diff --git "a/swe-bench-lite/mwaskom#seaborn#4a9e54962a29c12a8b103d75f838e0e795a6974d.graph.json" "b/swe-bench-lite/mwaskom#seaborn#4a9e54962a29c12a8b103d75f838e0e795a6974d.graph.json" new file mode 100644--- /dev/null +++ "b/swe-bench-lite/mwaskom#seaborn#4a9e54962a29c12a8b103d75f838e0e795a6974d.graph.json" @@ -0,0 +1 @@ +{"edges":[{"edgeType":"calls","source":4428,"target":1633},{"edgeType":"calls","source":4381,"target":976},{"edgeType":"calls","source":5239,"target":804},{"edgeType":"calls","source":5055,"target":1223},{"edgeType":"calls","source":3870,"target":961},{"edgeType":"calls","source":5294,"target":156},{"edgeType":"calls","source":3482,"target":305},{"edgeType":"calls","source":5761,"target":5763},{"edgeType":"calls","source":3433,"target":767},{"edgeType":"calls","source":1501,"target":407},{"edgeType":"calls","source":3823,"target":304},{"edgeType":"calls","source":5743,"target":1036},{"edgeType":"contains","source":74,"target":1736},{"edgeType":"calls","source":4756,"target":979},{"edgeType":"calls","source":3365,"target":1817},{"edgeType":"calls","source":3433,"target":766},{"edgeType":"calls","source":1966,"target":790},{"edgeType":"calls","source":3229,"target":1805},{"edgeType":"contains","source":5506,"target":5644},{"edgeType":"contains","source":1645,"target":1660},{"edgeType":"calls","source":2807,"target":89},{"edgeType":"calls","source":1061,"target":305},{"edgeType":"contains","source":1164,"target":1771},{"edgeType":"calls","source":870,"target":940},{"edgeType":"calls","source":4381,"target":975},{"edgeType":"calls","source":2938,"target":257},{"edgeType":"contains","source":3297,"target":3301},{"edgeType":"calls","source":4989,"target":2211},{"edgeType":"contains","source":3321,"target":3614},{"edgeType":"calls","source":4294,"target":501},{"edgeType":"calls","source":5239,"target":803},{"edgeType":"contains","source":3886,"target":896},{"edgeType":"calls","source":1501,"target":406},{"edgeType":"calls","source":5761,"target":5762},{"edgeType":"calls","source":3547,"target":405},{"edgeType":"calls","source":5717,"target":2898},{"edgeType":"calls","source":4756,"target":978},{"edgeType":"calls","source":4023,"target":447},{"edgeType":"calls","source":5521,"target":1574},{"edgeType":"contains","source":2207,"target":2209},{"edgeType":"contains","source":5506,"target":5645},{"edgeType":"calls","source":2043,"target":1573},{"edgeType":"contains","source":4747,"target":4859},{"edgeType":"contains","source":2915,"target":3515},{"edgeType":"calls","source":912,"target":1755},{"edgeType":"calls","source":4381,"target":974},{"edgeType":"contains","source":3886,"target":895},{"edgeType":"contains","source":4410,"target":4735},{"edgeType":"calls","source":1529,"target":598},{"edgeType":"contains","source":4153,"target":4245},{"edgeType":"calls","source":4690,"target":4080},{"edgeType":"contains","source":1645,"target":1658},{"edgeType":"calls","source":5389,"target":380},{"edgeType":"calls","source":2043,"target":1576},{"edgeType":"calls","source":2850,"target":1925},{"edgeType":"contains","source":3393,"target":3494},{"edgeType":"contains","source":1249,"target":1250},{"edgeType":"calls","source":4756,"target":977},{"edgeType":"calls","source":2954,"target":2930},{"edgeType":"calls","source":4381,"target":973},{"edgeType":"calls","source":994,"target":269},{"edgeType":"calls","source":5255,"target":305},{"edgeType":"calls","source":1409,"target":89},{"edgeType":"contains","source":3886,"target":894},{"edgeType":"calls","source":5697,"target":345},{"edgeType":"contains","source":4410,"target":4734},{"edgeType":"calls","source":1435,"target":1397},{"edgeType":"calls","source":3737,"target":1912},{"edgeType":"imports","source":4037,"target":1581},{"edgeType":"calls","source":4039,"target":2063},{"edgeType":"contains","source":5742,"target":445},{"edgeType":"contains","source":5506,"target":5647},{"edgeType":"calls","source":1913,"target":320},{"edgeType":"calls","source":1877,"target":1436},{"edgeType":"contains","source":1645,"target":1659},{"edgeType":"calls","source":3220,"target":1026},{"edgeType":"calls","source":4921,"target":89},{"edgeType":"calls","source":4756,"target":976},{"edgeType":"calls","source":4740,"target":4643},{"edgeType":"calls","source":3106,"target":329},{"edgeType":"calls","source":5193,"target":1169},{"edgeType":"contains","source":4410,"target":4741},{"edgeType":"contains","source":5114,"target":5115},{"edgeType":"calls","source":4381,"target":972},{"edgeType":"contains","source":256,"target":327},{"edgeType":"calls","source":5612,"target":1922},{"edgeType":"calls","source":1913,"target":315},{"edgeType":"calls","source":2043,"target":1570},{"edgeType":"contains","source":126,"target":129},{"edgeType":"contains","source":1988,"target":3716},{"edgeType":"calls","source":5533,"target":142},{"edgeType":"calls","source":3482,"target":300},{"edgeType":"contains","source":1189,"target":3116},{"edgeType":"calls","source":5383,"target":564},{"edgeType":"calls","source":4756,"target":975},{"edgeType":"contains","source":1117,"target":1118},{"edgeType":"calls","source":1755,"target":984},{"edgeType":"calls","source":5201,"target":920},{"edgeType":"calls","source":4381,"target":971},{"edgeType":"calls","source":4571,"target":366},{"edgeType":"calls","source":3985,"target":564},{"edgeType":"contains","source":1581,"target":478},{"edgeType":"contains","source":1671,"target":1916},{"edgeType":"imports","source":3811,"target":2247},{"edgeType":"calls","source":2043,"target":1569},{"edgeType":"contains","source":118,"target":1433},{"edgeType":"calls","source":4674,"target":345},{"edgeType":"calls","source":4756,"target":974},{"edgeType":"calls","source":2968,"target":380},{"edgeType":"contains","source":2888,"target":3299},{"edgeType":"calls","source":1061,"target":300},{"edgeType":"calls","source":1036,"target":1075},{"edgeType":"calls","source":5201,"target":919},{"edgeType":"imports","source":2886,"target":256},{"edgeType":"calls","source":2211,"target":589},{"edgeType":"contains","source":3871,"target":4535},{"edgeType":"calls","source":4851,"target":142},{"edgeType":"calls","source":2043,"target":1572},{"edgeType":"calls","source":3383,"target":1253},{"edgeType":"calls","source":5568,"target":1169},{"edgeType":"calls","source":5390,"target":345},{"edgeType":"calls","source":4756,"target":973},{"edgeType":"calls","source":3264,"target":1771},{"edgeType":"calls","source":3227,"target":804},{"edgeType":"calls","source":4955,"target":89},{"edgeType":"calls","source":2261,"target":2211},{"edgeType":"calls","source":1537,"target":345},{"edgeType":"contains","source":1645,"target":1663},{"edgeType":"calls","source":4104,"target":1101},{"edgeType":"contains","source":4019,"target":4174},{"edgeType":"calls","source":2043,"target":1571},{"edgeType":"contains","source":4178,"target":4531},{"edgeType":"calls","source":5543,"target":886},{"edgeType":"calls","source":5668,"target":1239},{"edgeType":"calls","source":5589,"target":1574},{"edgeType":"calls","source":4756,"target":972},{"edgeType":"calls","source":3227,"target":805},{"edgeType":"calls","source":5201,"target":918},{"edgeType":"calls","source":2962,"target":564},{"edgeType":"calls","source":1755,"target":981},{"edgeType":"calls","source":5330,"target":89},{"edgeType":"calls","source":997,"target":1224},{"edgeType":"contains","source":331,"target":2234},{"edgeType":"calls","source":4367,"target":345},{"edgeType":"calls","source":1946,"target":345},{"edgeType":"contains","source":1645,"target":1668},{"edgeType":"calls","source":2795,"target":453},{"edgeType":"calls","source":3582,"target":367},{"edgeType":"contains","source":2698,"target":4964},{"edgeType":"calls","source":5765,"target":345},{"edgeType":"calls","source":773,"target":769},{"edgeType":"calls","source":5537,"target":1071},{"edgeType":"contains","source":3958,"target":3959},{"edgeType":"calls","source":4756,"target":971},{"edgeType":"contains","source":4178,"target":4538},{"edgeType":"calls","source":5201,"target":917},{"edgeType":"calls","source":3067,"target":2591},{"edgeType":"calls","source":5255,"target":300},{"edgeType":"calls","source":3250,"target":89},{"edgeType":"imports","source":2569,"target":2698},{"edgeType":"contains","source":4410,"target":4744},{"edgeType":"calls","source":997,"target":1223},{"edgeType":"calls","source":4426,"target":3800},{"edgeType":"calls","source":1755,"target":980},{"edgeType":"calls","source":4721,"target":997},{"edgeType":"calls","source":2211,"target":588},{"edgeType":"calls","source":2795,"target":454},{"edgeType":"calls","source":4989,"target":89},{"edgeType":"contains","source":1910,"target":1911},{"edgeType":"contains","source":4621,"target":4545},{"edgeType":"calls","source":3227,"target":803},{"edgeType":"calls","source":5267,"target":984},{"edgeType":"calls","source":5201,"target":916},{"edgeType":"calls","source":4641,"target":305},{"edgeType":"calls","source":5342,"target":772},{"edgeType":"contains","source":259,"target":1297},{"edgeType":"calls","source":3181,"target":1169},{"edgeType":"calls","source":1755,"target":983},{"edgeType":"contains","source":4410,"target":4743},{"edgeType":"contains","source":5114,"target":5117},{"edgeType":"calls","source":1913,"target":313},{"edgeType":"calls","source":4434,"target":380},{"edgeType":"contains","source":3871,"target":4539},{"edgeType":"calls","source":1983,"target":257},{"edgeType":"calls","source":2043,"target":1568},{"edgeType":"calls","source":5702,"target":1239},{"edgeType":"calls","source":5665,"target":272},{"edgeType":"calls","source":5623,"target":1574},{"edgeType":"calls","source":1463,"target":521},{"edgeType":"calls","source":5708,"target":2110},{"edgeType":"calls","source":2795,"target":451},{"edgeType":"calls","source":4748,"target":2274},{"edgeType":"contains","source":54,"target":2367},{"edgeType":"contains","source":56,"target":2305},{"edgeType":"contains","source":42,"target":3796},{"edgeType":"calls","source":3521,"target":142},{"edgeType":"calls","source":3456,"target":2157},{"edgeType":"contains","source":331,"target":2236},{"edgeType":"calls","source":3170,"target":453},{"edgeType":"calls","source":5201,"target":915},{"edgeType":"calls","source":5267,"target":983},{"edgeType":"calls","source":1755,"target":982},{"edgeType":"contains","source":4410,"target":4742},{"edgeType":"contains","source":259,"target":1296},{"edgeType":"calls","source":2347,"target":598},{"edgeType":"contains","source":1645,"target":1667},{"edgeType":"contains","source":2734,"target":3847},{"edgeType":"calls","source":5642,"target":984},{"edgeType":"contains","source":3393,"target":3501},{"edgeType":"calls","source":2795,"target":452},{"edgeType":"contains","source":2910,"target":3676},{"edgeType":"calls","source":3413,"target":320},{"edgeType":"calls","source":5201,"target":914},{"edgeType":"contains","source":778,"target":1062},{"edgeType":"calls","source":5625,"target":454},{"edgeType":"calls","source":5267,"target":982},{"edgeType":"contains","source":2517,"target":1061},{"edgeType":"calls","source":3170,"target":454},{"edgeType":"calls","source":5361,"target":1239},{"edgeType":"calls","source":1214,"target":835},{"edgeType":"contains","source":1561,"target":2162},{"edgeType":"imports","source":2517,"target":78},{"edgeType":"calls","source":1755,"target":977},{"edgeType":"contains","source":2901,"target":2904},{"edgeType":"calls","source":3987,"target":1550},{"edgeType":"calls","source":1861,"target":1919},{"edgeType":"calls","source":2795,"target":448},{"edgeType":"contains","source":5114,"target":5123},{"edgeType":"contains","source":5506,"target":5648},{"edgeType":"calls","source":5691,"target":521},{"edgeType":"calls","source":2795,"target":449},{"edgeType":"calls","source":4919,"target":142},{"edgeType":"contains","source":52,"target":317},{"edgeType":"contains","source":3826,"target":3827},{"edgeType":"calls","source":5625,"target":453},{"edgeType":"calls","source":1755,"target":976},{"edgeType":"calls","source":3170,"target":451},{"edgeType":"calls","source":5642,"target":983},{"edgeType":"calls","source":5267,"target":981},{"edgeType":"calls","source":3556,"target":1169},{"edgeType":"contains","source":259,"target":1298},{"edgeType":"contains","source":1671,"target":1924},{"edgeType":"calls","source":820,"target":364},{"edgeType":"contains","source":5506,"target":5649},{"edgeType":"calls","source":3639,"target":1768},{"edgeType":"contains","source":4019,"target":4185},{"edgeType":"calls","source":5686,"target":2789},{"edgeType":"calls","source":2795,"target":450},{"edgeType":"calls","source":944,"target":748},{"edgeType":"contains","source":4747,"target":4871},{"edgeType":"calls","source":5016,"target":305},{"edgeType":"calls","source":5566,"target":1224},{"edgeType":"calls","source":5611,"target":886},{"edgeType":"calls","source":5625,"target":452},{"edgeType":"calls","source":1755,"target":975},{"edgeType":"calls","source":5267,"target":980},{"edgeType":"calls","source":1276,"target":1026},{"edgeType":"calls","source":3170,"target":452},{"edgeType":"calls","source":5642,"target":982},{"edgeType":"calls","source":5430,"target":2269},{"edgeType":"contains","source":5114,"target":5121},{"edgeType":"calls","source":1913,"target":309},{"edgeType":"calls","source":1755,"target":979},{"edgeType":"calls","source":4814,"target":4451},{"edgeType":"contains","source":5506,"target":5650},{"edgeType":"calls","source":2297,"target":1086},{"edgeType":"calls","source":4300,"target":302},{"edgeType":"contains","source":2698,"target":4966},{"edgeType":"contains","source":3871,"target":4544},{"edgeType":"calls","source":5625,"target":451},{"edgeType":"calls","source":3170,"target":449},{"edgeType":"calls","source":5267,"target":979},{"edgeType":"calls","source":3413,"target":315},{"edgeType":"calls","source":3753,"target":345},{"edgeType":"calls","source":1214,"target":837},{"edgeType":"calls","source":5642,"target":981},{"edgeType":"calls","source":5566,"target":1223},{"edgeType":"calls","source":1755,"target":978},{"edgeType":"calls","source":4814,"target":4450},{"edgeType":"contains","source":3208,"target":785},{"edgeType":"calls","source":2795,"target":447},{"edgeType":"calls","source":4813,"target":3424},{"edgeType":"calls","source":4641,"target":300},{"edgeType":"imports","source":3642,"target":81},{"edgeType":"contains","source":3871,"target":4543},{"edgeType":"calls","source":5267,"target":978},{"edgeType":"calls","source":3170,"target":450},{"edgeType":"contains","source":59,"target":101},{"edgeType":"contains","source":4153,"target":4257},{"edgeType":"calls","source":1214,"target":836},{"edgeType":"contains","source":2570,"target":2593},{"edgeType":"contains","source":2207,"target":2219},{"edgeType":"calls","source":5625,"target":450},{"edgeType":"calls","source":5642,"target":980},{"edgeType":"calls","source":1858,"target":984},{"edgeType":"contains","source":3658,"target":3720},{"edgeType":"calls","source":1204,"target":117},{"edgeType":"contains","source":5506,"target":5627},{"edgeType":"contains","source":2735,"target":2736},{"edgeType":"calls","source":4920,"target":2253},{"edgeType":"calls","source":4959,"target":1044},{"edgeType":"contains","source":4747,"target":4844},{"edgeType":"calls","source":2534,"target":1169},{"edgeType":"calls","source":1529,"target":1669},{"edgeType":"imports","source":4037,"target":1562},{"edgeType":"calls","source":4301,"target":302},{"edgeType":"calls","source":3039,"target":313},{"edgeType":"contains","source":341,"target":842},{"edgeType":"calls","source":5268,"target":979},{"edgeType":"calls","source":5295,"target":142},{"edgeType":"calls","source":3154,"target":976},{"edgeType":"contains","source":291,"target":1335},{"edgeType":"calls","source":5251,"target":449},{"edgeType":"calls","source":5325,"target":269},{"edgeType":"contains","source":2305,"target":2324},{"edgeType":"calls","source":1858,"target":983},{"edgeType":"calls","source":3823,"target":320},{"edgeType":"calls","source":5626,"target":451},{"edgeType":"calls","source":5609,"target":978},{"edgeType":"imports","source":2948,"target":437},{"edgeType":"contains","source":5506,"target":5628},{"edgeType":"calls","source":2289,"target":309},{"edgeType":"calls","source":2169,"target":858},{"edgeType":"calls","source":5251,"target":448},{"edgeType":"calls","source":5268,"target":978},{"edgeType":"calls","source":3154,"target":977},{"edgeType":"contains","source":3792,"target":3794},{"edgeType":"contains","source":259,"target":1269},{"edgeType":"imports","source":2374,"target":2375},{"edgeType":"calls","source":5502,"target":2180},{"edgeType":"calls","source":1858,"target":982},{"edgeType":"calls","source":1632,"target":1646},{"edgeType":"calls","source":5626,"target":450},{"edgeType":"calls","source":5609,"target":977},{"edgeType":"calls","source":4035,"target":89},{"edgeType":"calls","source":3250,"target":1169},{"edgeType":"calls","source":4798,"target":1805},{"edgeType":"calls","source":806,"target":830},{"edgeType":"calls","source":5045,"target":3662},{"edgeType":"contains","source":3924,"target":3929},{"edgeType":"calls","source":4376,"target":89},{"edgeType":"calls","source":5268,"target":977},{"edgeType":"calls","source":4258,"target":1633},{"edgeType":"calls","source":3154,"target":974},{"edgeType":"calls","source":5251,"target":447},{"edgeType":"calls","source":1817,"target":142},{"edgeType":"calls","source":5626,"target":449},{"edgeType":"calls","source":5609,"target":976},{"edgeType":"calls","source":5692,"target":1574},{"edgeType":"calls","source":1171,"target":1141},{"edgeType":"calls","source":477,"target":457},{"edgeType":"contains","source":1376,"target":1525},{"edgeType":"calls","source":4988,"target":142},{"edgeType":"calls","source":2504,"target":1041},{"edgeType":"calls","source":4470,"target":345},{"edgeType":"calls","source":5078,"target":2638},{"edgeType":"calls","source":4369,"target":305},{"edgeType":"calls","source":994,"target":286},{"edgeType":"calls","source":113,"target":114},{"edgeType":"contains","source":4747,"target":4840},{"edgeType":"calls","source":5268,"target":976},{"edgeType":"calls","source":3154,"target":975},{"edgeType":"contains","source":58,"target":103},{"edgeType":"calls","source":5626,"target":448},{"edgeType":"calls","source":5609,"target":975},{"edgeType":"calls","source":1505,"target":300},{"edgeType":"imports","source":291,"target":354},{"edgeType":"calls","source":3734,"target":964},{"edgeType":"calls","source":4721,"target":4190},{"edgeType":"calls","source":1995,"target":961},{"edgeType":"calls","source":5626,"target":447},{"edgeType":"calls","source":5609,"target":974},{"edgeType":"calls","source":4109,"target":964},{"edgeType":"calls","source":3456,"target":2180},{"edgeType":"calls","source":477,"target":452},{"edgeType":"imports","source":3333,"target":126},{"edgeType":"calls","source":3273,"target":454},{"edgeType":"contains","source":1189,"target":3099},{"edgeType":"calls","source":2572,"target":1044},{"edgeType":"calls","source":5173,"target":749},{"edgeType":"calls","source":3039,"target":309},{"edgeType":"calls","source":5078,"target":2637},{"edgeType":"calls","source":2289,"target":304},{"edgeType":"calls","source":5268,"target":975},{"edgeType":"calls","source":3154,"target":972},{"edgeType":"calls","source":2186,"target":2440},{"edgeType":"calls","source":1858,"target":979},{"edgeType":"calls","source":1830,"target":790},{"edgeType":"calls","source":5718,"target":2880},{"edgeType":"contains","source":1671,"target":1899},{"edgeType":"calls","source":4036,"target":3228},{"edgeType":"calls","source":1271,"target":1206},{"edgeType":"calls","source":5609,"target":973},{"edgeType":"calls","source":477,"target":451},{"edgeType":"imports","source":3056,"target":256},{"edgeType":"imports","source":3460,"target":416},{"edgeType":"contains","source":2888,"target":3283},{"edgeType":"calls","source":994,"target":1337},{"edgeType":"calls","source":4538,"target":349},{"edgeType":"calls","source":5186,"target":345},{"edgeType":"calls","source":4583,"target":1068},{"edgeType":"calls","source":351,"target":129},{"edgeType":"contains","source":341,"target":845},{"edgeType":"calls","source":5268,"target":974},{"edgeType":"calls","source":3154,"target":973},{"edgeType":"calls","source":2344,"target":1771},{"edgeType":"calls","source":4306,"target":1199},{"edgeType":"calls","source":5744,"target":1016},{"edgeType":"calls","source":1858,"target":978},{"edgeType":"calls","source":4021,"target":521},{"edgeType":"calls","source":4070,"target":3228},{"edgeType":"calls","source":5609,"target":972},{"edgeType":"calls","source":4847,"target":282},{"edgeType":"calls","source":477,"target":454},{"edgeType":"calls","source":3273,"target":1509},{"edgeType":"contains","source":5506,"target":5625},{"edgeType":"calls","source":3273,"target":452},{"edgeType":"calls","source":5126,"target":89},{"edgeType":"calls","source":3084,"target":1026},{"edgeType":"calls","source":5268,"target":973},{"edgeType":"contains","source":2374,"target":1244},{"edgeType":"calls","source":1858,"target":981},{"edgeType":"calls","source":5609,"target":971},{"edgeType":"calls","source":5570,"target":2180},{"edgeType":"contains","source":54,"target":2345},{"edgeType":"calls","source":477,"target":453},{"edgeType":"calls","source":3273,"target":453},{"edgeType":"calls","source":4721,"target":1016},{"edgeType":"contains","source":3034,"target":2983},{"edgeType":"calls","source":3225,"target":2998},{"edgeType":"calls","source":4785,"target":89},{"edgeType":"imports","source":1561,"target":89},{"edgeType":"contains","source":3057,"target":156},{"edgeType":"calls","source":892,"target":272},{"edgeType":"calls","source":3823,"target":315},{"edgeType":"calls","source":3093,"target":1805},{"edgeType":"calls","source":5268,"target":972},{"edgeType":"calls","source":3154,"target":971},{"edgeType":"contains","source":3329,"target":3351},{"edgeType":"calls","source":5744,"target":1014},{"edgeType":"contains","source":1645,"target":1647},{"edgeType":"calls","source":3728,"target":89},{"edgeType":"contains","source":1988,"target":3698},{"edgeType":"calls","source":1858,"target":980},{"edgeType":"contains","source":1988,"target":3703},{"edgeType":"calls","source":1334,"target":1364},{"edgeType":"calls","source":4930,"target":1935},{"edgeType":"calls","source":4833,"target":1771},{"edgeType":"calls","source":5738,"target":142},{"edgeType":"calls","source":1582,"target":1075},{"edgeType":"calls","source":5453,"target":521},{"edgeType":"calls","source":3039,"target":304},{"edgeType":"calls","source":5307,"target":2933},{"edgeType":"contains","source":317,"target":3709},{"edgeType":"calls","source":3273,"target":450},{"edgeType":"calls","source":5057,"target":1169},{"edgeType":"calls","source":5268,"target":971},{"edgeType":"contains","source":4410,"target":4728},{"edgeType":"calls","source":5271,"target":1935},{"edgeType":"calls","source":1858,"target":975},{"edgeType":"calls","source":4412,"target":3195},{"edgeType":"calls","source":2290,"target":269},{"edgeType":"calls","source":477,"target":448},{"edgeType":"calls","source":4023,"target":454},{"edgeType":"calls","source":4369,"target":300},{"edgeType":"contains","source":5506,"target":5636},{"edgeType":"contains","source":2698,"target":4949},{"edgeType":"contains","source":1988,"target":3704},{"edgeType":"calls","source":3273,"target":451},{"edgeType":"calls","source":1563,"target":606},{"edgeType":"calls","source":3293,"target":3002},{"edgeType":"imports","source":3641,"target":89},{"edgeType":"calls","source":1105,"target":1063},{"edgeType":"calls","source":3094,"target":1771},{"edgeType":"contains","source":2374,"target":2308},{"edgeType":"calls","source":3823,"target":313},{"edgeType":"calls","source":3802,"target":964},{"edgeType":"calls","source":1858,"target":974},{"edgeType":"imports","source":3403,"target":81},{"edgeType":"calls","source":4721,"target":1014},{"edgeType":"contains","source":3057,"target":1219},{"edgeType":"calls","source":1776,"target":345},{"edgeType":"calls","source":3714,"target":521},{"edgeType":"calls","source":2160,"target":2186},{"edgeType":"calls","source":477,"target":447},{"edgeType":"calls","source":4381,"target":984},{"edgeType":"calls","source":4371,"target":1294},{"edgeType":"calls","source":4104,"target":1115},{"edgeType":"contains","source":3359,"target":3482},{"edgeType":"calls","source":5605,"target":1092},{"edgeType":"contains","source":1273,"target":1554},{"edgeType":"calls","source":2812,"target":997},{"edgeType":"calls","source":862,"target":142},{"edgeType":"calls","source":4819,"target":89},{"edgeType":"calls","source":892,"target":269},{"edgeType":"imports","source":2948,"target":444},{"edgeType":"calls","source":3273,"target":448},{"edgeType":"calls","source":995,"target":1304},{"edgeType":"calls","source":4023,"target":452},{"edgeType":"calls","source":1548,"target":1074},{"edgeType":"calls","source":477,"target":450},{"edgeType":"calls","source":2590,"target":2594},{"edgeType":"contains","source":1546,"target":1548},{"edgeType":"calls","source":4371,"target":1293},{"edgeType":"calls","source":4381,"target":983},{"edgeType":"calls","source":1858,"target":977},{"edgeType":"calls","source":1993,"target":2077},{"edgeType":"calls","source":5045,"target":481},{"edgeType":"calls","source":773,"target":786},{"edgeType":"calls","source":5772,"target":1199},{"edgeType":"contains","source":1273,"target":1555},{"edgeType":"calls","source":4838,"target":3727},{"edgeType":"contains","source":4178,"target":4518},{"edgeType":"calls","source":1548,"target":1073},{"edgeType":"contains","source":4953,"target":4805},{"edgeType":"calls","source":3273,"target":449},{"edgeType":"calls","source":1300,"target":305},{"edgeType":"calls","source":995,"target":1303},{"edgeType":"contains","source":259,"target":1279},{"edgeType":"calls","source":4756,"target":984},{"edgeType":"calls","source":5746,"target":5176},{"edgeType":"calls","source":477,"target":449},{"edgeType":"contains","source":3321,"target":3603},{"edgeType":"calls","source":4023,"target":453},{"edgeType":"calls","source":1858,"target":976},{"edgeType":"contains","source":3709,"target":4259},{"edgeType":"calls","source":4381,"target":982},{"edgeType":"calls","source":4371,"target":1292},{"edgeType":"contains","source":5506,"target":5631},{"edgeType":"calls","source":5020,"target":3369},{"edgeType":"contains","source":3865,"target":4715},{"edgeType":"calls","source":2882,"target":1996},{"edgeType":"contains","source":62,"target":1047},{"edgeType":"calls","source":1300,"target":300},{"edgeType":"contains","source":59,"target":83},{"edgeType":"calls","source":2988,"target":2938},{"edgeType":"contains","source":2531,"target":2730},{"edgeType":"calls","source":1564,"target":1629},{"edgeType":"contains","source":4410,"target":4733},{"edgeType":"calls","source":3272,"target":2591},{"edgeType":"calls","source":1543,"target":1223},{"edgeType":"contains","source":3644,"target":4167},{"edgeType":"calls","source":1858,"target":971},{"edgeType":"imports","source":1280,"target":354},{"edgeType":"calls","source":4756,"target":983},{"edgeType":"imports","source":3437,"target":81},{"edgeType":"contains","source":3591,"target":3696},{"edgeType":"contains","source":2910,"target":3665},{"edgeType":"calls","source":3985,"target":3742},{"edgeType":"calls","source":4023,"target":450},{"edgeType":"calls","source":3877,"target":1805},{"edgeType":"calls","source":2043,"target":1578},{"edgeType":"calls","source":4381,"target":981},{"edgeType":"calls","source":4371,"target":1291},{"edgeType":"calls","source":4374,"target":1198},{"edgeType":"calls","source":4437,"target":302},{"edgeType":"calls","source":806,"target":814},{"edgeType":"calls","source":3666,"target":948},{"edgeType":"calls","source":5714,"target":5109},{"edgeType":"contains","source":2734,"target":3837},{"edgeType":"contains","source":62,"target":1046},{"edgeType":"calls","source":5288,"target":345},{"edgeType":"contains","source":1988,"target":3708},{"edgeType":"contains","source":4410,"target":4732},{"edgeType":"calls","source":3273,"target":447},{"edgeType":"calls","source":1557,"target":788},{"edgeType":"calls","source":4756,"target":982},{"edgeType":"calls","source":4671,"target":4674},{"edgeType":"calls","source":4023,"target":451},{"edgeType":"calls","source":3823,"target":309},{"edgeType":"calls","source":2051,"target":272},{"edgeType":"calls","source":1992,"target":1044},{"edgeType":"calls","source":2043,"target":1577},{"edgeType":"calls","source":4231,"target":345},{"edgeType":"calls","source":4574,"target":282},{"edgeType":"calls","source":4381,"target":980},{"edgeType":"calls","source":4371,"target":1290},{"edgeType":"contains","source":5506,"target":5633},{"edgeType":"calls","source":2940,"target":1253},{"edgeType":"calls","source":4381,"target":978},{"edgeType":"contains","source":2735,"target":2746},{"edgeType":"contains","source":2698,"target":4950},{"edgeType":"calls","source":5746,"target":5173},{"edgeType":"contains","source":1988,"target":3705},{"edgeType":"calls","source":4955,"target":2211},{"edgeType":"calls","source":1564,"target":1631},{"edgeType":"contains","source":255,"target":1409},{"edgeType":"contains","source":258,"target":259},{"edgeType":"calls","source":4023,"target":448},{"edgeType":"calls","source":5461,"target":266},{"edgeType":"imports","source":1280,"target":352},{"edgeType":"calls","source":4756,"target":981},{"edgeType":"calls","source":1661,"target":1795},{"edgeType":"calls","source":1858,"target":973},{"edgeType":"calls","source":4585,"target":997},{"edgeType":"calls","source":4381,"target":979},{"edgeType":"calls","source":4371,"target":1289},{"edgeType":"calls","source":4381,"target":977},{"edgeType":"imports","source":2374,"target":263},{"edgeType":"calls","source":2273,"target":790},{"edgeType":"contains","source":1988,"target":3706},{"edgeType":"calls","source":5055,"target":1224},{"edgeType":"calls","source":5239,"target":805},{"edgeType":"contains","source":62,"target":1048},{"edgeType":"calls","source":1564,"target":1630},{"edgeType":"calls","source":5487,"target":1574},{"edgeType":"calls","source":1543,"target":1224},{"edgeType":"calls","source":5569,"target":89},{"edgeType":"calls","source":4756,"target":980},{"edgeType":"calls","source":1165,"target":257},{"edgeType":"calls","source":1923,"target":1071},{"edgeType":"calls","source":4023,"target":449},{"edgeType":"calls","source":1858,"target":972},{"edgeType":"contains","source":3865,"target":4686},{"edgeType":"calls","source":2998,"target":477},{"edgeType":"calls","source":4285,"target":1805},{"edgeType":"calls","source":5186,"target":300},{"edgeType":"calls","source":5288,"target":309},{"edgeType":"imports","source":1781,"target":1782},{"edgeType":"calls","source":3967,"target":1092},{"edgeType":"calls","source":5520,"target":1574},{"edgeType":"calls","source":1877,"target":345},{"edgeType":"contains","source":5506,"target":5611},{"edgeType":"calls","source":2828,"target":462},{"edgeType":"contains","source":4747,"target":4827},{"edgeType":"calls","source":997,"target":1199},{"edgeType":"calls","source":4736,"target":4737},{"edgeType":"contains","source":1189,"target":3079},{"edgeType":"contains","source":3230,"target":3231},{"edgeType":"calls","source":4504,"target":300},{"edgeType":"imports","source":4654,"target":1512},{"edgeType":"contains","source":2533,"target":2640},{"edgeType":"calls","source":5696,"target":345},{"edgeType":"calls","source":3528,"target":961},{"edgeType":"calls","source":3510,"target":462},{"edgeType":"calls","source":3823,"target":272},{"edgeType":"calls","source":5508,"target":887},{"edgeType":"calls","source":1993,"target":2033},{"edgeType":"contains","source":2829,"target":4034},{"edgeType":"calls","source":5533,"target":1169},{"edgeType":"contains","source":4319,"target":4353},{"edgeType":"contains","source":5506,"target":5612},{"edgeType":"calls","source":5342,"target":1805},{"edgeType":"contains","source":1273,"target":1533},{"edgeType":"calls","source":4820,"target":1075},{"edgeType":"calls","source":4413,"target":2063},{"edgeType":"contains","source":3329,"target":3330},{"edgeType":"contains","source":1189,"target":2023},{"edgeType":"calls","source":3112,"target":1169},{"edgeType":"calls","source":2443,"target":767},{"edgeType":"calls","source":5301,"target":961},{"edgeType":"calls","source":5292,"target":1240},{"edgeType":"calls","source":5611,"target":1922},{"edgeType":"imports","source":3811,"target":3334},{"edgeType":"calls","source":5753,"target":691},{"edgeType":"contains","source":2305,"target":1249},{"edgeType":"calls","source":5508,"target":886},{"edgeType":"calls","source":5532,"target":142},{"edgeType":"calls","source":3430,"target":2938},{"edgeType":"imports","source":889,"target":891},{"edgeType":"calls","source":5327,"target":2269},{"edgeType":"calls","source":3189,"target":896},{"edgeType":"calls","source":5195,"target":1075},{"edgeType":"imports","source":3437,"target":124},{"edgeType":"contains","source":4747,"target":4824},{"edgeType":"imports","source":337,"target":1092},{"edgeType":"contains","source":4153,"target":4211},{"edgeType":"calls","source":5604,"target":3195},{"edgeType":"calls","source":5626,"target":1456},{"edgeType":"contains","source":25,"target":3223},{"edgeType":"contains","source":3658,"target":3701},{"edgeType":"contains","source":2305,"target":1250},{"edgeType":"contains","source":1512,"target":1521},{"edgeType":"contains","source":5506,"target":5614},{"edgeType":"calls","source":2006,"target":1632},{"edgeType":"contains","source":778,"target":1021},{"edgeType":"contains","source":1671,"target":1877},{"edgeType":"calls","source":4986,"target":2269},{"edgeType":"imports","source":3403,"target":120},{"edgeType":"calls","source":4851,"target":1169},{"edgeType":"calls","source":5361,"target":156},{"edgeType":"contains","source":2305,"target":2312},{"edgeType":"calls","source":3383,"target":1222},{"edgeType":"contains","source":5674,"target":5684},{"edgeType":"calls","source":5389,"target":345},{"edgeType":"contains","source":5506,"target":5607},{"edgeType":"calls","source":4622,"target":1925},{"edgeType":"calls","source":3189,"target":894},{"edgeType":"calls","source":2963,"target":501},{"edgeType":"calls","source":1777,"target":269},{"edgeType":"calls","source":5288,"target":304},{"edgeType":"calls","source":2443,"target":766},{"edgeType":"contains","source":2305,"target":2313},{"edgeType":"calls","source":5753,"target":688},{"edgeType":"calls","source":4104,"target":1070},{"edgeType":"imports","source":889,"target":890},{"edgeType":"calls","source":5542,"target":886},{"edgeType":"contains","source":5674,"target":5685},{"edgeType":"contains","source":5724,"target":4135},{"edgeType":"contains","source":4747,"target":4830},{"edgeType":"calls","source":3189,"target":895},{"edgeType":"calls","source":5099,"target":1935},{"edgeType":"calls","source":4947,"target":305},{"edgeType":"calls","source":5057,"target":2180},{"edgeType":"calls","source":3154,"target":920},{"edgeType":"calls","source":1713,"target":142},{"edgeType":"calls","source":5329,"target":89},{"edgeType":"contains","source":2305,"target":2310},{"edgeType":"contains","source":1710,"target":1728},{"edgeType":"calls","source":4366,"target":345},{"edgeType":"contains","source":2040,"target":2068},{"edgeType":"contains","source":1988,"target":3680},{"edgeType":"imports","source":3385,"target":2789},{"edgeType":"calls","source":5266,"target":984},{"edgeType":"calls","source":1511,"target":3232},{"edgeType":"imports","source":96,"target":102},{"edgeType":"imports","source":2305,"target":329},{"edgeType":"calls","source":3652,"target":282},{"edgeType":"calls","source":4256,"target":3754},{"edgeType":"calls","source":3931,"target":89},{"edgeType":"calls","source":4039,"target":969},{"edgeType":"calls","source":3495,"target":920},{"edgeType":"calls","source":3379,"target":3459},{"edgeType":"calls","source":5766,"target":282},{"edgeType":"calls","source":2879,"target":990},{"edgeType":"calls","source":5249,"target":454},{"edgeType":"calls","source":405,"target":516},{"edgeType":"calls","source":4638,"target":367},{"edgeType":"calls","source":1024,"target":354},{"edgeType":"calls","source":1013,"target":695},{"edgeType":"calls","source":1777,"target":266},{"edgeType":"calls","source":1951,"target":1214},{"edgeType":"calls","source":4016,"target":2736},{"edgeType":"calls","source":2201,"target":864},{"edgeType":"calls","source":5622,"target":1574},{"edgeType":"contains","source":4747,"target":4835},{"edgeType":"calls","source":3572,"target":2758},{"edgeType":"calls","source":5609,"target":920},{"edgeType":"calls","source":5701,"target":1239},{"edgeType":"calls","source":5651,"target":2789},{"edgeType":"calls","source":5707,"target":2110},{"edgeType":"calls","source":5266,"target":983},{"edgeType":"calls","source":5249,"target":453},{"edgeType":"calls","source":3917,"target":521},{"edgeType":"calls","source":3711,"target":3736},{"edgeType":"calls","source":2269,"target":1928},{"edgeType":"contains","source":3641,"target":5295},{"edgeType":"contains","source":3709,"target":4244},{"edgeType":"calls","source":5624,"target":454},{"edgeType":"calls","source":3330,"target":1805},{"edgeType":"calls","source":5109,"target":564},{"edgeType":"calls","source":1564,"target":1582},{"edgeType":"calls","source":5249,"target":452},{"edgeType":"calls","source":5422,"target":1431},{"edgeType":"calls","source":5266,"target":982},{"edgeType":"calls","source":3820,"target":354},{"edgeType":"calls","source":1945,"target":345},{"edgeType":"contains","source":3709,"target":4243},{"edgeType":"calls","source":1978,"target":1436},{"edgeType":"calls","source":4427,"target":564},{"edgeType":"imports","source":57,"target":266},{"edgeType":"calls","source":4947,"target":300},{"edgeType":"calls","source":2847,"target":920},{"edgeType":"calls","source":1602,"target":407},{"edgeType":"imports","source":3642,"target":1166},{"edgeType":"contains","source":4316,"target":4453},{"edgeType":"calls","source":5624,"target":453},{"edgeType":"calls","source":5266,"target":981},{"edgeType":"calls","source":5249,"target":451},{"edgeType":"calls","source":3489,"target":1101},{"edgeType":"calls","source":3377,"target":345},{"edgeType":"calls","source":4715,"target":2205},{"edgeType":"calls","source":4308,"target":3195},{"edgeType":"calls","source":5706,"target":2138},{"edgeType":"contains","source":58,"target":95},{"edgeType":"calls","source":1602,"target":406},{"edgeType":"calls","source":5249,"target":450},{"edgeType":"calls","source":5624,"target":452},{"edgeType":"calls","source":5162,"target":1033},{"edgeType":"calls","source":5266,"target":980},{"edgeType":"contains","source":4747,"target":4832},{"edgeType":"calls","source":5397,"target":89},{"edgeType":"calls","source":1013,"target":691},{"edgeType":"calls","source":2005,"target":593},{"edgeType":"calls","source":2722,"target":564},{"edgeType":"calls","source":4434,"target":345},{"edgeType":"imports","source":57,"target":263},{"edgeType":"contains","source":1989,"target":1546},{"edgeType":"contains","source":1285,"target":115},{"edgeType":"contains","source":5506,"target":5615},{"edgeType":"contains","source":1988,"target":3691},{"edgeType":"calls","source":5624,"target":451},{"edgeType":"contains","source":4153,"target":4227},{"edgeType":"calls","source":5266,"target":979},{"edgeType":"calls","source":5249,"target":449},{"edgeType":"imports","source":889,"target":897},{"edgeType":"calls","source":1644,"target":1213},{"edgeType":"calls","source":5420,"target":1489},{"edgeType":"imports","source":2517,"target":110},{"edgeType":"calls","source":4080,"target":749},{"edgeType":"contains","source":3591,"target":3678},{"edgeType":"calls","source":4393,"target":3729},{"edgeType":"contains","source":5741,"target":445},{"edgeType":"calls","source":2160,"target":1075},{"edgeType":"calls","source":2186,"target":269},{"edgeType":"calls","source":5115,"target":1431},{"edgeType":"imports","source":2305,"target":340},{"edgeType":"calls","source":5249,"target":448},{"edgeType":"calls","source":5624,"target":450},{"edgeType":"calls","source":3023,"target":1805},{"edgeType":"calls","source":5266,"target":978},{"edgeType":"calls","source":1644,"target":1212},{"edgeType":"contains","source":2305,"target":2321},{"edgeType":"contains","source":3709,"target":4247},{"edgeType":"calls","source":4033,"target":89},{"edgeType":"calls","source":1145,"target":829},{"edgeType":"calls","source":3319,"target":2139},{"edgeType":"contains","source":3814,"target":3106},{"edgeType":"contains","source":2910,"target":3647},{"edgeType":"calls","source":4796,"target":1805},{"edgeType":"calls","source":4482,"target":969},{"edgeType":"calls","source":2572,"target":984},{"edgeType":"imports","source":57,"target":261},{"edgeType":"calls","source":2935,"target":302},{"edgeType":"calls","source":4374,"target":89},{"edgeType":"contains","source":3924,"target":3925},{"edgeType":"contains","source":1988,"target":3689},{"edgeType":"calls","source":5266,"target":977},{"edgeType":"calls","source":5249,"target":447},{"edgeType":"calls","source":5279,"target":1631},{"edgeType":"calls","source":5518,"target":564},{"edgeType":"calls","source":5772,"target":89},{"edgeType":"contains","source":344,"target":747},{"edgeType":"calls","source":5644,"target":886},{"edgeType":"calls","source":5624,"target":449},{"edgeType":"calls","source":5431,"target":89},{"edgeType":"imports","source":57,"target":262},{"edgeType":"calls","source":2701,"target":1214},{"edgeType":"calls","source":4520,"target":847},{"edgeType":"calls","source":4367,"target":305},{"edgeType":"contains","source":3958,"target":3927},{"edgeType":"calls","source":5279,"target":1630},{"edgeType":"calls","source":5266,"target":976},{"edgeType":"contains","source":4178,"target":4506},{"edgeType":"calls","source":5535,"target":2150},{"edgeType":"calls","source":5624,"target":448},{"edgeType":"contains","source":259,"target":1267},{"edgeType":"calls","source":5648,"target":2875},{"edgeType":"calls","source":5692,"target":454},{"edgeType":"imports","source":3717,"target":944},{"edgeType":"calls","source":3362,"target":837},{"edgeType":"calls","source":5519,"target":564},{"edgeType":"calls","source":3413,"target":313},{"edgeType":"contains","source":4316,"target":4430},{"edgeType":"calls","source":4814,"target":4449},{"edgeType":"calls","source":4653,"target":984},{"edgeType":"contains","source":3871,"target":4484},{"edgeType":"calls","source":4297,"target":2507},{"edgeType":"calls","source":141,"target":269},{"edgeType":"calls","source":2191,"target":142},{"edgeType":"calls","source":3170,"target":447},{"edgeType":"calls","source":5645,"target":886},{"edgeType":"calls","source":5642,"target":979},{"edgeType":"contains","source":2040,"target":2050},{"edgeType":"calls","source":5267,"target":977},{"edgeType":"calls","source":3431,"target":2926},{"edgeType":"calls","source":3382,"target":3388},{"edgeType":"calls","source":3993,"target":302},{"edgeType":"calls","source":1506,"target":1292},{"edgeType":"calls","source":5773,"target":89},{"edgeType":"calls","source":5625,"target":449},{"edgeType":"contains","source":4078,"target":4409},{"edgeType":"calls","source":1755,"target":972},{"edgeType":"contains","source":851,"target":854},{"edgeType":"calls","source":4074,"target":964},{"edgeType":"calls","source":4814,"target":4448},{"edgeType":"calls","source":5016,"target":300},{"edgeType":"calls","source":4653,"target":983},{"edgeType":"calls","source":4822,"target":1029},{"edgeType":"contains","source":5442,"target":5462},{"edgeType":"calls","source":4368,"target":305},{"edgeType":"calls","source":4334,"target":302},{"edgeType":"calls","source":5267,"target":976},{"edgeType":"calls","source":3170,"target":448},{"edgeType":"contains","source":1710,"target":1711},{"edgeType":"calls","source":5642,"target":978},{"edgeType":"calls","source":5296,"target":2191},{"edgeType":"contains","source":5740,"target":5741},{"edgeType":"calls","source":1506,"target":1291},{"edgeType":"calls","source":5625,"target":448},{"edgeType":"contains","source":4078,"target":4408},{"edgeType":"calls","source":1755,"target":971},{"edgeType":"calls","source":5649,"target":2875},{"edgeType":"contains","source":4178,"target":4479},{"edgeType":"calls","source":1214,"target":833},{"edgeType":"calls","source":1993,"target":2053},{"edgeType":"contains","source":3884,"target":907},{"edgeType":"calls","source":3362,"target":835},{"edgeType":"calls","source":4653,"target":982},{"edgeType":"calls","source":4814,"target":4447},{"edgeType":"calls","source":112,"target":113},{"edgeType":"calls","source":5267,"target":975},{"edgeType":"calls","source":1755,"target":974},{"edgeType":"calls","source":5651,"target":2812},{"edgeType":"contains","source":5740,"target":5742},{"edgeType":"calls","source":2180,"target":481},{"edgeType":"calls","source":5642,"target":977},{"edgeType":"calls","source":5643,"target":946},{"edgeType":"imports","source":96,"target":89},{"edgeType":"contains","source":2570,"target":1473},{"edgeType":"calls","source":1817,"target":1166},{"edgeType":"calls","source":5625,"target":447},{"edgeType":"contains","source":4078,"target":4407},{"edgeType":"calls","source":1506,"target":1294},{"edgeType":"calls","source":1214,"target":832},{"edgeType":"calls","source":4798,"target":1771},{"edgeType":"calls","source":3362,"target":836},{"edgeType":"calls","source":1922,"target":2139},{"edgeType":"calls","source":1913,"target":304},{"edgeType":"calls","source":4027,"target":305},{"edgeType":"contains","source":2833,"target":2835},{"edgeType":"calls","source":2085,"target":257},{"edgeType":"calls","source":4653,"target":981},{"edgeType":"contains","source":1331,"target":2887},{"edgeType":"calls","source":5022,"target":1169},{"edgeType":"calls","source":2567,"target":1169},{"edgeType":"calls","source":4814,"target":4446},{"edgeType":"calls","source":4831,"target":1805},{"edgeType":"calls","source":5201,"target":906},{"edgeType":"contains","source":5442,"target":5460},{"edgeType":"calls","source":5267,"target":974},{"edgeType":"calls","source":1755,"target":973},{"edgeType":"contains","source":4178,"target":4477},{"edgeType":"calls","source":5743,"target":1016},{"edgeType":"calls","source":5642,"target":976},{"edgeType":"contains","source":4078,"target":4406},{"edgeType":"contains","source":4410,"target":4684},{"edgeType":"calls","source":1506,"target":1293},{"edgeType":"contains","source":5674,"target":5675},{"edgeType":"calls","source":3652,"target":302},{"edgeType":"calls","source":4130,"target":1337},{"edgeType":"calls","source":4871,"target":564},{"edgeType":"calls","source":4846,"target":282},{"edgeType":"imports","source":3641,"target":2247},{"edgeType":"calls","source":4149,"target":1805},{"edgeType":"calls","source":3362,"target":833},{"edgeType":"calls","source":5642,"target":975},{"edgeType":"contains","source":3393,"target":3450},{"edgeType":"calls","source":3430,"target":2953},{"edgeType":"calls","source":3413,"target":309},{"edgeType":"calls","source":2941,"target":142},{"edgeType":"contains","source":4683,"target":4685},{"edgeType":"contains","source":1273,"target":1519},{"edgeType":"calls","source":3227,"target":790},{"edgeType":"contains","source":2698,"target":2797},{"edgeType":"calls","source":4653,"target":980},{"edgeType":"contains","source":2829,"target":4021},{"edgeType":"calls","source":4814,"target":4445},{"edgeType":"calls","source":3096,"target":1680},{"edgeType":"contains","source":4581,"target":4675},{"edgeType":"calls","source":5267,"target":973},{"edgeType":"contains","source":4410,"target":4691},{"edgeType":"calls","source":2410,"target":1805},{"edgeType":"contains","source":5442,"target":5467},{"edgeType":"calls","source":1908,"target":453},{"edgeType":"calls","source":3686,"target":302},{"edgeType":"contains","source":1671,"target":1866},{"edgeType":"contains","source":1988,"target":3666},{"edgeType":"contains","source":11,"target":1530},{"edgeType":"contains","source":785,"target":790},{"edgeType":"calls","source":4036,"target":3195},{"edgeType":"calls","source":5642,"target":974},{"edgeType":"calls","source":520,"target":142},{"edgeType":"calls","source":5376,"target":3935},{"edgeType":"calls","source":4653,"target":979},{"edgeType":"calls","source":907,"target":829},{"edgeType":"calls","source":4814,"target":4444},{"edgeType":"calls","source":5267,"target":972},{"edgeType":"calls","source":2289,"target":272},{"edgeType":"contains","source":4481,"target":4603},{"edgeType":"imports","source":2115,"target":920},{"edgeType":"contains","source":5442,"target":5466},{"edgeType":"calls","source":1908,"target":452},{"edgeType":"calls","source":5689,"target":1631},{"edgeType":"calls","source":5743,"target":1014},{"edgeType":"calls","source":3621,"target":2318},{"edgeType":"contains","source":3871,"target":4487},{"edgeType":"calls","source":2029,"target":1986},{"edgeType":"contains","source":3591,"target":3652},{"edgeType":"calls","source":5689,"target":1630},{"edgeType":"calls","source":5737,"target":142},{"edgeType":"calls","source":5642,"target":973},{"edgeType":"calls","source":1366,"target":345},{"edgeType":"contains","source":3871,"target":4486},{"edgeType":"calls","source":3093,"target":1771},{"edgeType":"contains","source":4581,"target":4673},{"edgeType":"calls","source":5267,"target":971},{"edgeType":"calls","source":5288,"target":320},{"edgeType":"calls","source":4653,"target":978},{"edgeType":"contains","source":5442,"target":5465},{"edgeType":"calls","source":4368,"target":300},{"edgeType":"calls","source":1506,"target":1290},{"edgeType":"calls","source":2289,"target":269},{"edgeType":"contains","source":3884,"target":912},{"edgeType":"calls","source":2153,"target":257},{"edgeType":"calls","source":4196,"target":345},{"edgeType":"calls","source":4189,"target":564},{"edgeType":"calls","source":2003,"target":2795},{"edgeType":"contains","source":4286,"target":4304},{"edgeType":"calls","source":5689,"target":1629},{"edgeType":"contains","source":3658,"target":3688},{"edgeType":"calls","source":3362,"target":832},{"edgeType":"calls","source":5642,"target":972},{"edgeType":"calls","source":5500,"target":89},{"edgeType":"calls","source":4715,"target":1169},{"edgeType":"contains","source":4749,"target":4750},{"edgeType":"imports","source":3385,"target":2772},{"edgeType":"contains","source":2932,"target":2941},{"edgeType":"imports","source":3972,"target":446},{"edgeType":"calls","source":4653,"target":977},{"edgeType":"calls","source":1543,"target":1199},{"edgeType":"contains","source":5442,"target":5464},{"edgeType":"calls","source":4027,"target":300},{"edgeType":"calls","source":1506,"target":1289},{"edgeType":"calls","source":4436,"target":305},{"edgeType":"contains","source":1606,"target":1766},{"edgeType":"contains","source":1710,"target":1713},{"edgeType":"calls","source":2069,"target":1805},{"edgeType":"calls","source":4070,"target":3195},{"edgeType":"calls","source":1908,"target":454},{"edgeType":"calls","source":1432,"target":407},{"edgeType":"contains","source":1376,"target":1501},{"edgeType":"calls","source":5642,"target":971},{"edgeType":"contains","source":2040,"target":2058},{"edgeType":"contains","source":4747,"target":4819},{"edgeType":"calls","source":4933,"target":1809},{"edgeType":"calls","source":5420,"target":454},{"edgeType":"contains","source":4581,"target":4680},{"edgeType":"contains","source":259,"target":1245},{"edgeType":"calls","source":1908,"target":449},{"edgeType":"calls","source":1897,"target":790},{"edgeType":"calls","source":4653,"target":976},{"edgeType":"imports","source":1238,"target":1693},{"edgeType":"contains","source":1512,"target":1514},{"edgeType":"contains","source":5674,"target":5680},{"edgeType":"calls","source":4285,"target":3928},{"edgeType":"calls","source":4374,"target":1169},{"edgeType":"contains","source":2040,"target":2059},{"edgeType":"calls","source":1432,"target":406},{"edgeType":"calls","source":4963,"target":1935},{"edgeType":"contains","source":4316,"target":4437},{"edgeType":"contains","source":2888,"target":3254},{"edgeType":"calls","source":3039,"target":272},{"edgeType":"calls","source":1557,"target":759},{"edgeType":"calls","source":5332,"target":5295},{"edgeType":"calls","source":5420,"target":453},{"edgeType":"contains","source":4683,"target":4688},{"edgeType":"contains","source":2531,"target":2694},{"edgeType":"contains","source":4581,"target":4679},{"edgeType":"calls","source":5311,"target":1718},{"edgeType":"calls","source":2444,"target":1805},{"edgeType":"calls","source":1908,"target":448},{"edgeType":"calls","source":4653,"target":975},{"edgeType":"calls","source":4033,"target":1169},{"edgeType":"contains","source":5442,"target":5470},{"edgeType":"contains","source":3658,"target":3695},{"edgeType":"calls","source":5534,"target":89},{"edgeType":"calls","source":3328,"target":2938},{"edgeType":"calls","source":3039,"target":269},{"edgeType":"calls","source":5452,"target":1574},{"edgeType":"contains","source":2910,"target":3626},{"edgeType":"calls","source":5055,"target":2253},{"edgeType":"calls","source":5288,"target":315},{"edgeType":"calls","source":5420,"target":452},{"edgeType":"calls","source":5338,"target":1937},{"edgeType":"calls","source":4653,"target":974},{"edgeType":"calls","source":4571,"target":345},{"edgeType":"contains","source":330,"target":2217},{"edgeType":"imports","source":2374,"target":2415},{"edgeType":"calls","source":4673,"target":4582},{"edgeType":"contains","source":1606,"target":1769},{"edgeType":"calls","source":4426,"target":3783},{"edgeType":"calls","source":1908,"target":451},{"edgeType":"calls","source":5652,"target":2772},{"edgeType":"calls","source":3702,"target":858},{"edgeType":"calls","source":5713,"target":5109},{"edgeType":"contains","source":4316,"target":4435},{"edgeType":"calls","source":3351,"target":1169},{"edgeType":"calls","source":3413,"target":304},{"edgeType":"calls","source":5216,"target":1489},{"edgeType":"calls","source":5186,"target":305},{"edgeType":"calls","source":1271,"target":1171},{"edgeType":"calls","source":5420,"target":451},{"edgeType":"calls","source":1130,"target":257},{"edgeType":"calls","source":4653,"target":973},{"edgeType":"calls","source":3244,"target":257},{"edgeType":"calls","source":1808,"target":1436},{"edgeType":"imports","source":2374,"target":2414},{"edgeType":"contains","source":3658,"target":3693},{"edgeType":"contains","source":3321,"target":3570},{"edgeType":"contains","source":1512,"target":1513},{"edgeType":"contains","source":5442,"target":5468},{"edgeType":"calls","source":1908,"target":450},{"edgeType":"calls","source":2289,"target":266},{"edgeType":"calls","source":2882,"target":1963},{"edgeType":"calls","source":5124,"target":1169},{"edgeType":"calls","source":5745,"target":5173},{"edgeType":"contains","source":25,"target":3218},{"edgeType":"calls","source":1271,"target":1166},{"edgeType":"calls","source":5288,"target":313},{"edgeType":"calls","source":3499,"target":806},{"edgeType":"calls","source":5420,"target":450},{"edgeType":"calls","source":5420,"target":449},{"edgeType":"contains","source":3658,"target":3700},{"edgeType":"calls","source":4653,"target":972},{"edgeType":"calls","source":4436,"target":300},{"edgeType":"calls","source":2152,"target":282},{"edgeType":"calls","source":4933,"target":1804},{"edgeType":"calls","source":2861,"target":501},{"edgeType":"contains","source":785,"target":798},{"edgeType":"calls","source":5486,"target":1574},{"edgeType":"calls","source":5420,"target":448},{"edgeType":"calls","source":4653,"target":971},{"edgeType":"contains","source":258,"target":3393},{"edgeType":"imports","source":2374,"target":2412},{"edgeType":"calls","source":4711,"target":4458},{"edgeType":"calls","source":4411,"target":1074},{"edgeType":"contains","source":3393,"target":3458},{"edgeType":"calls","source":4504,"target":305},{"edgeType":"calls","source":2282,"target":477},{"edgeType":"contains","source":5442,"target":5474},{"edgeType":"calls","source":5753,"target":695},{"edgeType":"contains","source":2698,"target":4917},{"edgeType":"calls","source":2186,"target":282},{"edgeType":"contains","source":4581,"target":4682},{"edgeType":"calls","source":970,"target":985},{"edgeType":"calls","source":5420,"target":447},{"edgeType":"calls","source":5361,"target":1219},{"edgeType":"calls","source":3935,"target":1029},{"edgeType":"calls","source":1908,"target":447},{"edgeType":"calls","source":4411,"target":1073},{"edgeType":"calls","source":1506,"target":1281},{"edgeType":"calls","source":5716,"target":2898},{"edgeType":"calls","source":5621,"target":3729},{"edgeType":"calls","source":3305,"target":2591},{"edgeType":"calls","source":3489,"target":1115},{"edgeType":"calls","source":2534,"target":2180},{"edgeType":"imports","source":1238,"target":1688},{"edgeType":"calls","source":3877,"target":1771},{"edgeType":"calls","source":1986,"target":142},{"edgeType":"contains","source":5674,"target":5679},{"edgeType":"calls","source":2703,"target":1169},{"edgeType":"contains","source":5442,"target":5472},{"edgeType":"contains","source":3476,"target":4054},{"edgeType":"calls","source":2917,"target":973},{"edgeType":"calls","source":5713,"target":975},{"edgeType":"calls","source":932,"target":142},{"edgeType":"calls","source":5099,"target":982},{"edgeType":"calls","source":5517,"target":2823},{"edgeType":"contains","source":75,"target":1639},{"edgeType":"contains","source":4078,"target":4392},{"edgeType":"contains","source":256,"target":257},{"edgeType":"calls","source":5513,"target":833},{"edgeType":"imports","source":3999,"target":3879},{"edgeType":"calls","source":5423,"target":451},{"edgeType":"imports","source":2305,"target":370},{"edgeType":"calls","source":4758,"target":983},{"edgeType":"calls","source":1075,"target":994},{"edgeType":"contains","source":3591,"target":3634},{"edgeType":"contains","source":3334,"target":4202},{"edgeType":"calls","source":2917,"target":974},{"edgeType":"calls","source":5716,"target":5109},{"edgeType":"imports","source":1238,"target":1736},{"edgeType":"contains","source":4747,"target":4793},{"edgeType":"calls","source":5099,"target":981},{"edgeType":"contains","source":4481,"target":4583},{"edgeType":"calls","source":5290,"target":345},{"edgeType":"imports","source":331,"target":256},{"edgeType":"calls","source":3163,"target":747},{"edgeType":"calls","source":1334,"target":364},{"edgeType":"calls","source":1314,"target":984},{"edgeType":"calls","source":5513,"target":832},{"edgeType":"calls","source":3354,"target":1169},{"edgeType":"calls","source":3367,"target":766},{"edgeType":"contains","source":4078,"target":4391},{"edgeType":"calls","source":5713,"target":974},{"edgeType":"calls","source":5525,"target":4688},{"edgeType":"calls","source":5423,"target":450},{"edgeType":"calls","source":4758,"target":982},{"edgeType":"calls","source":1314,"target":983},{"edgeType":"calls","source":1300,"target":360},{"edgeType":"calls","source":3945,"target":817},{"edgeType":"contains","source":3460,"target":3466},{"edgeType":"calls","source":4233,"target":345},{"edgeType":"calls","source":4855,"target":89},{"edgeType":"contains","source":3058,"target":3244},{"edgeType":"calls","source":3001,"target":481},{"edgeType":"calls","source":5099,"target":980},{"edgeType":"contains","source":5442,"target":5445},{"edgeType":"calls","source":2917,"target":971},{"edgeType":"calls","source":2988,"target":2998},{"edgeType":"imports","source":73,"target":851},{"edgeType":"calls","source":5713,"target":973},{"edgeType":"calls","source":4758,"target":981},{"edgeType":"calls","source":5489,"target":1574},{"edgeType":"calls","source":1171,"target":1191},{"edgeType":"calls","source":5423,"target":449},{"edgeType":"calls","source":3451,"target":272},{"edgeType":"calls","source":4174,"target":3228},{"edgeType":"calls","source":4838,"target":4843},{"edgeType":"contains","source":3334,"target":4200},{"edgeType":"calls","source":5099,"target":979},{"edgeType":"calls","source":2917,"target":972},{"edgeType":"calls","source":4254,"target":1805},{"edgeType":"calls","source":3870,"target":1026},{"edgeType":"calls","source":5571,"target":89},{"edgeType":"calls","source":5551,"target":2823},{"edgeType":"calls","source":5713,"target":972},{"edgeType":"calls","source":4758,"target":980},{"edgeType":"imports","source":3641,"target":1239},{"edgeType":"contains","source":2994,"target":3112},{"edgeType":"calls","source":1075,"target":995},{"edgeType":"calls","source":5423,"target":448},{"edgeType":"calls","source":3210,"target":345},{"edgeType":"contains","source":4873,"target":5113},{"edgeType":"contains","source":3334,"target":4199},{"edgeType":"calls","source":5116,"target":2565},{"edgeType":"calls","source":5099,"target":978},{"edgeType":"calls","source":4226,"target":3729},{"edgeType":"calls","source":1436,"target":1427},{"edgeType":"contains","source":4078,"target":4396},{"edgeType":"calls","source":1505,"target":345},{"edgeType":"contains","source":3658,"target":3675},{"edgeType":"imports","source":3641,"target":1240},{"edgeType":"contains","source":3924,"target":3885},{"edgeType":"calls","source":5713,"target":971},{"edgeType":"contains","source":3871,"target":4471},{"edgeType":"calls","source":5745,"target":1036},{"edgeType":"calls","source":1300,"target":357},{"edgeType":"calls","source":5502,"target":1169},{"edgeType":"calls","source":1968,"target":790},{"edgeType":"contains","source":42,"target":3724},{"edgeType":"calls","source":5453,"target":1631},{"edgeType":"calls","source":5423,"target":447},{"edgeType":"calls","source":1314,"target":980},{"edgeType":"calls","source":4758,"target":979},{"edgeType":"calls","source":1633,"target":1661},{"edgeType":"imports","source":2035,"target":1335},{"edgeType":"contains","source":2570,"target":1464},{"edgeType":"calls","source":5099,"target":977},{"edgeType":"calls","source":348,"target":271},{"edgeType":"calls","source":2187,"target":345},{"edgeType":"contains","source":5442,"target":5450},{"edgeType":"calls","source":5624,"target":3729},{"edgeType":"calls","source":3507,"target":2764},{"edgeType":"calls","source":1501,"target":1525},{"edgeType":"contains","source":3658,"target":3674},{"edgeType":"calls","source":5719,"target":2898},{"edgeType":"calls","source":1314,"target":979},{"edgeType":"calls","source":5554,"target":613},{"edgeType":"calls","source":1300,"target":356},{"edgeType":"calls","source":5453,"target":1630},{"edgeType":"calls","source":1082,"target":772},{"edgeType":"calls","source":2537,"target":2180},{"edgeType":"calls","source":4788,"target":3219},{"edgeType":"calls","source":4758,"target":978},{"edgeType":"calls","source":892,"target":320},{"edgeType":"imports","source":3385,"target":2823},{"edgeType":"calls","source":3786,"target":454},{"edgeType":"calls","source":5264,"target":89},{"edgeType":"calls","source":5126,"target":2253},{"edgeType":"contains","source":4078,"target":4394},{"edgeType":"calls","source":1766,"target":1769},{"edgeType":"contains","source":1671,"target":1847},{"edgeType":"contains","source":4286,"target":4289},{"edgeType":"contains","source":1606,"target":1748},{"edgeType":"calls","source":5453,"target":1629},{"edgeType":"calls","source":1314,"target":982},{"edgeType":"calls","source":1300,"target":359},{"edgeType":"calls","source":1201,"target":257},{"edgeType":"imports","source":960,"target":1890},{"edgeType":"contains","source":3334,"target":4204},{"edgeType":"contains","source":2766,"target":2784},{"edgeType":"contains","source":1280,"target":1284},{"edgeType":"calls","source":5099,"target":976},{"edgeType":"calls","source":790,"target":1371},{"edgeType":"calls","source":4758,"target":977},{"edgeType":"calls","source":2881,"target":1026},{"edgeType":"contains","source":3159,"target":3287},{"edgeType":"calls","source":2255,"target":349},{"edgeType":"contains","source":5442,"target":5448},{"edgeType":"contains","source":3741,"target":4270},{"edgeType":"calls","source":4328,"target":564},{"edgeType":"calls","source":5606,"target":3228},{"edgeType":"contains","source":4019,"target":4108},{"edgeType":"contains","source":2829,"target":4003},{"edgeType":"calls","source":4166,"target":302},{"edgeType":"contains","source":3658,"target":3672},{"edgeType":"calls","source":5614,"target":1922},{"edgeType":"calls","source":3526,"target":1115},{"edgeType":"calls","source":1314,"target":981},{"edgeType":"calls","source":1300,"target":358},{"edgeType":"calls","source":5511,"target":887},{"edgeType":"imports","source":1518,"target":1505},{"edgeType":"contains","source":3334,"target":4203},{"edgeType":"calls","source":4758,"target":976},{"edgeType":"calls","source":5099,"target":975},{"edgeType":"calls","source":3786,"target":452},{"edgeType":"imports","source":960,"target":1905},{"edgeType":"contains","source":3127,"target":3227},{"edgeType":"calls","source":4368,"target":380},{"edgeType":"calls","source":1933,"target":814},{"edgeType":"contains","source":3871,"target":4475},{"edgeType":"contains","source":3641,"target":5263},{"edgeType":"contains","source":5442,"target":5455},{"edgeType":"calls","source":2043,"target":1632},{"edgeType":"contains","source":25,"target":27},{"edgeType":"calls","source":1314,"target":976},{"edgeType":"calls","source":5511,"target":886},{"edgeType":"contains","source":4078,"target":4401},{"edgeType":"calls","source":5575,"target":1016},{"edgeType":"calls","source":3256,"target":1026},{"edgeType":"calls","source":794,"target":184},{"edgeType":"contains","source":2910,"target":3611},{"edgeType":"contains","source":2915,"target":3456},{"edgeType":"calls","source":4758,"target":975},{"edgeType":"contains","source":2570,"target":1467},{"edgeType":"calls","source":5099,"target":974},{"edgeType":"calls","source":5015,"target":407},{"edgeType":"calls","source":3786,"target":453},{"edgeType":"contains","source":4410,"target":4678},{"edgeType":"calls","source":4590,"target":896},{"edgeType":"calls","source":1963,"target":940},{"edgeType":"contains","source":5442,"target":5454},{"edgeType":"calls","source":266,"target":695},{"edgeType":"calls","source":3456,"target":1169},{"edgeType":"contains","source":2766,"target":2791},{"edgeType":"calls","source":4854,"target":1169},{"edgeType":"contains","source":25,"target":26},{"edgeType":"calls","source":5522,"target":1601},{"edgeType":"calls","source":5733,"target":345},{"edgeType":"contains","source":4078,"target":4400},{"edgeType":"calls","source":1219,"target":749},{"edgeType":"calls","source":4758,"target":974},{"edgeType":"calls","source":3278,"target":345},{"edgeType":"calls","source":1314,"target":975},{"edgeType":"calls","source":5015,"target":406},{"edgeType":"contains","source":4747,"target":4801},{"edgeType":"calls","source":2843,"target":89},{"edgeType":"calls","source":4963,"target":961},{"edgeType":"calls","source":1056,"target":1574},{"edgeType":"contains","source":2570,"target":1468},{"edgeType":"calls","source":5099,"target":973},{"edgeType":"calls","source":4590,"target":895},{"edgeType":"contains","source":2570,"target":1465},{"edgeType":"contains","source":4410,"target":4677},{"edgeType":"calls","source":3786,"target":450},{"edgeType":"calls","source":4689,"target":997},{"edgeType":"calls","source":2092,"target":1169},{"edgeType":"calls","source":1314,"target":978},{"edgeType":"calls","source":1300,"target":355},{"edgeType":"calls","source":5575,"target":1014},{"edgeType":"calls","source":5570,"target":1169},{"edgeType":"calls","source":5099,"target":972},{"edgeType":"calls","source":4758,"target":973},{"edgeType":"calls","source":3400,"target":788},{"edgeType":"calls","source":5428,"target":1343},{"edgeType":"calls","source":5379,"target":1805},{"edgeType":"calls","source":3266,"target":1771},{"edgeType":"contains","source":2766,"target":2788},{"edgeType":"calls","source":4590,"target":894},{"edgeType":"calls","source":3859,"target":302},{"edgeType":"calls","source":3786,"target":451},{"edgeType":"calls","source":4758,"target":971},{"edgeType":"calls","source":1858,"target":1026},{"edgeType":"contains","source":5442,"target":5452},{"edgeType":"contains","source":4078,"target":4397},{"edgeType":"calls","source":2057,"target":142},{"edgeType":"contains","source":4181,"target":4376},{"edgeType":"contains","source":2040,"target":2041},{"edgeType":"calls","source":1314,"target":977},{"edgeType":"calls","source":1431,"target":521},{"edgeType":"contains","source":3334,"target":4207},{"edgeType":"contains","source":4319,"target":4326},{"edgeType":"calls","source":4758,"target":972},{"edgeType":"calls","source":5059,"target":2211},{"edgeType":"calls","source":5099,"target":971},{"edgeType":"calls","source":2907,"target":2331},{"edgeType":"contains","source":2888,"target":3235},{"edgeType":"contains","source":4747,"target":4799},{"edgeType":"calls","source":3227,"target":864},{"edgeType":"calls","source":3945,"target":804},{"edgeType":"calls","source":3786,"target":448},{"edgeType":"calls","source":4369,"target":345},{"edgeType":"calls","source":2425,"target":1414},{"edgeType":"contains","source":1561,"target":2096},{"edgeType":"calls","source":2289,"target":345},{"edgeType":"contains","source":3359,"target":3439},{"edgeType":"contains","source":1973,"target":2009},{"edgeType":"contains","source":4078,"target":4405},{"edgeType":"calls","source":892,"target":313},{"edgeType":"contains","source":3871,"target":4480},{"edgeType":"calls","source":5683,"target":5063},{"edgeType":"calls","source":3786,"target":447},{"edgeType":"contains","source":2570,"target":1471},{"edgeType":"calls","source":1314,"target":972},{"edgeType":"calls","source":3945,"target":805},{"edgeType":"calls","source":3786,"target":449},{"edgeType":"calls","source":266,"target":691},{"edgeType":"contains","source":5442,"target":5458},{"edgeType":"contains","source":4078,"target":4404},{"edgeType":"calls","source":5659,"target":1578},{"edgeType":"calls","source":4917,"target":269},{"edgeType":"calls","source":1314,"target":971},{"edgeType":"contains","source":2570,"target":1472},{"edgeType":"calls","source":5426,"target":345},{"edgeType":"calls","source":5380,"target":1771},{"edgeType":"contains","source":4410,"target":4681},{"edgeType":"calls","source":4057,"target":501},{"edgeType":"calls","source":4482,"target":1068},{"edgeType":"calls","source":4876,"target":481},{"edgeType":"calls","source":2704,"target":1219},{"edgeType":"contains","source":5442,"target":5457},{"edgeType":"calls","source":5659,"target":1577},{"edgeType":"calls","source":806,"target":867},{"edgeType":"calls","source":892,"target":315},{"edgeType":"calls","source":5609,"target":1013},{"edgeType":"calls","source":1314,"target":974},{"edgeType":"calls","source":3536,"target":1853},{"edgeType":"contains","source":4316,"target":4424},{"edgeType":"contains","source":2570,"target":1469},{"edgeType":"calls","source":3945,"target":803},{"edgeType":"calls","source":3936,"target":2139},{"edgeType":"calls","source":3243,"target":367},{"edgeType":"contains","source":2932,"target":2933},{"edgeType":"contains","source":3871,"target":4476},{"edgeType":"calls","source":4191,"target":1633},{"edgeType":"contains","source":5442,"target":5456},{"edgeType":"contains","source":4078,"target":4402},{"edgeType":"calls","source":3536,"target":1854},{"edgeType":"calls","source":794,"target":181},{"edgeType":"contains","source":1973,"target":2008},{"edgeType":"calls","source":927,"target":286},{"edgeType":"contains","source":2570,"target":1470},{"edgeType":"calls","source":5191,"target":3400},{"edgeType":"calls","source":5659,"target":1576},{"edgeType":"calls","source":1314,"target":973},{"edgeType":"calls","source":5332,"target":2232},{"edgeType":"contains","source":785,"target":1811},{"edgeType":"calls","source":4230,"target":454},{"edgeType":"contains","source":3378,"target":3878},{"edgeType":"contains","source":4873,"target":5100},{"edgeType":"contains","source":1973,"target":1980},{"edgeType":"calls","source":964,"target":1281},{"edgeType":"calls","source":5609,"target":1044},{"edgeType":"calls","source":5131,"target":4235},{"edgeType":"calls","source":5708,"target":89},{"edgeType":"calls","source":5626,"target":1574},{"edgeType":"calls","source":3246,"target":305},{"edgeType":"calls","source":3866,"target":1169},{"edgeType":"calls","source":4009,"target":964},{"edgeType":"contains","source":2766,"target":2767},{"edgeType":"contains","source":1081,"target":1090},{"edgeType":"calls","source":4192,"target":1633},{"edgeType":"calls","source":2496,"target":300},{"edgeType":"calls","source":4358,"target":1771},{"edgeType":"calls","source":2795,"target":1602},{"edgeType":"calls","source":3530,"target":1014},{"edgeType":"imports","source":2048,"target":920},{"edgeType":"calls","source":5461,"target":345},{"edgeType":"calls","source":1075,"target":1013},{"edgeType":"contains","source":785,"target":1813},{"edgeType":"contains","source":2888,"target":3210},{"edgeType":"contains","source":2865,"target":2866},{"edgeType":"calls","source":4230,"target":452},{"edgeType":"calls","source":4233,"target":359},{"edgeType":"contains","source":4873,"target":5098},{"edgeType":"calls","source":4963,"target":984},{"edgeType":"calls","source":870,"target":1026},{"edgeType":"calls","source":5304,"target":984},{"edgeType":"contains","source":2185,"target":2805},{"edgeType":"calls","source":1166,"target":305},{"edgeType":"contains","source":2865,"target":2867},{"edgeType":"contains","source":4873,"target":5097},{"edgeType":"calls","source":4230,"target":453},{"edgeType":"calls","source":4233,"target":360},{"edgeType":"calls","source":4241,"target":1169},{"edgeType":"calls","source":2851,"target":920},{"edgeType":"calls","source":4963,"target":983},{"edgeType":"contains","source":4019,"target":4088},{"edgeType":"calls","source":2934,"target":462},{"edgeType":"calls","source":4355,"target":805},{"edgeType":"calls","source":4457,"target":814},{"edgeType":"calls","source":5304,"target":983},{"edgeType":"calls","source":5360,"target":304},{"edgeType":"calls","source":5614,"target":886},{"edgeType":"contains","source":785,"target":1815},{"edgeType":"contains","source":2865,"target":2872},{"edgeType":"calls","source":511,"target":521},{"edgeType":"calls","source":1166,"target":300},{"edgeType":"calls","source":4230,"target":450},{"edgeType":"calls","source":4233,"target":357},{"edgeType":"calls","source":4229,"target":481},{"edgeType":"calls","source":3246,"target":300},{"edgeType":"calls","source":4963,"target":982},{"edgeType":"calls","source":2872,"target":266},{"edgeType":"calls","source":2823,"target":2842},{"edgeType":"calls","source":2980,"target":89},{"edgeType":"contains","source":4873,"target":5104},{"edgeType":"imports","source":3969,"target":1626},{"edgeType":"imports","source":3994,"target":851},{"edgeType":"calls","source":4355,"target":804},{"edgeType":"calls","source":5273,"target":886},{"edgeType":"calls","source":2255,"target":367},{"edgeType":"calls","source":5304,"target":982},{"edgeType":"contains","source":1671,"target":1833},{"edgeType":"calls","source":1728,"target":847},{"edgeType":"calls","source":3332,"target":806},{"edgeType":"calls","source":5449,"target":1771},{"edgeType":"contains","source":4181,"target":4357},{"edgeType":"calls","source":4098,"target":1372},{"edgeType":"calls","source":4230,"target":451},{"edgeType":"calls","source":4233,"target":358},{"edgeType":"calls","source":4963,"target":981},{"edgeType":"calls","source":455,"target":142},{"edgeType":"contains","source":4873,"target":5103},{"edgeType":"calls","source":4819,"target":2274},{"edgeType":"calls","source":4355,"target":803},{"edgeType":"calls","source":5217,"target":1564},{"edgeType":"calls","source":5304,"target":981},{"edgeType":"contains","source":1973,"target":1985},{"edgeType":"contains","source":4078,"target":4379},{"edgeType":"contains","source":3741,"target":4256},{"edgeType":"imports","source":57,"target":273},{"edgeType":"calls","source":1728,"target":846},{"edgeType":"contains","source":2036,"target":2146},{"edgeType":"contains","source":1994,"target":277},{"edgeType":"calls","source":4233,"target":355},{"edgeType":"calls","source":4230,"target":448},{"edgeType":"calls","source":2054,"target":257},{"edgeType":"contains","source":3393,"target":3415},{"edgeType":"contains","source":4873,"target":5102},{"edgeType":"contains","source":4907,"target":5105},{"edgeType":"calls","source":4963,"target":980},{"edgeType":"contains","source":5114,"target":802},{"edgeType":"calls","source":2917,"target":983},{"edgeType":"calls","source":4506,"target":349},{"edgeType":"contains","source":1189,"target":1977},{"edgeType":"calls","source":5304,"target":980},{"edgeType":"calls","source":2364,"target":1214},{"edgeType":"calls","source":4300,"target":2507},{"edgeType":"contains","source":4078,"target":4378},{"edgeType":"calls","source":4304,"target":269},{"edgeType":"calls","source":5694,"target":1574},{"edgeType":"calls","source":3495,"target":3149},{"edgeType":"calls","source":1410,"target":137},{"edgeType":"calls","source":5648,"target":886},{"edgeType":"calls","source":3696,"target":89},{"edgeType":"calls","source":1740,"target":477},{"edgeType":"contains","source":2865,"target":2871},{"edgeType":"contains","source":14,"target":2462},{"edgeType":"calls","source":3402,"target":1805},{"edgeType":"contains","source":73,"target":2747},{"edgeType":"calls","source":4230,"target":449},{"edgeType":"calls","source":4233,"target":356},{"edgeType":"calls","source":5360,"target":1357},{"edgeType":"calls","source":4705,"target":521},{"edgeType":"contains","source":4873,"target":5101},{"edgeType":"calls","source":4759,"target":961},{"edgeType":"contains","source":2910,"target":3590},{"edgeType":"calls","source":2917,"target":984},{"edgeType":"calls","source":4963,"target":979},{"edgeType":"calls","source":2361,"target":2365},{"edgeType":"calls","source":5307,"target":886},{"edgeType":"calls","source":5304,"target":979},{"edgeType":"calls","source":4371,"target":305},{"edgeType":"calls","source":5640,"target":4304},{"edgeType":"calls","source":5713,"target":984},{"edgeType":"calls","source":3436,"target":1805},{"edgeType":"calls","source":4047,"target":4005},{"edgeType":"contains","source":73,"target":2750},{"edgeType":"contains","source":4019,"target":4099},{"edgeType":"calls","source":2917,"target":981},{"edgeType":"calls","source":5377,"target":829},{"edgeType":"contains","source":785,"target":1819},{"edgeType":"calls","source":4963,"target":978},{"edgeType":"contains","source":2865,"target":2876},{"edgeType":"calls","source":5251,"target":1564},{"edgeType":"calls","source":5304,"target":978},{"edgeType":"contains","source":3159,"target":3275},{"edgeType":"calls","source":1933,"target":830},{"edgeType":"calls","source":2163,"target":1101},{"edgeType":"calls","source":5713,"target":983},{"edgeType":"calls","source":5720,"target":2880},{"edgeType":"calls","source":3967,"target":142},{"edgeType":"contains","source":2766,"target":2775},{"edgeType":"calls","source":4871,"target":2772},{"edgeType":"contains","source":4873,"target":5107},{"edgeType":"calls","source":4230,"target":447},{"edgeType":"calls","source":4847,"target":345},{"edgeType":"contains","source":73,"target":2749},{"edgeType":"calls","source":5713,"target":982},{"edgeType":"contains","source":4178,"target":4454},{"edgeType":"calls","source":2917,"target":982},{"edgeType":"contains","source":2865,"target":2877},{"edgeType":"calls","source":4963,"target":977},{"edgeType":"calls","source":5125,"target":1240},{"edgeType":"calls","source":3801,"target":1061},{"edgeType":"calls","source":5304,"target":977},{"edgeType":"contains","source":337,"target":4078},{"edgeType":"contains","source":259,"target":1211},{"edgeType":"calls","source":5746,"target":1016},{"edgeType":"calls","source":4039,"target":1082},{"edgeType":"contains","source":4873,"target":5106},{"edgeType":"calls","source":2005,"target":1772},{"edgeType":"calls","source":2023,"target":1214},{"edgeType":"calls","source":2043,"target":594},{"edgeType":"calls","source":4963,"target":976},{"edgeType":"calls","source":4874,"target":564},{"edgeType":"contains","source":4078,"target":4382},{"edgeType":"calls","source":5713,"target":981},{"edgeType":"contains","source":11,"target":1503},{"edgeType":"contains","source":2263,"target":395},{"edgeType":"contains","source":784,"target":1852},{"edgeType":"calls","source":2917,"target":979},{"edgeType":"imports","source":2948,"target":510},{"edgeType":"contains","source":2865,"target":2874},{"edgeType":"contains","source":3811,"target":5260},{"edgeType":"calls","source":5304,"target":976},{"edgeType":"contains","source":3658,"target":3661},{"edgeType":"contains","source":4178,"target":4452},{"edgeType":"calls","source":2038,"target":1805},{"edgeType":"imports","source":2115,"target":963},{"edgeType":"calls","source":4884,"target":3424},{"edgeType":"calls","source":4963,"target":975},{"edgeType":"calls","source":4860,"target":997},{"edgeType":"calls","source":5746,"target":1014},{"edgeType":"calls","source":5572,"target":2180},{"edgeType":"calls","source":5713,"target":980},{"edgeType":"calls","source":3626,"target":142},{"edgeType":"calls","source":1150,"target":793},{"edgeType":"calls","source":2917,"target":980},{"edgeType":"contains","source":2568,"target":2569},{"edgeType":"calls","source":5304,"target":975},{"edgeType":"calls","source":1609,"target":305},{"edgeType":"contains","source":1515,"target":2444},{"edgeType":"calls","source":4343,"target":1169},{"edgeType":"calls","source":2029,"target":1026},{"edgeType":"calls","source":4963,"target":974},{"edgeType":"contains","source":5442,"target":5443},{"edgeType":"contains","source":4078,"target":4388},{"edgeType":"calls","source":2917,"target":977},{"edgeType":"calls","source":5713,"target":979},{"edgeType":"contains","source":4873,"target":5112},{"edgeType":"calls","source":5565,"target":282},{"edgeType":"contains","source":4178,"target":4459},{"edgeType":"calls","source":1609,"target":300},{"edgeType":"calls","source":3429,"target":961},{"edgeType":"calls","source":5513,"target":837},{"edgeType":"calls","source":3140,"target":406},{"edgeType":"calls","source":3097,"target":1739},{"edgeType":"contains","source":4410,"target":4667},{"edgeType":"calls","source":1253,"target":766},{"edgeType":"calls","source":5304,"target":973},{"edgeType":"calls","source":5246,"target":2772},{"edgeType":"calls","source":5304,"target":974},{"edgeType":"calls","source":1133,"target":257},{"edgeType":"calls","source":3855,"target":3610},{"edgeType":"calls","source":2503,"target":2184},{"edgeType":"calls","source":2432,"target":1214},{"edgeType":"imports","source":1232,"target":851},{"edgeType":"imports","source":3969,"target":1618},{"edgeType":"calls","source":4371,"target":300},{"edgeType":"contains","source":3334,"target":4198},{"edgeType":"calls","source":4963,"target":973},{"edgeType":"calls","source":5713,"target":978},{"edgeType":"calls","source":4838,"target":4848},{"edgeType":"calls","source":3510,"target":565},{"edgeType":"calls","source":5630,"target":380},{"edgeType":"calls","source":2917,"target":978},{"edgeType":"contains","source":4873,"target":5111},{"edgeType":"calls","source":5513,"target":836},{"edgeType":"calls","source":3384,"target":1300},{"edgeType":"contains","source":785,"target":1822},{"edgeType":"calls","source":1239,"target":142},{"edgeType":"calls","source":3140,"target":407},{"edgeType":"calls","source":5304,"target":972},{"edgeType":"calls","source":5268,"target":3145},{"edgeType":"calls","source":3971,"target":1072},{"edgeType":"contains","source":2888,"target":3225},{"edgeType":"contains","source":3159,"target":3280},{"edgeType":"calls","source":5713,"target":977},{"edgeType":"contains","source":3334,"target":4195},{"edgeType":"calls","source":2146,"target":564},{"edgeType":"calls","source":5099,"target":984},{"edgeType":"contains","source":4873,"target":5110},{"edgeType":"calls","source":4963,"target":972},{"edgeType":"calls","source":2917,"target":975},{"edgeType":"contains","source":4581,"target":4649},{"edgeType":"calls","source":5513,"target":835},{"edgeType":"calls","source":5304,"target":971},{"edgeType":"calls","source":5296,"target":1219},{"edgeType":"calls","source":5423,"target":454},{"edgeType":"calls","source":3367,"target":767},{"edgeType":"calls","source":5373,"target":946},{"edgeType":"contains","source":959,"target":2773},{"edgeType":"calls","source":4721,"target":3189},{"edgeType":"calls","source":3945,"target":818},{"edgeType":"calls","source":4228,"target":501},{"edgeType":"calls","source":4267,"target":349},{"edgeType":"contains","source":1561,"target":2078},{"edgeType":"contains","source":3334,"target":4194},{"edgeType":"calls","source":5713,"target":976},{"edgeType":"calls","source":5148,"target":521},{"edgeType":"calls","source":5099,"target":983},{"edgeType":"calls","source":4915,"target":345},{"edgeType":"calls","source":2917,"target":976},{"edgeType":"calls","source":4963,"target":971},{"edgeType":"calls","source":1253,"target":767},{"edgeType":"contains","source":2829,"target":3995},{"edgeType":"calls","source":5202,"target":961},{"edgeType":"calls","source":5423,"target":453},{"edgeType":"calls","source":5434,"target":1169},{"edgeType":"calls","source":5423,"target":452},{"edgeType":"contains","source":259,"target":1217},{"edgeType":"contains","source":4481,"target":4576},{"edgeType":"calls","source":4758,"target":984},{"edgeType":"contains","source":2910,"target":3598},{"edgeType":"calls","source":3867,"target":2180},{"edgeType":"calls","source":3812,"target":1771},{"edgeType":"contains","source":5677,"target":5553},{"edgeType":"calls","source":4107,"target":1082},{"edgeType":"contains","source":3588,"target":1606},{"edgeType":"calls","source":4416,"target":981},{"edgeType":"calls","source":4413,"target":1074},{"edgeType":"calls","source":2852,"target":2955},{"edgeType":"calls","source":5659,"target":3673},{"edgeType":"calls","source":961,"target":267},{"edgeType":"calls","source":5132,"target":983},{"edgeType":"calls","source":5078,"target":2657},{"edgeType":"calls","source":3831,"target":89},{"edgeType":"contains","source":40,"target":1634},{"edgeType":"calls","source":3400,"target":766},{"edgeType":"calls","source":3328,"target":2998},{"edgeType":"calls","source":5473,"target":983},{"edgeType":"calls","source":1687,"target":1016},{"edgeType":"contains","source":4181,"target":4337},{"edgeType":"contains","source":2263,"target":2487},{"edgeType":"calls","source":4706,"target":448},{"edgeType":"calls","source":5475,"target":920},{"edgeType":"calls","source":5473,"target":982},{"edgeType":"calls","source":4774,"target":454},{"edgeType":"calls","source":4100,"target":206},{"edgeType":"calls","source":4846,"target":1393},{"edgeType":"calls","source":4590,"target":1930},{"edgeType":"calls","source":4416,"target":982},{"edgeType":"calls","source":4416,"target":980},{"edgeType":"calls","source":4413,"target":1073},{"edgeType":"calls","source":4348,"target":2031},{"edgeType":"calls","source":113,"target":128},{"edgeType":"calls","source":5132,"target":982},{"edgeType":"contains","source":4178,"target":4429},{"edgeType":"calls","source":1765,"target":1768},{"edgeType":"contains","source":2517,"target":956},{"edgeType":"calls","source":3400,"target":767},{"edgeType":"calls","source":5488,"target":1574},{"edgeType":"calls","source":1739,"target":460},{"edgeType":"calls","source":5697,"target":380},{"edgeType":"calls","source":5665,"target":315},{"edgeType":"calls","source":5473,"target":981},{"edgeType":"contains","source":2263,"target":2488},{"edgeType":"calls","source":4774,"target":453},{"edgeType":"calls","source":1963,"target":1972},{"edgeType":"contains","source":785,"target":1793},{"edgeType":"contains","source":5506,"target":5546},{"edgeType":"calls","source":4840,"target":521},{"edgeType":"calls","source":4706,"target":447},{"edgeType":"calls","source":4416,"target":979},{"edgeType":"calls","source":5132,"target":981},{"edgeType":"calls","source":2363,"target":142},{"edgeType":"calls","source":4429,"target":1633},{"edgeType":"contains","source":4747,"target":4759},{"edgeType":"calls","source":2186,"target":2458},{"edgeType":"contains","source":4178,"target":4428},{"edgeType":"calls","source":1661,"target":767},{"edgeType":"calls","source":5744,"target":1036},{"edgeType":"calls","source":5755,"target":695},{"edgeType":"calls","source":5746,"target":2031},{"edgeType":"calls","source":4774,"target":452},{"edgeType":"calls","source":1145,"target":907},{"edgeType":"calls","source":1228,"target":448},{"edgeType":"imports","source":3641,"target":1271},{"edgeType":"calls","source":5473,"target":980},{"edgeType":"contains","source":785,"target":1796},{"edgeType":"contains","source":784,"target":1827},{"edgeType":"calls","source":2051,"target":304},{"edgeType":"calls","source":4174,"target":3195},{"edgeType":"contains","source":3190,"target":3344},{"edgeType":"calls","source":2912,"target":1093},{"edgeType":"contains","source":3393,"target":3395},{"edgeType":"calls","source":4416,"target":978},{"edgeType":"calls","source":5132,"target":980},{"edgeType":"calls","source":4538,"target":367},{"edgeType":"calls","source":113,"target":130},{"edgeType":"calls","source":2186,"target":345},{"edgeType":"calls","source":5350,"target":564},{"edgeType":"calls","source":5665,"target":313},{"edgeType":"calls","source":3490,"target":89},{"edgeType":"contains","source":2185,"target":2789},{"edgeType":"calls","source":1661,"target":766},{"edgeType":"contains","source":2263,"target":2485},{"edgeType":"calls","source":5469,"target":2160},{"edgeType":"calls","source":1228,"target":447},{"edgeType":"calls","source":5473,"target":979},{"edgeType":"calls","source":5522,"target":1574},{"edgeType":"calls","source":5604,"target":89},{"edgeType":"contains","source":5506,"target":5548},{"edgeType":"calls","source":2092,"target":89},{"edgeType":"calls","source":4825,"target":984},{"edgeType":"calls","source":4774,"target":451},{"edgeType":"contains","source":476,"target":807},{"edgeType":"contains","source":2533,"target":2577},{"edgeType":"calls","source":5132,"target":979},{"edgeType":"calls","source":2289,"target":320},{"edgeType":"calls","source":4355,"target":2868},{"edgeType":"calls","source":4416,"target":977},{"edgeType":"calls","source":4254,"target":1771},{"edgeType":"calls","source":1525,"target":749},{"edgeType":"calls","source":1775,"target":398},{"edgeType":"contains","source":40,"target":1638},{"edgeType":"calls","source":3848,"target":615},{"edgeType":"calls","source":5473,"target":978},{"edgeType":"calls","source":5390,"target":380},{"edgeType":"contains","source":3374,"target":3990},{"edgeType":"contains","source":3393,"target":3401},{"edgeType":"calls","source":397,"target":835},{"edgeType":"calls","source":4641,"target":345},{"edgeType":"calls","source":4932,"target":837},{"edgeType":"calls","source":4774,"target":450},{"edgeType":"calls","source":4825,"target":983},{"edgeType":"contains","source":3194,"target":3228},{"edgeType":"contains","source":3865,"target":4623},{"edgeType":"calls","source":5132,"target":978},{"edgeType":"calls","source":397,"target":833},{"edgeType":"calls","source":5297,"target":2205},{"edgeType":"calls","source":4416,"target":976},{"edgeType":"calls","source":4721,"target":4206},{"edgeType":"calls","source":4825,"target":982},{"edgeType":"calls","source":5473,"target":977},{"edgeType":"calls","source":5510,"target":887},{"edgeType":"contains","source":5506,"target":5542},{"edgeType":"calls","source":4932,"target":836},{"edgeType":"calls","source":4774,"target":449},{"edgeType":"calls","source":3718,"target":4643},{"edgeType":"calls","source":4416,"target":975},{"edgeType":"calls","source":113,"target":127},{"edgeType":"contains","source":476,"target":809},{"edgeType":"calls","source":2511,"target":835},{"edgeType":"calls","source":5755,"target":691},{"edgeType":"calls","source":4367,"target":380},{"edgeType":"imports","source":3641,"target":3389},{"edgeType":"calls","source":2287,"target":380},{"edgeType":"calls","source":1687,"target":1014},{"edgeType":"calls","source":1967,"target":790},{"edgeType":"calls","source":3463,"target":920},{"edgeType":"contains","source":785,"target":1800},{"edgeType":"calls","source":4825,"target":981},{"edgeType":"calls","source":4233,"target":305},{"edgeType":"calls","source":5606,"target":3195},{"edgeType":"calls","source":3400,"target":759},{"edgeType":"calls","source":5665,"target":309},{"edgeType":"calls","source":3604,"target":777},{"edgeType":"calls","source":5510,"target":886},{"edgeType":"calls","source":5473,"target":976},{"edgeType":"calls","source":5003,"target":1805},{"edgeType":"calls","source":397,"target":837},{"edgeType":"contains","source":5506,"target":5543},{"edgeType":"calls","source":4774,"target":448},{"edgeType":"calls","source":5132,"target":977},{"edgeType":"calls","source":3009,"target":1253},{"edgeType":"calls","source":4932,"target":835},{"edgeType":"calls","source":1585,"target":1004},{"edgeType":"contains","source":5275,"target":5307},{"edgeType":"calls","source":4416,"target":974},{"edgeType":"calls","source":2511,"target":836},{"edgeType":"contains","source":3811,"target":4181},{"edgeType":"calls","source":3946,"target":747},{"edgeType":"contains","source":73,"target":2731},{"edgeType":"calls","source":4825,"target":980},{"edgeType":"calls","source":4240,"target":89},{"edgeType":"calls","source":1169,"target":1215},{"edgeType":"calls","source":5473,"target":975},{"edgeType":"calls","source":1340,"target":142},{"edgeType":"calls","source":2511,"target":837},{"edgeType":"calls","source":397,"target":836},{"edgeType":"calls","source":3264,"target":1805},{"edgeType":"calls","source":4774,"target":447},{"edgeType":"calls","source":5132,"target":976},{"edgeType":"calls","source":5128,"target":2157},{"edgeType":"contains","source":1081,"target":1083},{"edgeType":"calls","source":3154,"target":984},{"edgeType":"calls","source":2511,"target":833},{"edgeType":"calls","source":2535,"target":89},{"edgeType":"contains","source":317,"target":1512},{"edgeType":"calls","source":2281,"target":564},{"edgeType":"calls","source":2186,"target":2452},{"edgeType":"calls","source":4416,"target":973},{"edgeType":"contains","source":1671,"target":1820},{"edgeType":"calls","source":4932,"target":833},{"edgeType":"calls","source":3430,"target":2998},{"edgeType":"calls","source":2772,"target":142},{"edgeType":"contains","source":2016,"target":2753},{"edgeType":"calls","source":4825,"target":979},{"edgeType":"calls","source":5755,"target":688},{"edgeType":"contains","source":4153,"target":4157},{"edgeType":"calls","source":5473,"target":974},{"edgeType":"calls","source":5331,"target":2205},{"edgeType":"contains","source":2570,"target":1434},{"edgeType":"calls","source":1071,"target":1077},{"edgeType":"calls","source":5132,"target":975},{"edgeType":"contains","source":2302,"target":2344},{"edgeType":"contains","source":3058,"target":3220},{"edgeType":"calls","source":4709,"target":345},{"edgeType":"calls","source":4416,"target":972},{"edgeType":"contains","source":3886,"target":805},{"edgeType":"calls","source":4932,"target":832},{"edgeType":"calls","source":5672,"target":89},{"edgeType":"calls","source":4231,"target":366},{"edgeType":"contains","source":2016,"target":2754},{"edgeType":"calls","source":4825,"target":978},{"edgeType":"contains","source":2185,"target":2800},{"edgeType":"calls","source":5590,"target":1574},{"edgeType":"calls","source":3604,"target":776},{"edgeType":"calls","source":5473,"target":973},{"edgeType":"calls","source":964,"target":1222},{"edgeType":"calls","source":5132,"target":974},{"edgeType":"contains","source":3159,"target":3257},{"edgeType":"contains","source":3129,"target":3130},{"edgeType":"calls","source":397,"target":832},{"edgeType":"calls","source":4416,"target":971},{"edgeType":"imports","source":4286,"target":1351},{"edgeType":"calls","source":4027,"target":345},{"edgeType":"calls","source":4368,"target":345},{"edgeType":"contains","source":3886,"target":804},{"edgeType":"calls","source":2208,"target":1768},{"edgeType":"contains","source":4873,"target":5089},{"edgeType":"calls","source":2042,"target":1632},{"edgeType":"calls","source":4825,"target":977},{"edgeType":"calls","source":4841,"target":481},{"edgeType":"calls","source":5609,"target":984},{"edgeType":"contains","source":3374,"target":3992},{"edgeType":"calls","source":5766,"target":345},{"edgeType":"calls","source":5132,"target":973},{"edgeType":"calls","source":3379,"target":349},{"edgeType":"contains","source":476,"target":813},{"edgeType":"calls","source":5473,"target":972},{"edgeType":"calls","source":3140,"target":359},{"edgeType":"calls","source":3154,"target":982},{"edgeType":"calls","source":2511,"target":832},{"edgeType":"calls","source":4531,"target":1633},{"edgeType":"calls","source":2289,"target":315},{"edgeType":"contains","source":2016,"target":2751},{"edgeType":"contains","source":3886,"target":803},{"edgeType":"calls","source":4395,"target":564},{"edgeType":"contains","source":1906,"target":1933},{"edgeType":"calls","source":4267,"target":305},{"edgeType":"calls","source":5665,"target":304},{"edgeType":"contains","source":2016,"target":2752},{"edgeType":"calls","source":5609,"target":983},{"edgeType":"calls","source":4825,"target":976},{"edgeType":"contains","source":3374,"target":3991},{"edgeType":"calls","source":3039,"target":320},{"edgeType":"calls","source":5132,"target":972},{"edgeType":"calls","source":5473,"target":971},{"edgeType":"contains","source":476,"target":812},{"edgeType":"calls","source":5251,"target":454},{"edgeType":"calls","source":5379,"target":1771},{"edgeType":"calls","source":5412,"target":1805},{"edgeType":"calls","source":1171,"target":92},{"edgeType":"calls","source":3140,"target":360},{"edgeType":"calls","source":1063,"target":269},{"edgeType":"calls","source":5268,"target":984},{"edgeType":"calls","source":3154,"target":983},{"edgeType":"calls","source":4662,"target":1799},{"edgeType":"contains","source":3127,"target":3198},{"edgeType":"calls","source":3794,"target":1224},{"edgeType":"calls","source":4825,"target":974},{"edgeType":"calls","source":4381,"target":997},{"edgeType":"calls","source":5703,"target":1239},{"edgeType":"calls","source":5624,"target":1574},{"edgeType":"calls","source":5082,"target":407},{"edgeType":"contains","source":5506,"target":5549},{"edgeType":"calls","source":3715,"target":501},{"edgeType":"calls","source":4825,"target":975},{"edgeType":"calls","source":3794,"target":1223},{"edgeType":"contains","source":72,"target":2769},{"edgeType":"calls","source":5132,"target":971},{"edgeType":"contains","source":4178,"target":4443},{"edgeType":"contains","source":2185,"target":2803},{"edgeType":"calls","source":3140,"target":357},{"edgeType":"calls","source":5609,"target":982},{"edgeType":"calls","source":5268,"target":983},{"edgeType":"calls","source":3154,"target":980},{"edgeType":"calls","source":5251,"target":453},{"edgeType":"contains","source":2994,"target":3094},{"edgeType":"calls","source":1205,"target":89},{"edgeType":"calls","source":1923,"target":1086},{"edgeType":"calls","source":4825,"target":973},{"edgeType":"calls","source":4233,"target":300},{"edgeType":"calls","source":2289,"target":313},{"edgeType":"calls","source":5082,"target":406},{"edgeType":"contains","source":5506,"target":5550},{"edgeType":"calls","source":3354,"target":2180},{"edgeType":"calls","source":3350,"target":3361},{"edgeType":"calls","source":5626,"target":454},{"edgeType":"calls","source":5609,"target":981},{"edgeType":"calls","source":5634,"target":206},{"edgeType":"calls","source":2999,"target":501},{"edgeType":"calls","source":5251,"target":452},{"edgeType":"calls","source":2933,"target":3604},{"edgeType":"calls","source":3140,"target":358},{"edgeType":"calls","source":1640,"target":345},{"edgeType":"calls","source":5190,"target":3400},{"edgeType":"calls","source":5268,"target":982},{"edgeType":"calls","source":3154,"target":981},{"edgeType":"calls","source":1067,"target":142},{"edgeType":"calls","source":4825,"target":972},{"edgeType":"calls","source":4267,"target":300},{"edgeType":"contains","source":2016,"target":2755},{"edgeType":"calls","source":1505,"target":305},{"edgeType":"calls","source":3039,"target":315},{"edgeType":"contains","source":4873,"target":5093},{"edgeType":"contains","source":4181,"target":4348},{"edgeType":"contains","source":4178,"target":4441},{"edgeType":"calls","source":5078,"target":2643},{"edgeType":"calls","source":4950,"target":269},{"edgeType":"contains","source":2185,"target":2801},{"edgeType":"calls","source":3140,"target":355},{"edgeType":"calls","source":5626,"target":453},{"edgeType":"calls","source":5609,"target":980},{"edgeType":"calls","source":5268,"target":981},{"edgeType":"calls","source":3154,"target":978},{"edgeType":"calls","source":3170,"target":482},{"edgeType":"calls","source":5251,"target":451},{"edgeType":"calls","source":3379,"target":345},{"edgeType":"contains","source":4481,"target":4561},{"edgeType":"calls","source":5396,"target":1240},{"edgeType":"contains","source":2964,"target":2965},{"edgeType":"contains","source":1081,"target":1088},{"edgeType":"calls","source":1839,"target":521},{"edgeType":"imports","source":3814,"target":2247},{"edgeType":"calls","source":1974,"target":564},{"edgeType":"calls","source":4825,"target":971},{"edgeType":"calls","source":2690,"target":564},{"edgeType":"calls","source":4470,"target":349},{"edgeType":"contains","source":4873,"target":5092},{"edgeType":"contains","source":4178,"target":4440},{"edgeType":"calls","source":5078,"target":2642},{"edgeType":"contains","source":1973,"target":1975},{"edgeType":"contains","source":2016,"target":2756},{"edgeType":"calls","source":5612,"target":886},{"edgeType":"calls","source":5626,"target":452},{"edgeType":"calls","source":5609,"target":979},{"edgeType":"calls","source":5251,"target":450},{"edgeType":"contains","source":118,"target":1344},{"edgeType":"calls","source":3140,"target":356},{"edgeType":"calls","source":5268,"target":980},{"edgeType":"calls","source":3154,"target":979},{"edgeType":"calls","source":1622,"target":905},{"edgeType":"calls","source":5296,"target":1169},{"edgeType":"calls","source":1922,"target":1147},{"edgeType":"calls","source":5460,"target":345},{"edgeType":"calls","source":4080,"target":2957},{"edgeType":"contains","source":2829,"target":2894},{"edgeType":"calls","source":266,"target":688},{"edgeType":"contains","source":4873,"target":5067},{"edgeType":"calls","source":2503,"target":2163},{"edgeType":"calls","source":892,"target":309},{"edgeType":"calls","source":5025,"target":89},{"edgeType":"contains","source":54,"target":2241},{"edgeType":"contains","source":280,"target":519},{"edgeType":"calls","source":3286,"target":89},{"edgeType":"calls","source":4108,"target":1033},{"edgeType":"calls","source":794,"target":174},{"edgeType":"calls","source":4311,"target":3195},{"edgeType":"contains","source":4181,"target":4320},{"edgeType":"calls","source":5297,"target":1169},{"edgeType":"imports","source":291,"target":455},{"edgeType":"calls","source":5646,"target":920},{"edgeType":"calls","source":2875,"target":142},{"edgeType":"calls","source":4670,"target":521},{"edgeType":"calls","source":2344,"target":1805},{"edgeType":"contains","source":2698,"target":4838},{"edgeType":"contains","source":55,"target":98},{"edgeType":"contains","source":11,"target":1462},{"edgeType":"contains","source":2185,"target":2772},{"edgeType":"calls","source":5360,"target":272},{"edgeType":"calls","source":3723,"target":1337},{"edgeType":"calls","source":5659,"target":1573},{"edgeType":"calls","source":1922,"target":1148},{"edgeType":"calls","source":2051,"target":320},{"edgeType":"calls","source":4925,"target":1071},{"edgeType":"contains","source":1238,"target":2533},{"edgeType":"calls","source":794,"target":177},{"edgeType":"calls","source":3039,"target":345},{"edgeType":"contains","source":1906,"target":1909},{"edgeType":"contains","source":3865,"target":4601},{"edgeType":"calls","source":5659,"target":1572},{"edgeType":"calls","source":5337,"target":984},{"edgeType":"contains","source":476,"target":787},{"edgeType":"contains","source":73,"target":2713},{"edgeType":"calls","source":2051,"target":315},{"edgeType":"calls","source":1996,"target":2020},{"edgeType":"calls","source":2042,"target":594},{"edgeType":"calls","source":5412,"target":772},{"edgeType":"calls","source":794,"target":171},{"edgeType":"calls","source":2933,"target":1513},{"edgeType":"contains","source":4873,"target":5071},{"edgeType":"calls","source":892,"target":304},{"edgeType":"calls","source":5746,"target":5216},{"edgeType":"calls","source":2249,"target":1577},{"edgeType":"calls","source":5291,"target":2409},{"edgeType":"calls","source":5337,"target":983},{"edgeType":"calls","source":5331,"target":1169},{"edgeType":"calls","source":2193,"target":142},{"edgeType":"calls","source":1511,"target":142},{"edgeType":"calls","source":5659,"target":1571},{"edgeType":"calls","source":5647,"target":886},{"edgeType":"contains","source":55,"target":100},{"edgeType":"calls","source":5352,"target":1574},{"edgeType":"calls","source":829,"target":142},{"edgeType":"contains","source":4747,"target":4748},{"edgeType":"contains","source":4873,"target":5070},{"edgeType":"calls","source":5099,"target":961},{"edgeType":"calls","source":2249,"target":1578},{"edgeType":"calls","source":5337,"target":982},{"edgeType":"calls","source":4336,"target":302},{"edgeType":"calls","source":5659,"target":1570},{"edgeType":"calls","source":3526,"target":1101},{"edgeType":"contains","source":55,"target":99},{"edgeType":"calls","source":3402,"target":1771},{"edgeType":"contains","source":5506,"target":5526},{"edgeType":"contains","source":4873,"target":5069},{"edgeType":"calls","source":3079,"target":1214},{"edgeType":"calls","source":961,"target":282},{"edgeType":"contains","source":337,"target":1930},{"edgeType":"calls","source":5337,"target":981},{"edgeType":"contains","source":283,"target":433},{"edgeType":"calls","source":1438,"target":1350},{"edgeType":"calls","source":5659,"target":1569},{"edgeType":"contains","source":11,"target":1466},{"edgeType":"calls","source":4833,"target":1805},{"edgeType":"calls","source":5659,"target":1568},{"edgeType":"contains","source":1671,"target":1798},{"edgeType":"calls","source":5420,"target":521},{"edgeType":"calls","source":3227,"target":1912},{"edgeType":"contains","source":4873,"target":5068},{"edgeType":"contains","source":3374,"target":3970},{"edgeType":"calls","source":892,"target":305},{"edgeType":"calls","source":2939,"target":269},{"edgeType":"calls","source":4963,"target":3060},{"edgeType":"contains","source":476,"target":791},{"edgeType":"calls","source":2249,"target":1576},{"edgeType":"calls","source":5337,"target":980},{"edgeType":"calls","source":4492,"target":749},{"edgeType":"calls","source":1956,"target":89},{"edgeType":"calls","source":4933,"target":818},{"edgeType":"calls","source":5445,"target":802},{"edgeType":"calls","source":892,"target":300},{"edgeType":"calls","source":2425,"target":345},{"edgeType":"calls","source":5337,"target":979},{"edgeType":"calls","source":4001,"target":1169},{"edgeType":"calls","source":2249,"target":1573},{"edgeType":"calls","source":2056,"target":1212},{"edgeType":"contains","source":3591,"target":3593},{"edgeType":"calls","source":4144,"target":964},{"edgeType":"calls","source":4933,"target":817},{"edgeType":"calls","source":4883,"target":3424},{"edgeType":"calls","source":5691,"target":1631},{"edgeType":"calls","source":794,"target":166},{"edgeType":"calls","source":1228,"target":454},{"edgeType":"calls","source":5461,"target":305},{"edgeType":"calls","source":3094,"target":1805},{"edgeType":"calls","source":5337,"target":978},{"edgeType":"calls","source":4658,"target":886},{"edgeType":"contains","source":3657,"target":3660},{"edgeType":"contains","source":1561,"target":2044},{"edgeType":"contains","source":283,"target":434},{"edgeType":"contains","source":1510,"target":1511},{"edgeType":"calls","source":2024,"target":89},{"edgeType":"calls","source":4353,"target":828},{"edgeType":"calls","source":2051,"target":309},{"edgeType":"calls","source":4296,"target":481},{"edgeType":"contains","source":5506,"target":5538},{"edgeType":"calls","source":2051,"target":313},{"edgeType":"calls","source":4880,"target":345},{"edgeType":"calls","source":5591,"target":3673},{"edgeType":"calls","source":5691,"target":1630},{"edgeType":"calls","source":794,"target":169},{"edgeType":"calls","source":5158,"target":1240},{"edgeType":"calls","source":5193,"target":2269},{"edgeType":"contains","source":1043,"target":1189},{"edgeType":"calls","source":5337,"target":977},{"edgeType":"calls","source":4413,"target":3195},{"edgeType":"calls","source":4706,"target":454},{"edgeType":"imports","source":1280,"target":455},{"edgeType":"calls","source":2249,"target":1571},{"edgeType":"contains","source":3657,"target":3659},{"edgeType":"calls","source":4353,"target":827},{"edgeType":"calls","source":1990,"target":89},{"edgeType":"calls","source":2261,"target":142},{"edgeType":"contains","source":5506,"target":5539},{"edgeType":"calls","source":3482,"target":345},{"edgeType":"calls","source":3436,"target":1771},{"edgeType":"contains","source":1515,"target":2410},{"edgeType":"calls","source":2694,"target":2575},{"edgeType":"calls","source":5691,"target":1629},{"edgeType":"contains","source":519,"target":520},{"edgeType":"contains","source":476,"target":796},{"edgeType":"contains","source":1781,"target":1564},{"edgeType":"contains","source":3190,"target":3337},{"edgeType":"calls","source":5337,"target":976},{"edgeType":"contains","source":476,"target":795},{"edgeType":"calls","source":4706,"target":453},{"edgeType":"calls","source":4540,"target":4542},{"edgeType":"calls","source":2249,"target":1572},{"edgeType":"contains","source":1970,"target":2047},{"edgeType":"calls","source":4372,"target":1294},{"edgeType":"calls","source":4009,"target":920},{"edgeType":"contains","source":5506,"target":5540},{"edgeType":"calls","source":4353,"target":826},{"edgeType":"calls","source":2056,"target":1213},{"edgeType":"calls","source":4193,"target":501},{"edgeType":"calls","source":2038,"target":1771},{"edgeType":"contains","source":4747,"target":4757},{"edgeType":"calls","source":5665,"target":320},{"edgeType":"contains","source":5506,"target":5532},{"edgeType":"contains","source":4019,"target":4070},{"edgeType":"contains","source":2263,"target":2482},{"edgeType":"calls","source":1228,"target":451},{"edgeType":"calls","source":5255,"target":345},{"edgeType":"calls","source":5337,"target":974},{"edgeType":"calls","source":2511,"target":846},{"edgeType":"calls","source":5267,"target":3145},{"edgeType":"calls","source":5337,"target":975},{"edgeType":"contains","source":1671,"target":1808},{"edgeType":"calls","source":4540,"target":4541},{"edgeType":"calls","source":1204,"target":137},{"edgeType":"calls","source":4706,"target":452},{"edgeType":"calls","source":3839,"target":902},{"edgeType":"calls","source":4457,"target":772},{"edgeType":"calls","source":4224,"target":594},{"edgeType":"contains","source":3321,"target":3509},{"edgeType":"calls","source":4353,"target":825},{"edgeType":"calls","source":4372,"target":1293},{"edgeType":"calls","source":2249,"target":1569},{"edgeType":"calls","source":1514,"target":1097},{"edgeType":"imports","source":1518,"target":1531},{"edgeType":"calls","source":5773,"target":1199},{"edgeType":"calls","source":3676,"target":1728},{"edgeType":"calls","source":4838,"target":4815},{"edgeType":"contains","source":56,"target":3247},{"edgeType":"calls","source":4914,"target":345},{"edgeType":"calls","source":5192,"target":1240},{"edgeType":"contains","source":2263,"target":369},{"edgeType":"calls","source":5623,"target":564},{"edgeType":"calls","source":1228,"target":450},{"edgeType":"contains","source":2263,"target":2483},{"edgeType":"calls","source":5282,"target":564},{"edgeType":"calls","source":5337,"target":973},{"edgeType":"calls","source":2459,"target":345},{"edgeType":"calls","source":4706,"target":451},{"edgeType":"calls","source":1228,"target":449},{"edgeType":"calls","source":2511,"target":847},{"edgeType":"calls","source":1986,"target":206},{"edgeType":"calls","source":4372,"target":1292},{"edgeType":"contains","source":5672,"target":5673},{"edgeType":"calls","source":2249,"target":1570},{"edgeType":"calls","source":4353,"target":824},{"edgeType":"calls","source":5690,"target":2714},{"edgeType":"calls","source":4353,"target":822},{"edgeType":"calls","source":806,"target":850},{"edgeType":"calls","source":3020,"target":920},{"edgeType":"calls","source":5091,"target":1199},{"edgeType":"contains","source":11,"target":1474},{"edgeType":"calls","source":4838,"target":4814},{"edgeType":"contains","source":785,"target":1792},{"edgeType":"contains","source":115,"target":364},{"edgeType":"calls","source":3472,"target":2764},{"edgeType":"calls","source":5337,"target":972},{"edgeType":"calls","source":1228,"target":453},{"edgeType":"calls","source":3456,"target":89},{"edgeType":"calls","source":5461,"target":300},{"edgeType":"calls","source":4706,"target":450},{"edgeType":"contains","source":72,"target":3811},{"edgeType":"calls","source":3891,"target":345},{"edgeType":"contains","source":2994,"target":3074},{"edgeType":"contains","source":3591,"target":3595},{"edgeType":"contains","source":5275,"target":5299},{"edgeType":"calls","source":4212,"target":964},{"edgeType":"calls","source":4353,"target":823},{"edgeType":"calls","source":4416,"target":984},{"edgeType":"calls","source":4372,"target":1291},{"edgeType":"calls","source":4372,"target":1289},{"edgeType":"calls","source":3554,"target":3394},{"edgeType":"calls","source":5715,"target":5109},{"edgeType":"calls","source":5132,"target":984},{"edgeType":"contains","source":4178,"target":4423},{"edgeType":"calls","source":794,"target":164},{"edgeType":"contains","source":2263,"target":2481},{"edgeType":"calls","source":5337,"target":971},{"edgeType":"calls","source":1228,"target":452},{"edgeType":"contains","source":476,"target":800},{"edgeType":"calls","source":5473,"target":984},{"edgeType":"calls","source":4706,"target":449},{"edgeType":"contains","source":5275,"target":5298},{"edgeType":"calls","source":1777,"target":345},{"edgeType":"contains","source":1189,"target":1951},{"edgeType":"calls","source":2249,"target":1568},{"edgeType":"calls","source":4416,"target":983},{"edgeType":"imports","source":3969,"target":1654},{"edgeType":"calls","source":4372,"target":1290},{"edgeType":"contains","source":3591,"target":3594},{"edgeType":"calls","source":5715,"target":979},{"edgeType":"contains","source":4019,"target":4041},{"edgeType":"contains","source":4808,"target":4951},{"edgeType":"calls","source":997,"target":307},{"edgeType":"calls","source":5567,"target":282},{"edgeType":"calls","source":5515,"target":837},{"edgeType":"calls","source":5196,"target":2269},{"edgeType":"calls","source":3335,"target":766},{"edgeType":"contains","source":291,"target":1220},{"edgeType":"contains","source":476,"target":770},{"edgeType":"calls","source":5306,"target":973},{"edgeType":"calls","source":5402,"target":1169},{"edgeType":"calls","source":3260,"target":976},{"edgeType":"calls","source":4658,"target":978},{"edgeType":"calls","source":1135,"target":257},{"edgeType":"calls","source":1879,"target":1505},{"edgeType":"contains","source":4873,"target":5050},{"edgeType":"calls","source":4108,"target":3228},{"edgeType":"calls","source":4348,"target":1075},{"edgeType":"calls","source":4344,"target":142},{"edgeType":"calls","source":5026,"target":2253},{"edgeType":"calls","source":5715,"target":978},{"edgeType":"calls","source":3009,"target":302},{"edgeType":"contains","source":2070,"target":2095},{"edgeType":"contains","source":2036,"target":2092},{"edgeType":"calls","source":5306,"target":972},{"edgeType":"calls","source":3260,"target":978},{"edgeType":"calls","source":5452,"target":2789},{"edgeType":"calls","source":5515,"target":836},{"edgeType":"contains","source":2302,"target":2303},{"edgeType":"calls","source":3335,"target":767},{"edgeType":"calls","source":5430,"target":300},{"edgeType":"calls","source":5425,"target":454},{"edgeType":"calls","source":3260,"target":977},{"edgeType":"calls","source":5304,"target":3148},{"edgeType":"contains","source":1542,"target":1551},{"edgeType":"calls","source":4658,"target":977},{"edgeType":"contains","source":1671,"target":1780},{"edgeType":"imports","source":2948,"target":2435},{"edgeType":"contains","source":3871,"target":1229},{"edgeType":"contains","source":5171,"target":5324},{"edgeType":"contains","source":3359,"target":3360},{"edgeType":"calls","source":5715,"target":977},{"edgeType":"calls","source":5258,"target":345},{"edgeType":"calls","source":5306,"target":971},{"edgeType":"calls","source":1166,"target":356},{"edgeType":"contains","source":2517,"target":920},{"edgeType":"calls","source":5515,"target":835},{"edgeType":"calls","source":4695,"target":886},{"edgeType":"calls","source":4715,"target":266},{"edgeType":"calls","source":5425,"target":453},{"edgeType":"calls","source":3260,"target":974},{"edgeType":"calls","source":1166,"target":355},{"edgeType":"calls","source":4658,"target":976},{"edgeType":"contains","source":3057,"target":1092},{"edgeType":"contains","source":5506,"target":5514},{"edgeType":"contains","source":5171,"target":5323},{"edgeType":"contains","source":2016,"target":2710},{"edgeType":"calls","source":3084,"target":89},{"edgeType":"calls","source":5626,"target":564},{"edgeType":"contains","source":54,"target":3282},{"edgeType":"contains","source":476,"target":771},{"edgeType":"calls","source":3299,"target":2938},{"edgeType":"calls","source":5715,"target":976},{"edgeType":"contains","source":4316,"target":4344},{"edgeType":"contains","source":3057,"target":1093},{"edgeType":"calls","source":5425,"target":452},{"edgeType":"calls","source":3260,"target":975},{"edgeType":"calls","source":1952,"target":300},{"edgeType":"calls","source":2731,"target":462},{"edgeType":"contains","source":1542,"target":1549},{"edgeType":"calls","source":2640,"target":1169},{"edgeType":"calls","source":4658,"target":975},{"edgeType":"calls","source":4493,"target":805},{"edgeType":"imports","source":2734,"target":3781},{"edgeType":"calls","source":934,"target":142},{"edgeType":"contains","source":1671,"target":1783},{"edgeType":"calls","source":1436,"target":436},{"edgeType":"calls","source":3433,"target":895},{"edgeType":"calls","source":5715,"target":975},{"edgeType":"calls","source":1847,"target":1436},{"edgeType":"calls","source":5539,"target":89},{"edgeType":"calls","source":5515,"target":833},{"edgeType":"calls","source":5515,"target":832},{"edgeType":"calls","source":3433,"target":894},{"edgeType":"calls","source":5459,"target":454},{"edgeType":"calls","source":5425,"target":451},{"edgeType":"calls","source":3260,"target":972},{"edgeType":"contains","source":2698,"target":4828},{"edgeType":"calls","source":4658,"target":974},{"edgeType":"calls","source":4493,"target":804},{"edgeType":"contains","source":5506,"target":5508},{"edgeType":"contains","source":1906,"target":841},{"edgeType":"contains","source":3194,"target":3195},{"edgeType":"contains","source":5275,"target":5276},{"edgeType":"contains","source":4481,"target":4521},{"edgeType":"calls","source":5292,"target":345},{"edgeType":"contains","source":1635,"target":1843},{"edgeType":"calls","source":1438,"target":1430},{"edgeType":"calls","source":1525,"target":847},{"edgeType":"contains","source":253,"target":287},{"edgeType":"calls","source":3433,"target":896},{"edgeType":"contains","source":1,"target":2813},{"edgeType":"contains","source":2016,"target":2716},{"edgeType":"calls","source":5715,"target":974},{"edgeType":"calls","source":5459,"target":453},{"edgeType":"calls","source":5525,"target":521},{"edgeType":"contains","source":3476,"target":3965},{"edgeType":"calls","source":5425,"target":450},{"edgeType":"calls","source":3260,"target":973},{"edgeType":"calls","source":1241,"target":137},{"edgeType":"calls","source":4235,"target":345},{"edgeType":"calls","source":4189,"target":1771},{"edgeType":"contains","source":2698,"target":4829},{"edgeType":"contains","source":4873,"target":5053},{"edgeType":"calls","source":4493,"target":803},{"edgeType":"calls","source":4658,"target":973},{"edgeType":"calls","source":3739,"target":920},{"edgeType":"calls","source":4453,"target":984},{"edgeType":"calls","source":2420,"target":1641},{"edgeType":"contains","source":2585,"target":4101},{"edgeType":"contains","source":3884,"target":829},{"edgeType":"contains","source":283,"target":417},{"edgeType":"contains","source":3741,"target":4205},{"edgeType":"contains","source":4181,"target":4306},{"edgeType":"calls","source":5715,"target":973},{"edgeType":"contains","source":14,"target":2413},{"edgeType":"calls","source":3834,"target":89},{"edgeType":"calls","source":5491,"target":1574},{"edgeType":"calls","source":5573,"target":89},{"edgeType":"calls","source":2003,"target":830},{"edgeType":"calls","source":5425,"target":449},{"edgeType":"calls","source":5459,"target":452},{"edgeType":"imports","source":3374,"target":851},{"edgeType":"calls","source":3239,"target":564},{"edgeType":"calls","source":4838,"target":4905},{"edgeType":"contains","source":5506,"target":5510},{"edgeType":"calls","source":2714,"target":984},{"edgeType":"calls","source":4658,"target":972},{"edgeType":"contains","source":476,"target":775},{"edgeType":"calls","source":4502,"target":521},{"edgeType":"calls","source":4453,"target":983},{"edgeType":"calls","source":4502,"target":1578},{"edgeType":"contains","source":4019,"target":4042},{"edgeType":"calls","source":5094,"target":2253},{"edgeType":"calls","source":5099,"target":1041},{"edgeType":"calls","source":5128,"target":142},{"edgeType":"calls","source":5715,"target":972},{"edgeType":"calls","source":1786,"target":1214},{"edgeType":"contains","source":2367,"target":2404},{"edgeType":"calls","source":1661,"target":861},{"edgeType":"imports","source":2948,"target":2429},{"edgeType":"contains","source":1970,"target":2026},{"edgeType":"calls","source":3608,"target":2868},{"edgeType":"calls","source":1563,"target":1785},{"edgeType":"contains","source":1542,"target":1553},{"edgeType":"calls","source":5459,"target":451},{"edgeType":"calls","source":5493,"target":454},{"edgeType":"calls","source":5425,"target":448},{"edgeType":"calls","source":3260,"target":971},{"edgeType":"calls","source":4264,"target":501},{"edgeType":"calls","source":4658,"target":971},{"edgeType":"contains","source":5506,"target":5511},{"edgeType":"contains","source":3359,"target":3362},{"edgeType":"calls","source":4502,"target":1577},{"edgeType":"calls","source":3771,"target":983},{"edgeType":"calls","source":4453,"target":982},{"edgeType":"calls","source":436,"target":777},{"edgeType":"calls","source":5715,"target":971},{"edgeType":"contains","source":1542,"target":1558},{"edgeType":"calls","source":1908,"target":1655},{"edgeType":"calls","source":2714,"target":982},{"edgeType":"contains","source":56,"target":57},{"edgeType":"calls","source":5493,"target":453},{"edgeType":"calls","source":3319,"target":1253},{"edgeType":"calls","source":5459,"target":450},{"edgeType":"calls","source":5425,"target":447},{"edgeType":"contains","source":2994,"target":3055},{"edgeType":"contains","source":3057,"target":2159},{"edgeType":"imports","source":4103,"target":1506},{"edgeType":"calls","source":4582,"target":4383},{"edgeType":"calls","source":2939,"target":349},{"edgeType":"calls","source":4502,"target":1576},{"edgeType":"calls","source":3771,"target":984},{"edgeType":"calls","source":4376,"target":2311},{"edgeType":"calls","source":2222,"target":1436},{"edgeType":"calls","source":436,"target":776},{"edgeType":"calls","source":4470,"target":454},{"edgeType":"contains","source":5275,"target":5280},{"edgeType":"calls","source":4453,"target":981},{"edgeType":"contains","source":3321,"target":3490},{"edgeType":"calls","source":5626,"target":3729},{"edgeType":"calls","source":3986,"target":1718},{"edgeType":"calls","source":2714,"target":983},{"edgeType":"calls","source":3451,"target":3504},{"edgeType":"calls","source":5459,"target":449},{"edgeType":"calls","source":5493,"target":452},{"edgeType":"calls","source":5509,"target":1013},{"edgeType":"imports","source":2734,"target":2735},{"edgeType":"calls","source":1056,"target":1640},{"edgeType":"calls","source":3186,"target":89},{"edgeType":"contains","source":3159,"target":3224},{"edgeType":"calls","source":3771,"target":981},{"edgeType":"calls","source":4470,"target":453},{"edgeType":"calls","source":4453,"target":980},{"edgeType":"calls","source":4622,"target":1026},{"edgeType":"contains","source":283,"target":421},{"edgeType":"calls","source":4593,"target":2982},{"edgeType":"calls","source":4571,"target":1550},{"edgeType":"contains","source":2367,"target":2407},{"edgeType":"calls","source":1525,"target":846},{"edgeType":"calls","source":4257,"target":1771},{"edgeType":"contains","source":1867,"target":2051},{"edgeType":"contains","source":2016,"target":2717},{"edgeType":"calls","source":2714,"target":980},{"edgeType":"calls","source":2742,"target":1169},{"edgeType":"contains","source":14,"target":3475},{"edgeType":"contains","source":72,"target":2734},{"edgeType":"calls","source":5493,"target":451},{"edgeType":"calls","source":3621,"target":345},{"edgeType":"calls","source":5459,"target":448},{"edgeType":"contains","source":476,"target":780},{"edgeType":"calls","source":4776,"target":481},{"edgeType":"calls","source":5132,"target":1072},{"edgeType":"calls","source":964,"target":266},{"edgeType":"contains","source":3194,"target":3197},{"edgeType":"contains","source":5275,"target":5278},{"edgeType":"calls","source":3771,"target":982},{"edgeType":"calls","source":4470,"target":452},{"edgeType":"calls","source":4453,"target":979},{"edgeType":"contains","source":2070,"target":2101},{"edgeType":"calls","source":4008,"target":3148},{"edgeType":"contains","source":2829,"target":2884},{"edgeType":"calls","source":2714,"target":981},{"edgeType":"calls","source":4825,"target":1075},{"edgeType":"calls","source":5680,"target":995},{"edgeType":"calls","source":5459,"target":447},{"edgeType":"calls","source":5493,"target":450},{"edgeType":"contains","source":2585,"target":4106},{"edgeType":"calls","source":4875,"target":4810},{"edgeType":"calls","source":5342,"target":902},{"edgeType":"imports","source":2035,"target":89},{"edgeType":"calls","source":4502,"target":1573},{"edgeType":"calls","source":3771,"target":979},{"edgeType":"calls","source":1748,"target":269},{"edgeType":"calls","source":4470,"target":451},{"edgeType":"calls","source":4453,"target":978},{"edgeType":"calls","source":4838,"target":4899},{"edgeType":"calls","source":4918,"target":305},{"edgeType":"calls","source":2714,"target":978},{"edgeType":"contains","source":5506,"target":5516},{"edgeType":"calls","source":5559,"target":1574},{"edgeType":"contains","source":73,"target":2705},{"edgeType":"calls","source":5493,"target":449},{"edgeType":"calls","source":5533,"target":266},{"edgeType":"calls","source":1377,"target":142},{"edgeType":"calls","source":4973,"target":1771},{"edgeType":"calls","source":5148,"target":1631},{"edgeType":"calls","source":1036,"target":142},{"edgeType":"calls","source":4502,"target":1572},{"edgeType":"calls","source":3771,"target":980},{"edgeType":"calls","source":1916,"target":345},{"edgeType":"calls","source":4470,"target":450},{"edgeType":"calls","source":4453,"target":977},{"edgeType":"calls","source":4104,"target":2284},{"edgeType":"calls","source":4838,"target":4898},{"edgeType":"calls","source":2714,"target":979},{"edgeType":"calls","source":5524,"target":1601},{"edgeType":"calls","source":5493,"target":448},{"edgeType":"calls","source":5148,"target":1630},{"edgeType":"calls","source":5300,"target":89},{"edgeType":"calls","source":3771,"target":977},{"edgeType":"calls","source":141,"target":407},{"edgeType":"calls","source":4470,"target":449},{"edgeType":"calls","source":4453,"target":976},{"edgeType":"calls","source":2714,"target":975},{"edgeType":"calls","source":4502,"target":1571},{"edgeType":"calls","source":2422,"target":514},{"edgeType":"calls","source":4838,"target":4897},{"edgeType":"calls","source":5643,"target":2139},{"edgeType":"calls","source":5722,"target":747},{"edgeType":"calls","source":2714,"target":976},{"edgeType":"contains","source":55,"target":94},{"edgeType":"calls","source":3771,"target":976},{"edgeType":"calls","source":5148,"target":1629},{"edgeType":"calls","source":5493,"target":447},{"edgeType":"calls","source":5572,"target":1169},{"edgeType":"contains","source":2769,"target":4747},{"edgeType":"calls","source":5394,"target":345},{"edgeType":"imports","source":3331,"target":78},{"edgeType":"calls","source":3220,"target":89},{"edgeType":"calls","source":1673,"target":481},{"edgeType":"contains","source":3190,"target":3325},{"edgeType":"calls","source":3771,"target":978},{"edgeType":"calls","source":4470,"target":448},{"edgeType":"calls","source":4453,"target":975},{"edgeType":"calls","source":4502,"target":1570},{"edgeType":"calls","source":141,"target":406},{"edgeType":"calls","source":4838,"target":4896},{"edgeType":"calls","source":1543,"target":282},{"edgeType":"calls","source":2714,"target":977},{"edgeType":"contains","source":476,"target":783},{"edgeType":"calls","source":2998,"target":2743},{"edgeType":"imports","source":3385,"target":1574},{"edgeType":"contains","source":2585,"target":4110},{"edgeType":"contains","source":4654,"target":5506},{"edgeType":"calls","source":4692,"target":997},{"edgeType":"contains","source":5637,"target":5662},{"edgeType":"calls","source":1766,"target":1854},{"edgeType":"calls","source":4812,"target":448},{"edgeType":"contains","source":5736,"target":5764},{"edgeType":"imports","source":3460,"target":3461},{"edgeType":"calls","source":2425,"target":452},{"edgeType":"calls","source":4838,"target":4928},{"edgeType":"calls","source":3573,"target":803},{"edgeType":"contains","source":1988,"target":3563},{"edgeType":"calls","source":2785,"target":920},{"edgeType":"calls","source":2823,"target":799},{"edgeType":"contains","source":53,"target":125},{"edgeType":"contains","source":2532,"target":2554},{"edgeType":"calls","source":5579,"target":983},{"edgeType":"contains","source":54,"target":3265},{"edgeType":"calls","source":1766,"target":1853},{"edgeType":"calls","source":4812,"target":447},{"edgeType":"calls","source":1871,"target":1769},{"edgeType":"contains","source":5736,"target":5765},{"edgeType":"calls","source":2425,"target":453},{"edgeType":"calls","source":4947,"target":3662},{"edgeType":"calls","source":3573,"target":804},{"edgeType":"calls","source":892,"target":407},{"edgeType":"calls","source":3702,"target":1033},{"edgeType":"calls","source":4888,"target":206},{"edgeType":"calls","source":5548,"target":886},{"edgeType":"calls","source":5579,"target":982},{"edgeType":"calls","source":5592,"target":1636},{"edgeType":"calls","source":5594,"target":1574},{"edgeType":"contains","source":2532,"target":2555},{"edgeType":"calls","source":5332,"target":1240},{"edgeType":"calls","source":3857,"target":1511},{"edgeType":"contains","source":5736,"target":5766},{"edgeType":"calls","source":1748,"target":300},{"edgeType":"calls","source":2425,"target":450},{"edgeType":"calls","source":4372,"target":345},{"edgeType":"contains","source":2532,"target":2552},{"edgeType":"calls","source":5579,"target":981},{"edgeType":"calls","source":920,"target":1656},{"edgeType":"calls","source":1563,"target":749},{"edgeType":"contains","source":476,"target":755},{"edgeType":"calls","source":1067,"target":269},{"edgeType":"contains","source":1671,"target":1761},{"edgeType":"contains","source":5736,"target":5767},{"edgeType":"calls","source":1917,"target":345},{"edgeType":"calls","source":1834,"target":1861},{"edgeType":"contains","source":2829,"target":3917},{"edgeType":"calls","source":3964,"target":309},{"edgeType":"calls","source":1950,"target":1436},{"edgeType":"calls","source":2279,"target":749},{"edgeType":"calls","source":2425,"target":451},{"edgeType":"contains","source":4808,"target":4931},{"edgeType":"contains","source":4019,"target":4022},{"edgeType":"contains","source":1905,"target":1907},{"edgeType":"contains","source":2532,"target":2553},{"edgeType":"contains","source":2048,"target":4873},{"edgeType":"calls","source":3492,"target":142},{"edgeType":"calls","source":5579,"target":980},{"edgeType":"calls","source":1937,"target":777},{"edgeType":"calls","source":5431,"target":282},{"edgeType":"contains","source":5736,"target":5760},{"edgeType":"calls","source":3163,"target":2939},{"edgeType":"calls","source":3186,"target":1169},{"edgeType":"contains","source":5637,"target":5658},{"edgeType":"calls","source":2425,"target":448},{"edgeType":"contains","source":5171,"target":5313},{"edgeType":"contains","source":3057,"target":1082},{"edgeType":"calls","source":4644,"target":367},{"edgeType":"calls","source":1543,"target":1363},{"edgeType":"calls","source":4280,"target":3195},{"edgeType":"calls","source":4246,"target":4249},{"edgeType":"contains","source":2532,"target":2558},{"edgeType":"calls","source":2995,"target":1805},{"edgeType":"calls","source":4982,"target":4688},{"edgeType":"contains","source":2016,"target":2699},{"edgeType":"contains","source":3811,"target":4135},{"edgeType":"calls","source":5579,"target":979},{"edgeType":"contains","source":75,"target":1561},{"edgeType":"calls","source":5612,"target":1013},{"edgeType":"contains","source":5736,"target":5761},{"edgeType":"calls","source":1937,"target":776},{"edgeType":"calls","source":5428,"target":1431},{"edgeType":"contains","source":4316,"target":4334},{"edgeType":"calls","source":3243,"target":460},{"edgeType":"calls","source":2425,"target":449},{"edgeType":"contains","source":4868,"target":4135},{"edgeType":"contains","source":4808,"target":4938},{"edgeType":"calls","source":811,"target":799},{"edgeType":"calls","source":4674,"target":1550},{"edgeType":"contains","source":476,"target":756},{"edgeType":"calls","source":5025,"target":1240},{"edgeType":"contains","source":2532,"target":2559},{"edgeType":"calls","source":3931,"target":272},{"edgeType":"calls","source":5579,"target":978},{"edgeType":"contains","source":5637,"target":5660},{"edgeType":"calls","source":4687,"target":89},{"edgeType":"calls","source":4662,"target":864},{"edgeType":"contains","source":2532,"target":2556},{"edgeType":"calls","source":892,"target":406},{"edgeType":"calls","source":1352,"target":944},{"edgeType":"calls","source":5306,"target":984},{"edgeType":"contains","source":4410,"target":4590},{"edgeType":"calls","source":5579,"target":977},{"edgeType":"contains","source":56,"target":3208},{"edgeType":"contains","source":815,"target":820},{"edgeType":"calls","source":5579,"target":976},{"edgeType":"calls","source":1132,"target":364},{"edgeType":"contains","source":5637,"target":5661},{"edgeType":"contains","source":3871,"target":1214},{"edgeType":"contains","source":3792,"target":3663},{"edgeType":"calls","source":4959,"target":1169},{"edgeType":"calls","source":2425,"target":447},{"edgeType":"contains","source":3476,"target":3946},{"edgeType":"calls","source":2694,"target":564},{"edgeType":"contains","source":2532,"target":2557},{"edgeType":"contains","source":4808,"target":4935},{"edgeType":"calls","source":5306,"target":983},{"edgeType":"calls","source":5744,"target":89},{"edgeType":"calls","source":1817,"target":269},{"edgeType":"calls","source":3964,"target":304},{"edgeType":"calls","source":1681,"target":257},{"edgeType":"calls","source":3621,"target":367},{"edgeType":"contains","source":54,"target":2213},{"edgeType":"imports","source":2948,"target":2412},{"edgeType":"contains","source":4181,"target":4296},{"edgeType":"calls","source":3987,"target":3817},{"edgeType":"calls","source":5579,"target":975},{"edgeType":"calls","source":4053,"target":1771},{"edgeType":"contains","source":2070,"target":2086},{"edgeType":"calls","source":5239,"target":5173},{"edgeType":"calls","source":5403,"target":89},{"edgeType":"calls","source":1169,"target":269},{"edgeType":"calls","source":964,"target":282},{"edgeType":"imports","source":3641,"target":1013},{"edgeType":"contains","source":2532,"target":2562},{"edgeType":"contains","source":4481,"target":4509},{"edgeType":"calls","source":3712,"target":1771},{"edgeType":"contains","source":5171,"target":5317},{"edgeType":"calls","source":5306,"target":982},{"edgeType":"calls","source":5579,"target":974},{"edgeType":"calls","source":3987,"target":3818},{"edgeType":"contains","source":2016,"target":2704},{"edgeType":"contains","source":1988,"target":3572},{"edgeType":"calls","source":5463,"target":2456},{"edgeType":"calls","source":5055,"target":305},{"edgeType":"calls","source":4721,"target":89},{"edgeType":"contains","source":2532,"target":2564},{"edgeType":"imports","source":2948,"target":2427},{"edgeType":"calls","source":2741,"target":1219},{"edgeType":"contains","source":2698,"target":4817},{"edgeType":"contains","source":2532,"target":2563},{"edgeType":"contains","source":5171,"target":5316},{"edgeType":"calls","source":5306,"target":981},{"edgeType":"calls","source":4467,"target":564},{"edgeType":"contains","source":476,"target":760},{"edgeType":"calls","source":4355,"target":1922},{"edgeType":"contains","source":1510,"target":3592},{"edgeType":"contains","source":3321,"target":3473},{"edgeType":"contains","source":253,"target":274},{"edgeType":"calls","source":5579,"target":973},{"edgeType":"calls","source":5305,"target":5239},{"edgeType":"calls","source":5443,"target":961},{"edgeType":"calls","source":5524,"target":564},{"edgeType":"calls","source":4658,"target":984},{"edgeType":"calls","source":3260,"target":983},{"edgeType":"calls","source":3246,"target":360},{"edgeType":"contains","source":2698,"target":4814},{"edgeType":"calls","source":4838,"target":4917},{"edgeType":"calls","source":4947,"target":481},{"edgeType":"contains","source":2532,"target":2560},{"edgeType":"calls","source":2428,"target":349},{"edgeType":"calls","source":3771,"target":997},{"edgeType":"calls","source":5273,"target":2003},{"edgeType":"calls","source":5306,"target":980},{"edgeType":"calls","source":5293,"target":2440},{"edgeType":"imports","source":4286,"target":2161},{"edgeType":"calls","source":2186,"target":1509},{"edgeType":"contains","source":1988,"target":3569},{"edgeType":"contains","source":3811,"target":5194},{"edgeType":"calls","source":5715,"target":984},{"edgeType":"calls","source":3417,"target":345},{"edgeType":"calls","source":5579,"target":972},{"edgeType":"calls","source":5541,"target":2150},{"edgeType":"calls","source":3260,"target":984},{"edgeType":"calls","source":5414,"target":802},{"edgeType":"calls","source":5331,"target":2318},{"edgeType":"contains","source":5171,"target":5314},{"edgeType":"contains","source":2584,"target":3064},{"edgeType":"calls","source":4963,"target":1041},{"edgeType":"contains","source":2698,"target":4815},{"edgeType":"contains","source":337,"target":2957},{"edgeType":"contains","source":2532,"target":2561},{"edgeType":"calls","source":5105,"target":4039},{"edgeType":"calls","source":1574,"target":1456},{"edgeType":"calls","source":5306,"target":979},{"edgeType":"calls","source":4658,"target":983},{"edgeType":"calls","source":1456,"target":886},{"edgeType":"contains","source":1671,"target":1770},{"edgeType":"contains","source":3886,"target":754},{"edgeType":"contains","source":5506,"target":5507},{"edgeType":"calls","source":4852,"target":3424},{"edgeType":"contains","source":5637,"target":5666},{"edgeType":"calls","source":5715,"target":983},{"edgeType":"calls","source":5531,"target":345},{"edgeType":"calls","source":5579,"target":971},{"edgeType":"calls","source":5430,"target":305},{"edgeType":"calls","source":3260,"target":981},{"edgeType":"calls","source":3246,"target":358},{"edgeType":"calls","source":5045,"target":1669},{"edgeType":"calls","source":1166,"target":358},{"edgeType":"calls","source":5253,"target":1564},{"edgeType":"calls","source":997,"target":2425},{"edgeType":"contains","source":1671,"target":1775},{"edgeType":"contains","source":5171,"target":5321},{"edgeType":"calls","source":5306,"target":978},{"edgeType":"calls","source":4658,"target":982},{"edgeType":"calls","source":4482,"target":1153},{"edgeType":"calls","source":3710,"target":772},{"edgeType":"imports","source":2048,"target":1784},{"edgeType":"calls","source":4041,"target":3195},{"edgeType":"imports","source":2948,"target":2423},{"edgeType":"contains","source":4019,"target":4036},{"edgeType":"contains","source":2070,"target":2091},{"edgeType":"calls","source":3611,"target":1728},{"edgeType":"contains","source":1988,"target":3576},{"edgeType":"calls","source":5715,"target":982},{"edgeType":"calls","source":5127,"target":1240},{"edgeType":"contains","source":2533,"target":2537},{"edgeType":"calls","source":3260,"target":982},{"edgeType":"calls","source":5500,"target":1305},{"edgeType":"calls","source":997,"target":310},{"edgeType":"contains","source":4356,"target":4159},{"edgeType":"calls","source":1166,"target":357},{"edgeType":"calls","source":3246,"target":359},{"edgeType":"contains","source":2584,"target":3070},{"edgeType":"contains","source":5171,"target":5320},{"edgeType":"calls","source":5306,"target":977},{"edgeType":"calls","source":3803,"target":1061},{"edgeType":"calls","source":2298,"target":2264},{"edgeType":"calls","source":3732,"target":2205},{"edgeType":"contains","source":3159,"target":3214},{"edgeType":"calls","source":4491,"target":1930},{"edgeType":"calls","source":4658,"target":981},{"edgeType":"contains","source":1542,"target":1547},{"edgeType":"calls","source":4957,"target":1224},{"edgeType":"contains","source":4808,"target":4945},{"edgeType":"contains","source":2070,"target":2088},{"edgeType":"calls","source":5055,"target":300},{"edgeType":"calls","source":5030,"target":1075},{"edgeType":"calls","source":5031,"target":1044},{"edgeType":"calls","source":5715,"target":981},{"edgeType":"contains","source":2584,"target":3067},{"edgeType":"calls","source":1166,"target":360},{"edgeType":"calls","source":5517,"target":777},{"edgeType":"calls","source":5375,"target":5179},{"edgeType":"calls","source":3116,"target":1214},{"edgeType":"calls","source":5257,"target":380},{"edgeType":"contains","source":2533,"target":2534},{"edgeType":"calls","source":3260,"target":979},{"edgeType":"contains","source":476,"target":768},{"edgeType":"calls","source":3246,"target":356},{"edgeType":"calls","source":3222,"target":2157},{"edgeType":"calls","source":5306,"target":975},{"edgeType":"contains","source":5171,"target":5319},{"edgeType":"calls","source":3246,"target":355},{"edgeType":"calls","source":5306,"target":976},{"edgeType":"calls","source":1777,"target":445},{"edgeType":"calls","source":4686,"target":1169},{"edgeType":"calls","source":4658,"target":980},{"edgeType":"contains","source":1542,"target":1544},{"edgeType":"calls","source":1952,"target":305},{"edgeType":"calls","source":4957,"target":1223},{"edgeType":"contains","source":4808,"target":4944},{"edgeType":"calls","source":5715,"target":980},{"edgeType":"calls","source":5574,"target":2180},{"edgeType":"calls","source":750,"target":570},{"edgeType":"calls","source":1501,"target":1601},{"edgeType":"calls","source":5517,"target":776},{"edgeType":"calls","source":1276,"target":120},{"edgeType":"calls","source":5575,"target":1092},{"edgeType":"calls","source":3260,"target":980},{"edgeType":"contains","source":4581,"target":4582},{"edgeType":"calls","source":1166,"target":359},{"edgeType":"calls","source":3246,"target":357},{"edgeType":"calls","source":5306,"target":974},{"edgeType":"calls","source":3145,"target":2431},{"edgeType":"calls","source":4658,"target":979},{"edgeType":"calls","source":1641,"target":1489},{"edgeType":"calls","source":4689,"target":3189},{"edgeType":"contains","source":5171,"target":5318},{"edgeType":"calls","source":4022,"target":1669},{"edgeType":"imports","source":57,"target":81},{"edgeType":"calls","source":4167,"target":345},{"edgeType":"calls","source":4240,"target":1253},{"edgeType":"calls","source":5029,"target":1071},{"edgeType":"calls","source":5714,"target":977},{"edgeType":"contains","source":2698,"target":4791},{"edgeType":"contains","source":3886,"target":3903},{"edgeType":"calls","source":5550,"target":776},{"edgeType":"contains","source":2532,"target":2538},{"edgeType":"calls","source":1777,"target":406},{"edgeType":"calls","source":5646,"target":971},{"edgeType":"calls","source":3383,"target":302},{"edgeType":"calls","source":3518,"target":345},{"edgeType":"contains","source":476,"target":737},{"edgeType":"calls","source":5390,"target":450},{"edgeType":"imports","source":331,"target":89},{"edgeType":"calls","source":4623,"target":973},{"edgeType":"calls","source":4708,"target":452},{"edgeType":"contains","source":5637,"target":5646},{"edgeType":"contains","source":841,"target":1049},{"edgeType":"calls","source":4822,"target":89},{"edgeType":"calls","source":4023,"target":1602},{"edgeType":"contains","source":5736,"target":5748},{"edgeType":"calls","source":4108,"target":3195},{"edgeType":"calls","source":4498,"target":3791},{"edgeType":"calls","source":4433,"target":1578},{"edgeType":"contains","source":1376,"target":1378},{"edgeType":"calls","source":4384,"target":983},{"edgeType":"calls","source":2211,"target":695},{"edgeType":"calls","source":4384,"target":981},{"edgeType":"contains","source":4037,"target":5563},{"edgeType":"calls","source":5714,"target":976},{"edgeType":"contains","source":1988,"target":3547},{"edgeType":"calls","source":4924,"target":2211},{"edgeType":"calls","source":5749,"target":5176},{"edgeType":"contains","source":3886,"target":3902},{"edgeType":"calls","source":3451,"target":309},{"edgeType":"contains","source":2532,"target":2539},{"edgeType":"contains","source":2367,"target":2369},{"edgeType":"calls","source":4688,"target":1071},{"edgeType":"calls","source":4708,"target":451},{"edgeType":"contains","source":2959,"target":3043},{"edgeType":"calls","source":5403,"target":2160},{"edgeType":"calls","source":5390,"target":449},{"edgeType":"contains","source":5736,"target":5749},{"edgeType":"calls","source":4749,"target":3408},{"edgeType":"calls","source":4558,"target":1930},{"edgeType":"calls","source":4623,"target":972},{"edgeType":"calls","source":4384,"target":982},{"edgeType":"contains","source":1376,"target":1379},{"edgeType":"calls","source":4381,"target":3189},{"edgeType":"calls","source":4433,"target":1577},{"edgeType":"calls","source":4384,"target":980},{"edgeType":"calls","source":2958,"target":790},{"edgeType":"calls","source":4353,"target":884},{"edgeType":"calls","source":4280,"target":1033},{"edgeType":"calls","source":5197,"target":89},{"edgeType":"calls","source":5122,"target":300},{"edgeType":"calls","source":4989,"target":3366},{"edgeType":"contains","source":476,"target":739},{"edgeType":"calls","source":5538,"target":89},{"edgeType":"calls","source":5714,"target":975},{"edgeType":"calls","source":5458,"target":454},{"edgeType":"calls","source":4708,"target":450},{"edgeType":"calls","source":5475,"target":984},{"edgeType":"calls","source":5390,"target":448},{"edgeType":"calls","source":3417,"target":302},{"edgeType":"contains","source":2959,"target":3040},{"edgeType":"contains","source":3816,"target":3957},{"edgeType":"contains","source":898,"target":341},{"edgeType":"contains","source":841,"target":1051},{"edgeType":"contains","source":3886,"target":3901},{"edgeType":"calls","source":4918,"target":282},{"edgeType":"calls","source":4433,"target":1576},{"edgeType":"calls","source":4623,"target":971},{"edgeType":"calls","source":5717,"target":5109},{"edgeType":"calls","source":4353,"target":883},{"edgeType":"calls","source":4457,"target":830},{"edgeType":"calls","source":4411,"target":1199},{"edgeType":"calls","source":4384,"target":979},{"edgeType":"contains","source":2829,"target":2843},{"edgeType":"calls","source":5291,"target":345},{"edgeType":"calls","source":5360,"target":320},{"edgeType":"calls","source":5714,"target":974},{"edgeType":"contains","source":4481,"target":4482},{"edgeType":"calls","source":1837,"target":1718},{"edgeType":"calls","source":5475,"target":983},{"edgeType":"calls","source":5458,"target":453},{"edgeType":"calls","source":5420,"target":1631},{"edgeType":"contains","source":3816,"target":3956},{"edgeType":"contains","source":841,"target":1050},{"edgeType":"calls","source":1777,"target":407},{"edgeType":"calls","source":5390,"target":447},{"edgeType":"contains","source":5736,"target":5751},{"edgeType":"calls","source":4234,"target":345},{"edgeType":"calls","source":4662,"target":818},{"edgeType":"calls","source":4708,"target":449},{"edgeType":"calls","source":5128,"target":1169},{"edgeType":"contains","source":476,"target":741},{"edgeType":"calls","source":4384,"target":978},{"edgeType":"calls","source":5749,"target":5173},{"edgeType":"calls","source":4506,"target":367},{"edgeType":"calls","source":4433,"target":1573},{"edgeType":"calls","source":4328,"target":1657},{"edgeType":"contains","source":2532,"target":2542},{"edgeType":"calls","source":5293,"target":282},{"edgeType":"calls","source":5659,"target":564},{"edgeType":"calls","source":1753,"target":89},{"edgeType":"calls","source":5714,"target":973},{"edgeType":"calls","source":4776,"target":454},{"edgeType":"contains","source":2959,"target":3046},{"edgeType":"calls","source":5458,"target":452},{"edgeType":"calls","source":5420,"target":1630},{"edgeType":"calls","source":5490,"target":1574},{"edgeType":"calls","source":5475,"target":982},{"edgeType":"contains","source":5736,"target":5744},{"edgeType":"calls","source":4498,"target":3787},{"edgeType":"calls","source":4708,"target":448},{"edgeType":"calls","source":4662,"target":817},{"edgeType":"contains","source":1781,"target":4683},{"edgeType":"calls","source":4433,"target":1572},{"edgeType":"calls","source":997,"target":269},{"edgeType":"contains","source":3886,"target":3906},{"edgeType":"calls","source":2211,"target":691},{"edgeType":"calls","source":4328,"target":1656},{"edgeType":"calls","source":4384,"target":977},{"edgeType":"contains","source":2532,"target":2543},{"edgeType":"contains","source":2531,"target":2574},{"edgeType":"calls","source":5645,"target":997},{"edgeType":"calls","source":3451,"target":305},{"edgeType":"calls","source":5714,"target":972},{"edgeType":"calls","source":1858,"target":1061},{"edgeType":"contains","source":253,"target":254},{"edgeType":"calls","source":1308,"target":141},{"edgeType":"contains","source":4283,"target":4284},{"edgeType":"contains","source":2915,"target":3354},{"edgeType":"calls","source":5475,"target":981},{"edgeType":"contains","source":5736,"target":5745},{"edgeType":"calls","source":3451,"target":304},{"edgeType":"calls","source":5458,"target":451},{"edgeType":"calls","source":5420,"target":1629},{"edgeType":"contains","source":4808,"target":4921},{"edgeType":"imports","source":1280,"target":264},{"edgeType":"calls","source":4464,"target":3783},{"edgeType":"calls","source":4708,"target":447},{"edgeType":"contains","source":2959,"target":3047},{"edgeType":"calls","source":4776,"target":453},{"edgeType":"calls","source":2989,"target":2996},{"edgeType":"contains","source":2584,"target":3042},{"edgeType":"calls","source":4433,"target":1571},{"edgeType":"imports","source":58,"target":90},{"edgeType":"contains","source":3886,"target":3905},{"edgeType":"contains","source":2531,"target":2571},{"edgeType":"contains","source":2532,"target":2540},{"edgeType":"calls","source":4384,"target":976},{"edgeType":"imports","source":3811,"target":1092},{"edgeType":"calls","source":2211,"target":688},{"edgeType":"calls","source":5714,"target":971},{"edgeType":"calls","source":2100,"target":2015},{"edgeType":"calls","source":1505,"target":380},{"edgeType":"calls","source":5746,"target":1036},{"edgeType":"contains","source":2959,"target":3044},{"edgeType":"contains","source":4316,"target":4317},{"edgeType":"calls","source":2736,"target":269},{"edgeType":"contains","source":5736,"target":5746},{"edgeType":"calls","source":4104,"target":142},{"edgeType":"calls","source":5458,"target":450},{"edgeType":"calls","source":3319,"target":1222},{"edgeType":"calls","source":5475,"target":980},{"edgeType":"contains","source":1376,"target":1380},{"edgeType":"calls","source":4776,"target":452},{"edgeType":"calls","source":2758,"target":2758},{"edgeType":"calls","source":4693,"target":4082},{"edgeType":"imports","source":58,"target":91},{"edgeType":"contains","source":2532,"target":2541},{"edgeType":"contains","source":3886,"target":3904},{"edgeType":"contains","source":4683,"target":2452},{"edgeType":"calls","source":5233,"target":2139},{"edgeType":"calls","source":4433,"target":1570},{"edgeType":"calls","source":4384,"target":975},{"edgeType":"contains","source":3816,"target":3960},{"edgeType":"calls","source":3490,"target":3322},{"edgeType":"calls","source":3967,"target":1219},{"edgeType":"calls","source":5693,"target":564},{"edgeType":"contains","source":4410,"target":344},{"edgeType":"contains","source":5736,"target":5747},{"edgeType":"calls","source":5524,"target":1574},{"edgeType":"calls","source":5606,"target":89},{"edgeType":"contains","source":2959,"target":3045},{"edgeType":"calls","source":5475,"target":979},{"edgeType":"calls","source":5502,"target":142},{"edgeType":"calls","source":5458,"target":449},{"edgeType":"contains","source":1376,"target":1381},{"edgeType":"calls","source":2459,"target":2515},{"edgeType":"contains","source":3476,"target":3930},{"edgeType":"calls","source":4776,"target":451},{"edgeType":"contains","source":2532,"target":2546},{"edgeType":"calls","source":3787,"target":454},{"edgeType":"calls","source":5360,"target":315},{"edgeType":"contains","source":476,"target":745},{"edgeType":"calls","source":4384,"target":974},{"edgeType":"calls","source":4433,"target":1569},{"edgeType":"contains","source":5637,"target":5654},{"edgeType":"contains","source":1988,"target":3554},{"edgeType":"contains","source":3886,"target":3911},{"edgeType":"contains","source":5736,"target":5756},{"edgeType":"calls","source":1390,"target":767},{"edgeType":"calls","source":1436,"target":398},{"edgeType":"calls","source":5458,"target":448},{"edgeType":"contains","source":4316,"target":4323},{"edgeType":"calls","source":5526,"target":454},{"edgeType":"calls","source":5475,"target":978},{"edgeType":"contains","source":3057,"target":3183},{"edgeType":"calls","source":1105,"target":89},{"edgeType":"calls","source":4776,"target":450},{"edgeType":"calls","source":4693,"target":4080},{"edgeType":"calls","source":2882,"target":1026},{"edgeType":"calls","source":5258,"target":305},{"edgeType":"calls","source":5078,"target":4828},{"edgeType":"contains","source":2532,"target":2547},{"edgeType":"contains","source":4683,"target":2458},{"edgeType":"calls","source":4433,"target":1568},{"edgeType":"contains","source":4481,"target":4492},{"edgeType":"calls","source":4353,"target":877},{"edgeType":"calls","source":4384,"target":973},{"edgeType":"contains","source":3644,"target":4013},{"edgeType":"contains","source":5736,"target":5757},{"edgeType":"contains","source":3886,"target":3910},{"edgeType":"contains","source":5637,"target":5655},{"edgeType":"calls","source":1390,"target":766},{"edgeType":"contains","source":2070,"target":2071},{"edgeType":"calls","source":5526,"target":453},{"edgeType":"contains","source":4283,"target":4288},{"edgeType":"calls","source":5475,"target":977},{"edgeType":"calls","source":3431,"target":920},{"edgeType":"contains","source":4316,"target":4322},{"edgeType":"calls","source":3451,"target":300},{"edgeType":"calls","source":2535,"target":1214},{"edgeType":"contains","source":2994,"target":3023},{"edgeType":"calls","source":5458,"target":447},{"edgeType":"calls","source":892,"target":349},{"edgeType":"calls","source":4776,"target":449},{"edgeType":"calls","source":2858,"target":1771},{"edgeType":"contains","source":2532,"target":2544},{"edgeType":"contains","source":2531,"target":2575},{"edgeType":"contains","source":3886,"target":3909},{"edgeType":"calls","source":2496,"target":305},{"edgeType":"calls","source":5360,"target":313},{"edgeType":"calls","source":3787,"target":452},{"edgeType":"calls","source":4384,"target":972},{"edgeType":"calls","source":1506,"target":345},{"edgeType":"contains","source":3644,"target":4012},{"edgeType":"calls","source":4369,"target":380},{"edgeType":"contains","source":3641,"target":5162},{"edgeType":"calls","source":2163,"target":1115},{"edgeType":"contains","source":5736,"target":5758},{"edgeType":"contains","source":4316,"target":4321},{"edgeType":"calls","source":5526,"target":452},{"edgeType":"contains","source":4283,"target":4287},{"edgeType":"calls","source":5608,"target":3195},{"edgeType":"calls","source":5640,"target":89},{"edgeType":"calls","source":5475,"target":976},{"edgeType":"calls","source":4776,"target":448},{"edgeType":"contains","source":1244,"target":1248},{"edgeType":"contains","source":2959,"target":3048},{"edgeType":"calls","source":5196,"target":1169},{"edgeType":"contains","source":2910,"target":3510},{"edgeType":"contains","source":3886,"target":3908},{"edgeType":"contains","source":2532,"target":2545},{"edgeType":"calls","source":3787,"target":453},{"edgeType":"contains","source":4481,"target":4490},{"edgeType":"calls","source":2249,"target":564},{"edgeType":"calls","source":2205,"target":1928},{"edgeType":"calls","source":4384,"target":971},{"edgeType":"contains","source":5736,"target":5759},{"edgeType":"calls","source":4839,"target":1665},{"edgeType":"contains","source":54,"target":3258},{"edgeType":"calls","source":5734,"target":345},{"edgeType":"calls","source":5475,"target":975},{"edgeType":"contains","source":3057,"target":3182},{"edgeType":"calls","source":4776,"target":447},{"edgeType":"calls","source":4686,"target":2180},{"edgeType":"calls","source":5526,"target":451},{"edgeType":"calls","source":3266,"target":1805},{"edgeType":"calls","source":5200,"target":1044},{"edgeType":"contains","source":2959,"target":3049},{"edgeType":"contains","source":5171,"target":5305},{"edgeType":"calls","source":3787,"target":450},{"edgeType":"calls","source":4295,"target":3729},{"edgeType":"contains","source":5736,"target":5752},{"edgeType":"contains","source":2016,"target":2691},{"edgeType":"calls","source":4858,"target":1075},{"edgeType":"contains","source":53,"target":121},{"edgeType":"calls","source":3634,"target":964},{"edgeType":"calls","source":3358,"target":2121},{"edgeType":"contains","source":2263,"target":2433},{"edgeType":"calls","source":5526,"target":450},{"edgeType":"calls","source":5475,"target":974},{"edgeType":"calls","source":5380,"target":1805},{"edgeType":"contains","source":2532,"target":2550},{"edgeType":"contains","source":4481,"target":4497},{"edgeType":"calls","source":3787,"target":451},{"edgeType":"calls","source":4711,"target":345},{"edgeType":"contains","source":5736,"target":5753},{"edgeType":"calls","source":4403,"target":380},{"edgeType":"calls","source":5592,"target":1574},{"edgeType":"calls","source":892,"target":345},{"edgeType":"calls","source":5526,"target":449},{"edgeType":"contains","source":2829,"target":3914},{"edgeType":"calls","source":5475,"target":973},{"edgeType":"contains","source":2263,"target":2434},{"edgeType":"calls","source":5546,"target":886},{"edgeType":"contains","source":2532,"target":2551},{"edgeType":"calls","source":1726,"target":920},{"edgeType":"contains","source":5736,"target":5754},{"edgeType":"calls","source":4370,"target":345},{"edgeType":"contains","source":5637,"target":5652},{"edgeType":"calls","source":5079,"target":564},{"edgeType":"contains","source":53,"target":123},{"edgeType":"contains","source":476,"target":751},{"edgeType":"calls","source":3787,"target":447},{"edgeType":"calls","source":5526,"target":448},{"edgeType":"contains","source":4283,"target":4291},{"edgeType":"calls","source":3070,"target":2591},{"edgeType":"contains","source":2532,"target":2548},{"edgeType":"calls","source":5475,"target":972},{"edgeType":"calls","source":5258,"target":300},{"edgeType":"calls","source":3451,"target":3464},{"edgeType":"calls","source":5360,"target":309},{"edgeType":"calls","source":3840,"target":920},{"edgeType":"contains","source":3127,"target":3131},{"edgeType":"contains","source":3159,"target":3196},{"edgeType":"calls","source":3787,"target":449},{"edgeType":"contains","source":5736,"target":5755},{"edgeType":"calls","source":2640,"target":2180},{"edgeType":"calls","source":3986,"target":2736},{"edgeType":"contains","source":3886,"target":3912},{"edgeType":"contains","source":5637,"target":5653},{"edgeType":"calls","source":4267,"target":367},{"edgeType":"calls","source":3530,"target":1016},{"edgeType":"contains","source":53,"target":122},{"edgeType":"calls","source":4823,"target":2157},{"edgeType":"calls","source":3787,"target":448},{"edgeType":"calls","source":5475,"target":971},{"edgeType":"contains","source":2532,"target":2549},{"edgeType":"calls","source":5526,"target":447},{"edgeType":"calls","source":5451,"target":2772},{"edgeType":"imports","source":3331,"target":110},{"edgeType":"calls","source":1205,"target":1242},{"edgeType":"contains","source":2959,"target":3026},{"edgeType":"calls","source":4502,"target":1569},{"edgeType":"calls","source":4054,"target":2772},{"edgeType":"contains","source":5603,"target":5626},{"edgeType":"calls","source":2714,"target":973},{"edgeType":"calls","source":2289,"target":407},{"edgeType":"calls","source":4470,"target":447},{"edgeType":"calls","source":4371,"target":345},{"edgeType":"calls","source":4453,"target":974},{"edgeType":"calls","source":4358,"target":1805},{"edgeType":"contains","source":1970,"target":1974},{"edgeType":"calls","source":3000,"target":564},{"edgeType":"contains","source":4808,"target":4901},{"edgeType":"contains","source":3885,"target":3918},{"edgeType":"contains","source":3884,"target":3949},{"edgeType":"calls","source":4838,"target":4895},{"edgeType":"calls","source":920,"target":1621},{"edgeType":"contains","source":79,"target":343},{"edgeType":"calls","source":5595,"target":454},{"edgeType":"calls","source":3771,"target":974},{"edgeType":"contains","source":3884,"target":3947},{"edgeType":"calls","source":2714,"target":974},{"edgeType":"calls","source":4502,"target":1568},{"edgeType":"contains","source":3865,"target":4536},{"edgeType":"calls","source":4080,"target":4081},{"edgeType":"contains","source":3258,"target":3271},{"edgeType":"calls","source":4652,"target":89},{"edgeType":"calls","source":4453,"target":973},{"edgeType":"contains","source":3321,"target":3432},{"edgeType":"imports","source":2740,"target":443},{"edgeType":"calls","source":3595,"target":89},{"edgeType":"calls","source":5771,"target":282},{"edgeType":"calls","source":3723,"target":349},{"edgeType":"contains","source":2698,"target":3718},{"edgeType":"contains","source":79,"target":342},{"edgeType":"calls","source":5015,"target":464},{"edgeType":"calls","source":4918,"target":300},{"edgeType":"contains","source":54,"target":60},{"edgeType":"contains","source":3884,"target":3948},{"edgeType":"contains","source":476,"target":719},{"edgeType":"calls","source":5595,"target":453},{"edgeType":"calls","source":3771,"target":975},{"edgeType":"imports","source":2305,"target":1244},{"edgeType":"calls","source":5296,"target":1266},{"edgeType":"calls","source":3292,"target":1026},{"edgeType":"calls","source":4686,"target":2205},{"edgeType":"calls","source":3145,"target":2409},{"edgeType":"calls","source":3945,"target":864},{"edgeType":"contains","source":1867,"target":1993},{"edgeType":"contains","source":3885,"target":3915},{"edgeType":"calls","source":4453,"target":972},{"edgeType":"calls","source":2714,"target":971},{"edgeType":"calls","source":4611,"target":302},{"edgeType":"calls","source":354,"target":142},{"edgeType":"calls","source":5747,"target":1025},{"edgeType":"calls","source":4311,"target":89},{"edgeType":"imports","source":1988,"target":1557},{"edgeType":"contains","source":54,"target":63},{"edgeType":"calls","source":3771,"target":972},{"edgeType":"calls","source":5595,"target":452},{"edgeType":"calls","source":1024,"target":512},{"edgeType":"calls","source":3867,"target":1169},{"edgeType":"calls","source":2714,"target":972},{"edgeType":"calls","source":4453,"target":971},{"edgeType":"calls","source":2289,"target":406},{"edgeType":"calls","source":3866,"target":142},{"edgeType":"contains","source":14,"target":2359},{"edgeType":"calls","source":3771,"target":973},{"edgeType":"calls","source":5368,"target":89},{"edgeType":"calls","source":1563,"target":1772},{"edgeType":"contains","source":476,"target":721},{"edgeType":"calls","source":5595,"target":451},{"edgeType":"calls","source":5646,"target":984},{"edgeType":"calls","source":5629,"target":454},{"edgeType":"calls","source":5449,"target":1805},{"edgeType":"contains","source":2959,"target":3030},{"edgeType":"contains","source":2829,"target":3889},{"edgeType":"calls","source":3451,"target":320},{"edgeType":"contains","source":5171,"target":4223},{"edgeType":"calls","source":4464,"target":3800},{"edgeType":"contains","source":2698,"target":3722},{"edgeType":"contains","source":1189,"target":2934},{"edgeType":"contains","source":5603,"target":5622},{"edgeType":"contains","source":3885,"target":3922},{"edgeType":"calls","source":2947,"target":89},{"edgeType":"calls","source":5646,"target":983},{"edgeType":"contains","source":344,"target":588},{"edgeType":"calls","source":3573,"target":766},{"edgeType":"calls","source":3964,"target":272},{"edgeType":"calls","source":4004,"target":89},{"edgeType":"calls","source":5595,"target":450},{"edgeType":"calls","source":5629,"target":453},{"edgeType":"imports","source":2569,"target":2570},{"edgeType":"contains","source":869,"target":2282},{"edgeType":"calls","source":5434,"target":2269},{"edgeType":"contains","source":5603,"target":5623},{"edgeType":"calls","source":4623,"target":984},{"edgeType":"calls","source":5646,"target":982},{"edgeType":"contains","source":54,"target":64},{"edgeType":"contains","source":476,"target":723},{"edgeType":"calls","source":5595,"target":449},{"edgeType":"calls","source":1917,"target":305},{"edgeType":"calls","source":3771,"target":971},{"edgeType":"calls","source":5615,"target":886},{"edgeType":"calls","source":5629,"target":452},{"edgeType":"calls","source":3732,"target":2180},{"edgeType":"calls","source":3573,"target":767},{"edgeType":"calls","source":5743,"target":89},{"edgeType":"calls","source":5690,"target":2789},{"edgeType":"calls","source":5595,"target":448},{"edgeType":"calls","source":2003,"target":814},{"edgeType":"calls","source":5306,"target":5179},{"edgeType":"calls","source":1059,"target":481},{"edgeType":"contains","source":5603,"target":5624},{"edgeType":"calls","source":4623,"target":983},{"edgeType":"calls","source":4672,"target":521},{"edgeType":"calls","source":2537,"target":1169},{"edgeType":"contains","source":476,"target":726},{"edgeType":"calls","source":116,"target":117},{"edgeType":"calls","source":5646,"target":981},{"edgeType":"calls","source":5629,"target":451},{"edgeType":"calls","source":1206,"target":1208},{"edgeType":"calls","source":4093,"target":501},{"edgeType":"calls","source":5595,"target":447},{"edgeType":"contains","source":2959,"target":3029},{"edgeType":"calls","source":5629,"target":450},{"edgeType":"contains","source":2910,"target":3491},{"edgeType":"calls","source":4623,"target":982},{"edgeType":"calls","source":2995,"target":1771},{"edgeType":"calls","source":4398,"target":3729},{"edgeType":"contains","source":3321,"target":3434},{"edgeType":"contains","source":3884,"target":3950},{"edgeType":"contains","source":3885,"target":3919},{"edgeType":"calls","source":2191,"target":269},{"edgeType":"contains","source":344,"target":589},{"edgeType":"calls","source":3589,"target":269},{"edgeType":"calls","source":5646,"target":980},{"edgeType":"calls","source":4823,"target":2180},{"edgeType":"calls","source":5629,"target":449},{"edgeType":"calls","source":5649,"target":886},{"edgeType":"calls","source":5646,"target":979},{"edgeType":"contains","source":4694,"target":5273},{"edgeType":"calls","source":1127,"target":481},{"edgeType":"calls","source":4623,"target":981},{"edgeType":"calls","source":4853,"target":3364},{"edgeType":"contains","source":476,"target":728},{"edgeType":"imports","source":291,"target":264},{"edgeType":"calls","source":5615,"target":2997},{"edgeType":"contains","source":5637,"target":5638},{"edgeType":"imports","source":58,"target":88},{"edgeType":"contains","source":5603,"target":5635},{"edgeType":"contains","source":3886,"target":3895},{"edgeType":"contains","source":54,"target":69},{"edgeType":"contains","source":5736,"target":5740},{"edgeType":"calls","source":4031,"target":305},{"edgeType":"calls","source":3353,"target":3355},{"edgeType":"calls","source":5629,"target":448},{"edgeType":"imports","source":57,"target":120},{"edgeType":"calls","source":5646,"target":978},{"edgeType":"calls","source":5643,"target":1071},{"edgeType":"contains","source":2585,"target":4059},{"edgeType":"calls","source":5413,"target":802},{"edgeType":"contains","source":2959,"target":3035},{"edgeType":"calls","source":1241,"target":117},{"edgeType":"calls","source":1219,"target":799},{"edgeType":"calls","source":4662,"target":828},{"edgeType":"calls","source":4957,"target":2253},{"edgeType":"calls","source":2940,"target":302},{"edgeType":"calls","source":4623,"target":980},{"edgeType":"calls","source":4372,"target":305},{"edgeType":"calls","source":5714,"target":984},{"edgeType":"contains","source":3886,"target":3894},{"edgeType":"contains","source":2185,"target":2714},{"edgeType":"calls","source":5629,"target":447},{"edgeType":"imports","source":2305,"target":2308},{"edgeType":"calls","source":5714,"target":983},{"edgeType":"calls","source":5646,"target":977},{"edgeType":"contains","source":3159,"target":3174},{"edgeType":"calls","source":5057,"target":2323},{"edgeType":"contains","source":3886,"target":3893},{"edgeType":"contains","source":4683,"target":2440},{"edgeType":"calls","source":5252,"target":1564},{"edgeType":"calls","source":4623,"target":979},{"edgeType":"calls","source":4662,"target":827},{"edgeType":"calls","source":5721,"target":2880},{"edgeType":"calls","source":113,"target":206},{"edgeType":"contains","source":3820,"target":3825},{"edgeType":"contains","source":5637,"target":5640},{"edgeType":"calls","source":1300,"target":404},{"edgeType":"calls","source":5714,"target":982},{"edgeType":"calls","source":5532,"target":282},{"edgeType":"calls","source":3451,"target":315},{"edgeType":"calls","source":5646,"target":976},{"edgeType":"calls","source":5197,"target":2211},{"edgeType":"contains","source":3159,"target":3175},{"edgeType":"calls","source":4662,"target":826},{"edgeType":"calls","source":4521,"target":969},{"edgeType":"calls","source":4623,"target":978},{"edgeType":"contains","source":5736,"target":5743},{"edgeType":"imports","source":2035,"target":1164},{"edgeType":"calls","source":5646,"target":975},{"edgeType":"calls","source":1478,"target":1223},{"edgeType":"calls","source":2746,"target":1026},{"edgeType":"calls","source":865,"target":142},{"edgeType":"calls","source":5714,"target":981},{"edgeType":"calls","source":5129,"target":89},{"edgeType":"contains","source":869,"target":2291},{"edgeType":"calls","source":2425,"target":407},{"edgeType":"calls","source":3812,"target":1805},{"edgeType":"calls","source":4623,"target":977},{"edgeType":"contains","source":3159,"target":3180},{"edgeType":"calls","source":4662,"target":825},{"edgeType":"contains","source":3886,"target":3899},{"edgeType":"calls","source":2032,"target":961},{"edgeType":"calls","source":5646,"target":974},{"edgeType":"calls","source":3451,"target":313},{"edgeType":"calls","source":4915,"target":380},{"edgeType":"calls","source":5714,"target":980},{"edgeType":"calls","source":5122,"target":305},{"edgeType":"contains","source":476,"target":732},{"edgeType":"calls","source":5390,"target":454},{"edgeType":"calls","source":5203,"target":4136},{"edgeType":"calls","source":5274,"target":1935},{"edgeType":"calls","source":4623,"target":976},{"edgeType":"calls","source":1922,"target":142},{"edgeType":"calls","source":4662,"target":824},{"edgeType":"calls","source":3694,"target":1236},{"edgeType":"contains","source":5736,"target":5737},{"edgeType":"calls","source":4031,"target":302},{"edgeType":"contains","source":3886,"target":3898},{"edgeType":"calls","source":4494,"target":747},{"edgeType":"contains","source":1606,"target":1644},{"edgeType":"imports","source":2048,"target":759},{"edgeType":"calls","source":5714,"target":979},{"edgeType":"calls","source":5646,"target":973},{"edgeType":"calls","source":5020,"target":2409},{"edgeType":"calls","source":4882,"target":345},{"edgeType":"calls","source":5160,"target":1240},{"edgeType":"calls","source":1233,"target":364},{"edgeType":"calls","source":5591,"target":564},{"edgeType":"calls","source":5390,"target":453},{"edgeType":"calls","source":1063,"target":349},{"edgeType":"calls","source":4623,"target":975},{"edgeType":"contains","source":3159,"target":3178},{"edgeType":"calls","source":4662,"target":823},{"edgeType":"calls","source":4574,"target":380},{"edgeType":"calls","source":4708,"target":454},{"edgeType":"calls","source":3854,"target":501},{"edgeType":"contains","source":5736,"target":5738},{"edgeType":"calls","source":4520,"target":997},{"edgeType":"calls","source":1917,"target":300},{"edgeType":"contains","source":3886,"target":3897},{"edgeType":"calls","source":4372,"target":300},{"edgeType":"calls","source":2448,"target":749},{"edgeType":"calls","source":5714,"target":978},{"edgeType":"calls","source":5030,"target":1041},{"edgeType":"calls","source":4989,"target":3369},{"edgeType":"calls","source":5646,"target":972},{"edgeType":"calls","source":1478,"target":1224},{"edgeType":"contains","source":54,"target":2188},{"edgeType":"calls","source":5550,"target":777},{"edgeType":"contains","source":476,"target":734},{"edgeType":"contains","source":869,"target":2292},{"edgeType":"calls","source":997,"target":279},{"edgeType":"calls","source":5504,"target":89},{"edgeType":"calls","source":5369,"target":2160},{"edgeType":"calls","source":5390,"target":452},{"edgeType":"calls","source":5390,"target":451},{"edgeType":"calls","source":4662,"target":822},{"edgeType":"calls","source":4708,"target":453},{"edgeType":"calls","source":4623,"target":974},{"edgeType":"calls","source":4031,"target":300},{"edgeType":"contains","source":3159,"target":3179},{"edgeType":"contains","source":1209,"target":1265},{"edgeType":"contains","source":5736,"target":5739},{"edgeType":"calls","source":2425,"target":406},{"edgeType":"calls","source":4384,"target":984},{"edgeType":"contains","source":3886,"target":3896},{"edgeType":"calls","source":5683,"target":980},{"edgeType":"contains","source":40,"target":1535},{"edgeType":"calls","source":5533,"target":345},{"edgeType":"calls","source":5240,"target":971},{"edgeType":"calls","source":5376,"target":984},{"edgeType":"calls","source":5299,"target":1257},{"edgeType":"calls","source":3971,"target":142},{"edgeType":"contains","source":1736,"target":1812},{"edgeType":"calls","source":3876,"target":973},{"edgeType":"calls","source":1836,"target":790},{"edgeType":"calls","source":3774,"target":964},{"edgeType":"calls","source":1995,"target":89},{"edgeType":"contains","source":5603,"target":5610},{"edgeType":"calls","source":323,"target":127},{"edgeType":"contains","source":5399,"target":5590},{"edgeType":"calls","source":5683,"target":979},{"edgeType":"calls","source":5719,"target":920},{"edgeType":"calls","source":5739,"target":300},{"edgeType":"calls","source":4989,"target":2409},{"edgeType":"contains","source":4808,"target":4884},{"edgeType":"contains","source":476,"target":703},{"edgeType":"calls","source":5376,"target":983},{"edgeType":"calls","source":3852,"target":1718},{"edgeType":"calls","source":3876,"target":974},{"edgeType":"contains","source":1561,"target":1953},{"edgeType":"contains","source":1588,"target":2173},{"edgeType":"calls","source":1861,"target":1071},{"edgeType":"contains","source":5399,"target":5589},{"edgeType":"contains","source":4808,"target":4883},{"edgeType":"calls","source":5683,"target":978},{"edgeType":"contains","source":1331,"target":2737},{"edgeType":"calls","source":2831,"target":598},{"edgeType":"calls","source":5132,"target":89},{"edgeType":"calls","source":1516,"target":142},{"edgeType":"contains","source":3970,"target":3378},{"edgeType":"contains","source":11,"target":3493},{"edgeType":"contains","source":4410,"target":2422},{"edgeType":"calls","source":3335,"target":830},{"edgeType":"contains","source":476,"target":706},{"edgeType":"calls","source":5376,"target":982},{"edgeType":"calls","source":3189,"target":3241},{"edgeType":"calls","source":5376,"target":981},{"edgeType":"contains","source":278,"target":501},{"edgeType":"calls","source":3876,"target":971},{"edgeType":"contains","source":3190,"target":3245},{"edgeType":"calls","source":3815,"target":1805},{"edgeType":"calls","source":2273,"target":984},{"edgeType":"calls","source":5683,"target":977},{"edgeType":"calls","source":845,"target":858},{"edgeType":"imports","source":2115,"target":1896},{"edgeType":"calls","source":3734,"target":89},{"edgeType":"calls","source":4919,"target":349},{"edgeType":"calls","source":2780,"target":2180},{"edgeType":"calls","source":5234,"target":2211},{"edgeType":"calls","source":5250,"target":2772},{"edgeType":"calls","source":3220,"target":2282},{"edgeType":"contains","source":2491,"target":2718},{"edgeType":"calls","source":3189,"target":3242},{"edgeType":"calls","source":5376,"target":980},{"edgeType":"calls","source":4716,"target":300},{"edgeType":"calls","source":3995,"target":1511},{"edgeType":"contains","source":5603,"target":5613},{"edgeType":"calls","source":3876,"target":972},{"edgeType":"calls","source":2713,"target":1086},{"edgeType":"calls","source":323,"target":128},{"edgeType":"calls","source":2928,"target":1817},{"edgeType":"contains","source":476,"target":708},{"edgeType":"calls","source":2273,"target":981},{"edgeType":"contains","source":5399,"target":5595},{"edgeType":"calls","source":4893,"target":2211},{"edgeType":"calls","source":5198,"target":2269},{"edgeType":"calls","source":5683,"target":976},{"edgeType":"calls","source":1574,"target":452},{"edgeType":"calls","source":1563,"target":793},{"edgeType":"calls","source":1895,"target":1071},{"edgeType":"calls","source":5376,"target":979},{"edgeType":"calls","source":1093,"target":564},{"edgeType":"calls","source":1067,"target":313},{"edgeType":"calls","source":2075,"target":776},{"edgeType":"contains","source":2698,"target":4762},{"edgeType":"imports","source":1280,"target":296},{"edgeType":"calls","source":4157,"target":1771},{"edgeType":"contains","source":5603,"target":5606},{"edgeType":"calls","source":4418,"target":3195},{"edgeType":"calls","source":1574,"target":451},{"edgeType":"contains","source":3258,"target":3259},{"edgeType":"calls","source":2273,"target":982},{"edgeType":"contains","source":5399,"target":5594},{"edgeType":"calls","source":5683,"target":975},{"edgeType":"calls","source":5507,"target":89},{"edgeType":"calls","source":5376,"target":978},{"edgeType":"calls","source":4109,"target":89},{"edgeType":"calls","source":2273,"target":983},{"edgeType":"calls","source":4441,"target":367},{"edgeType":"calls","source":2273,"target":979},{"edgeType":"contains","source":2584,"target":3009},{"edgeType":"calls","source":868,"target":142},{"edgeType":"calls","source":5268,"target":2211},{"edgeType":"calls","source":1239,"target":269},{"edgeType":"calls","source":1574,"target":454},{"edgeType":"calls","source":5601,"target":345},{"edgeType":"calls","source":5683,"target":974},{"edgeType":"contains","source":1588,"target":2174},{"edgeType":"calls","source":3362,"target":1045},{"edgeType":"calls","source":3299,"target":2998},{"edgeType":"calls","source":4039,"target":142},{"edgeType":"calls","source":4825,"target":89},{"edgeType":"calls","source":5376,"target":977},{"edgeType":"calls","source":1067,"target":315},{"edgeType":"contains","source":1781,"target":419},{"edgeType":"contains","source":2829,"target":3870},{"edgeType":"imports","source":1280,"target":294},{"edgeType":"calls","source":4085,"target":4001},{"edgeType":"contains","source":5603,"target":5608},{"edgeType":"calls","source":2410,"target":961},{"edgeType":"calls","source":2273,"target":980},{"edgeType":"contains","source":5399,"target":5592},{"edgeType":"calls","source":2991,"target":920},{"edgeType":"calls","source":2169,"target":1033},{"edgeType":"calls","source":3500,"target":997},{"edgeType":"imports","source":898,"target":510},{"edgeType":"calls","source":3931,"target":320},{"edgeType":"contains","source":61,"target":889},{"edgeType":"calls","source":1574,"target":453},{"edgeType":"calls","source":5657,"target":1779},{"edgeType":"calls","source":5683,"target":973},{"edgeType":"calls","source":4816,"target":367},{"edgeType":"calls","source":5376,"target":976},{"edgeType":"calls","source":4205,"target":282},{"edgeType":"calls","source":4612,"target":349},{"edgeType":"calls","source":2075,"target":777},{"edgeType":"calls","source":4963,"target":2152},{"edgeType":"calls","source":1574,"target":448},{"edgeType":"contains","source":3159,"target":3160},{"edgeType":"contains","source":3258,"target":3262},{"edgeType":"calls","source":2444,"target":961},{"edgeType":"contains","source":476,"target":712},{"edgeType":"calls","source":2273,"target":977},{"edgeType":"calls","source":5683,"target":972},{"edgeType":"calls","source":3883,"target":1805},{"edgeType":"contains","source":5603,"target":5618},{"edgeType":"imports","source":2115,"target":851},{"edgeType":"calls","source":5461,"target":454},{"edgeType":"calls","source":5376,"target":975},{"edgeType":"calls","source":1067,"target":309},{"edgeType":"contains","source":476,"target":711},{"edgeType":"calls","source":5105,"target":1976},{"edgeType":"calls","source":1574,"target":447},{"edgeType":"calls","source":2273,"target":978},{"edgeType":"calls","source":5281,"target":1805},{"edgeType":"contains","source":5399,"target":5598},{"edgeType":"calls","source":5683,"target":971},{"edgeType":"contains","source":1588,"target":2181},{"edgeType":"calls","source":5635,"target":345},{"edgeType":"contains","source":5603,"target":5619},{"edgeType":"calls","source":1993,"target":142},{"edgeType":"calls","source":3802,"target":89},{"edgeType":"calls","source":3392,"target":1171},{"edgeType":"calls","source":5550,"target":1922},{"edgeType":"calls","source":5461,"target":453},{"edgeType":"calls","source":5376,"target":974},{"edgeType":"calls","source":5186,"target":1578},{"edgeType":"contains","source":3884,"target":3938},{"edgeType":"calls","source":1574,"target":450},{"edgeType":"calls","source":2273,"target":975},{"edgeType":"contains","source":5399,"target":5597},{"edgeType":"contains","source":4545,"target":4588},{"edgeType":"calls","source":2431,"target":305},{"edgeType":"calls","source":5743,"target":1224},{"edgeType":"calls","source":1842,"target":1655},{"edgeType":"calls","source":3834,"target":3322},{"edgeType":"calls","source":3931,"target":315},{"edgeType":"contains","source":54,"target":55},{"edgeType":"calls","source":5575,"target":89},{"edgeType":"calls","source":1959,"target":142},{"edgeType":"imports","source":2115,"target":1906},{"edgeType":"calls","source":3568,"target":997},{"edgeType":"calls","source":3389,"target":1261},{"edgeType":"calls","source":3396,"target":1044},{"edgeType":"calls","source":5461,"target":452},{"edgeType":"calls","source":5376,"target":973},{"edgeType":"calls","source":4961,"target":2211},{"edgeType":"contains","source":4808,"target":4891},{"edgeType":"imports","source":2769,"target":2772},{"edgeType":"calls","source":1574,"target":1506},{"edgeType":"calls","source":1574,"target":449},{"edgeType":"calls","source":5186,"target":1577},{"edgeType":"calls","source":2273,"target":976},{"edgeType":"contains","source":476,"target":713},{"edgeType":"calls","source":5743,"target":1223},{"edgeType":"contains","source":5603,"target":5621},{"edgeType":"calls","source":2684,"target":920},{"edgeType":"calls","source":5461,"target":451},{"edgeType":"calls","source":3389,"target":1262},{"edgeType":"calls","source":5376,"target":972},{"edgeType":"calls","source":5059,"target":3400},{"edgeType":"contains","source":5171,"target":1036},{"edgeType":"calls","source":5186,"target":1576},{"edgeType":"calls","source":323,"target":114},{"edgeType":"calls","source":5749,"target":1036},{"edgeType":"calls","source":2273,"target":973},{"edgeType":"calls","source":3931,"target":313},{"edgeType":"calls","source":4107,"target":142},{"edgeType":"contains","source":2036,"target":2038},{"edgeType":"calls","source":2739,"target":269},{"edgeType":"calls","source":3389,"target":1259},{"edgeType":"calls","source":5461,"target":450},{"edgeType":"calls","source":5376,"target":971},{"edgeType":"calls","source":806,"target":997},{"edgeType":"contains","source":2698,"target":3713},{"edgeType":"calls","source":1067,"target":304},{"edgeType":"contains","source":1705,"target":1729},{"edgeType":"calls","source":369,"target":801},{"edgeType":"contains","source":476,"target":715},{"edgeType":"contains","source":3057,"target":1042},{"edgeType":"contains","source":2994,"target":2995},{"edgeType":"calls","source":1563,"target":1841},{"edgeType":"contains","source":1515,"target":2334},{"edgeType":"calls","source":2273,"target":974},{"edgeType":"contains","source":5399,"target":5602},{"edgeType":"calls","source":3389,"target":1260},{"edgeType":"calls","source":5461,"target":449},{"edgeType":"calls","source":4759,"target":1071},{"edgeType":"contains","source":2584,"target":3020},{"edgeType":"contains","source":3816,"target":3936},{"edgeType":"calls","source":5172,"target":5179},{"edgeType":"imports","source":4286,"target":2247},{"edgeType":"calls","source":2273,"target":971},{"edgeType":"contains","source":5399,"target":5601},{"edgeType":"calls","source":4053,"target":3928},{"edgeType":"calls","source":4305,"target":345},{"edgeType":"calls","source":3379,"target":3681},{"edgeType":"contains","source":54,"target":59},{"edgeType":"calls","source":3389,"target":1257},{"edgeType":"calls","source":4696,"target":4080},{"edgeType":"calls","source":5492,"target":1601},{"edgeType":"calls","source":1205,"target":257},{"edgeType":"calls","source":5461,"target":448},{"edgeType":"calls","source":5239,"target":5216},{"edgeType":"calls","source":3084,"target":1199},{"edgeType":"calls","source":5268,"target":89},{"edgeType":"calls","source":964,"target":329},{"edgeType":"calls","source":3132,"target":2882},{"edgeType":"calls","source":5362,"target":345},{"edgeType":"calls","source":2273,"target":972},{"edgeType":"contains","source":5399,"target":5600},{"edgeType":"contains","source":5603,"target":5617},{"edgeType":"contains","source":11,"target":3505},{"edgeType":"contains","source":38,"target":3725},{"edgeType":"calls","source":2980,"target":1253},{"edgeType":"calls","source":2953,"target":1033},{"edgeType":"contains","source":476,"target":717},{"edgeType":"calls","source":2934,"target":565},{"edgeType":"calls","source":5461,"target":447},{"edgeType":"calls","source":3389,"target":1258},{"edgeType":"contains","source":2532,"target":2516},{"edgeType":"calls","source":5349,"target":1805},{"edgeType":"contains","source":4808,"target":4894},{"edgeType":"calls","source":5186,"target":1573},{"edgeType":"calls","source":3965,"target":345},{"edgeType":"contains","source":3865,"target":4504},{"edgeType":"calls","source":1933,"target":971},{"edgeType":"calls","source":2018,"target":450},{"edgeType":"calls","source":4352,"target":1033},{"edgeType":"calls","source":4191,"target":1795},{"edgeType":"calls","source":5704,"target":345},{"edgeType":"calls","source":4956,"target":279},{"edgeType":"contains","source":11,"target":2418},{"edgeType":"calls","source":3365,"target":975},{"edgeType":"calls","source":3433,"target":981},{"edgeType":"calls","source":1377,"target":1294},{"edgeType":"calls","source":5172,"target":982},{"edgeType":"calls","source":3189,"target":3260},{"edgeType":"calls","source":5303,"target":2205},{"edgeType":"contains","source":1588,"target":2156},{"edgeType":"calls","source":3710,"target":4023},{"edgeType":"calls","source":1956,"target":257},{"edgeType":"calls","source":2018,"target":449},{"edgeType":"contains","source":3644,"target":3955},{"edgeType":"calls","source":2348,"target":1849},{"edgeType":"contains","source":5399,"target":5573},{"edgeType":"imports","source":2048,"target":788},{"edgeType":"calls","source":1455,"target":989},{"edgeType":"contains","source":2067,"target":2106},{"edgeType":"contains","source":11,"target":3474},{"edgeType":"contains","source":3951,"target":3952},{"edgeType":"calls","source":5516,"target":887},{"edgeType":"calls","source":3365,"target":976},{"edgeType":"contains","source":476,"target":686},{"edgeType":"calls","source":5172,"target":981},{"edgeType":"imports","source":74,"target":1732},{"edgeType":"calls","source":2917,"target":2180},{"edgeType":"calls","source":3433,"target":982},{"edgeType":"contains","source":416,"target":432},{"edgeType":"calls","source":1377,"target":1293},{"edgeType":"contains","source":2584,"target":2991},{"edgeType":"calls","source":1641,"target":512},{"edgeType":"calls","source":1933,"target":973},{"edgeType":"contains","source":3642,"target":1902},{"edgeType":"calls","source":2028,"target":142},{"edgeType":"calls","source":2018,"target":452},{"edgeType":"calls","source":2045,"target":1729},{"edgeType":"calls","source":3433,"target":979},{"edgeType":"calls","source":5172,"target":980},{"edgeType":"calls","source":5516,"target":886},{"edgeType":"calls","source":5073,"target":1935},{"edgeType":"calls","source":3065,"target":1817},{"edgeType":"calls","source":1086,"target":804},{"edgeType":"calls","source":5312,"target":4039},{"edgeType":"calls","source":3365,"target":973},{"edgeType":"calls","source":1086,"target":803},{"edgeType":"contains","source":1736,"target":1794},{"edgeType":"calls","source":3857,"target":521},{"edgeType":"calls","source":4824,"target":2253},{"edgeType":"calls","source":2018,"target":451},{"edgeType":"calls","source":1933,"target":972},{"edgeType":"contains","source":5399,"target":5571},{"edgeType":"calls","source":2014,"target":1632},{"edgeType":"imports","source":1280,"target":283},{"edgeType":"calls","source":2875,"target":309},{"edgeType":"calls","source":5765,"target":565},{"edgeType":"contains","source":2698,"target":4740},{"edgeType":"contains","source":1249,"target":2093},{"edgeType":"contains","source":2067,"target":2104},{"edgeType":"contains","source":12,"target":1331},{"edgeType":"calls","source":3433,"target":980},{"edgeType":"calls","source":1563,"target":814},{"edgeType":"calls","source":5175,"target":886},{"edgeType":"calls","source":5172,"target":979},{"edgeType":"calls","source":5173,"target":5176},{"edgeType":"calls","source":3365,"target":974},{"edgeType":"calls","source":3237,"target":1771},{"edgeType":"calls","source":1214,"target":1063},{"edgeType":"calls","source":1990,"target":257},{"edgeType":"calls","source":4788,"target":2311},{"edgeType":"contains","source":5399,"target":5578},{"edgeType":"calls","source":1755,"target":142},{"edgeType":"calls","source":1377,"target":1290},{"edgeType":"calls","source":5172,"target":978},{"edgeType":"calls","source":5240,"target":984},{"edgeType":"calls","source":3365,"target":971},{"edgeType":"calls","source":3433,"target":977},{"edgeType":"calls","source":1219,"target":902},{"edgeType":"calls","source":5329,"target":2452},{"edgeType":"contains","source":2829,"target":3857},{"edgeType":"calls","source":4612,"target":367},{"edgeType":"contains","source":4654,"target":5417},{"edgeType":"calls","source":5172,"target":977},{"edgeType":"calls","source":1414,"target":142},{"edgeType":"calls","source":5173,"target":3060},{"edgeType":"calls","source":1377,"target":1289},{"edgeType":"calls","source":5240,"target":983},{"edgeType":"calls","source":1779,"target":454},{"edgeType":"contains","source":4545,"target":4568},{"edgeType":"calls","source":3365,"target":972},{"edgeType":"contains","source":476,"target":690},{"edgeType":"calls","source":3433,"target":978},{"edgeType":"calls","source":5550,"target":886},{"edgeType":"calls","source":1118,"target":865},{"edgeType":"contains","source":3642,"target":1906},{"edgeType":"calls","source":1938,"target":814},{"edgeType":"calls","source":4085,"target":4018},{"edgeType":"imports","source":291,"target":283},{"edgeType":"calls","source":4211,"target":1169},{"edgeType":"calls","source":4815,"target":4643},{"edgeType":"contains","source":3190,"target":3233},{"edgeType":"calls","source":2018,"target":448},{"edgeType":"calls","source":2472,"target":1169},{"edgeType":"contains","source":5399,"target":5576},{"edgeType":"contains","source":476,"target":693},{"edgeType":"calls","source":2281,"target":1805},{"edgeType":"calls","source":5172,"target":976},{"edgeType":"calls","source":3876,"target":983},{"edgeType":"contains","source":3847,"target":4008},{"edgeType":"calls","source":5240,"target":982},{"edgeType":"calls","source":5337,"target":89},{"edgeType":"calls","source":3859,"target":453},{"edgeType":"calls","source":3433,"target":975},{"edgeType":"contains","source":97,"target":815},{"edgeType":"calls","source":1377,"target":1292},{"edgeType":"imports","source":4286,"target":2240},{"edgeType":"calls","source":1861,"target":1086},{"edgeType":"calls","source":1834,"target":1923},{"edgeType":"calls","source":5431,"target":345},{"edgeType":"calls","source":2018,"target":447},{"edgeType":"calls","source":2875,"target":304},{"edgeType":"calls","source":1506,"target":1520},{"edgeType":"calls","source":5030,"target":3263},{"edgeType":"contains","source":1232,"target":1567},{"edgeType":"contains","source":3885,"target":3886},{"edgeType":"calls","source":5240,"target":981},{"edgeType":"calls","source":5257,"target":454},{"edgeType":"calls","source":5172,"target":975},{"edgeType":"calls","source":3084,"target":2282},{"edgeType":"calls","source":3859,"target":454},{"edgeType":"calls","source":3876,"target":984},{"edgeType":"contains","source":255,"target":1201},{"edgeType":"calls","source":3433,"target":976},{"edgeType":"calls","source":1377,"target":1291},{"edgeType":"calls","source":3523,"target":3471},{"edgeType":"calls","source":4758,"target":2180},{"edgeType":"calls","source":3433,"target":973},{"edgeType":"contains","source":3057,"target":3134},{"edgeType":"contains","source":4808,"target":4877},{"edgeType":"contains","source":2910,"target":3463},{"edgeType":"calls","source":4441,"target":380},{"edgeType":"calls","source":5077,"target":1805},{"edgeType":"calls","source":3010,"target":345},{"edgeType":"calls","source":4304,"target":1456},{"edgeType":"contains","source":2585,"target":4024},{"edgeType":"calls","source":5172,"target":974},{"edgeType":"calls","source":5240,"target":980},{"edgeType":"calls","source":5257,"target":453},{"edgeType":"calls","source":2160,"target":269},{"edgeType":"calls","source":5712,"target":89},{"edgeType":"calls","source":3859,"target":451},{"edgeType":"calls","source":1779,"target":451},{"edgeType":"calls","source":3876,"target":981},{"edgeType":"contains","source":3884,"target":3924},{"edgeType":"contains","source":3847,"target":4014},{"edgeType":"contains","source":5768,"target":5772},{"edgeType":"calls","source":1979,"target":593},{"edgeType":"calls","source":3433,"target":974},{"edgeType":"contains","source":4181,"target":4229},{"edgeType":"calls","source":2431,"target":2439},{"edgeType":"calls","source":5030,"target":89},{"edgeType":"calls","source":2823,"target":857},{"edgeType":"calls","source":4458,"target":4080},{"edgeType":"calls","source":4930,"target":1075},{"edgeType":"imports","source":3641,"target":3194},{"edgeType":"contains","source":2829,"target":3861},{"edgeType":"contains","source":476,"target":694},{"edgeType":"calls","source":5172,"target":973},{"edgeType":"calls","source":2860,"target":2882},{"edgeType":"calls","source":5240,"target":979},{"edgeType":"contains","source":2584,"target":2999},{"edgeType":"calls","source":5257,"target":452},{"edgeType":"contains","source":4545,"target":4572},{"edgeType":"imports","source":1280,"target":293},{"edgeType":"calls","source":5197,"target":3369},{"edgeType":"calls","source":5271,"target":1075},{"edgeType":"calls","source":5331,"target":272},{"edgeType":"calls","source":3876,"target":982},{"edgeType":"calls","source":1779,"target":450},{"edgeType":"calls","source":3859,"target":452},{"edgeType":"contains","source":5768,"target":5773},{"edgeType":"contains","source":40,"target":1526},{"edgeType":"calls","source":3433,"target":971},{"edgeType":"calls","source":1979,"target":596},{"edgeType":"calls","source":4689,"target":89},{"edgeType":"contains","source":4808,"target":4875},{"edgeType":"contains","source":1043,"target":3204},{"edgeType":"calls","source":5172,"target":972},{"edgeType":"calls","source":2436,"target":1224},{"edgeType":"calls","source":5240,"target":978},{"edgeType":"calls","source":5257,"target":451},{"edgeType":"contains","source":476,"target":697},{"edgeType":"calls","source":1779,"target":453},{"edgeType":"calls","source":4007,"target":89},{"edgeType":"contains","source":1705,"target":1706},{"edgeType":"calls","source":5752,"target":961},{"edgeType":"imports","source":291,"target":295},{"edgeType":"calls","source":3882,"target":793},{"edgeType":"calls","source":3728,"target":282},{"edgeType":"contains","source":5603,"target":5604},{"edgeType":"calls","source":3876,"target":979},{"edgeType":"calls","source":3859,"target":449},{"edgeType":"calls","source":3433,"target":972},{"edgeType":"calls","source":2024,"target":257},{"edgeType":"calls","source":4245,"target":1169},{"edgeType":"contains","source":2698,"target":4749},{"edgeType":"imports","source":3230,"target":91},{"edgeType":"calls","source":5182,"target":1718},{"edgeType":"calls","source":4521,"target":1068},{"edgeType":"calls","source":5240,"target":977},{"edgeType":"calls","source":5257,"target":450},{"edgeType":"calls","source":5172,"target":971},{"edgeType":"contains","source":5399,"target":5579},{"edgeType":"calls","source":5299,"target":1262},{"edgeType":"contains","source":255,"target":1205},{"edgeType":"imports","source":291,"target":296},{"edgeType":"contains","source":3814,"target":806},{"edgeType":"calls","source":5746,"target":89},{"edgeType":"calls","source":4054,"target":747},{"edgeType":"calls","source":1779,"target":452},{"edgeType":"calls","source":3859,"target":450},{"edgeType":"calls","source":3876,"target":980},{"edgeType":"calls","source":5683,"target":984},{"edgeType":"imports","source":1497,"target":961},{"edgeType":"calls","source":5352,"target":2789},{"edgeType":"calls","source":5239,"target":5235},{"edgeType":"contains","source":4545,"target":4578},{"edgeType":"contains","source":2531,"target":2532},{"edgeType":"calls","source":2889,"target":920},{"edgeType":"calls","source":1051,"target":818},{"edgeType":"imports","source":3230,"target":90},{"edgeType":"calls","source":3073,"target":501},{"edgeType":"calls","source":3859,"target":447},{"edgeType":"calls","source":1779,"target":447},{"edgeType":"calls","source":3876,"target":977},{"edgeType":"calls","source":5240,"target":976},{"edgeType":"calls","source":5257,"target":449},{"edgeType":"contains","source":476,"target":699},{"edgeType":"calls","source":5299,"target":1261},{"edgeType":"calls","source":5307,"target":1013},{"edgeType":"contains","source":3057,"target":3138},{"edgeType":"calls","source":5739,"target":305},{"edgeType":"imports","source":291,"target":293},{"edgeType":"calls","source":2705,"target":1340},{"edgeType":"contains","source":14,"target":2336},{"edgeType":"calls","source":2690,"target":1805},{"edgeType":"calls","source":3336,"target":806},{"edgeType":"calls","source":5683,"target":983},{"edgeType":"calls","source":3222,"target":1169},{"edgeType":"calls","source":5074,"target":5063},{"edgeType":"calls","source":998,"target":345},{"edgeType":"calls","source":1051,"target":817},{"edgeType":"calls","source":1067,"target":320},{"edgeType":"calls","source":5240,"target":975},{"edgeType":"calls","source":5257,"target":448},{"edgeType":"calls","source":3859,"target":448},{"edgeType":"calls","source":5299,"target":1260},{"edgeType":"calls","source":2436,"target":1223},{"edgeType":"contains","source":5768,"target":5769},{"edgeType":"imports","source":291,"target":294},{"edgeType":"calls","source":4279,"target":1169},{"edgeType":"calls","source":3876,"target":978},{"edgeType":"calls","source":4030,"target":1489},{"edgeType":"calls","source":4826,"target":2180},{"edgeType":"calls","source":4804,"target":1805},{"edgeType":"calls","source":5683,"target":982},{"edgeType":"imports","source":3230,"target":88},{"edgeType":"imports","source":3642,"target":2111},{"edgeType":"calls","source":5240,"target":973},{"edgeType":"calls","source":964,"target":345},{"edgeType":"calls","source":3876,"target":975},{"edgeType":"contains","source":3847,"target":4016},{"edgeType":"calls","source":5240,"target":974},{"edgeType":"calls","source":5257,"target":447},{"edgeType":"calls","source":5299,"target":1259},{"edgeType":"calls","source":1662,"target":905},{"edgeType":"calls","source":4490,"target":969},{"edgeType":"calls","source":4716,"target":305},{"edgeType":"contains","source":5768,"target":5770},{"edgeType":"calls","source":1779,"target":449},{"edgeType":"calls","source":1779,"target":1506},{"edgeType":"contains","source":3588,"target":3589},{"edgeType":"calls","source":4042,"target":3228},{"edgeType":"contains","source":4868,"target":5132},{"edgeType":"calls","source":4229,"target":604},{"edgeType":"contains","source":1483,"target":2250},{"edgeType":"calls","source":4844,"target":564},{"edgeType":"contains","source":3374,"target":3879},{"edgeType":"calls","source":5683,"target":981},{"edgeType":"contains","source":476,"target":701},{"edgeType":"calls","source":5240,"target":972},{"edgeType":"calls","source":5299,"target":1258},{"edgeType":"contains","source":258,"target":3230},{"edgeType":"calls","source":5344,"target":920},{"edgeType":"calls","source":1779,"target":448},{"edgeType":"calls","source":3876,"target":976},{"edgeType":"contains","source":5768,"target":5771},{"edgeType":"calls","source":4041,"target":89},{"edgeType":"contains","source":1540,"target":1541},{"edgeType":"calls","source":1963,"target":1086},{"edgeType":"imports","source":291,"target":292},{"edgeType":"calls","source":5000,"target":979},{"edgeType":"calls","source":5716,"target":981},{"edgeType":"calls","source":141,"target":450},{"edgeType":"calls","source":3692,"target":302},{"edgeType":"contains","source":4808,"target":4852},{"edgeType":"contains","source":2078,"target":1747},{"edgeType":"contains","source":476,"target":671},{"edgeType":"calls","source":5551,"target":811},{"edgeType":"calls","source":1215,"target":982},{"edgeType":"calls","source":1422,"target":907},{"edgeType":"calls","source":5307,"target":975},{"edgeType":"contains","source":283,"target":311},{"edgeType":"calls","source":141,"target":451},{"edgeType":"calls","source":5716,"target":980},{"edgeType":"calls","source":5000,"target":978},{"edgeType":"calls","source":4881,"target":4667},{"edgeType":"calls","source":5749,"target":1014},{"edgeType":"calls","source":141,"target":449},{"edgeType":"calls","source":964,"target":305},{"edgeType":"calls","source":5566,"target":345},{"edgeType":"contains","source":476,"target":670},{"edgeType":"calls","source":3389,"target":1240},{"edgeType":"imports","source":3969,"target":1540},{"edgeType":"calls","source":1215,"target":981},{"edgeType":"calls","source":5307,"target":974},{"edgeType":"calls","source":1869,"target":790},{"edgeType":"calls","source":1215,"target":980},{"edgeType":"contains","source":1671,"target":1681},{"edgeType":"contains","source":278,"target":465},{"edgeType":"calls","source":2261,"target":269},{"edgeType":"calls","source":4257,"target":3928},{"edgeType":"contains","source":1238,"target":5587},{"edgeType":"calls","source":5716,"target":979},{"edgeType":"calls","source":5000,"target":977},{"edgeType":"calls","source":5016,"target":481},{"edgeType":"calls","source":4892,"target":2211},{"edgeType":"calls","source":3718,"target":3722},{"edgeType":"contains","source":55,"target":1039},{"edgeType":"calls","source":3848,"target":749},{"edgeType":"contains","source":2769,"target":4636},{"edgeType":"calls","source":5307,"target":973},{"edgeType":"calls","source":5310,"target":1937},{"edgeType":"contains","source":476,"target":673},{"edgeType":"calls","source":1215,"target":984},{"edgeType":"calls","source":5304,"target":5295},{"edgeType":"calls","source":5371,"target":2160},{"edgeType":"calls","source":4710,"target":454},{"edgeType":"calls","source":4783,"target":305},{"edgeType":"calls","source":4067,"target":302},{"edgeType":"calls","source":4417,"target":3195},{"edgeType":"calls","source":1937,"target":799},{"edgeType":"calls","source":4189,"target":1805},{"edgeType":"calls","source":2278,"target":1853},{"edgeType":"calls","source":141,"target":453},{"edgeType":"calls","source":5716,"target":978},{"edgeType":"calls","source":5746,"target":3219},{"edgeType":"contains","source":1238,"target":5588},{"edgeType":"calls","source":844,"target":856},{"edgeType":"calls","source":3010,"target":302},{"edgeType":"contains","source":55,"target":1038},{"edgeType":"calls","source":5000,"target":976},{"edgeType":"calls","source":3729,"target":3382},{"edgeType":"calls","source":5307,"target":972},{"edgeType":"contains","source":4545,"target":4546},{"edgeType":"calls","source":1215,"target":983},{"edgeType":"calls","source":4710,"target":453},{"edgeType":"calls","source":5426,"target":454},{"edgeType":"calls","source":5332,"target":2311},{"edgeType":"contains","source":3847,"target":3986},{"edgeType":"calls","source":4776,"target":521},{"edgeType":"calls","source":1766,"target":1871},{"edgeType":"calls","source":4235,"target":380},{"edgeType":"calls","source":4440,"target":367},{"edgeType":"calls","source":141,"target":452},{"edgeType":"calls","source":2278,"target":1854},{"edgeType":"calls","source":4344,"target":2286},{"edgeType":"calls","source":2299,"target":142},{"edgeType":"calls","source":5000,"target":975},{"edgeType":"calls","source":4921,"target":3424},{"edgeType":"calls","source":5267,"target":2211},{"edgeType":"calls","source":5307,"target":971},{"edgeType":"imports","source":2305,"target":266},{"edgeType":"calls","source":5716,"target":977},{"edgeType":"contains","source":283,"target":316},{"edgeType":"calls","source":1215,"target":977},{"edgeType":"calls","source":4710,"target":452},{"edgeType":"calls","source":5426,"target":453},{"edgeType":"contains","source":2910,"target":3442},{"edgeType":"calls","source":3392,"target":1141},{"edgeType":"calls","source":4824,"target":89},{"edgeType":"calls","source":1051,"target":776},{"edgeType":"contains","source":5667,"target":5703},{"edgeType":"contains","source":3403,"target":2959},{"edgeType":"contains","source":5399,"target":5561},{"edgeType":"calls","source":5000,"target":974},{"edgeType":"contains","source":4808,"target":4855},{"edgeType":"calls","source":5716,"target":976},{"edgeType":"calls","source":1276,"target":142},{"edgeType":"calls","source":5434,"target":2318},{"edgeType":"calls","source":5540,"target":89},{"edgeType":"calls","source":5426,"target":452},{"edgeType":"calls","source":1144,"target":1063},{"edgeType":"calls","source":4120,"target":772},{"edgeType":"calls","source":1215,"target":976},{"edgeType":"calls","source":4182,"target":964},{"edgeType":"calls","source":4926,"target":2211},{"edgeType":"calls","source":4918,"target":345},{"edgeType":"calls","source":436,"target":814},{"edgeType":"calls","source":4710,"target":451},{"edgeType":"calls","source":141,"target":448},{"edgeType":"contains","source":5399,"target":5560},{"edgeType":"calls","source":5099,"target":1075},{"edgeType":"calls","source":2334,"target":1169},{"edgeType":"calls","source":4491,"target":896},{"edgeType":"calls","source":5199,"target":89},{"edgeType":"calls","source":3964,"target":320},{"edgeType":"calls","source":1753,"target":1214},{"edgeType":"contains","source":283,"target":318},{"edgeType":"calls","source":5716,"target":975},{"edgeType":"contains","source":2305,"target":2111},{"edgeType":"calls","source":5460,"target":454},{"edgeType":"calls","source":1215,"target":979},{"edgeType":"calls","source":5426,"target":451},{"edgeType":"imports","source":3333,"target":1164},{"edgeType":"calls","source":2807,"target":1305},{"edgeType":"calls","source":5000,"target":973},{"edgeType":"contains","source":3334,"target":866},{"edgeType":"contains","source":1374,"target":1376},{"edgeType":"calls","source":4710,"target":450},{"edgeType":"calls","source":141,"target":447},{"edgeType":"contains","source":5399,"target":5559},{"edgeType":"calls","source":5719,"target":5109},{"edgeType":"calls","source":4355,"target":2997},{"edgeType":"imports","source":3969,"target":1546},{"edgeType":"calls","source":4491,"target":895},{"edgeType":"contains","source":476,"target":676},{"edgeType":"contains","source":2044,"target":1747},{"edgeType":"calls","source":4413,"target":142},{"edgeType":"calls","source":5716,"target":974},{"edgeType":"calls","source":5772,"target":2409},{"edgeType":"calls","source":3365,"target":920},{"edgeType":"calls","source":1215,"target":978},{"edgeType":"calls","source":5460,"target":453},{"edgeType":"calls","source":5426,"target":450},{"edgeType":"calls","source":1086,"target":749},{"edgeType":"calls","source":1051,"target":777},{"edgeType":"calls","source":4236,"target":345},{"edgeType":"contains","source":3190,"target":3217},{"edgeType":"calls","source":5000,"target":972},{"edgeType":"calls","source":4710,"target":449},{"edgeType":"calls","source":4662,"target":880},{"edgeType":"calls","source":4783,"target":300},{"edgeType":"calls","source":5185,"target":521},{"edgeType":"calls","source":1644,"target":1416},{"edgeType":"calls","source":4491,"target":894},{"edgeType":"calls","source":3039,"target":453},{"edgeType":"contains","source":5171,"target":5235},{"edgeType":"contains","source":416,"target":425},{"edgeType":"calls","source":2428,"target":367},{"edgeType":"calls","source":369,"target":773},{"edgeType":"calls","source":5716,"target":973},{"edgeType":"contains","source":2001,"target":2028},{"edgeType":"calls","source":1340,"target":269},{"edgeType":"calls","source":5492,"target":1574},{"edgeType":"contains","source":903,"target":126},{"edgeType":"contains","source":3642,"target":1896},{"edgeType":"calls","source":1215,"target":973},{"edgeType":"calls","source":5460,"target":452},{"edgeType":"calls","source":1350,"target":1016},{"edgeType":"calls","source":5426,"target":449},{"edgeType":"calls","source":5000,"target":971},{"edgeType":"calls","source":4594,"target":1930},{"edgeType":"calls","source":4960,"target":2211},{"edgeType":"calls","source":4710,"target":448},{"edgeType":"calls","source":4921,"target":1306},{"edgeType":"calls","source":4850,"target":1393},{"edgeType":"calls","source":3732,"target":1169},{"edgeType":"contains","source":476,"target":678},{"edgeType":"calls","source":1748,"target":305},{"edgeType":"calls","source":3039,"target":454},{"edgeType":"contains","source":5399,"target":5565},{"edgeType":"calls","source":5716,"target":972},{"edgeType":"calls","source":4257,"target":1805},{"edgeType":"contains","source":54,"target":3190},{"edgeType":"contains","source":841,"target":990},{"edgeType":"contains","source":3642,"target":838},{"edgeType":"calls","source":3391,"target":1169},{"edgeType":"calls","source":4118,"target":4001},{"edgeType":"calls","source":5460,"target":451},{"edgeType":"calls","source":5426,"target":448},{"edgeType":"calls","source":4662,"target":878},{"edgeType":"calls","source":794,"target":282},{"edgeType":"calls","source":3213,"target":345},{"edgeType":"calls","source":4710,"target":447},{"edgeType":"calls","source":1215,"target":972},{"edgeType":"calls","source":1048,"target":864},{"edgeType":"calls","source":2778,"target":89},{"edgeType":"calls","source":964,"target":300},{"edgeType":"calls","source":5356,"target":503},{"edgeType":"contains","source":476,"target":681},{"edgeType":"contains","source":416,"target":427},{"edgeType":"contains","source":2584,"target":2980},{"edgeType":"contains","source":4545,"target":4555},{"edgeType":"calls","source":5748,"target":1036},{"edgeType":"calls","source":5716,"target":971},{"edgeType":"calls","source":3945,"target":4076},{"edgeType":"contains","source":2959,"target":2982},{"edgeType":"calls","source":1363,"target":615},{"edgeType":"calls","source":1215,"target":975},{"edgeType":"calls","source":5460,"target":450},{"edgeType":"calls","source":5426,"target":447},{"edgeType":"contains","source":1249,"target":2084},{"edgeType":"calls","source":3039,"target":451},{"edgeType":"imports","source":3811,"target":89},{"edgeType":"calls","source":844,"target":849},{"edgeType":"contains","source":3058,"target":3084},{"edgeType":"calls","source":5264,"target":1240},{"edgeType":"calls","source":5329,"target":282},{"edgeType":"contains","source":416,"target":426},{"edgeType":"contains","source":1671,"target":1687},{"edgeType":"calls","source":1879,"target":1531},{"edgeType":"calls","source":3883,"target":1771},{"edgeType":"contains","source":12,"target":3437},{"edgeType":"calls","source":1215,"target":974},{"edgeType":"calls","source":5608,"target":89},{"edgeType":"calls","source":5030,"target":2152},{"edgeType":"calls","source":5460,"target":449},{"edgeType":"calls","source":4812,"target":454},{"edgeType":"calls","source":3039,"target":452},{"edgeType":"calls","source":811,"target":814},{"edgeType":"calls","source":2899,"target":1621},{"edgeType":"calls","source":4973,"target":1805},{"edgeType":"calls","source":1067,"target":272},{"edgeType":"contains","source":5171,"target":5239},{"edgeType":"contains","source":416,"target":429},{"edgeType":"calls","source":5267,"target":89},{"edgeType":"calls","source":3880,"target":804},{"edgeType":"calls","source":3818,"target":1669},{"edgeType":"contains","source":476,"target":683},{"edgeType":"contains","source":283,"target":324},{"edgeType":"calls","source":1916,"target":1436},{"edgeType":"calls","source":4231,"target":1550},{"edgeType":"contains","source":54,"target":1081},{"edgeType":"contains","source":2035,"target":2036},{"edgeType":"imports","source":3641,"target":4304},{"edgeType":"calls","source":4823,"target":1169},{"edgeType":"calls","source":5491,"target":1601},{"edgeType":"contains","source":1232,"target":1560},{"edgeType":"calls","source":5460,"target":448},{"edgeType":"calls","source":4812,"target":453},{"edgeType":"calls","source":5129,"target":2253},{"edgeType":"calls","source":3039,"target":449},{"edgeType":"contains","source":416,"target":428},{"edgeType":"calls","source":3880,"target":805},{"edgeType":"calls","source":2297,"target":2311},{"edgeType":"contains","source":1189,"target":1834},{"edgeType":"contains","source":5399,"target":5569},{"edgeType":"calls","source":2289,"target":445},{"edgeType":"calls","source":3964,"target":315},{"edgeType":"contains","source":3865,"target":4499},{"edgeType":"contains","source":2067,"target":2102},{"edgeType":"calls","source":3528,"target":89},{"edgeType":"calls","source":2807,"target":1300},{"edgeType":"calls","source":4812,"target":452},{"edgeType":"calls","source":5514,"target":887},{"edgeType":"calls","source":920,"target":1657},{"edgeType":"calls","source":5460,"target":447},{"edgeType":"contains","source":869,"target":126},{"edgeType":"calls","source":3039,"target":450},{"edgeType":"contains","source":416,"target":431},{"edgeType":"contains","source":4545,"target":4559},{"edgeType":"calls","source":3794,"target":1354},{"edgeType":"calls","source":4027,"target":2587},{"edgeType":"contains","source":2305,"target":2120},{"edgeType":"calls","source":3954,"target":2736},{"edgeType":"calls","source":2425,"target":454},{"edgeType":"contains","source":2067,"target":2098},{"edgeType":"calls","source":4371,"target":380},{"edgeType":"calls","source":1350,"target":1014},{"edgeType":"calls","source":3573,"target":805},{"edgeType":"imports","source":2305,"target":273},{"edgeType":"calls","source":5610,"target":3195},{"edgeType":"calls","source":1338,"target":329},{"edgeType":"calls","source":5020,"target":345},{"edgeType":"contains","source":3642,"target":841},{"edgeType":"calls","source":3471,"target":1853},{"edgeType":"calls","source":5560,"target":1574},{"edgeType":"calls","source":3039,"target":447},{"edgeType":"calls","source":4812,"target":451},{"edgeType":"calls","source":1215,"target":971},{"edgeType":"calls","source":5514,"target":886},{"edgeType":"calls","source":5198,"target":1169},{"edgeType":"calls","source":3880,"target":803},{"edgeType":"contains","source":416,"target":430},{"edgeType":"calls","source":4571,"target":521},{"edgeType":"calls","source":3964,"target":313},{"edgeType":"calls","source":4812,"target":449},{"edgeType":"contains","source":5399,"target":5567},{"edgeType":"calls","source":1996,"target":1071},{"edgeType":"calls","source":3471,"target":1854},{"edgeType":"calls","source":3604,"target":902},{"edgeType":"calls","source":2772,"target":269},{"edgeType":"calls","source":4857,"target":1169},{"edgeType":"calls","source":4812,"target":450},{"edgeType":"contains","source":1232,"target":1559},{"edgeType":"calls","source":3039,"target":448},{"edgeType":"contains","source":476,"target":684},{"edgeType":"calls","source":5579,"target":984},{"edgeType":"calls","source":5301,"target":89},{"edgeType":"calls","source":3931,"target":309},{"edgeType":"calls","source":3993,"target":501},{"edgeType":"contains","source":3127,"target":4094},{"edgeType":"contains","source":1189,"target":1806},{"edgeType":"calls","source":2684,"target":912},{"edgeType":"contains","source":5667,"target":5690},{"edgeType":"calls","source":4372,"target":380},{"edgeType":"calls","source":3652,"target":501},{"edgeType":"calls","source":5008,"target":1805},{"edgeType":"calls","source":5643,"target":89},{"edgeType":"calls","source":4876,"target":1669},{"edgeType":"calls","source":3459,"target":142},{"edgeType":"contains","source":476,"target":654},{"edgeType":"calls","source":3354,"target":3397},{"edgeType":"calls","source":5561,"target":1574},{"edgeType":"calls","source":5453,"target":4922},{"edgeType":"contains","source":2585,"target":3983},{"edgeType":"calls","source":5186,"target":1572},{"edgeType":"calls","source":1142,"target":89},{"edgeType":"calls","source":1918,"target":345},{"edgeType":"contains","source":2959,"target":2961},{"edgeType":"calls","source":1993,"target":1191},{"edgeType":"calls","source":2431,"target":300},{"edgeType":"calls","source":4529,"target":1854},{"edgeType":"calls","source":2847,"target":89},{"edgeType":"contains","source":55,"target":1020},{"edgeType":"calls","source":2743,"target":142},{"edgeType":"calls","source":5563,"target":454},{"edgeType":"calls","source":5202,"target":1075},{"edgeType":"calls","source":5207,"target":920},{"edgeType":"calls","source":5186,"target":1571},{"edgeType":"calls","source":1621,"target":1095},{"edgeType":"contains","source":476,"target":653},{"edgeType":"calls","source":1537,"target":1585},{"edgeType":"calls","source":3222,"target":2205},{"edgeType":"contains","source":255,"target":1165},{"edgeType":"calls","source":1780,"target":398},{"edgeType":"calls","source":3246,"target":2515},{"edgeType":"contains","source":5667,"target":5692},{"edgeType":"calls","source":4025,"target":564},{"edgeType":"calls","source":1895,"target":1061},{"edgeType":"contains","source":1495,"target":1832},{"edgeType":"calls","source":4529,"target":1853},{"edgeType":"calls","source":2436,"target":1199},{"edgeType":"calls","source":4298,"target":3729},{"edgeType":"calls","source":4961,"target":89},{"edgeType":"calls","source":1543,"target":345},{"edgeType":"calls","source":4861,"target":1075},{"edgeType":"calls","source":5186,"target":1570},{"edgeType":"calls","source":5563,"target":453},{"edgeType":"calls","source":5525,"target":1631},{"edgeType":"calls","source":3843,"target":920},{"edgeType":"calls","source":5574,"target":1169},{"edgeType":"calls","source":5239,"target":984},{"edgeType":"contains","source":2915,"target":3264},{"edgeType":"contains","source":2698,"target":478},{"edgeType":"contains","source":476,"target":656},{"edgeType":"calls","source":3998,"target":345},{"edgeType":"calls","source":3222,"target":89},{"edgeType":"imports","source":4286,"target":3326},{"edgeType":"contains","source":52,"target":4286},{"edgeType":"calls","source":1837,"target":1801},{"edgeType":"contains","source":5667,"target":5693},{"edgeType":"calls","source":2722,"target":790},{"edgeType":"calls","source":4846,"target":481},{"edgeType":"contains","source":3944,"target":4133},{"edgeType":"imports","source":1238,"target":1618},{"edgeType":"calls","source":5099,"target":2152},{"edgeType":"calls","source":5128,"target":1253},{"edgeType":"contains","source":2001,"target":2003},{"edgeType":"contains","source":4181,"target":4186},{"edgeType":"contains","source":476,"target":655},{"edgeType":"calls","source":5595,"target":1574},{"edgeType":"calls","source":5239,"target":983},{"edgeType":"calls","source":5186,"target":1569},{"edgeType":"calls","source":3256,"target":3263},{"edgeType":"calls","source":3335,"target":814},{"edgeType":"calls","source":5304,"target":2139},{"edgeType":"calls","source":5563,"target":452},{"edgeType":"calls","source":5549,"target":886},{"edgeType":"calls","source":5420,"target":4885},{"edgeType":"calls","source":5525,"target":1630},{"edgeType":"contains","source":2584,"target":2956},{"edgeType":"calls","source":1952,"target":345},{"edgeType":"contains","source":2910,"target":3426},{"edgeType":"contains","source":4997,"target":2152},{"edgeType":"calls","source":2875,"target":272},{"edgeType":"contains","source":3190,"target":3202},{"edgeType":"contains","source":5667,"target":5686},{"edgeType":"calls","source":5082,"target":564},{"edgeType":"calls","source":5239,"target":982},{"edgeType":"contains","source":2067,"target":2076},{"edgeType":"contains","source":11,"target":275},{"edgeType":"calls","source":5186,"target":1568},{"edgeType":"calls","source":3931,"target":304},{"edgeType":"contains","source":4331,"target":1657},{"edgeType":"contains","source":476,"target":658},{"edgeType":"calls","source":3522,"target":3470},{"edgeType":"calls","source":5563,"target":451},{"edgeType":"calls","source":5525,"target":1629},{"edgeType":"calls","source":4915,"target":454},{"edgeType":"calls","source":436,"target":830},{"edgeType":"contains","source":3190,"target":3203},{"edgeType":"imports","source":2035,"target":1220},{"edgeType":"calls","source":5239,"target":981},{"edgeType":"calls","source":5563,"target":450},{"edgeType":"calls","source":5773,"target":282},{"edgeType":"calls","source":3355,"target":3363},{"edgeType":"contains","source":476,"target":657},{"edgeType":"contains","source":4331,"target":1656},{"edgeType":"contains","source":3717,"target":3776},{"edgeType":"calls","source":5412,"target":902},{"edgeType":"contains","source":3190,"target":3200},{"edgeType":"calls","source":4915,"target":453},{"edgeType":"calls","source":2439,"target":1102},{"edgeType":"calls","source":4748,"target":345},{"edgeType":"contains","source":3321,"target":3367},{"edgeType":"contains","source":476,"target":660},{"edgeType":"calls","source":4440,"target":380},{"edgeType":"calls","source":5239,"target":980},{"edgeType":"contains","source":3884,"target":3885},{"edgeType":"contains","source":1902,"target":1904},{"edgeType":"calls","source":5563,"target":449},{"edgeType":"contains","source":4410,"target":4491},{"edgeType":"calls","source":5616,"target":920},{"edgeType":"calls","source":5711,"target":89},{"edgeType":"contains","source":3709,"target":4023},{"edgeType":"contains","source":3717,"target":3775},{"edgeType":"calls","source":5563,"target":448},{"edgeType":"imports","source":435,"target":81},{"edgeType":"contains","source":3190,"target":3201},{"edgeType":"calls","source":4915,"target":452},{"edgeType":"contains","source":2584,"target":2960},{"edgeType":"contains","source":2761,"target":2758},{"edgeType":"calls","source":5073,"target":4011},{"edgeType":"calls","source":5239,"target":979},{"edgeType":"calls","source":5704,"target":305},{"edgeType":"contains","source":476,"target":659},{"edgeType":"calls","source":3573,"target":831},{"edgeType":"contains","source":1483,"target":2214},{"edgeType":"calls","source":5473,"target":2180},{"edgeType":"calls","source":3428,"target":1095},{"edgeType":"calls","source":5563,"target":447},{"edgeType":"contains","source":5667,"target":5698},{"edgeType":"calls","source":2504,"target":142},{"edgeType":"calls","source":4915,"target":451},{"edgeType":"contains","source":3127,"target":4102},{"edgeType":"calls","source":4671,"target":3787},{"edgeType":"contains","source":476,"target":662},{"edgeType":"calls","source":5239,"target":978},{"edgeType":"calls","source":2348,"target":1807},{"edgeType":"calls","source":5307,"target":984},{"edgeType":"calls","source":5697,"target":521},{"edgeType":"calls","source":2079,"target":1690},{"edgeType":"contains","source":5667,"target":5699},{"edgeType":"contains","source":54,"target":2117},{"edgeType":"contains","source":3944,"target":4145},{"edgeType":"calls","source":4053,"target":1805},{"edgeType":"calls","source":4118,"target":4018},{"edgeType":"calls","source":2875,"target":269},{"edgeType":"calls","source":4915,"target":450},{"edgeType":"calls","source":4806,"target":2772},{"edgeType":"contains","source":2910,"target":3431},{"edgeType":"calls","source":3712,"target":1805},{"edgeType":"calls","source":2281,"target":1771},{"edgeType":"contains","source":476,"target":661},{"edgeType":"calls","source":5078,"target":2797},{"edgeType":"calls","source":5239,"target":977},{"edgeType":"calls","source":5307,"target":983},{"edgeType":"calls","source":1511,"target":269},{"edgeType":"calls","source":3590,"target":302},{"edgeType":"calls","source":5692,"target":2789},{"edgeType":"contains","source":1671,"target":1673},{"edgeType":"contains","source":55,"target":1028},{"edgeType":"contains","source":5667,"target":5700},{"edgeType":"contains","source":54,"target":2116},{"edgeType":"contains","source":1483,"target":2212},{"edgeType":"calls","source":1311,"target":130},{"edgeType":"calls","source":1208,"target":1209},{"edgeType":"calls","source":5351,"target":2789},{"edgeType":"calls","source":5426,"target":1521},{"edgeType":"calls","source":5381,"target":802},{"edgeType":"calls","source":5379,"target":864},{"edgeType":"contains","source":5171,"target":5216},{"edgeType":"calls","source":4915,"target":449},{"edgeType":"calls","source":4938,"target":793},{"edgeType":"calls","source":4930,"target":1041},{"edgeType":"calls","source":4963,"target":1075},{"edgeType":"calls","source":2363,"target":1340},{"edgeType":"contains","source":2584,"target":2963},{"edgeType":"calls","source":5239,"target":976},{"edgeType":"calls","source":5276,"target":886},{"edgeType":"calls","source":5307,"target":982},{"edgeType":"calls","source":2299,"target":2267},{"edgeType":"contains","source":476,"target":664},{"edgeType":"contains","source":5667,"target":5701},{"edgeType":"calls","source":3355,"target":3357},{"edgeType":"calls","source":4915,"target":448},{"edgeType":"calls","source":3330,"target":961},{"edgeType":"calls","source":3451,"target":3552},{"edgeType":"contains","source":1238,"target":5580},{"edgeType":"calls","source":811,"target":830},{"edgeType":"calls","source":5000,"target":984},{"edgeType":"contains","source":476,"target":663},{"edgeType":"calls","source":3711,"target":2891},{"edgeType":"calls","source":5239,"target":975},{"edgeType":"calls","source":5307,"target":981},{"edgeType":"imports","source":1238,"target":1626},{"edgeType":"contains","source":3816,"target":3882},{"edgeType":"contains","source":5667,"target":5702},{"edgeType":"calls","source":4915,"target":447},{"edgeType":"calls","source":1409,"target":257},{"edgeType":"calls","source":1436,"target":477},{"edgeType":"calls","source":5704,"target":300},{"edgeType":"calls","source":2690,"target":1771},{"edgeType":"calls","source":5675,"target":142},{"edgeType":"contains","source":1238,"target":5585},{"edgeType":"contains","source":1249,"target":2073},{"edgeType":"contains","source":5667,"target":5694},{"edgeType":"calls","source":4643,"target":4651},{"edgeType":"calls","source":5000,"target":983},{"edgeType":"calls","source":4838,"target":4948},{"edgeType":"calls","source":5239,"target":974},{"edgeType":"calls","source":2448,"target":817},{"edgeType":"calls","source":5307,"target":980},{"edgeType":"contains","source":476,"target":666},{"edgeType":"calls","source":4349,"target":3195},{"edgeType":"calls","source":5772,"target":1363},{"edgeType":"calls","source":1996,"target":1086},{"edgeType":"calls","source":4041,"target":3228},{"edgeType":"contains","source":5667,"target":5695},{"edgeType":"contains","source":1238,"target":5586},{"edgeType":"calls","source":5716,"target":984},{"edgeType":"calls","source":5415,"target":802},{"edgeType":"calls","source":5000,"target":982},{"edgeType":"contains","source":1043,"target":1058},{"edgeType":"calls","source":5239,"target":972},{"edgeType":"calls","source":5239,"target":973},{"edgeType":"calls","source":5307,"target":979},{"edgeType":"calls","source":2448,"target":818},{"edgeType":"contains","source":476,"target":665},{"edgeType":"contains","source":3644,"target":3935},{"edgeType":"contains","source":3653,"target":3656},{"edgeType":"calls","source":141,"target":454},{"edgeType":"contains","source":5667,"target":5696},{"edgeType":"calls","source":5000,"target":981},{"edgeType":"calls","source":3490,"target":1281},{"edgeType":"calls","source":4838,"target":4946},{"edgeType":"contains","source":1238,"target":5583},{"edgeType":"contains","source":52,"target":2185},{"edgeType":"contains","source":1515,"target":2281},{"edgeType":"contains","source":1483,"target":2216},{"edgeType":"calls","source":5716,"target":983},{"edgeType":"calls","source":829,"target":269},{"edgeType":"contains","source":476,"target":669},{"edgeType":"calls","source":5191,"target":345},{"edgeType":"calls","source":5239,"target":971},{"edgeType":"calls","source":5079,"target":4874},{"edgeType":"calls","source":5307,"target":978},{"edgeType":"contains","source":3127,"target":4104},{"edgeType":"calls","source":4638,"target":1633},{"edgeType":"calls","source":4042,"target":3195},{"edgeType":"contains","source":2067,"target":2082},{"edgeType":"calls","source":2047,"target":564},{"edgeType":"calls","source":5000,"target":980},{"edgeType":"contains","source":1546,"target":264},{"edgeType":"calls","source":5716,"target":982},{"edgeType":"calls","source":4804,"target":1771},{"edgeType":"calls","source":5749,"target":1016},{"edgeType":"contains","source":1238,"target":5584},{"edgeType":"calls","source":3358,"target":89},{"edgeType":"calls","source":794,"target":296},{"edgeType":"calls","source":5109,"target":5000},{"edgeType":"calls","source":997,"target":345},{"edgeType":"calls","source":5307,"target":976},{"edgeType":"contains","source":4868,"target":5099},{"edgeType":"calls","source":5307,"target":977},{"edgeType":"contains","source":476,"target":667},{"edgeType":"imports","source":2578,"target":1305},{"edgeType":"calls","source":1537,"target":1575},{"edgeType":"contains","source":3653,"target":3654},{"edgeType":"calls","source":2299,"target":2264},{"edgeType":"contains","source":3944,"target":4146},{"edgeType":"calls","source":4050,"target":4005},{"edgeType":"calls","source":2828,"target":2873},{"edgeType":"contains","source":4953,"target":5081},{"edgeType":"calls","source":5668,"target":454},{"edgeType":"calls","source":5616,"target":1009},{"edgeType":"contains","source":1906,"target":2289},{"edgeType":"calls","source":5354,"target":2789},{"edgeType":"calls","source":5384,"target":802},{"edgeType":"calls","source":3228,"target":1044},{"edgeType":"contains","source":2737,"target":2954},{"edgeType":"calls","source":5296,"target":359},{"edgeType":"calls","source":4431,"target":1805},{"edgeType":"contains","source":3972,"target":3781},{"edgeType":"calls","source":5772,"target":2515},{"edgeType":"calls","source":3971,"target":3379},{"edgeType":"calls","source":4104,"target":313},{"edgeType":"calls","source":1937,"target":896},{"edgeType":"calls","source":1969,"target":961},{"edgeType":"calls","source":3995,"target":521},{"edgeType":"contains","source":4683,"target":4994},{"edgeType":"calls","source":5668,"target":453},{"edgeType":"calls","source":4838,"target":814},{"edgeType":"calls","source":5616,"target":1008},{"edgeType":"calls","source":5296,"target":357},{"edgeType":"calls","source":5296,"target":358},{"edgeType":"calls","source":5312,"target":1976},{"edgeType":"calls","source":5293,"target":2565},{"edgeType":"contains","source":1238,"target":2915},{"edgeType":"contains","source":4890,"target":4918},{"edgeType":"calls","source":4667,"target":830},{"edgeType":"contains","source":61,"target":3460},{"edgeType":"contains","source":3999,"target":4000},{"edgeType":"calls","source":1937,"target":895},{"edgeType":"calls","source":4328,"target":1826},{"edgeType":"contains","source":815,"target":1226},{"edgeType":"calls","source":5668,"target":452},{"edgeType":"calls","source":3604,"target":1013},{"edgeType":"calls","source":2917,"target":1169},{"edgeType":"calls","source":4819,"target":345},{"edgeType":"calls","source":5109,"target":1925},{"edgeType":"calls","source":5128,"target":279},{"edgeType":"contains","source":1606,"target":2074},{"edgeType":"calls","source":5296,"target":356},{"edgeType":"calls","source":2509,"target":2190},{"edgeType":"calls","source":2582,"target":984},{"edgeType":"contains","source":1,"target":38},{"edgeType":"calls","source":4352,"target":3195},{"edgeType":"calls","source":4492,"target":969},{"edgeType":"contains","source":4747,"target":5122},{"edgeType":"calls","source":4384,"target":89},{"edgeType":"contains","source":4683,"target":4992},{"edgeType":"calls","source":4304,"target":453},{"edgeType":"calls","source":5719,"target":984},{"edgeType":"calls","source":5668,"target":451},{"edgeType":"calls","source":3599,"target":1169},{"edgeType":"calls","source":5646,"target":4304},{"edgeType":"calls","source":3080,"target":345},{"edgeType":"contains","source":3865,"target":4980},{"edgeType":"calls","source":5296,"target":355},{"edgeType":"imports","source":2948,"target":1244},{"edgeType":"calls","source":5361,"target":454},{"edgeType":"contains","source":4890,"target":4916},{"edgeType":"calls","source":369,"target":882},{"edgeType":"calls","source":4711,"target":521},{"edgeType":"calls","source":1965,"target":1086},{"edgeType":"calls","source":1922,"target":305},{"edgeType":"calls","source":4304,"target":454},{"edgeType":"contains","source":4683,"target":4991},{"edgeType":"calls","source":3523,"target":3522},{"edgeType":"calls","source":5719,"target":983},{"edgeType":"calls","source":4304,"target":452},{"edgeType":"calls","source":802,"target":1195},{"edgeType":"calls","source":5000,"target":1074},{"edgeType":"calls","source":5668,"target":450},{"edgeType":"contains","source":3884,"target":1227},{"edgeType":"contains","source":4890,"target":4924},{"edgeType":"contains","source":1351,"target":1529},{"edgeType":"calls","source":5271,"target":2186},{"edgeType":"calls","source":1343,"target":1337},{"edgeType":"calls","source":5434,"target":305},{"edgeType":"calls","source":5361,"target":453},{"edgeType":"calls","source":5383,"target":829},{"edgeType":"calls","source":3971,"target":1261},{"edgeType":"calls","source":1838,"target":790},{"edgeType":"calls","source":2582,"target":982},{"edgeType":"contains","source":1,"target":40},{"edgeType":"calls","source":4104,"target":309},{"edgeType":"calls","source":4618,"target":4460},{"edgeType":"calls","source":1922,"target":300},{"edgeType":"calls","source":4166,"target":501},{"edgeType":"contains","source":2312,"target":278},{"edgeType":"calls","source":2425,"target":564},{"edgeType":"calls","source":1552,"target":142},{"edgeType":"calls","source":5015,"target":1665},{"edgeType":"calls","source":5031,"target":1169},{"edgeType":"calls","source":4304,"target":451},{"edgeType":"calls","source":5719,"target":982},{"edgeType":"contains","source":2915,"target":3784},{"edgeType":"contains","source":4953,"target":5084},{"edgeType":"calls","source":5099,"target":2232},{"edgeType":"calls","source":3020,"target":89},{"edgeType":"calls","source":5000,"target":1073},{"edgeType":"calls","source":3400,"target":2051},{"edgeType":"contains","source":1455,"target":1477},{"edgeType":"calls","source":5668,"target":449},{"edgeType":"calls","source":1655,"target":120},{"edgeType":"calls","source":5267,"target":3366},{"edgeType":"calls","source":5361,"target":452},{"edgeType":"calls","source":1552,"target":1199},{"edgeType":"calls","source":3235,"target":2938},{"edgeType":"contains","source":2585,"target":3443},{"edgeType":"contains","source":3334,"target":3479},{"edgeType":"calls","source":3189,"target":2249},{"edgeType":"calls","source":3971,"target":1262},{"edgeType":"calls","source":5340,"target":2160},{"edgeType":"calls","source":2582,"target":983},{"edgeType":"contains","source":3926,"target":4153},{"edgeType":"contains","source":1852,"target":1855},{"edgeType":"calls","source":1013,"target":995},{"edgeType":"calls","source":3805,"target":2180},{"edgeType":"calls","source":4807,"target":1771},{"edgeType":"contains","source":889,"target":1054},{"edgeType":"calls","source":5719,"target":981},{"edgeType":"calls","source":4304,"target":450},{"edgeType":"calls","source":5743,"target":1294},{"edgeType":"contains","source":4953,"target":5083},{"edgeType":"contains","source":3204,"target":3278},{"edgeType":"calls","source":1622,"target":89},{"edgeType":"calls","source":3784,"target":1771},{"edgeType":"calls","source":5361,"target":451},{"edgeType":"calls","source":5668,"target":448},{"edgeType":"calls","source":5452,"target":802},{"edgeType":"calls","source":5475,"target":89},{"edgeType":"calls","source":2582,"target":980},{"edgeType":"contains","source":4747,"target":5126},{"edgeType":"calls","source":3260,"target":1102},{"edgeType":"contains","source":4683,"target":4996},{"edgeType":"calls","source":1937,"target":894},{"edgeType":"calls","source":3964,"target":419},{"edgeType":"calls","source":3967,"target":1383},{"edgeType":"calls","source":3971,"target":1259},{"edgeType":"contains","source":3865,"target":4986},{"edgeType":"calls","source":3997,"target":453},{"edgeType":"calls","source":4499,"target":1805},{"edgeType":"calls","source":4855,"target":282},{"edgeType":"contains","source":1,"target":42},{"edgeType":"contains","source":62,"target":1322},{"edgeType":"calls","source":4411,"target":305},{"edgeType":"calls","source":4427,"target":864},{"edgeType":"calls","source":5743,"target":1293},{"edgeType":"calls","source":4304,"target":1506},{"edgeType":"calls","source":4304,"target":449},{"edgeType":"contains","source":815,"target":1233},{"edgeType":"contains","source":3865,"target":4984},{"edgeType":"calls","source":5215,"target":1805},{"edgeType":"contains","source":1058,"target":1099},{"edgeType":"calls","source":5361,"target":450},{"edgeType":"calls","source":5373,"target":5364},{"edgeType":"calls","source":5719,"target":980},{"edgeType":"calls","source":5668,"target":447},{"edgeType":"calls","source":5523,"target":1771},{"edgeType":"calls","source":2582,"target":981},{"edgeType":"contains","source":4683,"target":4995},{"edgeType":"contains","source":2584,"target":3472},{"edgeType":"calls","source":3971,"target":1260},{"edgeType":"calls","source":3997,"target":454},{"edgeType":"calls","source":2727,"target":1771},{"edgeType":"calls","source":4866,"target":997},{"edgeType":"calls","source":4872,"target":811},{"edgeType":"calls","source":2760,"target":1805},{"edgeType":"contains","source":259,"target":1556},{"edgeType":"calls","source":2998,"target":766},{"edgeType":"calls","source":4304,"target":448},{"edgeType":"calls","source":5065,"target":1169},{"edgeType":"calls","source":3859,"target":501},{"edgeType":"calls","source":5361,"target":449},{"edgeType":"calls","source":3439,"target":837},{"edgeType":"calls","source":5623,"target":3955},{"edgeType":"calls","source":5719,"target":979},{"edgeType":"calls","source":5743,"target":1292},{"edgeType":"calls","source":4643,"target":4738},{"edgeType":"calls","source":5456,"target":2789},{"edgeType":"calls","source":3429,"target":89},{"edgeType":"calls","source":3439,"target":836},{"edgeType":"calls","source":5374,"target":2160},{"edgeType":"calls","source":5434,"target":300},{"edgeType":"calls","source":3971,"target":1257},{"edgeType":"calls","source":3997,"target":451},{"edgeType":"contains","source":2585,"target":3446},{"edgeType":"calls","source":4120,"target":866},{"edgeType":"calls","source":369,"target":873},{"edgeType":"contains","source":317,"target":2932},{"edgeType":"contains","source":264,"target":347},{"edgeType":"calls","source":4498,"target":777},{"edgeType":"calls","source":2582,"target":978},{"edgeType":"calls","source":2998,"target":767},{"edgeType":"contains","source":2247,"target":3355},{"edgeType":"calls","source":4337,"target":481},{"edgeType":"calls","source":4304,"target":447},{"edgeType":"calls","source":3102,"target":1771},{"edgeType":"calls","source":5361,"target":448},{"edgeType":"calls","source":3787,"target":3791},{"edgeType":"calls","source":3390,"target":1300},{"edgeType":"calls","source":5743,"target":1291},{"edgeType":"calls","source":5719,"target":978},{"edgeType":"contains","source":3204,"target":3285},{"edgeType":"calls","source":3971,"target":1258},{"edgeType":"calls","source":3997,"target":452},{"edgeType":"contains","source":1654,"target":1655},{"edgeType":"contains","source":264,"target":346},{"edgeType":"calls","source":4498,"target":776},{"edgeType":"calls","source":2582,"target":979},{"edgeType":"imports","source":3318,"target":354},{"edgeType":"calls","source":5105,"target":984},{"edgeType":"calls","source":4411,"target":300},{"edgeType":"calls","source":3136,"target":1771},{"edgeType":"calls","source":5331,"target":320},{"edgeType":"calls","source":1748,"target":407},{"edgeType":"calls","source":5361,"target":447},{"edgeType":"calls","source":2152,"target":564},{"edgeType":"calls","source":3997,"target":449},{"edgeType":"contains","source":4890,"target":4926},{"edgeType":"calls","source":5719,"target":977},{"edgeType":"imports","source":280,"target":455},{"edgeType":"calls","source":5728,"target":2812},{"edgeType":"calls","source":5743,"target":1290},{"edgeType":"calls","source":1928,"target":1169},{"edgeType":"contains","source":1852,"target":1856},{"edgeType":"calls","source":3366,"target":983},{"edgeType":"calls","source":2037,"target":961},{"edgeType":"calls","source":4942,"target":1809},{"edgeType":"calls","source":2582,"target":976},{"edgeType":"calls","source":2303,"target":1169},{"edgeType":"calls","source":5199,"target":1240},{"edgeType":"contains","source":2247,"target":3353},{"edgeType":"calls","source":865,"target":296},{"edgeType":"calls","source":5105,"target":983},{"edgeType":"calls","source":3060,"target":3071},{"edgeType":"calls","source":4413,"target":1294},{"edgeType":"calls","source":2158,"target":1436},{"edgeType":"calls","source":3873,"target":2180},{"edgeType":"calls","source":1748,"target":406},{"edgeType":"calls","source":5659,"target":1779},{"edgeType":"calls","source":5719,"target":976},{"edgeType":"calls","source":3997,"target":450},{"edgeType":"calls","source":5743,"target":1289},{"edgeType":"calls","source":4104,"target":304},{"edgeType":"calls","source":3366,"target":984},{"edgeType":"calls","source":3439,"target":835},{"edgeType":"contains","source":4747,"target":5129},{"edgeType":"calls","source":1068,"target":345},{"edgeType":"calls","source":369,"target":874},{"edgeType":"calls","source":354,"target":282},{"edgeType":"calls","source":4921,"target":345},{"edgeType":"calls","source":2582,"target":977},{"edgeType":"contains","source":2116,"target":2134},{"edgeType":"contains","source":4890,"target":4932},{"edgeType":"calls","source":5198,"target":2327},{"edgeType":"calls","source":5202,"target":89},{"edgeType":"calls","source":4413,"target":1293},{"edgeType":"calls","source":5719,"target":975},{"edgeType":"calls","source":3997,"target":447},{"edgeType":"calls","source":2146,"target":1805},{"edgeType":"calls","source":4813,"target":1578},{"edgeType":"imports","source":291,"target":111},{"edgeType":"calls","source":3366,"target":981},{"edgeType":"calls","source":5531,"target":4688},{"edgeType":"contains","source":3238,"target":3291},{"edgeType":"calls","source":3400,"target":984},{"edgeType":"contains","source":2247,"target":4415},{"edgeType":"calls","source":3439,"target":832},{"edgeType":"calls","source":5463,"target":454},{"edgeType":"calls","source":5239,"target":5284},{"edgeType":"calls","source":2582,"target":974},{"edgeType":"calls","source":5105,"target":982},{"edgeType":"calls","source":5128,"target":269},{"edgeType":"calls","source":4758,"target":1169},{"edgeType":"calls","source":5175,"target":925},{"edgeType":"contains","source":28,"target":3438},{"edgeType":"calls","source":5296,"target":345},{"edgeType":"calls","source":4413,"target":1292},{"edgeType":"calls","source":4571,"target":2736},{"edgeType":"calls","source":4458,"target":4125},{"edgeType":"contains","source":4319,"target":4662},{"edgeType":"calls","source":3997,"target":448},{"edgeType":"calls","source":5719,"target":974},{"edgeType":"contains","source":1058,"target":1105},{"edgeType":"calls","source":1940,"target":790},{"edgeType":"calls","source":3852,"target":1772},{"edgeType":"calls","source":3439,"target":833},{"edgeType":"calls","source":4813,"target":1577},{"edgeType":"calls","source":3529,"target":1214},{"edgeType":"calls","source":3451,"target":3632},{"edgeType":"calls","source":5463,"target":453},{"edgeType":"calls","source":3366,"target":982},{"edgeType":"calls","source":5239,"target":5283},{"edgeType":"calls","source":3131,"target":2982},{"edgeType":"calls","source":2582,"target":975},{"edgeType":"contains","source":3972,"target":2735},{"edgeType":"calls","source":5105,"target":981},{"edgeType":"calls","source":5233,"target":1240},{"edgeType":"calls","source":968,"target":271},{"edgeType":"calls","source":3732,"target":2318},{"edgeType":"calls","source":4601,"target":1805},{"edgeType":"calls","source":4413,"target":1291},{"edgeType":"contains","source":73,"target":2046},{"edgeType":"calls","source":4440,"target":454},{"edgeType":"calls","source":4623,"target":2180},{"edgeType":"calls","source":350,"target":402},{"edgeType":"calls","source":2582,"target":971},{"edgeType":"calls","source":4469,"target":3783},{"edgeType":"calls","source":3919,"target":3920},{"edgeType":"calls","source":5719,"target":973},{"edgeType":"contains","source":2915,"target":3789},{"edgeType":"calls","source":1786,"target":282},{"edgeType":"calls","source":4013,"target":2063},{"edgeType":"calls","source":1805,"target":1807},{"edgeType":"contains","source":3204,"target":3286},{"edgeType":"calls","source":4813,"target":1576},{"edgeType":"calls","source":4227,"target":1771},{"edgeType":"calls","source":3400,"target":982},{"edgeType":"calls","source":5719,"target":972},{"edgeType":"calls","source":3528,"target":1242},{"edgeType":"contains","source":4105,"target":1782},{"edgeType":"calls","source":2582,"target":972},{"edgeType":"calls","source":5463,"target":452},{"edgeType":"calls","source":5473,"target":142},{"edgeType":"calls","source":3366,"target":979},{"edgeType":"calls","source":5188,"target":521},{"edgeType":"calls","source":5105,"target":980},{"edgeType":"calls","source":5331,"target":315},{"edgeType":"contains","source":4319,"target":4660},{"edgeType":"calls","source":4506,"target":521},{"edgeType":"contains","source":2247,"target":3357},{"edgeType":"calls","source":2186,"target":564},{"edgeType":"calls","source":4413,"target":1290},{"edgeType":"contains","source":2584,"target":3481},{"edgeType":"calls","source":4440,"target":453},{"edgeType":"contains","source":815,"target":1241},{"edgeType":"calls","source":3919,"target":3921},{"edgeType":"contains","source":2532,"target":864},{"edgeType":"calls","source":1206,"target":1348},{"edgeType":"calls","source":5719,"target":971},{"edgeType":"calls","source":3366,"target":980},{"edgeType":"calls","source":3400,"target":983},{"edgeType":"calls","source":5751,"target":1036},{"edgeType":"calls","source":5463,"target":451},{"edgeType":"calls","source":2582,"target":973},{"edgeType":"imports","source":3811,"target":920},{"edgeType":"calls","source":1017,"target":865},{"edgeType":"calls","source":5105,"target":979},{"edgeType":"contains","source":4019,"target":4421},{"edgeType":"calls","source":4355,"target":2063},{"edgeType":"calls","source":5746,"target":1224},{"edgeType":"calls","source":3890,"target":2736},{"edgeType":"calls","source":4885,"target":1489},{"edgeType":"calls","source":5496,"target":1574},{"edgeType":"calls","source":5746,"target":1223},{"edgeType":"imports","source":96,"target":851},{"edgeType":"calls","source":3514,"target":2764},{"edgeType":"calls","source":3394,"target":142},{"edgeType":"calls","source":961,"target":515},{"edgeType":"calls","source":4965,"target":2180},{"edgeType":"calls","source":5215,"target":772},{"edgeType":"contains","source":11,"target":765},{"edgeType":"calls","source":1086,"target":867},{"edgeType":"contains","source":889,"target":1030},{"edgeType":"imports","source":3438,"target":838},{"edgeType":"calls","source":4457,"target":1014},{"edgeType":"contains","source":1023,"target":1104},{"edgeType":"calls","source":2809,"target":1366},{"edgeType":"calls","source":4983,"target":564},{"edgeType":"calls","source":5752,"target":1036},{"edgeType":"contains","source":3007,"target":3025},{"edgeType":"calls","source":1276,"target":262},{"edgeType":"imports","source":2740,"target":278},{"edgeType":"calls","source":5173,"target":1016},{"edgeType":"calls","source":3882,"target":1925},{"edgeType":"imports","source":317,"target":340},{"edgeType":"contains","source":11,"target":1825},{"edgeType":"calls","source":1817,"target":407},{"edgeType":"calls","source":4231,"target":3791},{"edgeType":"calls","source":4930,"target":3263},{"edgeType":"imports","source":96,"target":1906},{"edgeType":"calls","source":1478,"target":345},{"edgeType":"calls","source":5564,"target":1578},{"edgeType":"calls","source":4838,"target":830},{"edgeType":"contains","source":1023,"target":1107},{"edgeType":"calls","source":3389,"target":1352},{"edgeType":"calls","source":3429,"target":1169},{"edgeType":"contains","source":3865,"target":4965},{"edgeType":"calls","source":5198,"target":2354},{"edgeType":"calls","source":4662,"target":999},{"edgeType":"contains","source":4890,"target":4900},{"edgeType":"calls","source":1817,"target":406},{"edgeType":"calls","source":1941,"target":790},{"edgeType":"calls","source":257,"target":142},{"edgeType":"calls","source":2075,"target":864},{"edgeType":"contains","source":1023,"target":1106},{"edgeType":"contains","source":2517,"target":1300},{"edgeType":"calls","source":3389,"target":3467},{"edgeType":"calls","source":3592,"target":1402},{"edgeType":"calls","source":5173,"target":1014},{"edgeType":"contains","source":4019,"target":4418},{"edgeType":"contains","source":1781,"target":5090},{"edgeType":"calls","source":5564,"target":1577},{"edgeType":"contains","source":1671,"target":2158},{"edgeType":"imports","source":2948,"target":2284},{"edgeType":"contains","source":4683,"target":4982},{"edgeType":"calls","source":1046,"target":1047},{"edgeType":"calls","source":1748,"target":426},{"edgeType":"calls","source":1783,"target":398},{"edgeType":"calls","source":1887,"target":345},{"edgeType":"calls","source":4838,"target":827},{"edgeType":"calls","source":4236,"target":462},{"edgeType":"contains","source":278,"target":950},{"edgeType":"calls","source":4308,"target":345},{"edgeType":"calls","source":747,"target":803},{"edgeType":"calls","source":5706,"target":345},{"edgeType":"contains","source":1023,"target":1109},{"edgeType":"calls","source":5757,"target":1935},{"edgeType":"calls","source":4838,"target":828},{"edgeType":"calls","source":997,"target":452},{"edgeType":"calls","source":5532,"target":454},{"edgeType":"calls","source":5564,"target":1576},{"edgeType":"contains","source":3437,"target":3441},{"edgeType":"calls","source":1714,"target":422},{"edgeType":"contains","source":3238,"target":3266},{"edgeType":"calls","source":3491,"target":302},{"edgeType":"calls","source":5251,"target":2823},{"edgeType":"calls","source":5331,"target":2456},{"edgeType":"calls","source":3946,"target":997},{"edgeType":"contains","source":1973,"target":2315},{"edgeType":"calls","source":4716,"target":380},{"edgeType":"calls","source":4670,"target":749},{"edgeType":"calls","source":1208,"target":1309},{"edgeType":"calls","source":3873,"target":89},{"edgeType":"contains","source":11,"target":3940},{"edgeType":"calls","source":4838,"target":826},{"edgeType":"contains","source":2910,"target":2865},{"edgeType":"contains","source":1023,"target":1108},{"edgeType":"calls","source":4930,"target":89},{"edgeType":"contains","source":959,"target":2035},{"edgeType":"calls","source":997,"target":451},{"edgeType":"calls","source":5244,"target":925},{"edgeType":"contains","source":3404,"target":3406},{"edgeType":"calls","source":5532,"target":453},{"edgeType":"imports","source":960,"target":1546},{"edgeType":"calls","source":4623,"target":2205},{"edgeType":"calls","source":3916,"target":867},{"edgeType":"imports","source":2740,"target":273},{"edgeType":"calls","source":4054,"target":817},{"edgeType":"contains","source":1,"target":25},{"edgeType":"calls","source":4838,"target":825},{"edgeType":"calls","source":350,"target":427},{"edgeType":"calls","source":4231,"target":3787},{"edgeType":"calls","source":747,"target":805},{"edgeType":"contains","source":1023,"target":1111},{"edgeType":"calls","source":997,"target":454},{"edgeType":"calls","source":1169,"target":407},{"edgeType":"calls","source":1276,"target":261},{"edgeType":"calls","source":1288,"target":946},{"edgeType":"calls","source":5532,"target":452},{"edgeType":"calls","source":3239,"target":1771},{"edgeType":"calls","source":1169,"target":406},{"edgeType":"imports","source":1280,"target":81},{"edgeType":"calls","source":1748,"target":427},{"edgeType":"calls","source":4054,"target":818},{"edgeType":"contains","source":4019,"target":4422},{"edgeType":"calls","source":4838,"target":824},{"edgeType":"contains","source":2578,"target":2585},{"edgeType":"contains","source":264,"target":328},{"edgeType":"contains","source":278,"target":951},{"edgeType":"calls","source":350,"target":426},{"edgeType":"imports","source":96,"target":1902},{"edgeType":"calls","source":747,"target":804},{"edgeType":"calls","source":3604,"target":1026},{"edgeType":"imports","source":4037,"target":1305},{"edgeType":"calls","source":997,"target":453},{"edgeType":"calls","source":3097,"target":3002},{"edgeType":"calls","source":5532,"target":451},{"edgeType":"calls","source":3358,"target":1253},{"edgeType":"calls","source":5740,"target":345},{"edgeType":"calls","source":5564,"target":1573},{"edgeType":"contains","source":337,"target":4410},{"edgeType":"calls","source":1857,"target":1271},{"edgeType":"calls","source":1087,"target":829},{"edgeType":"calls","source":4957,"target":305},{"edgeType":"calls","source":2448,"target":920},{"edgeType":"calls","source":354,"target":297},{"edgeType":"calls","source":4282,"target":89},{"edgeType":"contains","source":278,"target":954},{"edgeType":"contains","source":2247,"target":4395},{"edgeType":"calls","source":4838,"target":823},{"edgeType":"calls","source":2714,"target":2187},{"edgeType":"calls","source":4413,"target":4485},{"edgeType":"contains","source":4953,"target":5072},{"edgeType":"calls","source":5201,"target":141},{"edgeType":"calls","source":997,"target":448},{"edgeType":"imports","source":53,"target":78},{"edgeType":"contains","source":1023,"target":1113},{"edgeType":"calls","source":3442,"target":1817},{"edgeType":"calls","source":3916,"target":864},{"edgeType":"contains","source":4747,"target":5116},{"edgeType":"calls","source":5532,"target":450},{"edgeType":"calls","source":5648,"target":2139},{"edgeType":"calls","source":5564,"target":1572},{"edgeType":"calls","source":5577,"target":1169},{"edgeType":"calls","source":1907,"target":777},{"edgeType":"calls","source":5532,"target":449},{"edgeType":"calls","source":3227,"target":3198},{"edgeType":"contains","source":4683,"target":4985},{"edgeType":"imports","source":4654,"target":2247},{"edgeType":"calls","source":4963,"target":2232},{"edgeType":"calls","source":2884,"target":89},{"edgeType":"imports","source":3969,"target":1284},{"edgeType":"calls","source":866,"target":279},{"edgeType":"calls","source":4838,"target":822},{"edgeType":"calls","source":4717,"target":345},{"edgeType":"calls","source":2262,"target":345},{"edgeType":"calls","source":5175,"target":2003},{"edgeType":"calls","source":4250,"target":3195},{"edgeType":"calls","source":997,"target":447},{"edgeType":"calls","source":2160,"target":1393},{"edgeType":"calls","source":5012,"target":1771},{"edgeType":"calls","source":3042,"target":2591},{"edgeType":"imports","source":2734,"target":3643},{"edgeType":"calls","source":1907,"target":776},{"edgeType":"calls","source":5564,"target":1571},{"edgeType":"calls","source":5582,"target":1013},{"edgeType":"calls","source":5598,"target":1574},{"edgeType":"calls","source":4104,"target":320},{"edgeType":"contains","source":1973,"target":2316},{"edgeType":"calls","source":5532,"target":448},{"edgeType":"contains","source":3865,"target":4973},{"edgeType":"calls","source":4919,"target":2538},{"edgeType":"calls","source":4817,"target":4643},{"edgeType":"contains","source":1988,"target":2908},{"edgeType":"contains","source":62,"target":1309},{"edgeType":"calls","source":2283,"target":1805},{"edgeType":"calls","source":4376,"target":345},{"edgeType":"calls","source":997,"target":450},{"edgeType":"calls","source":1771,"target":767},{"edgeType":"calls","source":5564,"target":1570},{"edgeType":"calls","source":3868,"target":1293},{"edgeType":"calls","source":3689,"target":1557},{"edgeType":"calls","source":5457,"target":2772},{"edgeType":"calls","source":5532,"target":447},{"edgeType":"calls","source":5564,"target":1569},{"edgeType":"calls","source":5307,"target":5308},{"edgeType":"contains","source":1,"target":28},{"edgeType":"calls","source":4947,"target":1669},{"edgeType":"contains","source":278,"target":955},{"edgeType":"calls","source":779,"target":864},{"edgeType":"calls","source":4757,"target":2274},{"edgeType":"calls","source":2965,"target":1805},{"edgeType":"calls","source":5239,"target":1074},{"edgeType":"calls","source":997,"target":449},{"edgeType":"calls","source":3868,"target":1294},{"edgeType":"calls","source":1771,"target":766},{"edgeType":"calls","source":3861,"target":1511},{"edgeType":"calls","source":5564,"target":1568},{"edgeType":"calls","source":3530,"target":142},{"edgeType":"contains","source":264,"target":335},{"edgeType":"calls","source":5029,"target":1240},{"edgeType":"contains","source":1988,"target":2914},{"edgeType":"contains","source":1906,"target":2285},{"edgeType":"contains","source":2116,"target":2118},{"edgeType":"contains","source":11,"target":2893},{"edgeType":"calls","source":5239,"target":1073},{"edgeType":"contains","source":4683,"target":4990},{"edgeType":"calls","source":3634,"target":89},{"edgeType":"calls","source":5714,"target":89},{"edgeType":"calls","source":3868,"target":1291},{"edgeType":"contains","source":4953,"target":5076},{"edgeType":"imports","source":280,"target":437},{"edgeType":"calls","source":4095,"target":598},{"edgeType":"contains","source":264,"target":334},{"edgeType":"calls","source":1150,"target":985},{"edgeType":"contains","source":1906,"target":2286},{"edgeType":"contains","source":278,"target":957},{"edgeType":"calls","source":798,"target":269},{"edgeType":"calls","source":4957,"target":300},{"edgeType":"contains","source":62,"target":1311},{"edgeType":"contains","source":2048,"target":1056},{"edgeType":"calls","source":4419,"target":2180},{"edgeType":"calls","source":3975,"target":89},{"edgeType":"calls","source":5624,"target":3935},{"edgeType":"calls","source":3696,"target":282},{"edgeType":"calls","source":3639,"target":3106},{"edgeType":"contains","source":4953,"target":5075},{"edgeType":"calls","source":3868,"target":1292},{"edgeType":"calls","source":3806,"target":2157},{"edgeType":"calls","source":5616,"target":1011},{"edgeType":"calls","source":2007,"target":847},{"edgeType":"calls","source":2003,"target":2028},{"edgeType":"calls","source":3510,"target":1817},{"edgeType":"calls","source":5337,"target":2261},{"edgeType":"calls","source":1075,"target":142},{"edgeType":"calls","source":1063,"target":514},{"edgeType":"contains","source":1671,"target":2169},{"edgeType":"calls","source":3868,"target":1289},{"edgeType":"calls","source":5267,"target":2317},{"edgeType":"calls","source":4469,"target":3800},{"edgeType":"calls","source":3589,"target":3596},{"edgeType":"calls","source":3710,"target":902},{"edgeType":"calls","source":2224,"target":1516},{"edgeType":"calls","source":4009,"target":89},{"edgeType":"calls","source":4104,"target":315},{"edgeType":"calls","source":2015,"target":598},{"edgeType":"calls","source":2007,"target":846},{"edgeType":"calls","source":5616,"target":1010},{"edgeType":"calls","source":4107,"target":1281},{"edgeType":"calls","source":4618,"target":4465},{"edgeType":"contains","source":1,"target":33},{"edgeType":"calls","source":5296,"target":360},{"edgeType":"contains","source":97,"target":1285},{"edgeType":"calls","source":2508,"target":1169},{"edgeType":"contains","source":4683,"target":4987},{"edgeType":"calls","source":4096,"target":564},{"edgeType":"calls","source":3868,"target":1290},{"edgeType":"contains","source":4890,"target":4912},{"edgeType":"contains","source":3007,"target":3008},{"edgeType":"calls","source":4788,"target":3389},{"edgeType":"calls","source":3604,"target":982},{"edgeType":"calls","source":4758,"target":2205},{"edgeType":"calls","source":1563,"target":830},{"edgeType":"calls","source":5277,"target":914},{"edgeType":"calls","source":5309,"target":980},{"edgeType":"calls","source":5299,"target":1290},{"edgeType":"calls","source":5277,"target":915},{"edgeType":"contains","source":2016,"target":2018},{"edgeType":"calls","source":4715,"target":367},{"edgeType":"calls","source":2303,"target":89},{"edgeType":"contains","source":278,"target":928},{"edgeType":"calls","source":3604,"target":983},{"edgeType":"calls","source":5718,"target":984},{"edgeType":"contains","source":1220,"target":1323},{"edgeType":"contains","source":1784,"target":2868},{"edgeType":"imports","source":2981,"target":256},{"edgeType":"calls","source":3079,"target":345},{"edgeType":"calls","source":5309,"target":978},{"edgeType":"calls","source":5309,"target":979},{"edgeType":"calls","source":5299,"target":1289},{"edgeType":"calls","source":1067,"target":349},{"edgeType":"contains","source":61,"target":2370},{"edgeType":"calls","source":2002,"target":961},{"edgeType":"calls","source":4042,"target":89},{"edgeType":"calls","source":4431,"target":1771},{"edgeType":"calls","source":5718,"target":983},{"edgeType":"contains","source":2517,"target":1283},{"edgeType":"calls","source":3604,"target":980},{"edgeType":"calls","source":4855,"target":3424},{"edgeType":"contains","source":1684,"target":1737},{"edgeType":"calls","source":5309,"target":977},{"edgeType":"calls","source":3319,"target":302},{"edgeType":"calls","source":2572,"target":1261},{"edgeType":"contains","source":435,"target":292},{"edgeType":"calls","source":2847,"target":1193},{"edgeType":"calls","source":5718,"target":982},{"edgeType":"calls","source":5740,"target":300},{"edgeType":"calls","source":3604,"target":981},{"edgeType":"calls","source":3694,"target":305},{"edgeType":"contains","source":959,"target":960},{"edgeType":"contains","source":1220,"target":1325},{"edgeType":"calls","source":5130,"target":1240},{"edgeType":"calls","source":5309,"target":976},{"edgeType":"contains","source":1736,"target":126},{"edgeType":"calls","source":3971,"target":174},{"edgeType":"calls","source":2572,"target":1262},{"edgeType":"calls","source":3702,"target":3228},{"edgeType":"contains","source":3057,"target":405},{"edgeType":"calls","source":3604,"target":978},{"edgeType":"calls","source":5718,"target":981},{"edgeType":"contains","source":3884,"target":137},{"edgeType":"calls","source":3840,"target":1061},{"edgeType":"calls","source":5309,"target":975},{"edgeType":"contains","source":3238,"target":3250},{"edgeType":"calls","source":3490,"target":284},{"edgeType":"calls","source":2572,"target":1259},{"edgeType":"contains","source":1988,"target":2890},{"edgeType":"calls","source":1086,"target":814},{"edgeType":"calls","source":3971,"target":171},{"edgeType":"calls","source":1933,"target":983},{"edgeType":"calls","source":4562,"target":1935},{"edgeType":"calls","source":369,"target":844},{"edgeType":"contains","source":435,"target":294},{"edgeType":"calls","source":3604,"target":979},{"edgeType":"calls","source":4942,"target":4952},{"edgeType":"calls","source":5697,"target":1631},{"edgeType":"calls","source":5718,"target":980},{"edgeType":"contains","source":1510,"target":3967},{"edgeType":"calls","source":3608,"target":1912},{"edgeType":"calls","source":3710,"target":864},{"edgeType":"calls","source":5577,"target":2180},{"edgeType":"calls","source":5309,"target":974},{"edgeType":"calls","source":5207,"target":4136},{"edgeType":"calls","source":1621,"target":1141},{"edgeType":"calls","source":3291,"target":1169},{"edgeType":"calls","source":1933,"target":982},{"edgeType":"contains","source":4747,"target":5094},{"edgeType":"calls","source":2572,"target":1260},{"edgeType":"contains","source":4037,"target":4907},{"edgeType":"calls","source":1067,"target":345},{"edgeType":"contains","source":14,"target":2774},{"edgeType":"calls","source":4157,"target":1805},{"edgeType":"contains","source":435,"target":293},{"edgeType":"calls","source":3694,"target":300},{"edgeType":"calls","source":5754,"target":920},{"edgeType":"calls","source":4930,"target":2152},{"edgeType":"calls","source":5309,"target":973},{"edgeType":"calls","source":3916,"target":817},{"edgeType":"calls","source":1609,"target":1516},{"edgeType":"calls","source":5697,"target":1630},{"edgeType":"calls","source":5718,"target":979},{"edgeType":"calls","source":3665,"target":142},{"edgeType":"calls","source":3604,"target":976},{"edgeType":"calls","source":4736,"target":767},{"edgeType":"calls","source":5508,"target":89},{"edgeType":"calls","source":1938,"target":830},{"edgeType":"calls","source":3971,"target":169},{"edgeType":"calls","source":2760,"target":1771},{"edgeType":"contains","source":435,"target":296},{"edgeType":"calls","source":2875,"target":320},{"edgeType":"contains","source":73,"target":2005},{"edgeType":"calls","source":2703,"target":367},{"edgeType":"calls","source":2572,"target":1257},{"edgeType":"calls","source":794,"target":354},{"edgeType":"calls","source":747,"target":754},{"edgeType":"contains","source":815,"target":1200},{"edgeType":"calls","source":5309,"target":972},{"edgeType":"calls","source":5697,"target":1629},{"edgeType":"calls","source":5718,"target":978},{"edgeType":"calls","source":5455,"target":2789},{"edgeType":"calls","source":3604,"target":977},{"edgeType":"calls","source":2572,"target":1258},{"edgeType":"calls","source":4736,"target":766},{"edgeType":"calls","source":1240,"target":269},{"edgeType":"contains","source":2698,"target":3076},{"edgeType":"calls","source":5239,"target":5256},{"edgeType":"calls","source":3916,"target":818},{"edgeType":"calls","source":4002,"target":266},{"edgeType":"calls","source":1933,"target":984},{"edgeType":"contains","source":435,"target":295},{"edgeType":"contains","source":2115,"target":4237},{"edgeType":"contains","source":14,"target":2776},{"edgeType":"calls","source":2458,"target":564},{"edgeType":"calls","source":4499,"target":1771},{"edgeType":"calls","source":2331,"target":269},{"edgeType":"calls","source":4411,"target":269},{"edgeType":"calls","source":945,"target":953},{"edgeType":"calls","source":2405,"target":89},{"edgeType":"calls","source":5277,"target":906},{"edgeType":"calls","source":2100,"target":2145},{"edgeType":"contains","source":2737,"target":2930},{"edgeType":"contains","source":4873,"target":2251},{"edgeType":"calls","source":5269,"target":2211},{"edgeType":"calls","source":5309,"target":971},{"edgeType":"calls","source":3852,"target":3856},{"edgeType":"contains","source":1284,"target":1463},{"edgeType":"calls","source":3604,"target":974},{"edgeType":"calls","source":3843,"target":964},{"edgeType":"calls","source":5718,"target":977},{"edgeType":"contains","source":519,"target":865},{"edgeType":"imports","source":2305,"target":81},{"edgeType":"calls","source":4104,"target":272},{"edgeType":"calls","source":4144,"target":89},{"edgeType":"calls","source":3365,"target":983},{"edgeType":"contains","source":3865,"target":4959},{"edgeType":"calls","source":1933,"target":979},{"edgeType":"calls","source":2064,"target":89},{"edgeType":"contains","source":1,"target":11},{"edgeType":"imports","source":3811,"target":3060},{"edgeType":"calls","source":794,"target":349},{"edgeType":"calls","source":4698,"target":886},{"edgeType":"calls","source":945,"target":952},{"edgeType":"calls","source":5175,"target":896},{"edgeType":"calls","source":4434,"target":3783},{"edgeType":"calls","source":5239,"target":1026},{"edgeType":"calls","source":5288,"target":564},{"edgeType":"contains","source":1023,"target":1096},{"edgeType":"calls","source":3604,"target":975},{"edgeType":"calls","source":3376,"target":2758},{"edgeType":"calls","source":3791,"target":1520},{"edgeType":"calls","source":1933,"target":978},{"edgeType":"calls","source":5718,"target":976},{"edgeType":"contains","source":3007,"target":3017},{"edgeType":"calls","source":3365,"target":984},{"edgeType":"contains","source":3884,"target":141},{"edgeType":"contains","source":4019,"target":4412},{"edgeType":"calls","source":4920,"target":345},{"edgeType":"calls","source":811,"target":878},{"edgeType":"calls","source":5175,"target":895},{"edgeType":"contains","source":1606,"target":2049},{"edgeType":"contains","source":3884,"target":139},{"edgeType":"contains","source":3466,"target":3584},{"edgeType":"calls","source":3916,"target":2927},{"edgeType":"calls","source":5718,"target":975},{"edgeType":"calls","source":2113,"target":1740},{"edgeType":"calls","source":3604,"target":972},{"edgeType":"contains","source":4890,"target":4893},{"edgeType":"calls","source":1937,"target":857},{"edgeType":"calls","source":1933,"target":981},{"edgeType":"calls","source":1908,"target":1756},{"edgeType":"calls","source":5515,"target":925},{"edgeType":"calls","source":5535,"target":305},{"edgeType":"calls","source":5636,"target":345},{"edgeType":"calls","source":5605,"target":1306},{"edgeType":"calls","source":1112,"target":1063},{"edgeType":"calls","source":1165,"target":477},{"edgeType":"calls","source":3365,"target":981},{"edgeType":"calls","source":3248,"target":380},{"edgeType":"calls","source":2962,"target":790},{"edgeType":"imports","source":3969,"target":278},{"edgeType":"imports","source":3969,"target":1335},{"edgeType":"contains","source":3668,"target":3663},{"edgeType":"calls","source":912,"target":920},{"edgeType":"contains","source":815,"target":1204},{"edgeType":"calls","source":5175,"target":894},{"edgeType":"calls","source":5718,"target":974},{"edgeType":"calls","source":3971,"target":166},{"edgeType":"calls","source":3818,"target":3852},{"edgeType":"calls","source":3604,"target":973},{"edgeType":"contains","source":4890,"target":4892},{"edgeType":"contains","source":3466,"target":3583},{"edgeType":"calls","source":3530,"target":1153},{"edgeType":"calls","source":3491,"target":1305},{"edgeType":"contains","source":1220,"target":1333},{"edgeType":"calls","source":5541,"target":2232},{"edgeType":"calls","source":1933,"target":980},{"edgeType":"contains","source":1784,"target":2875},{"edgeType":"calls","source":5473,"target":1169},{"edgeType":"contains","source":2506,"target":2690},{"edgeType":"calls","source":4110,"target":3256},{"edgeType":"calls","source":3365,"target":982},{"edgeType":"calls","source":1229,"target":606},{"edgeType":"contains","source":1,"target":12},{"edgeType":"calls","source":811,"target":880},{"edgeType":"calls","source":2913,"target":1253},{"edgeType":"calls","source":2780,"target":2205},{"edgeType":"contains","source":52,"target":1605},{"edgeType":"contains","source":11,"target":3933},{"edgeType":"calls","source":5744,"target":1224},{"edgeType":"calls","source":5718,"target":973},{"edgeType":"calls","source":1933,"target":975},{"edgeType":"calls","source":3914,"target":1930},{"edgeType":"calls","source":2018,"target":454},{"edgeType":"calls","source":5556,"target":2823},{"edgeType":"calls","source":3365,"target":979},{"edgeType":"calls","source":3554,"target":405},{"edgeType":"calls","source":5494,"target":1574},{"edgeType":"contains","source":4019,"target":4417},{"edgeType":"contains","source":11,"target":762},{"edgeType":"calls","source":2947,"target":1253},{"edgeType":"contains","source":11,"target":3932},{"edgeType":"calls","source":3710,"target":4027},{"edgeType":"contains","source":54,"target":1542},{"edgeType":"imports","source":4286,"target":3138},{"edgeType":"calls","source":3604,"target":971},{"edgeType":"calls","source":1933,"target":974},{"edgeType":"calls","source":5718,"target":972},{"edgeType":"calls","source":5744,"target":1223},{"edgeType":"calls","source":2018,"target":453},{"edgeType":"calls","source":4104,"target":269},{"edgeType":"contains","source":1023,"target":1100},{"edgeType":"calls","source":3971,"target":164},{"edgeType":"calls","source":4719,"target":4458},{"edgeType":"calls","source":3365,"target":980},{"edgeType":"calls","source":5718,"target":971},{"edgeType":"contains","source":374,"target":78},{"edgeType":"contains","source":1988,"target":2899},{"edgeType":"calls","source":1312,"target":141},{"edgeType":"contains","source":11,"target":761},{"edgeType":"contains","source":1654,"target":1626},{"edgeType":"calls","source":2875,"target":315},{"edgeType":"calls","source":1086,"target":805},{"edgeType":"contains","source":1,"target":14},{"edgeType":"calls","source":350,"target":369},{"edgeType":"calls","source":4574,"target":1552},{"edgeType":"calls","source":1804,"target":1805},{"edgeType":"calls","source":2190,"target":406},{"edgeType":"calls","source":1933,"target":977},{"edgeType":"calls","source":4212,"target":89},{"edgeType":"contains","source":1023,"target":1103},{"edgeType":"calls","source":3433,"target":983},{"edgeType":"calls","source":2684,"target":948},{"edgeType":"contains","source":278,"target":943},{"edgeType":"contains","source":3644,"target":4413},{"edgeType":"contains","source":3668,"target":3669},{"edgeType":"calls","source":1087,"target":777},{"edgeType":"contains","source":1688,"target":1626},{"edgeType":"calls","source":3365,"target":977},{"edgeType":"calls","source":5172,"target":984},{"edgeType":"calls","source":3099,"target":2882},{"edgeType":"calls","source":5307,"target":1026},{"edgeType":"calls","source":1728,"target":989},{"edgeType":"contains","source":54,"target":3658},{"edgeType":"calls","source":2535,"target":282},{"edgeType":"calls","source":4601,"target":1771},{"edgeType":"calls","source":2190,"target":407},{"edgeType":"calls","source":4301,"target":501},{"edgeType":"calls","source":2146,"target":1771},{"edgeType":"calls","source":1933,"target":976},{"edgeType":"calls","source":2842,"target":279},{"edgeType":"contains","source":2584,"target":3447},{"edgeType":"calls","source":3433,"target":984},{"edgeType":"calls","source":5528,"target":1574},{"edgeType":"calls","source":5610,"target":89},{"edgeType":"calls","source":3599,"target":2180},{"edgeType":"calls","source":1478,"target":282},{"edgeType":"calls","source":5502,"target":266},{"edgeType":"calls","source":5475,"target":2160},{"edgeType":"calls","source":5535,"target":300},{"edgeType":"calls","source":3365,"target":978},{"edgeType":"calls","source":2875,"target":313},{"edgeType":"calls","source":1087,"target":776},{"edgeType":"calls","source":5172,"target":983},{"edgeType":"calls","source":4493,"target":4094},{"edgeType":"calls","source":3753,"target":1665},{"edgeType":"calls","source":4667,"target":814},{"edgeType":"calls","source":3916,"target":4011},{"edgeType":"calls","source":4413,"target":1289},{"edgeType":"calls","source":1974,"target":790},{"edgeType":"calls","source":4440,"target":452},{"edgeType":"calls","source":4232,"target":3729},{"edgeType":"imports","source":1497,"target":792},{"edgeType":"contains","source":3884,"target":117},{"edgeType":"contains","source":3865,"target":3877},{"edgeType":"contains","source":373,"target":3252},{"edgeType":"contains","source":5090,"target":2898},{"edgeType":"contains","source":1220,"target":1307},{"edgeType":"calls","source":3366,"target":977},{"edgeType":"calls","source":5105,"target":978},{"edgeType":"calls","source":3400,"target":980},{"edgeType":"calls","source":4800,"target":920},{"edgeType":"calls","source":5463,"target":450},{"edgeType":"calls","source":3237,"target":1805},{"edgeType":"calls","source":5370,"target":1219},{"edgeType":"calls","source":1341,"target":329},{"edgeType":"calls","source":5173,"target":984},{"edgeType":"calls","source":5331,"target":313},{"edgeType":"calls","source":369,"target":863},{"edgeType":"calls","source":3987,"target":2868},{"edgeType":"calls","source":4440,"target":451},{"edgeType":"calls","source":4420,"target":2128},{"edgeType":"calls","source":3852,"target":3882},{"edgeType":"calls","source":2148,"target":1740},{"edgeType":"contains","source":2585,"target":3390},{"edgeType":"contains","source":337,"target":2253},{"edgeType":"calls","source":3563,"target":156},{"edgeType":"calls","source":2842,"target":310},{"edgeType":"calls","source":4989,"target":345},{"edgeType":"calls","source":4813,"target":1573},{"edgeType":"calls","source":5622,"target":805},{"edgeType":"contains","source":278,"target":911},{"edgeType":"calls","source":5105,"target":977},{"edgeType":"calls","source":5463,"target":449},{"edgeType":"calls","source":5529,"target":1574},{"edgeType":"calls","source":3366,"target":978},{"edgeType":"calls","source":3400,"target":981},{"edgeType":"contains","source":3334,"target":3425},{"edgeType":"calls","source":5426,"target":3710},{"edgeType":"contains","source":3865,"target":4933},{"edgeType":"calls","source":1377,"target":269},{"edgeType":"calls","source":1144,"target":1150},{"edgeType":"calls","source":5173,"target":983},{"edgeType":"calls","source":3131,"target":864},{"edgeType":"calls","source":3831,"target":302},{"edgeType":"contains","source":2973,"target":2986},{"edgeType":"calls","source":4440,"target":450},{"edgeType":"contains","source":4953,"target":5029},{"edgeType":"calls","source":2279,"target":847},{"edgeType":"calls","source":4956,"target":310},{"edgeType":"calls","source":5622,"target":804},{"edgeType":"calls","source":2842,"target":307},{"edgeType":"calls","source":2823,"target":896},{"edgeType":"calls","source":4813,"target":1572},{"edgeType":"calls","source":4826,"target":1169},{"edgeType":"calls","source":3400,"target":978},{"edgeType":"calls","source":5494,"target":1601},{"edgeType":"calls","source":5173,"target":982},{"edgeType":"contains","source":1618,"target":1653},{"edgeType":"calls","source":5175,"target":920},{"edgeType":"contains","source":4103,"target":1782},{"edgeType":"calls","source":5105,"target":976},{"edgeType":"calls","source":5463,"target":448},{"edgeType":"calls","source":3366,"target":975},{"edgeType":"calls","source":4571,"target":3787},{"edgeType":"calls","source":3923,"target":2736},{"edgeType":"calls","source":2577,"target":2180},{"edgeType":"calls","source":4813,"target":1570},{"edgeType":"calls","source":1937,"target":1938},{"edgeType":"contains","source":4953,"target":5028},{"edgeType":"calls","source":4440,"target":449},{"edgeType":"calls","source":4963,"target":3263},{"edgeType":"calls","source":5613,"target":2139},{"edgeType":"calls","source":1511,"target":345},{"edgeType":"calls","source":4813,"target":1571},{"edgeType":"calls","source":5173,"target":981},{"edgeType":"calls","source":3366,"target":976},{"edgeType":"calls","source":3400,"target":979},{"edgeType":"calls","source":5105,"target":975},{"edgeType":"calls","source":5622,"target":803},{"edgeType":"calls","source":1348,"target":113},{"edgeType":"calls","source":5463,"target":447},{"edgeType":"calls","source":5198,"target":2320},{"edgeType":"calls","source":5364,"target":345},{"edgeType":"calls","source":1118,"target":896},{"edgeType":"contains","source":64,"target":151},{"edgeType":"contains","source":1781,"target":5062},{"edgeType":"calls","source":4813,"target":1569},{"edgeType":"calls","source":2780,"target":1169},{"edgeType":"calls","source":4440,"target":448},{"edgeType":"calls","source":5684,"target":994},{"edgeType":"calls","source":5613,"target":3195},{"edgeType":"calls","source":2823,"target":894},{"edgeType":"calls","source":5105,"target":974},{"edgeType":"calls","source":1381,"target":142},{"edgeType":"calls","source":5173,"target":980},{"edgeType":"calls","source":3366,"target":973},{"edgeType":"calls","source":3400,"target":976},{"edgeType":"contains","source":3334,"target":3428},{"edgeType":"imports","source":3247,"target":446},{"edgeType":"calls","source":1086,"target":830},{"edgeType":"calls","source":1118,"target":895},{"edgeType":"contains","source":4907,"target":4346},{"edgeType":"calls","source":4813,"target":1568},{"edgeType":"calls","source":4222,"target":864},{"edgeType":"calls","source":2279,"target":846},{"edgeType":"calls","source":4440,"target":447},{"edgeType":"calls","source":369,"target":859},{"edgeType":"calls","source":2508,"target":89},{"edgeType":"calls","source":5105,"target":973},{"edgeType":"calls","source":2823,"target":895},{"edgeType":"calls","source":4901,"target":2012},{"edgeType":"calls","source":4956,"target":307},{"edgeType":"contains","source":1220,"target":1310},{"edgeType":"calls","source":5173,"target":979},{"edgeType":"calls","source":5304,"target":89},{"edgeType":"calls","source":5196,"target":266},{"edgeType":"calls","source":1478,"target":305},{"edgeType":"calls","source":5331,"target":309},{"edgeType":"calls","source":3366,"target":974},{"edgeType":"calls","source":3400,"target":977},{"edgeType":"calls","source":3358,"target":1222},{"edgeType":"calls","source":5385,"target":1805},{"edgeType":"calls","source":3366,"target":971},{"edgeType":"calls","source":1036,"target":269},{"edgeType":"imports","source":3642,"target":897},{"edgeType":"calls","source":4853,"target":1384},{"edgeType":"calls","source":4622,"target":89},{"edgeType":"contains","source":2517,"target":1271},{"edgeType":"calls","source":4311,"target":3388},{"edgeType":"calls","source":5173,"target":978},{"edgeType":"contains","source":3798,"target":3842},{"edgeType":"calls","source":5105,"target":972},{"edgeType":"contains","source":3811,"target":5553},{"edgeType":"calls","source":3010,"target":380},{"edgeType":"calls","source":4959,"target":2327},{"edgeType":"calls","source":946,"target":945},{"edgeType":"calls","source":3400,"target":974},{"edgeType":"calls","source":5370,"target":156},{"edgeType":"contains","source":1220,"target":1313},{"edgeType":"calls","source":5376,"target":1026},{"edgeType":"imports","source":317,"target":370},{"edgeType":"calls","source":2056,"target":1416},{"edgeType":"contains","source":2585,"target":3392},{"edgeType":"calls","source":4716,"target":345},{"edgeType":"imports","source":2115,"target":1710},{"edgeType":"calls","source":2261,"target":345},{"edgeType":"calls","source":5173,"target":977},{"edgeType":"calls","source":5105,"target":971},{"edgeType":"contains","source":2915,"target":3732},{"edgeType":"calls","source":5682,"target":2110},{"edgeType":"calls","source":3366,"target":972},{"edgeType":"calls","source":3400,"target":975},{"edgeType":"contains","source":3334,"target":3427},{"edgeType":"calls","source":5575,"target":1199},{"edgeType":"calls","source":5597,"target":1574},{"edgeType":"calls","source":3556,"target":367},{"edgeType":"calls","source":4688,"target":4383},{"edgeType":"calls","source":3400,"target":972},{"edgeType":"contains","source":3865,"target":4942},{"edgeType":"calls","source":1987,"target":1436},{"edgeType":"calls","source":4157,"target":3931},{"edgeType":"calls","source":2822,"target":920},{"edgeType":"contains","source":64,"target":155},{"edgeType":"calls","source":811,"target":895},{"edgeType":"imports","source":3247,"target":459},{"edgeType":"calls","source":5689,"target":5063},{"edgeType":"contains","source":4328,"target":4331},{"edgeType":"calls","source":2885,"target":2139},{"edgeType":"calls","source":5200,"target":2253},{"edgeType":"calls","source":5243,"target":920},{"edgeType":"calls","source":5173,"target":976},{"edgeType":"calls","source":1777,"target":1603},{"edgeType":"contains","source":1284,"target":1447},{"edgeType":"calls","source":5599,"target":454},{"edgeType":"contains","source":3238,"target":3239},{"edgeType":"contains","source":3204,"target":3236},{"edgeType":"calls","source":3400,"target":973},{"edgeType":"calls","source":4240,"target":302},{"edgeType":"calls","source":4538,"target":1633},{"edgeType":"contains","source":33,"target":58},{"edgeType":"calls","source":4434,"target":3800},{"edgeType":"calls","source":4667,"target":805},{"edgeType":"calls","source":811,"target":894},{"edgeType":"contains","source":264,"target":297},{"edgeType":"contains","source":2247,"target":2249},{"edgeType":"calls","source":5173,"target":975},{"edgeType":"imports","source":1781,"target":1509},{"edgeType":"calls","source":3495,"target":142},{"edgeType":"calls","source":3490,"target":297},{"edgeType":"calls","source":3971,"target":184},{"edgeType":"calls","source":3547,"target":2758},{"edgeType":"calls","source":5599,"target":453},{"edgeType":"calls","source":3376,"target":1714},{"edgeType":"calls","source":2710,"target":1219},{"edgeType":"contains","source":3321,"target":3834},{"edgeType":"calls","source":5339,"target":5341},{"edgeType":"calls","source":5599,"target":452},{"edgeType":"calls","source":1118,"target":894},{"edgeType":"calls","source":5239,"target":5270},{"edgeType":"calls","source":4667,"target":804},{"edgeType":"calls","source":5028,"target":1240},{"edgeType":"contains","source":3865,"target":3883},{"edgeType":"calls","source":4717,"target":2425},{"edgeType":"calls","source":5173,"target":974},{"edgeType":"calls","source":2965,"target":1771},{"edgeType":"calls","source":5091,"target":345},{"edgeType":"calls","source":5331,"target":304},{"edgeType":"calls","source":3971,"target":181},{"edgeType":"calls","source":5713,"target":89},{"edgeType":"calls","source":3608,"target":864},{"edgeType":"contains","source":3403,"target":3407},{"edgeType":"contains","source":2585,"target":3396},{"edgeType":"contains","source":1220,"target":1317},{"edgeType":"calls","source":3400,"target":971},{"edgeType":"calls","source":4052,"target":843},{"edgeType":"calls","source":5599,"target":451},{"edgeType":"contains","source":4019,"target":4393},{"edgeType":"contains","source":435,"target":283},{"edgeType":"imports","source":1781,"target":1506},{"edgeType":"calls","source":4667,"target":803},{"edgeType":"contains","source":4260,"target":93},{"edgeType":"calls","source":811,"target":896},{"edgeType":"calls","source":4881,"target":511},{"edgeType":"calls","source":5173,"target":973},{"edgeType":"calls","source":5197,"target":3400},{"edgeType":"imports","source":53,"target":110},{"edgeType":"calls","source":3608,"target":1922},{"edgeType":"calls","source":1726,"target":1071},{"edgeType":"calls","source":5599,"target":450},{"edgeType":"calls","source":2731,"target":566},{"edgeType":"calls","source":5336,"target":2261},{"edgeType":"contains","source":1684,"target":1735},{"edgeType":"calls","source":5125,"target":345},{"edgeType":"calls","source":2930,"target":2853},{"edgeType":"calls","source":5173,"target":972},{"edgeType":"calls","source":5309,"target":984},{"edgeType":"calls","source":5299,"target":1294},{"edgeType":"calls","source":5277,"target":919},{"edgeType":"calls","source":2511,"target":1044},{"edgeType":"contains","source":2247,"target":3309},{"edgeType":"calls","source":456,"target":269},{"edgeType":"calls","source":3852,"target":3868},{"edgeType":"imports","source":3969,"target":264},{"edgeType":"calls","source":5599,"target":449},{"edgeType":"contains","source":1220,"target":1319},{"edgeType":"calls","source":4157,"target":3928},{"edgeType":"calls","source":3389,"target":3424},{"edgeType":"calls","source":5030,"target":2232},{"edgeType":"calls","source":3292,"target":89},{"edgeType":"imports","source":1280,"target":124},{"edgeType":"contains","source":52,"target":1588},{"edgeType":"calls","source":5173,"target":971},{"edgeType":"calls","source":5277,"target":918},{"edgeType":"calls","source":5309,"target":983},{"edgeType":"calls","source":5299,"target":1293},{"edgeType":"calls","source":5303,"target":1169},{"edgeType":"calls","source":4590,"target":1074},{"edgeType":"calls","source":2283,"target":1771},{"edgeType":"calls","source":5694,"target":2789},{"edgeType":"calls","source":5740,"target":1363},{"edgeType":"calls","source":1991,"target":1306},{"edgeType":"calls","source":4048,"target":964},{"edgeType":"imports","source":1781,"target":446},{"edgeType":"contains","source":1058,"target":1059},{"edgeType":"contains","source":3230,"target":3488},{"edgeType":"contains","source":3334,"target":3435},{"edgeType":"calls","source":5740,"target":305},{"edgeType":"calls","source":3604,"target":984},{"edgeType":"calls","source":1309,"target":1311},{"edgeType":"calls","source":5599,"target":448},{"edgeType":"calls","source":3626,"target":302},{"edgeType":"calls","source":5443,"target":1056},{"edgeType":"calls","source":5099,"target":3263},{"edgeType":"calls","source":4927,"target":2253},{"edgeType":"imports","source":3641,"target":920},{"edgeType":"contains","source":4019,"target":4398},{"edgeType":"calls","source":5309,"target":982},{"edgeType":"calls","source":5278,"target":886},{"edgeType":"calls","source":5299,"target":1292},{"edgeType":"calls","source":5277,"target":917},{"edgeType":"calls","source":5271,"target":2160},{"edgeType":"calls","source":4676,"target":521},{"edgeType":"calls","source":4590,"target":1073},{"edgeType":"calls","source":4498,"target":2868},{"edgeType":"calls","source":4030,"target":1519},{"edgeType":"calls","source":1478,"target":300},{"edgeType":"calls","source":3971,"target":177},{"edgeType":"calls","source":4080,"target":3140},{"edgeType":"contains","source":1220,"target":264},{"edgeType":"calls","source":5599,"target":447},{"edgeType":"calls","source":5078,"target":1799},{"edgeType":"imports","source":3642,"target":890},{"edgeType":"calls","source":4942,"target":4958},{"edgeType":"calls","source":5277,"target":916},{"edgeType":"calls","source":285,"target":286},{"edgeType":"calls","source":5309,"target":981},{"edgeType":"calls","source":5299,"target":1291},{"edgeType":"contains","source":2345,"target":2356},{"edgeType":"calls","source":5716,"target":89},{"edgeType":"calls","source":5551,"target":976},{"edgeType":"calls","source":5517,"target":973},{"edgeType":"imports","source":2948,"target":256},{"edgeType":"contains","source":1696,"target":277},{"edgeType":"calls","source":2998,"target":2954},{"edgeType":"calls","source":5261,"target":453},{"edgeType":"calls","source":419,"target":454},{"edgeType":"calls","source":4650,"target":367},{"edgeType":"contains","source":1280,"target":1546},{"edgeType":"calls","source":2448,"target":978},{"edgeType":"calls","source":2572,"target":305},{"edgeType":"calls","source":4457,"target":1065},{"edgeType":"calls","source":4023,"target":776},{"edgeType":"calls","source":4364,"target":777},{"edgeType":"calls","source":4318,"target":89},{"edgeType":"calls","source":5754,"target":1025},{"edgeType":"contains","source":2915,"target":3712},{"edgeType":"calls","source":2138,"target":1075},{"edgeType":"contains","source":2345,"target":2357},{"edgeType":"contains","source":4425,"target":4469},{"edgeType":"calls","source":5517,"target":972},{"edgeType":"calls","source":5626,"target":3935},{"edgeType":"calls","source":5551,"target":975},{"edgeType":"calls","source":5216,"target":789},{"edgeType":"calls","source":2879,"target":302},{"edgeType":"calls","source":5261,"target":452},{"edgeType":"calls","source":1779,"target":1631},{"edgeType":"contains","source":33,"target":34},{"edgeType":"calls","source":419,"target":453},{"edgeType":"contains","source":4223,"target":4389},{"edgeType":"contains","source":73,"target":1965},{"edgeType":"calls","source":4667,"target":896},{"edgeType":"calls","source":2448,"target":979},{"edgeType":"calls","source":4364,"target":776},{"edgeType":"calls","source":4412,"target":345},{"edgeType":"calls","source":5739,"target":1489},{"edgeType":"calls","source":1879,"target":1702},{"edgeType":"calls","source":3723,"target":564},{"edgeType":"calls","source":2128,"target":329},{"edgeType":"calls","source":4023,"target":777},{"edgeType":"calls","source":2026,"target":1377},{"edgeType":"calls","source":2913,"target":302},{"edgeType":"calls","source":4793,"target":2274},{"edgeType":"calls","source":5551,"target":974},{"edgeType":"calls","source":5517,"target":971},{"edgeType":"calls","source":3573,"target":983},{"edgeType":"calls","source":5651,"target":1045},{"edgeType":"contains","source":5681,"target":5704},{"edgeType":"calls","source":5261,"target":450},{"edgeType":"calls","source":2448,"target":976},{"edgeType":"calls","source":5261,"target":451},{"edgeType":"calls","source":5269,"target":2317},{"edgeType":"calls","source":4667,"target":895},{"edgeType":"contains","source":64,"target":133},{"edgeType":"calls","source":4693,"target":89},{"edgeType":"contains","source":4103,"target":2823},{"edgeType":"calls","source":321,"target":323},{"edgeType":"calls","source":4965,"target":1169},{"edgeType":"contains","source":5681,"target":5705},{"edgeType":"calls","source":5551,"target":973},{"edgeType":"contains","source":258,"target":1517},{"edgeType":"calls","source":3573,"target":984},{"edgeType":"calls","source":5668,"target":1574},{"edgeType":"calls","source":3595,"target":302},{"edgeType":"contains","source":5417,"target":5426},{"edgeType":"contains","source":2001,"target":2448},{"edgeType":"calls","source":946,"target":1030},{"edgeType":"calls","source":5261,"target":449},{"edgeType":"calls","source":2448,"target":977},{"edgeType":"calls","source":4574,"target":606},{"edgeType":"calls","source":5306,"target":1169},{"edgeType":"contains","source":4223,"target":4387},{"edgeType":"calls","source":4652,"target":302},{"edgeType":"calls","source":4667,"target":894},{"edgeType":"calls","source":1525,"target":1051},{"edgeType":"calls","source":1879,"target":1704},{"edgeType":"contains","source":4683,"target":4925},{"edgeType":"calls","source":1804,"target":1915},{"edgeType":"contains","source":4747,"target":5055},{"edgeType":"calls","source":3573,"target":981},{"edgeType":"calls","source":2110,"target":1938},{"edgeType":"calls","source":4964,"target":142},{"edgeType":"calls","source":5196,"target":349},{"edgeType":"calls","source":1582,"target":1393},{"edgeType":"calls","source":5551,"target":972},{"edgeType":"calls","source":5261,"target":448},{"edgeType":"calls","source":5386,"target":802},{"edgeType":"calls","source":1239,"target":1456},{"edgeType":"calls","source":5234,"target":3400},{"edgeType":"calls","source":5274,"target":2160},{"edgeType":"calls","source":419,"target":450},{"edgeType":"calls","source":2448,"target":974},{"edgeType":"calls","source":1708,"target":1715},{"edgeType":"imports","source":280,"target":510},{"edgeType":"calls","source":4013,"target":2139},{"edgeType":"calls","source":4433,"target":1805},{"edgeType":"calls","source":2421,"target":754},{"edgeType":"contains","source":4425,"target":4474},{"edgeType":"calls","source":3573,"target":982},{"edgeType":"contains","source":1671,"target":2114},{"edgeType":"contains","source":1606,"target":2015},{"edgeType":"calls","source":4827,"target":2274},{"edgeType":"calls","source":5551,"target":971},{"edgeType":"calls","source":5261,"target":447},{"edgeType":"calls","source":1431,"target":788},{"edgeType":"calls","source":3226,"target":1169},{"edgeType":"calls","source":419,"target":449},{"edgeType":"contains","source":3359,"target":3694},{"edgeType":"calls","source":419,"target":1506},{"edgeType":"calls","source":2448,"target":975},{"edgeType":"calls","source":4800,"target":997},{"edgeType":"contains","source":2345,"target":2358},{"edgeType":"calls","source":3573,"target":979},{"edgeType":"contains","source":815,"target":1168},{"edgeType":"calls","source":3064,"target":1959},{"edgeType":"calls","source":3405,"target":1959},{"edgeType":"calls","source":3495,"target":1283},{"edgeType":"calls","source":5505,"target":282},{"edgeType":"calls","source":3442,"target":2926},{"edgeType":"calls","source":5268,"target":3400},{"edgeType":"calls","source":5421,"target":772},{"edgeType":"contains","source":4873,"target":2211},{"edgeType":"calls","source":4004,"target":302},{"edgeType":"calls","source":1779,"target":1630},{"edgeType":"calls","source":419,"target":452},{"edgeType":"calls","source":1856,"target":300},{"edgeType":"calls","source":2448,"target":972},{"edgeType":"contains","source":2584,"target":3405},{"edgeType":"contains","source":1684,"target":1709},{"edgeType":"calls","source":4328,"target":828},{"edgeType":"calls","source":3573,"target":980},{"edgeType":"contains","source":5090,"target":4997},{"edgeType":"calls","source":2947,"target":302},{"edgeType":"contains","source":2973,"target":2975},{"edgeType":"contains","source":3204,"target":3213},{"edgeType":"calls","source":5443,"target":89},{"edgeType":"calls","source":1779,"target":1629},{"edgeType":"calls","source":5329,"target":2565},{"edgeType":"calls","source":419,"target":451},{"edgeType":"calls","source":2572,"target":300},{"edgeType":"imports","source":3642,"target":948},{"edgeType":"contains","source":2244,"target":2319},{"edgeType":"calls","source":2448,"target":973},{"edgeType":"contains","source":4545,"target":2865},{"edgeType":"contains","source":2310,"target":278},{"edgeType":"calls","source":4395,"target":864},{"edgeType":"calls","source":4320,"target":1075},{"edgeType":"calls","source":4328,"target":827},{"edgeType":"calls","source":3573,"target":977},{"edgeType":"calls","source":3525,"target":3522},{"edgeType":"imports","source":2948,"target":264},{"edgeType":"calls","source":3235,"target":2998},{"edgeType":"calls","source":4834,"target":997},{"edgeType":"contains","source":4425,"target":4478},{"edgeType":"contains","source":58,"target":325},{"edgeType":"calls","source":4426,"target":961},{"edgeType":"calls","source":4328,"target":826},{"edgeType":"calls","source":1817,"target":445},{"edgeType":"calls","source":3573,"target":978},{"edgeType":"calls","source":5564,"target":564},{"edgeType":"calls","source":3354,"target":367},{"edgeType":"contains","source":3321,"target":3820},{"edgeType":"calls","source":3170,"target":2900},{"edgeType":"contains","source":2584,"target":3412},{"edgeType":"contains","source":1684,"target":1716},{"edgeType":"contains","source":435,"target":264},{"edgeType":"calls","source":4498,"target":4013},{"edgeType":"calls","source":2448,"target":971},{"edgeType":"calls","source":4548,"target":349},{"edgeType":"contains","source":815,"target":115},{"edgeType":"calls","source":4328,"target":825},{"edgeType":"calls","source":1343,"target":1401},{"edgeType":"calls","source":3573,"target":975},{"edgeType":"imports","source":2948,"target":262},{"edgeType":"calls","source":1979,"target":1768},{"edgeType":"contains","source":3865,"target":3867},{"edgeType":"contains","source":253,"target":3795},{"edgeType":"calls","source":419,"target":448},{"edgeType":"contains","source":28,"target":3371},{"edgeType":"calls","source":5129,"target":305},{"edgeType":"calls","source":5119,"target":615},{"edgeType":"contains","source":2973,"target":2979},{"edgeType":"calls","source":4422,"target":3195},{"edgeType":"calls","source":5073,"target":984},{"edgeType":"calls","source":4328,"target":824},{"edgeType":"calls","source":3834,"target":284},{"edgeType":"calls","source":5558,"target":1805},{"edgeType":"calls","source":3573,"target":976},{"edgeType":"calls","source":1505,"target":606},{"edgeType":"calls","source":1276,"target":305},{"edgeType":"imports","source":2948,"target":261},{"edgeType":"contains","source":3865,"target":3866},{"edgeType":"calls","source":2729,"target":1771},{"edgeType":"calls","source":419,"target":447},{"edgeType":"calls","source":5108,"target":2012},{"edgeType":"calls","source":5073,"target":983},{"edgeType":"calls","source":5078,"target":828},{"edgeType":"calls","source":5257,"target":564},{"edgeType":"contains","source":5681,"target":5706},{"edgeType":"calls","source":4328,"target":823},{"edgeType":"calls","source":5315,"target":1937},{"edgeType":"calls","source":3573,"target":973},{"edgeType":"calls","source":5752,"target":1075},{"edgeType":"calls","source":5458,"target":2789},{"edgeType":"calls","source":2026,"target":305},{"edgeType":"contains","source":3865,"target":3873},{"edgeType":"calls","source":5511,"target":89},{"edgeType":"contains","source":2585,"target":3384},{"edgeType":"calls","source":3447,"target":2764},{"edgeType":"calls","source":5337,"target":3369},{"edgeType":"calls","source":1240,"target":1416},{"edgeType":"calls","source":1276,"target":300},{"edgeType":"calls","source":4253,"target":1033},{"edgeType":"calls","source":3248,"target":2591},{"edgeType":"contains","source":1684,"target":1719},{"edgeType":"contains","source":1618,"target":1651},{"edgeType":"contains","source":3798,"target":3836},{"edgeType":"calls","source":946,"target":1016},{"edgeType":"calls","source":1583,"target":296},{"edgeType":"imports","source":1988,"target":422},{"edgeType":"contains","source":5681,"target":5707},{"edgeType":"calls","source":4360,"target":887},{"edgeType":"calls","source":4328,"target":822},{"edgeType":"calls","source":3573,"target":974},{"edgeType":"calls","source":3810,"target":1026},{"edgeType":"calls","source":5605,"target":345},{"edgeType":"calls","source":4039,"target":269},{"edgeType":"contains","source":1618,"target":1652},{"edgeType":"calls","source":5073,"target":982},{"edgeType":"calls","source":5078,"target":827},{"edgeType":"contains","source":3798,"target":3835},{"edgeType":"contains","source":1684,"target":1720},{"edgeType":"contains","source":33,"target":46},{"edgeType":"calls","source":872,"target":142},{"edgeType":"calls","source":2304,"target":142},{"edgeType":"calls","source":5272,"target":2211},{"edgeType":"calls","source":4360,"target":886},{"edgeType":"contains","source":5681,"target":5708},{"edgeType":"calls","source":3573,"target":971},{"edgeType":"calls","source":5730,"target":2812},{"edgeType":"calls","source":3868,"target":282},{"edgeType":"contains","source":4953,"target":5025},{"edgeType":"calls","source":2049,"target":1708},{"edgeType":"contains","source":1684,"target":1717},{"edgeType":"calls","source":354,"target":345},{"edgeType":"calls","source":5073,"target":981},{"edgeType":"calls","source":5078,"target":826},{"edgeType":"calls","source":2795,"target":777},{"edgeType":"contains","source":3811,"target":5545},{"edgeType":"contains","source":5681,"target":5709},{"edgeType":"contains","source":73,"target":1979},{"edgeType":"calls","source":3163,"target":997},{"edgeType":"calls","source":4536,"target":1771},{"edgeType":"calls","source":4479,"target":367},{"edgeType":"calls","source":3568,"target":3241},{"edgeType":"calls","source":3573,"target":972},{"edgeType":"imports","source":2374,"target":81},{"edgeType":"contains","source":1784,"target":1789},{"edgeType":"calls","source":1959,"target":269},{"edgeType":"calls","source":3525,"target":345},{"edgeType":"calls","source":5554,"target":867},{"edgeType":"calls","source":5463,"target":1574},{"edgeType":"calls","source":5073,"target":980},{"edgeType":"calls","source":5078,"target":825},{"edgeType":"contains","source":3798,"target":3833},{"edgeType":"calls","source":3722,"target":3782},{"edgeType":"calls","source":2334,"target":300},{"edgeType":"calls","source":2436,"target":1366},{"edgeType":"calls","source":5746,"target":1290},{"edgeType":"calls","source":5756,"target":980},{"edgeType":"contains","source":924,"target":937},{"edgeType":"calls","source":4361,"target":886},{"edgeType":"calls","source":5731,"target":2812},{"edgeType":"contains","source":815,"target":1145},{"edgeType":"calls","source":3983,"target":976},{"edgeType":"calls","source":3998,"target":1568},{"edgeType":"contains","source":3798,"target":3807},{"edgeType":"contains","source":317,"target":1784},{"edgeType":"calls","source":5449,"target":983},{"edgeType":"calls","source":5415,"target":980},{"edgeType":"calls","source":3352,"target":453},{"edgeType":"contains","source":1948,"target":1962},{"edgeType":"calls","source":4716,"target":452},{"edgeType":"contains","source":5446,"target":5570},{"edgeType":"contains","source":1814,"target":1888},{"edgeType":"calls","source":5006,"target":975},{"edgeType":"calls","source":997,"target":1578},{"edgeType":"calls","source":3983,"target":977},{"edgeType":"contains","source":924,"target":936},{"edgeType":"contains","source":4326,"target":4350},{"edgeType":"calls","source":5746,"target":1289},{"edgeType":"calls","source":5756,"target":979},{"edgeType":"contains","source":4747,"target":5041},{"edgeType":"calls","source":3686,"target":1728},{"edgeType":"calls","source":3998,"target":1569},{"edgeType":"calls","source":4853,"target":1489},{"edgeType":"calls","source":4188,"target":964},{"edgeType":"calls","source":3352,"target":454},{"edgeType":"contains","source":3230,"target":3445},{"edgeType":"calls","source":4716,"target":451},{"edgeType":"calls","source":5415,"target":979},{"edgeType":"calls","source":5418,"target":886},{"edgeType":"calls","source":5451,"target":920},{"edgeType":"calls","source":5449,"target":982},{"edgeType":"calls","source":4932,"target":2211},{"edgeType":"calls","source":5006,"target":974},{"edgeType":"contains","source":2178,"target":2229},{"edgeType":"contains","source":54,"target":1483},{"edgeType":"calls","source":4498,"target":1922},{"edgeType":"calls","source":4716,"target":449},{"edgeType":"calls","source":5756,"target":978},{"edgeType":"calls","source":3983,"target":974},{"edgeType":"calls","source":1777,"target":1713},{"edgeType":"calls","source":2114,"target":776},{"edgeType":"calls","source":4926,"target":282},{"edgeType":"calls","source":1283,"target":1171},{"edgeType":"contains","source":960,"target":2994},{"edgeType":"calls","source":2846,"target":282},{"edgeType":"calls","source":2743,"target":304},{"edgeType":"calls","source":5756,"target":977},{"edgeType":"calls","source":3352,"target":451},{"edgeType":"calls","source":5466,"target":454},{"edgeType":"calls","source":5449,"target":981},{"edgeType":"calls","source":4716,"target":450},{"edgeType":"calls","source":5415,"target":978},{"edgeType":"contains","source":5446,"target":5568},{"edgeType":"calls","source":1142,"target":257},{"edgeType":"calls","source":5006,"target":973},{"edgeType":"calls","source":829,"target":447},{"edgeType":"calls","source":5286,"target":1805},{"edgeType":"contains","source":58,"target":301},{"edgeType":"contains","source":3466,"target":3525},{"edgeType":"contains","source":2178,"target":2230},{"edgeType":"calls","source":4716,"target":448},{"edgeType":"contains","source":3359,"target":3671},{"edgeType":"contains","source":3057,"target":350},{"edgeType":"calls","source":1820,"target":1436},{"edgeType":"contains","source":924,"target":938},{"edgeType":"contains","source":4657,"target":4658},{"edgeType":"calls","source":3983,"target":975},{"edgeType":"calls","source":2114,"target":777},{"edgeType":"contains","source":2532,"target":1826},{"edgeType":"calls","source":2798,"target":1771},{"edgeType":"calls","source":4815,"target":3722},{"edgeType":"calls","source":4839,"target":864},{"edgeType":"contains","source":5681,"target":5689},{"edgeType":"calls","source":5756,"target":976},{"edgeType":"contains","source":4019,"target":4352},{"edgeType":"calls","source":4756,"target":266},{"edgeType":"calls","source":3352,"target":452},{"edgeType":"calls","source":5415,"target":977},{"edgeType":"calls","source":5466,"target":453},{"edgeType":"calls","source":5449,"target":980},{"edgeType":"calls","source":5006,"target":972},{"edgeType":"imports","source":2578,"target":78},{"edgeType":"calls","source":455,"target":407},{"edgeType":"calls","source":3983,"target":972},{"edgeType":"calls","source":4716,"target":447},{"edgeType":"contains","source":2533,"target":2858},{"edgeType":"calls","source":2832,"target":1771},{"edgeType":"contains","source":1618,"target":1626},{"edgeType":"calls","source":5006,"target":971},{"edgeType":"calls","source":798,"target":345},{"edgeType":"calls","source":5756,"target":975},{"edgeType":"calls","source":3389,"target":1416},{"edgeType":"contains","source":1814,"target":1892},{"edgeType":"calls","source":5466,"target":452},{"edgeType":"calls","source":5449,"target":979},{"edgeType":"calls","source":5415,"target":976},{"edgeType":"contains","source":5681,"target":5682},{"edgeType":"calls","source":3352,"target":449},{"edgeType":"contains","source":5446,"target":5574},{"edgeType":"calls","source":455,"target":406},{"edgeType":"calls","source":1056,"target":802},{"edgeType":"calls","source":2436,"target":1363},{"edgeType":"calls","source":3983,"target":973},{"edgeType":"calls","source":4182,"target":89},{"edgeType":"calls","source":321,"target":332},{"edgeType":"calls","source":2709,"target":300},{"edgeType":"calls","source":5756,"target":974},{"edgeType":"calls","source":5517,"target":984},{"edgeType":"calls","source":3352,"target":450},{"edgeType":"contains","source":3230,"target":3449},{"edgeType":"calls","source":5415,"target":975},{"edgeType":"calls","source":5466,"target":451},{"edgeType":"calls","source":5449,"target":978},{"edgeType":"contains","source":5681,"target":5683},{"edgeType":"calls","source":1048,"target":1053},{"edgeType":"calls","source":997,"target":1577},{"edgeType":"imports","source":3641,"target":961},{"edgeType":"contains","source":11,"target":2820},{"edgeType":"contains","source":330,"target":331},{"edgeType":"contains","source":259,"target":1475},{"edgeType":"calls","source":4327,"target":877},{"edgeType":"calls","source":5756,"target":973},{"edgeType":"contains","source":3798,"target":3809},{"edgeType":"calls","source":3623,"target":3673},{"edgeType":"calls","source":3428,"target":1262},{"edgeType":"calls","source":5517,"target":983},{"edgeType":"calls","source":3771,"target":142},{"edgeType":"calls","source":3352,"target":447},{"edgeType":"contains","source":3644,"target":4355},{"edgeType":"calls","source":946,"target":1044},{"edgeType":"calls","source":5466,"target":450},{"edgeType":"calls","source":5449,"target":977},{"edgeType":"calls","source":3530,"target":1271},{"edgeType":"imports","source":2948,"target":2347},{"edgeType":"calls","source":5415,"target":974},{"edgeType":"contains","source":5446,"target":5572},{"edgeType":"calls","source":1048,"target":1052},{"edgeType":"calls","source":997,"target":1576},{"edgeType":"calls","source":3983,"target":971},{"edgeType":"calls","source":4548,"target":367},{"edgeType":"contains","source":1,"target":3129},{"edgeType":"calls","source":1881,"target":1655},{"edgeType":"calls","source":1943,"target":790},{"edgeType":"calls","source":4352,"target":2215},{"edgeType":"calls","source":5756,"target":972},{"edgeType":"contains","source":3798,"target":3808},{"edgeType":"contains","source":1867,"target":1305},{"edgeType":"calls","source":1283,"target":1166},{"edgeType":"calls","source":5517,"target":982},{"edgeType":"calls","source":3352,"target":448},{"edgeType":"calls","source":5305,"target":4383},{"edgeType":"calls","source":5415,"target":973},{"edgeType":"calls","source":5466,"target":449},{"edgeType":"calls","source":5449,"target":976},{"edgeType":"calls","source":5415,"target":972},{"edgeType":"calls","source":997,"target":1571},{"edgeType":"calls","source":1996,"target":1256},{"edgeType":"calls","source":2746,"target":1261},{"edgeType":"contains","source":72,"target":1988},{"edgeType":"contains","source":4953,"target":5006},{"edgeType":"calls","source":5756,"target":971},{"edgeType":"calls","source":3861,"target":521},{"edgeType":"calls","source":5607,"target":305},{"edgeType":"imports","source":317,"target":416},{"edgeType":"calls","source":3193,"target":89},{"edgeType":"calls","source":3806,"target":1169},{"edgeType":"contains","source":1164,"target":1961},{"edgeType":"calls","source":3428,"target":1260},{"edgeType":"calls","source":5466,"target":448},{"edgeType":"calls","source":5551,"target":984},{"edgeType":"calls","source":3582,"target":1771},{"edgeType":"calls","source":5449,"target":975},{"edgeType":"calls","source":5517,"target":981},{"edgeType":"calls","source":5415,"target":971},{"edgeType":"calls","source":5466,"target":447},{"edgeType":"calls","source":5449,"target":974},{"edgeType":"calls","source":1253,"target":1033},{"edgeType":"contains","source":1948,"target":1971},{"edgeType":"calls","source":997,"target":1570},{"edgeType":"calls","source":2746,"target":1262},{"edgeType":"calls","source":4943,"target":804},{"edgeType":"contains","source":25,"target":3444},{"edgeType":"calls","source":4672,"target":749},{"edgeType":"calls","source":4943,"target":805},{"edgeType":"contains","source":3466,"target":3536},{"edgeType":"calls","source":1755,"target":269},{"edgeType":"contains","source":2737,"target":2881},{"edgeType":"calls","source":5517,"target":980},{"edgeType":"calls","source":3428,"target":1261},{"edgeType":"calls","source":5551,"target":983},{"edgeType":"calls","source":1619,"target":257},{"edgeType":"calls","source":5449,"target":973},{"edgeType":"contains","source":5417,"target":5419},{"edgeType":"imports","source":1561,"target":961},{"edgeType":"contains","source":5446,"target":5577},{"edgeType":"calls","source":997,"target":1573},{"edgeType":"calls","source":3198,"target":989},{"edgeType":"calls","source":2448,"target":984},{"edgeType":"calls","source":4943,"target":803},{"edgeType":"calls","source":4685,"target":345},{"edgeType":"calls","source":2746,"target":1259},{"edgeType":"calls","source":2535,"target":2515},{"edgeType":"contains","source":2345,"target":2346},{"edgeType":"calls","source":2592,"target":1805},{"edgeType":"contains","source":3057,"target":1414},{"edgeType":"calls","source":4218,"target":3195},{"edgeType":"calls","source":4980,"target":1771},{"edgeType":"calls","source":811,"target":997},{"edgeType":"calls","source":5304,"target":1240},{"edgeType":"contains","source":3466,"target":3535},{"edgeType":"calls","source":3428,"target":1258},{"edgeType":"calls","source":5551,"target":982},{"edgeType":"calls","source":5517,"target":979},{"edgeType":"calls","source":5648,"target":89},{"edgeType":"contains","source":5417,"target":5418},{"edgeType":"calls","source":5517,"target":978},{"edgeType":"calls","source":5449,"target":972},{"edgeType":"calls","source":3971,"target":282},{"edgeType":"calls","source":997,"target":1572},{"edgeType":"calls","source":2746,"target":1260},{"edgeType":"contains","source":5681,"target":5697},{"edgeType":"contains","source":2178,"target":2238},{"edgeType":"calls","source":119,"target":250},{"edgeType":"calls","source":3428,"target":1259},{"edgeType":"contains","source":3460,"target":1606},{"edgeType":"calls","source":5551,"target":981},{"edgeType":"contains","source":3204,"target":3206},{"edgeType":"calls","source":5551,"target":980},{"edgeType":"calls","source":5449,"target":971},{"edgeType":"calls","source":5517,"target":977},{"edgeType":"contains","source":2345,"target":2352},{"edgeType":"contains","source":5417,"target":5425},{"edgeType":"calls","source":1135,"target":460},{"edgeType":"calls","source":2448,"target":982},{"edgeType":"calls","source":4498,"target":1912},{"edgeType":"calls","source":2746,"target":1257},{"edgeType":"contains","source":4223,"target":4386},{"edgeType":"imports","source":3642,"target":920},{"edgeType":"calls","source":4303,"target":3729},{"edgeType":"calls","source":1609,"target":564},{"edgeType":"contains","source":1351,"target":1455},{"edgeType":"calls","source":1432,"target":766},{"edgeType":"contains","source":1814,"target":1901},{"edgeType":"contains","source":1784,"target":2831},{"edgeType":"calls","source":5517,"target":976},{"edgeType":"contains","source":1189,"target":1190},{"edgeType":"calls","source":3459,"target":296},{"edgeType":"calls","source":3428,"target":1257},{"edgeType":"calls","source":5551,"target":979},{"edgeType":"calls","source":5607,"target":300},{"edgeType":"calls","source":1253,"target":1029},{"edgeType":"calls","source":2448,"target":983},{"edgeType":"calls","source":2746,"target":1258},{"edgeType":"calls","source":2812,"target":269},{"edgeType":"contains","source":4223,"target":4385},{"edgeType":"calls","source":5084,"target":2772},{"edgeType":"calls","source":2319,"target":754},{"edgeType":"calls","source":2264,"target":345},{"edgeType":"contains","source":5681,"target":5691},{"edgeType":"calls","source":5293,"target":521},{"edgeType":"calls","source":3170,"target":799},{"edgeType":"calls","source":1856,"target":305},{"edgeType":"calls","source":5600,"target":1574},{"edgeType":"calls","source":5551,"target":978},{"edgeType":"calls","source":5517,"target":975},{"edgeType":"contains","source":4683,"target":4922},{"edgeType":"contains","source":5417,"target":5423},{"edgeType":"imports","source":960,"target":1618},{"edgeType":"calls","source":3408,"target":817},{"edgeType":"contains","source":4425,"target":4464},{"edgeType":"calls","source":997,"target":1569},{"edgeType":"calls","source":3261,"target":89},{"edgeType":"calls","source":3009,"target":501},{"edgeType":"contains","source":1957,"target":1693},{"edgeType":"contains","source":2178,"target":2242},{"edgeType":"contains","source":1618,"target":1632},{"edgeType":"calls","source":2448,"target":980},{"edgeType":"imports","source":4286,"target":1042},{"edgeType":"imports","source":1988,"target":405},{"edgeType":"contains","source":3359,"target":3685},{"edgeType":"calls","source":3648,"target":776},{"edgeType":"calls","source":1393,"target":920},{"edgeType":"contains","source":1280,"target":1540},{"edgeType":"calls","source":3683,"target":1805},{"edgeType":"calls","source":4017,"target":964},{"edgeType":"calls","source":3408,"target":818},{"edgeType":"calls","source":5551,"target":977},{"edgeType":"calls","source":1923,"target":345},{"edgeType":"calls","source":5517,"target":974},{"edgeType":"calls","source":5375,"target":2205},{"edgeType":"contains","source":264,"target":270},{"edgeType":"contains","source":2345,"target":2351},{"edgeType":"calls","source":997,"target":1568},{"edgeType":"calls","source":4759,"target":2274},{"edgeType":"contains","source":2178,"target":2243},{"edgeType":"calls","source":4555,"target":142},{"edgeType":"contains","source":4223,"target":4383},{"edgeType":"calls","source":5261,"target":454},{"edgeType":"calls","source":2448,"target":981},{"edgeType":"calls","source":4457,"target":1066},{"edgeType":"calls","source":1432,"target":767},{"edgeType":"contains","source":2740,"target":1733},{"edgeType":"imports","source":96,"target":920},{"edgeType":"calls","source":3648,"target":777},{"edgeType":"calls","source":4186,"target":976},{"edgeType":"calls","source":1478,"target":360},{"edgeType":"calls","source":5373,"target":4347},{"edgeType":"imports","source":1988,"target":1509},{"edgeType":"calls","source":1225,"target":804},{"edgeType":"calls","source":5026,"target":305},{"edgeType":"calls","source":5175,"target":971},{"edgeType":"calls","source":5079,"target":776},{"edgeType":"calls","source":5127,"target":345},{"edgeType":"calls","source":5268,"target":2317},{"edgeType":"calls","source":5311,"target":984},{"edgeType":"calls","source":4692,"target":89},{"edgeType":"contains","source":2740,"target":1705},{"edgeType":"contains","source":778,"target":1218},{"edgeType":"calls","source":4186,"target":975},{"edgeType":"calls","source":4186,"target":977},{"edgeType":"calls","source":1478,"target":359},{"edgeType":"calls","source":1431,"target":759},{"edgeType":"calls","source":1225,"target":803},{"edgeType":"calls","source":1099,"target":481},{"edgeType":"calls","source":5073,"target":961},{"edgeType":"calls","source":3080,"target":380},{"edgeType":"contains","source":65,"target":66},{"edgeType":"calls","source":1075,"target":1224},{"edgeType":"calls","source":5311,"target":983},{"edgeType":"contains","source":28,"target":3327},{"edgeType":"calls","source":2331,"target":345},{"edgeType":"calls","source":1805,"target":1849},{"edgeType":"calls","source":4479,"target":349},{"edgeType":"calls","source":3608,"target":3039},{"edgeType":"calls","source":3683,"target":1771},{"edgeType":"calls","source":4929,"target":2253},{"edgeType":"calls","source":5625,"target":2875},{"edgeType":"calls","source":2733,"target":564},{"edgeType":"calls","source":866,"target":307},{"edgeType":"calls","source":4758,"target":2269},{"edgeType":"calls","source":5445,"target":1056},{"edgeType":"calls","source":3880,"target":946},{"edgeType":"calls","source":5280,"target":886},{"edgeType":"calls","source":5311,"target":982},{"edgeType":"calls","source":4623,"target":1169},{"edgeType":"calls","source":4020,"target":4005},{"edgeType":"calls","source":4186,"target":973},{"edgeType":"contains","source":2737,"target":2853},{"edgeType":"contains","source":1023,"target":1024},{"edgeType":"calls","source":4961,"target":2317},{"edgeType":"contains","source":4425,"target":4434},{"edgeType":"calls","source":3339,"target":806},{"edgeType":"calls","source":1225,"target":805},{"edgeType":"calls","source":5502,"target":345},{"edgeType":"contains","source":1671,"target":2075},{"edgeType":"calls","source":3195,"target":1042},{"edgeType":"contains","source":1814,"target":1870},{"edgeType":"calls","source":5311,"target":980},{"edgeType":"calls","source":5311,"target":981},{"edgeType":"contains","source":11,"target":2799},{"edgeType":"contains","source":3359,"target":3655},{"edgeType":"calls","source":4003,"target":305},{"edgeType":"calls","source":4227,"target":3931},{"edgeType":"contains","source":2829,"target":4230},{"edgeType":"calls","source":4186,"target":974},{"edgeType":"calls","source":1478,"target":356},{"edgeType":"calls","source":5685,"target":1013},{"edgeType":"calls","source":4844,"target":2772},{"edgeType":"calls","source":2727,"target":1805},{"edgeType":"calls","source":4807,"target":1805},{"edgeType":"calls","source":3036,"target":1739},{"edgeType":"calls","source":5128,"target":310},{"edgeType":"calls","source":5311,"target":979},{"edgeType":"calls","source":5267,"target":3400},{"edgeType":"contains","source":5446,"target":5558},{"edgeType":"calls","source":3193,"target":2157},{"edgeType":"calls","source":2510,"target":2190},{"edgeType":"calls","source":1013,"target":1029},{"edgeType":"contains","source":1867,"target":2347},{"edgeType":"contains","source":93,"target":260},{"edgeType":"contains","source":4907,"target":5354},{"edgeType":"calls","source":1842,"target":1756},{"edgeType":"calls","source":2056,"target":407},{"edgeType":"calls","source":4186,"target":971},{"edgeType":"contains","source":815,"target":1132},{"edgeType":"calls","source":4267,"target":1633},{"edgeType":"calls","source":4227,"target":3928},{"edgeType":"calls","source":4327,"target":828},{"edgeType":"calls","source":2137,"target":2126},{"edgeType":"calls","source":5026,"target":300},{"edgeType":"calls","source":4965,"target":2191},{"edgeType":"imports","source":96,"target":963},{"edgeType":"calls","source":3394,"target":156},{"edgeType":"calls","source":5311,"target":978},{"edgeType":"calls","source":1478,"target":355},{"edgeType":"calls","source":2056,"target":406},{"edgeType":"contains","source":2829,"target":4236},{"edgeType":"calls","source":4433,"target":1771},{"edgeType":"contains","source":815,"target":1131},{"edgeType":"calls","source":4186,"target":972},{"edgeType":"calls","source":2137,"target":2127},{"edgeType":"calls","source":4344,"target":302},{"edgeType":"contains","source":4425,"target":4439},{"edgeType":"calls","source":5094,"target":305},{"edgeType":"calls","source":4327,"target":827},{"edgeType":"calls","source":1478,"target":358},{"edgeType":"contains","source":891,"target":893},{"edgeType":"contains","source":924,"target":927},{"edgeType":"calls","source":2980,"target":302},{"edgeType":"calls","source":3102,"target":1805},{"edgeType":"calls","source":5523,"target":1805},{"edgeType":"calls","source":1007,"target":160},{"edgeType":"calls","source":5311,"target":977},{"edgeType":"calls","source":1075,"target":1223},{"edgeType":"calls","source":1842,"target":1758},{"edgeType":"calls","source":4003,"target":300},{"edgeType":"contains","source":3996,"target":3997},{"edgeType":"contains","source":64,"target":104},{"edgeType":"contains","source":63,"target":135},{"edgeType":"calls","source":1478,"target":357},{"edgeType":"calls","source":4327,"target":826},{"edgeType":"contains","source":924,"target":926},{"edgeType":"contains","source":2915,"target":3683},{"edgeType":"calls","source":5128,"target":307},{"edgeType":"calls","source":3784,"target":1805},{"edgeType":"calls","source":3722,"target":3727},{"edgeType":"calls","source":3134,"target":814},{"edgeType":"calls","source":5311,"target":976},{"edgeType":"calls","source":5268,"target":3366},{"edgeType":"calls","source":3396,"target":92},{"edgeType":"calls","source":2577,"target":1169},{"edgeType":"imports","source":317,"target":1509},{"edgeType":"contains","source":1948,"target":1949},{"edgeType":"calls","source":1842,"target":1757},{"edgeType":"calls","source":3806,"target":2180},{"edgeType":"contains","source":1,"target":3113},{"edgeType":"calls","source":4854,"target":345},{"edgeType":"contains","source":4747,"target":5026},{"edgeType":"calls","source":3696,"target":302},{"edgeType":"contains","source":924,"target":929},{"edgeType":"contains","source":4356,"target":4470},{"edgeType":"calls","source":4327,"target":825},{"edgeType":"calls","source":3060,"target":991},{"edgeType":"calls","source":5311,"target":975},{"edgeType":"calls","source":5426,"target":3753},{"edgeType":"calls","source":1208,"target":1322},{"edgeType":"contains","source":1948,"target":1954},{"edgeType":"calls","source":3998,"target":453},{"edgeType":"contains","source":3798,"target":3799},{"edgeType":"contains","source":11,"target":2806},{"edgeType":"calls","source":2353,"target":1768},{"edgeType":"contains","source":74,"target":1910},{"edgeType":"contains","source":278,"target":871},{"edgeType":"calls","source":4453,"target":89},{"edgeType":"calls","source":4327,"target":824},{"edgeType":"calls","source":5311,"target":974},{"edgeType":"contains","source":4907,"target":5358},{"edgeType":"calls","source":5740,"target":360},{"edgeType":"contains","source":1285,"target":1367},{"edgeType":"imports","source":4654,"target":1305},{"edgeType":"calls","source":2032,"target":89},{"edgeType":"calls","source":3998,"target":454},{"edgeType":"calls","source":2405,"target":1214},{"edgeType":"calls","source":4817,"target":4661},{"edgeType":"contains","source":3886,"target":1070},{"edgeType":"calls","source":4073,"target":4471},{"edgeType":"imports","source":3811,"target":1013},{"edgeType":"contains","source":2517,"target":1228},{"edgeType":"calls","source":4891,"target":3424},{"edgeType":"calls","source":4327,"target":823},{"edgeType":"calls","source":5311,"target":973},{"edgeType":"calls","source":3998,"target":451},{"edgeType":"calls","source":5740,"target":359},{"edgeType":"calls","source":5428,"target":1574},{"edgeType":"calls","source":5510,"target":89},{"edgeType":"imports","source":784,"target":785},{"edgeType":"calls","source":3220,"target":257},{"edgeType":"calls","source":4561,"target":969},{"edgeType":"calls","source":4421,"target":3195},{"edgeType":"contains","source":924,"target":930},{"edgeType":"calls","source":4359,"target":887},{"edgeType":"calls","source":5094,"target":300},{"edgeType":"contains","source":792,"target":794},{"edgeType":"calls","source":2269,"target":142},{"edgeType":"calls","source":4327,"target":822},{"edgeType":"calls","source":5311,"target":972},{"edgeType":"calls","source":3136,"target":1805},{"edgeType":"calls","source":5296,"target":380},{"edgeType":"calls","source":3490,"target":345},{"edgeType":"calls","source":5740,"target":358},{"edgeType":"calls","source":5558,"target":1771},{"edgeType":"calls","source":3436,"target":961},{"edgeType":"calls","source":3998,"target":452},{"edgeType":"calls","source":5336,"target":2311},{"edgeType":"calls","source":1145,"target":1162},{"edgeType":"contains","source":11,"target":3864},{"edgeType":"contains","source":839,"target":397},{"edgeType":"contains","source":74,"target":1914},{"edgeType":"calls","source":5119,"target":581},{"edgeType":"calls","source":5311,"target":971},{"edgeType":"calls","source":4359,"target":886},{"edgeType":"calls","source":4327,"target":821},{"edgeType":"contains","source":3359,"target":3670},{"edgeType":"calls","source":5740,"target":357},{"edgeType":"calls","source":3998,"target":449},{"edgeType":"calls","source":5729,"target":2812},{"edgeType":"calls","source":5244,"target":5162},{"edgeType":"contains","source":5446,"target":5566},{"edgeType":"calls","source":4857,"target":2361},{"edgeType":"contains","source":11,"target":2810},{"edgeType":"calls","source":2916,"target":1223},{"edgeType":"contains","source":2178,"target":2228},{"edgeType":"contains","source":2247,"target":3260},{"edgeType":"contains","source":3466,"target":3523},{"edgeType":"calls","source":5740,"target":356},{"edgeType":"calls","source":3998,"target":450},{"edgeType":"contains","source":924,"target":932},{"edgeType":"contains","source":2734,"target":4019},{"edgeType":"contains","source":2584,"target":3383},{"edgeType":"calls","source":3350,"target":1511},{"edgeType":"calls","source":802,"target":1219},{"edgeType":"calls","source":2536,"target":1377},{"edgeType":"calls","source":1201,"target":477},{"edgeType":"calls","source":2916,"target":1224},{"edgeType":"calls","source":945,"target":1014},{"edgeType":"contains","source":3466,"target":3522},{"edgeType":"calls","source":4327,"target":819},{"edgeType":"calls","source":5740,"target":355},{"edgeType":"contains","source":3057,"target":1402},{"edgeType":"calls","source":2160,"target":345},{"edgeType":"calls","source":4024,"target":1755},{"edgeType":"calls","source":3998,"target":447},{"edgeType":"calls","source":1937,"target":1976},{"edgeType":"calls","source":4167,"target":1550},{"edgeType":"imports","source":317,"target":459},{"edgeType":"calls","source":4220,"target":964},{"edgeType":"calls","source":2046,"target":1768},{"edgeType":"imports","source":1518,"target":1283},{"edgeType":"calls","source":860,"target":481},{"edgeType":"contains","source":2178,"target":2225},{"edgeType":"contains","source":4019,"target":4349},{"edgeType":"calls","source":4859,"target":4411},{"edgeType":"contains","source":3996,"target":4005},{"edgeType":"calls","source":1640,"target":1669},{"edgeType":"calls","source":945,"target":1016},{"edgeType":"contains","source":2178,"target":2226},{"edgeType":"calls","source":5297,"target":345},{"edgeType":"calls","source":4457,"target":1016},{"edgeType":"calls","source":3998,"target":448},{"edgeType":"contains","source":924,"target":934},{"edgeType":"calls","source":4227,"target":1805},{"edgeType":"imports","source":3460,"target":273},{"edgeType":"contains","source":42,"target":763},{"edgeType":"contains","source":93,"target":239},{"edgeType":"contains","source":97,"target":115},{"edgeType":"calls","source":4419,"target":1169},{"edgeType":"calls","source":4531,"target":2982},{"edgeType":"calls","source":1858,"target":1281},{"edgeType":"calls","source":3402,"target":984},{"edgeType":"calls","source":3614,"target":754},{"edgeType":"calls","source":5073,"target":979},{"edgeType":"calls","source":5078,"target":824},{"edgeType":"contains","source":3588,"target":3942},{"edgeType":"calls","source":5129,"target":300},{"edgeType":"calls","source":1036,"target":1393},{"edgeType":"contains","source":93,"target":238},{"edgeType":"calls","source":3806,"target":89},{"edgeType":"calls","source":2504,"target":1340},{"edgeType":"calls","source":1942,"target":790},{"edgeType":"calls","source":2026,"target":300},{"edgeType":"calls","source":4813,"target":4810},{"edgeType":"calls","source":2795,"target":776},{"edgeType":"calls","source":4241,"target":345},{"edgeType":"calls","source":3592,"target":380},{"edgeType":"calls","source":3396,"target":1171},{"edgeType":"calls","source":5531,"target":521},{"edgeType":"calls","source":3481,"target":2764},{"edgeType":"imports","source":2517,"target":948},{"edgeType":"calls","source":5073,"target":978},{"edgeType":"calls","source":5078,"target":823},{"edgeType":"calls","source":2536,"target":345},{"edgeType":"calls","source":2426,"target":1641},{"edgeType":"contains","source":11,"target":2783},{"edgeType":"contains","source":93,"target":241},{"edgeType":"calls","source":2576,"target":1219},{"edgeType":"calls","source":4671,"target":2868},{"edgeType":"contains","source":459,"target":523},{"edgeType":"contains","source":2740,"target":2744},{"edgeType":"calls","source":1993,"target":269},{"edgeType":"calls","source":1349,"target":1206},{"edgeType":"calls","source":2713,"target":2258},{"edgeType":"calls","source":5444,"target":2160},{"edgeType":"calls","source":3402,"target":982},{"edgeType":"calls","source":5291,"target":4789},{"edgeType":"calls","source":3055,"target":1169},{"edgeType":"calls","source":5073,"target":977},{"edgeType":"calls","source":5078,"target":822},{"edgeType":"contains","source":11,"target":2782},{"edgeType":"contains","source":93,"target":240},{"edgeType":"calls","source":369,"target":931},{"edgeType":"imports","source":3717,"target":749},{"edgeType":"contains","source":1515,"target":1609},{"edgeType":"calls","source":4357,"target":2031},{"edgeType":"contains","source":2740,"target":1688},{"edgeType":"calls","source":4935,"target":1026},{"edgeType":"calls","source":2743,"target":272},{"edgeType":"calls","source":4794,"target":1169},{"edgeType":"calls","source":3402,"target":983},{"edgeType":"calls","source":5073,"target":976},{"edgeType":"calls","source":946,"target":1014},{"edgeType":"imports","source":4286,"target":3194},{"edgeType":"contains","source":1376,"target":1695},{"edgeType":"contains","source":1331,"target":3090},{"edgeType":"calls","source":4005,"target":257},{"edgeType":"calls","source":1771,"target":803},{"edgeType":"contains","source":93,"target":243},{"edgeType":"contains","source":4907,"target":5338},{"edgeType":"calls","source":4120,"target":920},{"edgeType":"contains","source":2584,"target":3358},{"edgeType":"calls","source":3595,"target":282},{"edgeType":"calls","source":2743,"target":269},{"edgeType":"calls","source":3402,"target":980},{"edgeType":"calls","source":5175,"target":984},{"edgeType":"contains","source":3279,"target":2953},{"edgeType":"calls","source":5073,"target":975},{"edgeType":"calls","source":5371,"target":2307},{"edgeType":"calls","source":3239,"target":1805},{"edgeType":"imports","source":2578,"target":110},{"edgeType":"contains","source":93,"target":242},{"edgeType":"calls","source":1047,"target":1048},{"edgeType":"contains","source":1781,"target":4997},{"edgeType":"calls","source":1879,"target":1682},{"edgeType":"calls","source":5073,"target":974},{"edgeType":"calls","source":829,"target":407},{"edgeType":"calls","source":5175,"target":983},{"edgeType":"calls","source":3402,"target":981},{"edgeType":"calls","source":5613,"target":89},{"edgeType":"calls","source":5610,"target":1239},{"edgeType":"calls","source":5282,"target":837},{"edgeType":"contains","source":1331,"target":3092},{"edgeType":"calls","source":1771,"target":805},{"edgeType":"calls","source":3189,"target":3353},{"edgeType":"contains","source":1331,"target":3088},{"edgeType":"contains","source":2740,"target":2748},{"edgeType":"contains","source":64,"target":87},{"edgeType":"calls","source":1641,"target":1664},{"edgeType":"imports","source":3642,"target":963},{"edgeType":"contains","source":93,"target":245},{"edgeType":"contains","source":62,"target":1206},{"edgeType":"contains","source":4953,"target":4967},{"edgeType":"calls","source":4836,"target":920},{"edgeType":"calls","source":1983,"target":1632},{"edgeType":"imports","source":2948,"target":266},{"edgeType":"calls","source":5073,"target":973},{"edgeType":"contains","source":256,"target":477},{"edgeType":"calls","source":5707,"target":345},{"edgeType":"calls","source":3805,"target":1169},{"edgeType":"calls","source":3134,"target":830},{"edgeType":"calls","source":5272,"target":89},{"edgeType":"calls","source":5175,"target":982},{"edgeType":"contains","source":1781,"target":2880},{"edgeType":"imports","source":3056,"target":89},{"edgeType":"calls","source":5282,"target":836},{"edgeType":"calls","source":5533,"target":454},{"edgeType":"calls","source":3402,"target":978},{"edgeType":"imports","source":3247,"target":510},{"edgeType":"contains","source":1376,"target":1694},{"edgeType":"contains","source":1331,"target":3089},{"edgeType":"contains","source":93,"target":244},{"edgeType":"contains","source":2178,"target":2201},{"edgeType":"calls","source":1771,"target":804},{"edgeType":"calls","source":4014,"target":3148},{"edgeType":"calls","source":5073,"target":972},{"edgeType":"contains","source":3879,"target":3378},{"edgeType":"contains","source":3127,"target":4493},{"edgeType":"contains","source":960,"target":2964},{"edgeType":"contains","source":3958,"target":4100},{"edgeType":"calls","source":5282,"target":835},{"edgeType":"calls","source":5175,"target":981},{"edgeType":"calls","source":3066,"target":2939},{"edgeType":"calls","source":1205,"target":380},{"edgeType":"imports","source":3969,"target":341},{"edgeType":"calls","source":5306,"target":2205},{"edgeType":"contains","source":3588,"target":3943},{"edgeType":"calls","source":5533,"target":453},{"edgeType":"calls","source":3402,"target":979},{"edgeType":"calls","source":3818,"target":3936},{"edgeType":"calls","source":1048,"target":1014},{"edgeType":"contains","source":54,"target":399},{"edgeType":"calls","source":4186,"target":984},{"edgeType":"contains","source":93,"target":247},{"edgeType":"contains","source":52,"target":1518},{"edgeType":"contains","source":62,"target":1208},{"edgeType":"imports","source":2886,"target":89},{"edgeType":"calls","source":3694,"target":380},{"edgeType":"calls","source":5073,"target":971},{"edgeType":"contains","source":4326,"target":4327},{"edgeType":"calls","source":901,"target":286},{"edgeType":"contains","source":3057,"target":1383},{"edgeType":"calls","source":5175,"target":980},{"edgeType":"calls","source":2169,"target":89},{"edgeType":"calls","source":5012,"target":1805},{"edgeType":"calls","source":5647,"target":89},{"edgeType":"contains","source":1164,"target":1928},{"edgeType":"calls","source":5533,"target":452},{"edgeType":"calls","source":3402,"target":976},{"edgeType":"calls","source":5565,"target":1574},{"edgeType":"contains","source":4683,"target":4886},{"edgeType":"calls","source":3286,"target":345},{"edgeType":"calls","source":1922,"target":345},{"edgeType":"calls","source":3914,"target":961},{"edgeType":"imports","source":1518,"target":1271},{"edgeType":"calls","source":1146,"target":89},{"edgeType":"contains","source":93,"target":246},{"edgeType":"calls","source":2436,"target":269},{"edgeType":"calls","source":1047,"target":1044},{"edgeType":"contains","source":2374,"target":2474},{"edgeType":"calls","source":2940,"target":501},{"edgeType":"calls","source":3599,"target":2269},{"edgeType":"calls","source":892,"target":564},{"edgeType":"calls","source":5105,"target":3149},{"edgeType":"calls","source":5175,"target":979},{"edgeType":"calls","source":4930,"target":2232},{"edgeType":"contains","source":889,"target":939},{"edgeType":"calls","source":5282,"target":833},{"edgeType":"calls","source":1431,"target":767},{"edgeType":"contains","source":1238,"target":3865},{"edgeType":"calls","source":5533,"target":451},{"edgeType":"calls","source":3402,"target":977},{"edgeType":"contains","source":4683,"target":4885},{"edgeType":"calls","source":5533,"target":450},{"edgeType":"calls","source":3402,"target":974},{"edgeType":"calls","source":5387,"target":1805},{"edgeType":"calls","source":3228,"target":3197},{"edgeType":"calls","source":1048,"target":1016},{"edgeType":"calls","source":1112,"target":89},{"edgeType":"calls","source":4186,"target":982},{"edgeType":"contains","source":263,"target":265},{"edgeType":"calls","source":4506,"target":1633},{"edgeType":"calls","source":4697,"target":997},{"edgeType":"calls","source":829,"target":406},{"edgeType":"calls","source":5175,"target":978},{"edgeType":"imports","source":317,"target":1504},{"edgeType":"calls","source":5282,"target":832},{"edgeType":"calls","source":5372,"target":156},{"edgeType":"contains","source":1376,"target":1698},{"edgeType":"calls","source":1834,"target":961},{"edgeType":"calls","source":3322,"target":284},{"edgeType":"calls","source":5533,"target":449},{"edgeType":"calls","source":3402,"target":975},{"edgeType":"imports","source":2948,"target":278},{"edgeType":"calls","source":3971,"target":1306},{"edgeType":"calls","source":4186,"target":983},{"edgeType":"calls","source":3226,"target":89},{"edgeType":"calls","source":2441,"target":1169},{"edgeType":"contains","source":62,"target":1209},{"edgeType":"contains","source":4425,"target":4426},{"edgeType":"calls","source":4850,"target":481},{"edgeType":"calls","source":5059,"target":345},{"edgeType":"calls","source":5046,"target":1805},{"edgeType":"calls","source":5175,"target":977},{"edgeType":"calls","source":5197,"target":2409},{"edgeType":"calls","source":3839,"target":1169},{"edgeType":"contains","source":3591,"target":3854},{"edgeType":"imports","source":255,"target":256},{"edgeType":"calls","source":1525,"target":1026},{"edgeType":"calls","source":5533,"target":448},{"edgeType":"calls","source":3402,"target":972},{"edgeType":"calls","source":4186,"target":980},{"edgeType":"calls","source":870,"target":1242},{"edgeType":"imports","source":3410,"target":753},{"edgeType":"contains","source":28,"target":3324},{"edgeType":"calls","source":4350,"target":4353},{"edgeType":"calls","source":5175,"target":976},{"edgeType":"calls","source":4506,"target":1631},{"edgeType":"calls","source":5340,"target":89},{"edgeType":"contains","source":3127,"target":4502},{"edgeType":"calls","source":5691,"target":5063},{"edgeType":"calls","source":3873,"target":1169},{"edgeType":"calls","source":5533,"target":447},{"edgeType":"calls","source":3402,"target":973},{"edgeType":"calls","source":4031,"target":501},{"edgeType":"calls","source":4186,"target":981},{"edgeType":"calls","source":5421,"target":1805},{"edgeType":"calls","source":2961,"target":902},{"edgeType":"calls","source":2592,"target":1771},{"edgeType":"contains","source":4260,"target":4262},{"edgeType":"calls","source":5175,"target":975},{"edgeType":"calls","source":4506,"target":1630},{"edgeType":"imports","source":317,"target":446},{"edgeType":"calls","source":5616,"target":1044},{"edgeType":"calls","source":5620,"target":920},{"edgeType":"calls","source":4186,"target":978},{"edgeType":"calls","source":4167,"target":3681},{"edgeType":"calls","source":5065,"target":2269},{"edgeType":"calls","source":3084,"target":257},{"edgeType":"calls","source":4490,"target":1068},{"edgeType":"contains","source":3591,"target":3859},{"edgeType":"contains","source":815,"target":1126},{"edgeType":"calls","source":4506,"target":1629},{"edgeType":"contains","source":2247,"target":3241},{"edgeType":"contains","source":4260,"target":4261},{"edgeType":"calls","source":5175,"target":974},{"edgeType":"calls","source":2443,"target":1102},{"edgeType":"calls","source":1431,"target":766},{"edgeType":"calls","source":5753,"target":1025},{"edgeType":"calls","source":5683,"target":2138},{"edgeType":"calls","source":5715,"target":89},{"edgeType":"imports","source":2305,"target":124},{"edgeType":"calls","source":4070,"target":345},{"edgeType":"calls","source":3412,"target":1718},{"edgeType":"calls","source":4186,"target":979},{"edgeType":"calls","source":1214,"target":1150},{"edgeType":"calls","source":5502,"target":349},{"edgeType":"calls","source":3402,"target":971},{"edgeType":"calls","source":5079,"target":777},{"edgeType":"contains","source":278,"target":860},{"edgeType":"calls","source":866,"target":310},{"edgeType":"calls","source":5175,"target":972},{"edgeType":"calls","source":5175,"target":973},{"edgeType":"calls","source":5274,"target":1075},{"edgeType":"contains","source":2247,"target":3242},{"edgeType":"contains","source":785,"target":998},{"edgeType":"contains","source":4326,"target":4328},{"edgeType":"calls","source":5374,"target":89},{"edgeType":"calls","source":4411,"target":345},{"edgeType":"contains","source":1510,"target":3891},{"edgeType":"imports","source":2948,"target":273},{"edgeType":"contains","source":889,"target":945},{"edgeType":"calls","source":5536,"target":450},{"edgeType":"calls","source":2047,"target":790},{"edgeType":"calls","source":4186,"target":1075},{"edgeType":"imports","source":96,"target":2849},{"edgeType":"calls","source":5451,"target":971},{"edgeType":"contains","source":1220,"target":1225},{"edgeType":"calls","source":5502,"target":447},{"edgeType":"calls","source":3323,"target":345},{"edgeType":"calls","source":3411,"target":788},{"edgeType":"calls","source":1383,"target":1290},{"edgeType":"calls","source":5403,"target":345},{"edgeType":"contains","source":3865,"target":4851},{"edgeType":"contains","source":2048,"target":5155},{"edgeType":"calls","source":4479,"target":449},{"edgeType":"contains","source":93,"target":223},{"edgeType":"calls","source":3055,"target":2311},{"edgeType":"calls","source":2472,"target":300},{"edgeType":"contains","source":3359,"target":3625},{"edgeType":"calls","source":5251,"target":829},{"edgeType":"calls","source":4348,"target":282},{"edgeType":"calls","source":1839,"target":895},{"edgeType":"calls","source":5620,"target":1016},{"edgeType":"calls","source":1383,"target":1289},{"edgeType":"calls","source":5536,"target":449},{"edgeType":"calls","source":801,"target":304},{"edgeType":"contains","source":3591,"target":3831},{"edgeType":"contains","source":1,"target":959},{"edgeType":"contains","source":93,"target":222},{"edgeType":"calls","source":5179,"target":946},{"edgeType":"calls","source":3189,"target":272},{"edgeType":"calls","source":2444,"target":1169},{"edgeType":"calls","source":2190,"target":1644},{"edgeType":"contains","source":2048,"target":5156},{"edgeType":"contains","source":1285,"target":1326},{"edgeType":"calls","source":2208,"target":1086},{"edgeType":"calls","source":4479,"target":448},{"edgeType":"calls","source":1839,"target":894},{"edgeType":"calls","source":1807,"target":829},{"edgeType":"calls","source":1992,"target":1436},{"edgeType":"calls","source":4749,"target":4761},{"edgeType":"calls","source":2827,"target":920},{"edgeType":"contains","source":259,"target":1421},{"edgeType":"calls","source":1383,"target":1292},{"edgeType":"contains","source":2374,"target":2446},{"edgeType":"contains","source":256,"target":457},{"edgeType":"calls","source":5536,"target":448},{"edgeType":"contains","source":4019,"target":4303},{"edgeType":"calls","source":3163,"target":3189},{"edgeType":"calls","source":5129,"target":380},{"edgeType":"contains","source":3865,"target":4849},{"edgeType":"contains","source":4907,"target":5315},{"edgeType":"calls","source":5268,"target":300},{"edgeType":"contains","source":2178,"target":2180},{"edgeType":"contains","source":4292,"target":4297},{"edgeType":"contains","source":2244,"target":2248},{"edgeType":"contains","source":93,"target":225},{"edgeType":"calls","source":4479,"target":447},{"edgeType":"calls","source":1511,"target":1552},{"edgeType":"calls","source":5620,"target":1014},{"edgeType":"calls","source":2779,"target":1352},{"edgeType":"calls","source":4749,"target":4760},{"edgeType":"calls","source":1383,"target":1291},{"edgeType":"calls","source":5536,"target":447},{"edgeType":"calls","source":3567,"target":1236},{"edgeType":"calls","source":3500,"target":142},{"edgeType":"calls","source":4756,"target":315},{"edgeType":"calls","source":1075,"target":269},{"edgeType":"calls","source":1086,"target":985},{"edgeType":"contains","source":93,"target":224},{"edgeType":"contains","source":52,"target":1495},{"edgeType":"imports","source":3972,"target":1086},{"edgeType":"calls","source":5280,"target":984},{"edgeType":"calls","source":4439,"target":3800},{"edgeType":"calls","source":1839,"target":896},{"edgeType":"calls","source":3945,"target":2202},{"edgeType":"calls","source":4933,"target":1169},{"edgeType":"calls","source":5756,"target":1025},{"edgeType":"calls","source":5517,"target":3149},{"edgeType":"calls","source":5623,"target":920},{"edgeType":"calls","source":5620,"target":1013},{"edgeType":"calls","source":5344,"target":5341},{"edgeType":"calls","source":5280,"target":983},{"edgeType":"calls","source":5329,"target":521},{"edgeType":"calls","source":4571,"target":3935},{"edgeType":"contains","source":93,"target":227},{"edgeType":"contains","source":2888,"target":3430},{"edgeType":"calls","source":1531,"target":925},{"edgeType":"calls","source":3459,"target":354},{"edgeType":"contains","source":3127,"target":2365},{"edgeType":"contains","source":3865,"target":4854},{"edgeType":"calls","source":5280,"target":981},{"edgeType":"calls","source":5280,"target":982},{"edgeType":"contains","source":3393,"target":3631},{"edgeType":"calls","source":3880,"target":1044},{"edgeType":"contains","source":93,"target":226},{"edgeType":"contains","source":75,"target":784},{"edgeType":"calls","source":4756,"target":313},{"edgeType":"calls","source":3678,"target":964},{"edgeType":"contains","source":2244,"target":2255},{"edgeType":"contains","source":2584,"target":3342},{"edgeType":"calls","source":5704,"target":521},{"edgeType":"calls","source":3734,"target":282},{"edgeType":"calls","source":802,"target":272},{"edgeType":"contains","source":5446,"target":5523},{"edgeType":"calls","source":1067,"target":514},{"edgeType":"contains","source":1710,"target":1893},{"edgeType":"calls","source":5280,"target":980},{"edgeType":"calls","source":1024,"target":789},{"edgeType":"contains","source":3393,"target":3630},{"edgeType":"calls","source":2511,"target":142},{"edgeType":"calls","source":4582,"target":4649},{"edgeType":"contains","source":4019,"target":4308},{"edgeType":"contains","source":2111,"target":2147},{"edgeType":"contains","source":4159,"target":4196},{"edgeType":"contains","source":2048,"target":5157},{"edgeType":"calls","source":4774,"target":811},{"edgeType":"calls","source":4426,"target":1029},{"edgeType":"contains","source":2244,"target":2252},{"edgeType":"calls","source":119,"target":305},{"edgeType":"contains","source":93,"target":229},{"edgeType":"contains","source":1710,"target":1894},{"edgeType":"calls","source":2852,"target":1199},{"edgeType":"calls","source":2768,"target":2746},{"edgeType":"calls","source":5752,"target":89},{"edgeType":"contains","source":256,"target":460},{"edgeType":"calls","source":2956,"target":89},{"edgeType":"calls","source":4798,"target":2180},{"edgeType":"contains","source":5118,"target":5120},{"edgeType":"calls","source":1545,"target":1550},{"edgeType":"calls","source":5280,"target":979},{"edgeType":"calls","source":5473,"target":282},{"edgeType":"calls","source":2436,"target":2468},{"edgeType":"calls","source":4686,"target":367},{"edgeType":"contains","source":3393,"target":3629},{"edgeType":"calls","source":3834,"target":354},{"edgeType":"imports","source":3969,"target":126},{"edgeType":"contains","source":93,"target":228},{"edgeType":"contains","source":4292,"target":4300},{"edgeType":"calls","source":2211,"target":983},{"edgeType":"calls","source":806,"target":142},{"edgeType":"calls","source":4285,"target":1169},{"edgeType":"calls","source":3592,"target":454},{"edgeType":"calls","source":5628,"target":2875},{"edgeType":"calls","source":5689,"target":984},{"edgeType":"calls","source":2934,"target":2882},{"edgeType":"calls","source":4966,"target":142},{"edgeType":"contains","source":889,"target":924},{"edgeType":"contains","source":4907,"target":5326},{"edgeType":"calls","source":5448,"target":1056},{"edgeType":"contains","source":3393,"target":3636},{"edgeType":"calls","source":5280,"target":978},{"edgeType":"calls","source":5277,"target":1071},{"edgeType":"calls","source":5348,"target":984},{"edgeType":"calls","source":5388,"target":802},{"edgeType":"calls","source":3377,"target":777},{"edgeType":"calls","source":4035,"target":1519},{"edgeType":"contains","source":2506,"target":2592},{"edgeType":"contains","source":93,"target":231},{"edgeType":"contains","source":4292,"target":4307},{"edgeType":"calls","source":2211,"target":984},{"edgeType":"calls","source":5689,"target":983},{"edgeType":"contains","source":4953,"target":4956},{"edgeType":"contains","source":3476,"target":4233},{"edgeType":"calls","source":5529,"target":2772},{"edgeType":"calls","source":5280,"target":977},{"edgeType":"calls","source":1767,"target":1004},{"edgeType":"calls","source":5505,"target":345},{"edgeType":"calls","source":5348,"target":983},{"edgeType":"calls","source":5342,"target":1169},{"edgeType":"contains","source":3393,"target":3635},{"edgeType":"contains","source":1285,"target":1334},{"edgeType":"calls","source":5471,"target":2456},{"edgeType":"calls","source":4756,"target":309},{"edgeType":"calls","source":1136,"target":481},{"edgeType":"contains","source":93,"target":230},{"edgeType":"contains","source":2111,"target":2154},{"edgeType":"calls","source":4107,"target":345},{"edgeType":"contains","source":2374,"target":2457},{"edgeType":"calls","source":4426,"target":1026},{"edgeType":"calls","source":2211,"target":981},{"edgeType":"calls","source":119,"target":300},{"edgeType":"calls","source":5280,"target":976},{"edgeType":"calls","source":5341,"target":142},{"edgeType":"calls","source":3592,"target":452},{"edgeType":"calls","source":1363,"target":847},{"edgeType":"calls","source":5348,"target":982},{"edgeType":"calls","source":5689,"target":982},{"edgeType":"calls","source":5350,"target":920},{"edgeType":"calls","source":5422,"target":802},{"edgeType":"calls","source":2640,"target":367},{"edgeType":"calls","source":3907,"target":2314},{"edgeType":"calls","source":4052,"target":990},{"edgeType":"contains","source":2111,"target":2151},{"edgeType":"contains","source":93,"target":233},{"edgeType":"calls","source":4649,"target":454},{"edgeType":"contains","source":73,"target":853},{"edgeType":"calls","source":4561,"target":1068},{"edgeType":"contains","source":1710,"target":841},{"edgeType":"calls","source":2211,"target":982},{"edgeType":"contains","source":5118,"target":5124},{"edgeType":"calls","source":2797,"target":2900},{"edgeType":"contains","source":4953,"target":4954},{"edgeType":"calls","source":5280,"target":975},{"edgeType":"calls","source":3093,"target":2180},{"edgeType":"calls","source":5348,"target":981},{"edgeType":"calls","source":1409,"target":477},{"edgeType":"calls","source":3377,"target":776},{"edgeType":"calls","source":3592,"target":453},{"edgeType":"calls","source":5689,"target":981},{"edgeType":"calls","source":5349,"target":5179},{"edgeType":"calls","source":1363,"target":846},{"edgeType":"calls","source":4715,"target":1578},{"edgeType":"contains","source":4019,"target":4311},{"edgeType":"calls","source":1156,"target":920},{"edgeType":"contains","source":3962,"target":3964},{"edgeType":"contains","source":1814,"target":1846},{"edgeType":"calls","source":1926,"target":305},{"edgeType":"contains","source":3865,"target":4857},{"edgeType":"calls","source":4047,"target":89},{"edgeType":"contains","source":2517,"target":1193},{"edgeType":"contains","source":93,"target":232},{"edgeType":"contains","source":63,"target":105},{"edgeType":"calls","source":4649,"target":453},{"edgeType":"contains","source":841,"target":302},{"edgeType":"calls","source":2211,"target":979},{"edgeType":"calls","source":4881,"target":4887},{"edgeType":"calls","source":4318,"target":142},{"edgeType":"calls","source":5280,"target":974},{"edgeType":"calls","source":1377,"target":407},{"edgeType":"calls","source":1366,"target":748},{"edgeType":"calls","source":5348,"target":980},{"edgeType":"calls","source":3802,"target":282},{"edgeType":"calls","source":3592,"target":450},{"edgeType":"calls","source":5689,"target":980},{"edgeType":"contains","source":4907,"target":5330},{"edgeType":"calls","source":4715,"target":1577},{"edgeType":"calls","source":1926,"target":300},{"edgeType":"contains","source":3318,"target":3850},{"edgeType":"calls","source":1377,"target":406},{"edgeType":"calls","source":1283,"target":1206},{"edgeType":"calls","source":1205,"target":453},{"edgeType":"contains","source":5446,"target":5533},{"edgeType":"contains","source":11,"target":2777},{"edgeType":"contains","source":93,"target":235},{"edgeType":"calls","source":4649,"target":452},{"edgeType":"contains","source":3591,"target":3843},{"edgeType":"calls","source":1602,"target":830},{"edgeType":"contains","source":4292,"target":4310},{"edgeType":"calls","source":2193,"target":481},{"edgeType":"calls","source":2211,"target":980},{"edgeType":"calls","source":5280,"target":973},{"edgeType":"calls","source":5348,"target":979},{"edgeType":"contains","source":4747,"target":5004},{"edgeType":"calls","source":3665,"target":302},{"edgeType":"calls","source":3592,"target":451},{"edgeType":"calls","source":5689,"target":979},{"edgeType":"calls","source":5722,"target":1013},{"edgeType":"calls","source":5456,"target":802},{"edgeType":"calls","source":1215,"target":142},{"edgeType":"calls","source":1205,"target":452},{"edgeType":"contains","source":3318,"target":3851},{"edgeType":"calls","source":4121,"target":964},{"edgeType":"contains","source":2374,"target":2461},{"edgeType":"contains","source":93,"target":234},{"edgeType":"calls","source":4857,"target":345},{"edgeType":"calls","source":4649,"target":451},{"edgeType":"calls","source":4715,"target":1576},{"edgeType":"contains","source":4292,"target":4309},{"edgeType":"contains","source":93,"target":237},{"edgeType":"calls","source":4503,"target":747},{"edgeType":"calls","source":2448,"target":1029},{"edgeType":"calls","source":4413,"target":366},{"edgeType":"calls","source":2211,"target":977},{"edgeType":"calls","source":2279,"target":983},{"edgeType":"calls","source":5280,"target":972},{"edgeType":"calls","source":3592,"target":448},{"edgeType":"calls","source":5348,"target":978},{"edgeType":"calls","source":5689,"target":978},{"edgeType":"calls","source":3568,"target":2249},{"edgeType":"contains","source":4907,"target":5328},{"edgeType":"contains","source":784,"target":3128},{"edgeType":"calls","source":1552,"target":269},{"edgeType":"calls","source":3834,"target":345},{"edgeType":"contains","source":1782,"target":1784},{"edgeType":"calls","source":5416,"target":984},{"edgeType":"calls","source":3358,"target":302},{"edgeType":"calls","source":4571,"target":2868},{"edgeType":"calls","source":4649,"target":450},{"edgeType":"calls","source":2963,"target":920},{"edgeType":"calls","source":4756,"target":304},{"edgeType":"calls","source":5232,"target":345},{"edgeType":"contains","source":1517,"target":1543},{"edgeType":"calls","source":5280,"target":971},{"edgeType":"calls","source":2279,"target":984},{"edgeType":"calls","source":2211,"target":978},{"edgeType":"calls","source":5348,"target":977},{"edgeType":"calls","source":3592,"target":449},{"edgeType":"calls","source":5689,"target":977},{"edgeType":"calls","source":5597,"target":2772},{"edgeType":"contains","source":3113,"target":3862},{"edgeType":"contains","source":5118,"target":5128},{"edgeType":"contains","source":3318,"target":3849},{"edgeType":"calls","source":5311,"target":5295},{"edgeType":"calls","source":5416,"target":983},{"edgeType":"calls","source":1205,"target":454},{"edgeType":"calls","source":4649,"target":449},{"edgeType":"calls","source":4894,"target":3424},{"edgeType":"contains","source":93,"target":236},{"edgeType":"contains","source":28,"target":2221},{"edgeType":"calls","source":997,"target":588},{"edgeType":"contains","source":4907,"target":5301},{"edgeType":"contains","source":40,"target":3963},{"edgeType":"contains","source":2111,"target":2128},{"edgeType":"contains","source":4286,"target":4468},{"edgeType":"calls","source":5349,"target":978},{"edgeType":"calls","source":4231,"target":2868},{"edgeType":"contains","source":1285,"target":1308},{"edgeType":"calls","source":4002,"target":453},{"edgeType":"calls","source":3576,"target":975},{"edgeType":"calls","source":5770,"target":1669},{"edgeType":"calls","source":3732,"target":367},{"edgeType":"calls","source":3789,"target":1771},{"edgeType":"calls","source":1922,"target":453},{"edgeType":"contains","source":889,"target":899},{"edgeType":"calls","source":3883,"target":971},{"edgeType":"calls","source":2007,"target":989},{"edgeType":"contains","source":2506,"target":2567},{"edgeType":"imports","source":96,"target":2833},{"edgeType":"calls","source":1240,"target":454},{"edgeType":"contains","source":1250,"target":278},{"edgeType":"calls","source":5473,"target":305},{"edgeType":"calls","source":5490,"target":835},{"edgeType":"calls","source":1377,"target":1492},{"edgeType":"contains","source":2375,"target":2400},{"edgeType":"calls","source":4650,"target":450},{"edgeType":"calls","source":1209,"target":358},{"edgeType":"calls","source":5003,"target":2191},{"edgeType":"calls","source":2928,"target":979},{"edgeType":"calls","source":875,"target":142},{"edgeType":"calls","source":5078,"target":5150},{"edgeType":"contains","source":93,"target":205},{"edgeType":"contains","source":4907,"target":5300},{"edgeType":"contains","source":4178,"target":4644},{"edgeType":"contains","source":3588,"target":3907},{"edgeType":"calls","source":4534,"target":1930},{"edgeType":"calls","source":5241,"target":2211},{"edgeType":"calls","source":4357,"target":1075},{"edgeType":"calls","source":5349,"target":977},{"edgeType":"contains","source":3359,"target":3607},{"edgeType":"calls","source":3576,"target":976},{"edgeType":"calls","source":4002,"target":454},{"edgeType":"calls","source":5598,"target":2772},{"edgeType":"calls","source":1922,"target":452},{"edgeType":"calls","source":3883,"target":972},{"edgeType":"calls","source":1961,"target":300},{"edgeType":"calls","source":1909,"target":1912},{"edgeType":"calls","source":2063,"target":309},{"edgeType":"contains","source":4621,"target":4652},{"edgeType":"contains","source":2375,"target":2401},{"edgeType":"calls","source":4571,"target":3955},{"edgeType":"contains","source":3994,"target":4006},{"edgeType":"calls","source":1240,"target":453},{"edgeType":"calls","source":1209,"target":357},{"edgeType":"calls","source":4650,"target":449},{"edgeType":"calls","source":2914,"target":1414},{"edgeType":"calls","source":2928,"target":980},{"edgeType":"contains","source":5580,"target":5581},{"edgeType":"contains","source":93,"target":208},{"edgeType":"calls","source":1563,"target":1014},{"edgeType":"contains","source":62,"target":112},{"edgeType":"calls","source":5215,"target":902},{"edgeType":"contains","source":4286,"target":4466},{"edgeType":"calls","source":4650,"target":447},{"edgeType":"calls","source":5349,"target":976},{"edgeType":"calls","source":2439,"target":1337},{"edgeType":"calls","source":3648,"target":1912},{"edgeType":"contains","source":523,"target":620},{"edgeType":"contains","source":2740,"target":1654},{"edgeType":"calls","source":4002,"target":451},{"edgeType":"calls","source":2002,"target":89},{"edgeType":"calls","source":4210,"target":345},{"edgeType":"calls","source":1209,"target":360},{"edgeType":"calls","source":3576,"target":972},{"edgeType":"calls","source":3434,"target":89},{"edgeType":"calls","source":3424,"target":1456},{"edgeType":"calls","source":5432,"target":1574},{"edgeType":"calls","source":5514,"target":89},{"edgeType":"calls","source":5490,"target":833},{"edgeType":"contains","source":259,"target":1404},{"edgeType":"calls","source":2928,"target":977},{"edgeType":"contains","source":5446,"target":5502},{"edgeType":"contains","source":2375,"target":2398},{"edgeType":"contains","source":2374,"target":2429},{"edgeType":"calls","source":4650,"target":448},{"edgeType":"calls","source":2885,"target":1253},{"edgeType":"calls","source":4900,"target":2211},{"edgeType":"contains","source":3865,"target":4833},{"edgeType":"contains","source":2838,"target":2845},{"edgeType":"calls","source":1007,"target":279},{"edgeType":"calls","source":997,"target":589},{"edgeType":"contains","source":93,"target":207},{"edgeType":"calls","source":3163,"target":1092},{"edgeType":"calls","source":5349,"target":975},{"edgeType":"calls","source":4363,"target":887},{"edgeType":"calls","source":4002,"target":452},{"edgeType":"calls","source":3576,"target":974},{"edgeType":"calls","source":5668,"target":2714},{"edgeType":"calls","source":1922,"target":454},{"edgeType":"contains","source":1814,"target":1821},{"edgeType":"calls","source":4919,"target":564},{"edgeType":"calls","source":4167,"target":2736},{"edgeType":"contains","source":2584,"target":3319},{"edgeType":"calls","source":1209,"target":359},{"edgeType":"calls","source":3576,"target":973},{"edgeType":"contains","source":2375,"target":2399},{"edgeType":"calls","source":5507,"target":305},{"edgeType":"calls","source":5490,"target":832},{"edgeType":"calls","source":5073,"target":1075},{"edgeType":"calls","source":5451,"target":984},{"edgeType":"calls","source":5015,"target":759},{"edgeType":"calls","source":2928,"target":978},{"edgeType":"calls","source":5254,"target":1805},{"edgeType":"calls","source":2420,"target":867},{"edgeType":"calls","source":5349,"target":974},{"edgeType":"contains","source":93,"target":210},{"edgeType":"contains","source":1285,"target":1312},{"edgeType":"calls","source":4502,"target":805},{"edgeType":"calls","source":5733,"target":2812},{"edgeType":"calls","source":2304,"target":2349},{"edgeType":"calls","source":1922,"target":449},{"edgeType":"calls","source":4363,"target":886},{"edgeType":"calls","source":257,"target":269},{"edgeType":"calls","source":4002,"target":449},{"edgeType":"calls","source":4110,"target":272},{"edgeType":"imports","source":280,"target":296},{"edgeType":"calls","source":4231,"target":749},{"edgeType":"contains","source":2374,"target":2435},{"edgeType":"imports","source":889,"target":443},{"edgeType":"calls","source":1240,"target":450},{"edgeType":"calls","source":5451,"target":983},{"edgeType":"calls","source":5507,"target":304},{"edgeType":"calls","source":2928,"target":975},{"edgeType":"calls","source":1075,"target":1337},{"edgeType":"calls","source":353,"target":463},{"edgeType":"contains","source":62,"target":113},{"edgeType":"calls","source":5349,"target":973},{"edgeType":"imports","source":3969,"target":1164},{"edgeType":"calls","source":4502,"target":804},{"edgeType":"contains","source":93,"target":209},{"edgeType":"calls","source":1922,"target":448},{"edgeType":"calls","source":3734,"target":302},{"edgeType":"calls","source":4002,"target":450},{"edgeType":"calls","source":4926,"target":345},{"edgeType":"calls","source":3515,"target":1805},{"edgeType":"calls","source":3576,"target":971},{"edgeType":"calls","source":1240,"target":1506},{"edgeType":"calls","source":2928,"target":976},{"edgeType":"calls","source":4823,"target":367},{"edgeType":"calls","source":5451,"target":982},{"edgeType":"calls","source":5473,"target":300},{"edgeType":"calls","source":4881,"target":4911},{"edgeType":"calls","source":3220,"target":380},{"edgeType":"calls","source":1240,"target":449},{"edgeType":"calls","source":1205,"target":477},{"edgeType":"contains","source":2111,"target":2130},{"edgeType":"calls","source":5349,"target":972},{"edgeType":"calls","source":4002,"target":447},{"edgeType":"calls","source":1621,"target":269},{"edgeType":"contains","source":93,"target":212},{"edgeType":"calls","source":4758,"target":266},{"edgeType":"calls","source":4762,"target":142},{"edgeType":"calls","source":4104,"target":456},{"edgeType":"calls","source":1922,"target":451},{"edgeType":"calls","source":4502,"target":803},{"edgeType":"contains","source":2838,"target":2848},{"edgeType":"calls","source":4376,"target":481},{"edgeType":"imports","source":280,"target":293},{"edgeType":"calls","source":2836,"target":2768},{"edgeType":"calls","source":4881,"target":4910},{"edgeType":"contains","source":2517,"target":1171},{"edgeType":"calls","source":2928,"target":973},{"edgeType":"contains","source":2375,"target":2402},{"edgeType":"calls","source":5642,"target":345},{"edgeType":"calls","source":1209,"target":356},{"edgeType":"calls","source":801,"target":320},{"edgeType":"calls","source":1240,"target":452},{"edgeType":"calls","source":5451,"target":981},{"edgeType":"contains","source":1970,"target":2273},{"edgeType":"imports","source":1238,"target":1249},{"edgeType":"contains","source":1351,"target":2436},{"edgeType":"calls","source":4652,"target":380},{"edgeType":"calls","source":5349,"target":971},{"edgeType":"calls","source":4571,"target":777},{"edgeType":"contains","source":63,"target":84},{"edgeType":"contains","source":93,"target":211},{"edgeType":"calls","source":1922,"target":450},{"edgeType":"calls","source":4350,"target":4457},{"edgeType":"calls","source":4109,"target":302},{"edgeType":"calls","source":4433,"target":3998},{"edgeType":"calls","source":4002,"target":448},{"edgeType":"contains","source":523,"target":623},{"edgeType":"imports","source":280,"target":295},{"edgeType":"imports","source":280,"target":294},{"edgeType":"contains","source":2375,"target":2403},{"edgeType":"calls","source":4881,"target":4909},{"edgeType":"calls","source":1240,"target":451},{"edgeType":"calls","source":1209,"target":355},{"edgeType":"calls","source":5127,"target":454},{"edgeType":"calls","source":2928,"target":974},{"edgeType":"calls","source":5451,"target":980},{"edgeType":"calls","source":5301,"target":345},{"edgeType":"calls","source":5293,"target":593},{"edgeType":"calls","source":5288,"target":1805},{"edgeType":"calls","source":3193,"target":2269},{"edgeType":"contains","source":1988,"target":2778},{"edgeType":"calls","source":3843,"target":89},{"edgeType":"calls","source":4797,"target":1169},{"edgeType":"contains","source":93,"target":214},{"edgeType":"contains","source":61,"target":2263},{"edgeType":"calls","source":4571,"target":776},{"edgeType":"calls","source":4474,"target":3783},{"edgeType":"calls","source":4185,"target":3228},{"edgeType":"calls","source":4881,"target":4908},{"edgeType":"contains","source":815,"target":1087},{"edgeType":"calls","source":4858,"target":1393},{"edgeType":"calls","source":2928,"target":971},{"edgeType":"calls","source":5557,"target":864},{"edgeType":"calls","source":5582,"target":89},{"edgeType":"calls","source":3802,"target":302},{"edgeType":"contains","source":3466,"target":3471},{"edgeType":"calls","source":5127,"target":453},{"edgeType":"calls","source":5451,"target":979},{"edgeType":"calls","source":5507,"target":300},{"edgeType":"calls","source":3396,"target":1261},{"edgeType":"contains","source":4683,"target":4853},{"edgeType":"contains","source":3334,"target":3335},{"edgeType":"contains","source":93,"target":213},{"edgeType":"calls","source":4080,"target":142},{"edgeType":"calls","source":801,"target":313},{"edgeType":"calls","source":5127,"target":452},{"edgeType":"calls","source":3739,"target":142},{"edgeType":"calls","source":2928,"target":972},{"edgeType":"calls","source":3396,"target":1262},{"edgeType":"contains","source":3466,"target":3470},{"edgeType":"calls","source":5502,"target":454},{"edgeType":"calls","source":5451,"target":978},{"edgeType":"calls","source":3264,"target":2180},{"edgeType":"contains","source":4019,"target":4295},{"edgeType":"contains","source":4654,"target":4694},{"edgeType":"calls","source":1922,"target":447},{"edgeType":"imports","source":3208,"target":444},{"edgeType":"contains","source":1953,"target":1747},{"edgeType":"contains","source":93,"target":216},{"edgeType":"calls","source":2063,"target":304},{"edgeType":"contains","source":259,"target":1413},{"edgeType":"contains","source":2374,"target":2438},{"edgeType":"calls","source":4441,"target":1633},{"edgeType":"calls","source":1482,"target":345},{"edgeType":"calls","source":4305,"target":564},{"edgeType":"calls","source":5127,"target":451},{"edgeType":"calls","source":4881,"target":4906},{"edgeType":"imports","source":3811,"target":2880},{"edgeType":"calls","source":3773,"target":142},{"edgeType":"contains","source":3466,"target":3469},{"edgeType":"calls","source":3396,"target":1259},{"edgeType":"calls","source":5322,"target":1805},{"edgeType":"calls","source":1240,"target":448},{"edgeType":"calls","source":5451,"target":977},{"edgeType":"calls","source":5502,"target":453},{"edgeType":"calls","source":5451,"target":976},{"edgeType":"calls","source":4785,"target":481},{"edgeType":"calls","source":1945,"target":790},{"edgeType":"calls","source":1976,"target":886},{"edgeType":"contains","source":93,"target":215},{"edgeType":"calls","source":4196,"target":772},{"edgeType":"contains","source":4178,"target":4650},{"edgeType":"calls","source":4831,"target":1169},{"edgeType":"calls","source":4479,"target":454},{"edgeType":"calls","source":2431,"target":521},{"edgeType":"contains","source":2375,"target":2408},{"edgeType":"calls","source":321,"target":396},{"edgeType":"contains","source":259,"target":1412},{"edgeType":"calls","source":5045,"target":1935},{"edgeType":"contains","source":72,"target":4037},{"edgeType":"calls","source":2153,"target":1740},{"edgeType":"calls","source":5127,"target":450},{"edgeType":"imports","source":108,"target":354},{"edgeType":"calls","source":801,"target":315},{"edgeType":"contains","source":3466,"target":3468},{"edgeType":"calls","source":5459,"target":2842},{"edgeType":"calls","source":5362,"target":564},{"edgeType":"calls","source":1240,"target":447},{"edgeType":"calls","source":5743,"target":380},{"edgeType":"calls","source":3396,"target":1260},{"edgeType":"calls","source":5502,"target":452},{"edgeType":"calls","source":5534,"target":1574},{"edgeType":"calls","source":5451,"target":975},{"edgeType":"calls","source":1924,"target":1436},{"edgeType":"contains","source":1220,"target":1221},{"edgeType":"calls","source":5502,"target":451},{"edgeType":"calls","source":3396,"target":1257},{"edgeType":"calls","source":2069,"target":1169},{"edgeType":"calls","source":4149,"target":1169},{"edgeType":"calls","source":2410,"target":1169},{"edgeType":"contains","source":93,"target":218},{"edgeType":"calls","source":801,"target":309},{"edgeType":"calls","source":4479,"target":453},{"edgeType":"contains","source":40,"target":3976},{"edgeType":"contains","source":4286,"target":3424},{"edgeType":"calls","source":4881,"target":4904},{"edgeType":"calls","source":5127,"target":449},{"edgeType":"calls","source":1383,"target":1294},{"edgeType":"calls","source":5536,"target":454},{"edgeType":"calls","source":1655,"target":261},{"edgeType":"calls","source":5502,"target":450},{"edgeType":"contains","source":3972,"target":3643},{"edgeType":"calls","source":1918,"target":564},{"edgeType":"calls","source":5536,"target":453},{"edgeType":"calls","source":5451,"target":974},{"edgeType":"calls","source":2472,"target":305},{"edgeType":"calls","source":4881,"target":4902},{"edgeType":"calls","source":455,"target":464},{"edgeType":"contains","source":93,"target":217},{"edgeType":"contains","source":11,"target":2759},{"edgeType":"calls","source":5127,"target":448},{"edgeType":"calls","source":4271,"target":3729},{"edgeType":"calls","source":4479,"target":452},{"edgeType":"imports","source":108,"target":352},{"edgeType":"calls","source":4881,"target":4903},{"edgeType":"calls","source":4884,"target":4810},{"edgeType":"calls","source":5268,"target":305},{"edgeType":"imports","source":96,"target":2838},{"edgeType":"calls","source":1383,"target":1293},{"edgeType":"calls","source":3396,"target":1258},{"edgeType":"contains","source":4907,"target":5312},{"edgeType":"calls","source":5493,"target":2842},{"edgeType":"calls","source":5451,"target":973},{"edgeType":"calls","source":5536,"target":452},{"edgeType":"calls","source":5502,"target":449},{"edgeType":"contains","source":2375,"target":2411},{"edgeType":"calls","source":4920,"target":521},{"edgeType":"contains","source":11,"target":2762},{"edgeType":"contains","source":93,"target":220},{"edgeType":"calls","source":4756,"target":320},{"edgeType":"contains","source":4292,"target":4293},{"edgeType":"contains","source":93,"target":221},{"edgeType":"calls","source":5127,"target":447},{"edgeType":"calls","source":4479,"target":451},{"edgeType":"calls","source":5261,"target":521},{"edgeType":"calls","source":3959,"target":1771},{"edgeType":"calls","source":3570,"target":89},{"edgeType":"calls","source":3839,"target":2320},{"edgeType":"calls","source":5536,"target":451},{"edgeType":"contains","source":3301,"target":3303},{"edgeType":"contains","source":4019,"target":4298},{"edgeType":"calls","source":5502,"target":448},{"edgeType":"calls","source":3243,"target":1771},{"edgeType":"calls","source":3998,"target":564},{"edgeType":"calls","source":5451,"target":972},{"edgeType":"contains","source":4621,"target":4663},{"edgeType":"calls","source":2055,"target":1604},{"edgeType":"calls","source":4252,"target":89},{"edgeType":"contains","source":93,"target":219},{"edgeType":"calls","source":4479,"target":450},{"edgeType":"calls","source":2982,"target":349},{"edgeType":"calls","source":3154,"target":302},{"edgeType":"calls","source":5309,"target":89},{"edgeType":"contains","source":3127,"target":2354},{"edgeType":"contains","source":4907,"target":5310},{"edgeType":"contains","source":1285,"target":1320},{"edgeType":"calls","source":1655,"target":262},{"edgeType":"calls","source":5531,"target":1629},{"edgeType":"calls","source":4120,"target":974},{"edgeType":"calls","source":5620,"target":984},{"edgeType":"calls","source":2722,"target":973},{"edgeType":"contains","source":2570,"target":2681},{"edgeType":"calls","source":1409,"target":451},{"edgeType":"contains","source":2375,"target":2384},{"edgeType":"calls","source":1516,"target":305},{"edgeType":"calls","source":801,"target":272},{"edgeType":"calls","source":4926,"target":300},{"edgeType":"contains","source":1483,"target":1496},{"edgeType":"calls","source":5267,"target":300},{"edgeType":"contains","source":2111,"target":2112},{"edgeType":"calls","source":4120,"target":973},{"edgeType":"calls","source":2722,"target":974},{"edgeType":"calls","source":5620,"target":983},{"edgeType":"calls","source":1409,"target":450},{"edgeType":"calls","source":4120,"target":975},{"edgeType":"contains","source":2375,"target":2385},{"edgeType":"calls","source":3232,"target":2077},{"edgeType":"contains","source":4019,"target":4271},{"edgeType":"calls","source":2537,"target":367},{"edgeType":"calls","source":5082,"target":1805},{"edgeType":"contains","source":62,"target":92},{"edgeType":"contains","source":93,"target":189},{"edgeType":"contains","source":52,"target":2517},{"edgeType":"contains","source":4159,"target":4160},{"edgeType":"contains","source":2078,"target":2079},{"edgeType":"calls","source":4498,"target":2997},{"edgeType":"calls","source":1537,"target":1767},{"edgeType":"contains","source":2584,"target":3305},{"edgeType":"calls","source":3603,"target":89},{"edgeType":"contains","source":2570,"target":2682},{"edgeType":"contains","source":2735,"target":2852},{"edgeType":"contains","source":2698,"target":5056},{"edgeType":"calls","source":5620,"target":982},{"edgeType":"contains","source":3865,"target":4816},{"edgeType":"calls","source":1995,"target":257},{"edgeType":"calls","source":1409,"target":453},{"edgeType":"calls","source":2743,"target":320},{"edgeType":"contains","source":3333,"target":3338},{"edgeType":"calls","source":2722,"target":971},{"edgeType":"calls","source":5343,"target":5341},{"edgeType":"calls","source":5635,"target":1574},{"edgeType":"contains","source":2570,"target":2679},{"edgeType":"calls","source":2997,"target":902},{"edgeType":"contains","source":2375,"target":2382},{"edgeType":"calls","source":3193,"target":1169},{"edgeType":"contains","source":93,"target":192},{"edgeType":"calls","source":4492,"target":1068},{"edgeType":"contains","source":1483,"target":1494},{"edgeType":"contains","source":4747,"target":4957},{"edgeType":"calls","source":5755,"target":1025},{"edgeType":"contains","source":1284,"target":264},{"edgeType":"imports","source":3717,"target":3738},{"edgeType":"calls","source":4120,"target":971},{"edgeType":"calls","source":2722,"target":972},{"edgeType":"contains","source":959,"target":3999},{"edgeType":"contains","source":2570,"target":2680},{"edgeType":"contains","source":2375,"target":2383},{"edgeType":"calls","source":1393,"target":948},{"edgeType":"calls","source":5620,"target":981},{"edgeType":"calls","source":1409,"target":452},{"edgeType":"calls","source":4646,"target":521},{"edgeType":"calls","source":4413,"target":345},{"edgeType":"contains","source":841,"target":1314},{"edgeType":"calls","source":4120,"target":972},{"edgeType":"contains","source":2698,"target":5054},{"edgeType":"imports","source":2048,"target":1562},{"edgeType":"calls","source":4067,"target":501},{"edgeType":"contains","source":1054,"target":1057},{"edgeType":"calls","source":1409,"target":447},{"edgeType":"contains","source":2375,"target":2388},{"edgeType":"contains","source":2374,"target":2419},{"edgeType":"calls","source":1501,"target":766},{"edgeType":"calls","source":5620,"target":980},{"edgeType":"calls","source":3710,"target":995},{"edgeType":"contains","source":3958,"target":4053},{"edgeType":"calls","source":1537,"target":1764},{"edgeType":"calls","source":5390,"target":1768},{"edgeType":"contains","source":1483,"target":1500},{"edgeType":"calls","source":1209,"target":305},{"edgeType":"calls","source":5187,"target":1718},{"edgeType":"calls","source":4590,"target":142},{"edgeType":"calls","source":3987,"target":864},{"edgeType":"calls","source":460,"target":269},{"edgeType":"calls","source":3964,"target":1577},{"edgeType":"contains","source":93,"target":194},{"edgeType":"contains","source":1988,"target":2758},{"edgeType":"calls","source":4716,"target":1521},{"edgeType":"calls","source":1963,"target":1242},{"edgeType":"calls","source":4415,"target":282},{"edgeType":"calls","source":2851,"target":142},{"edgeType":"contains","source":2375,"target":2389},{"edgeType":"calls","source":2085,"target":1690},{"edgeType":"calls","source":1516,"target":300},{"edgeType":"calls","source":5620,"target":979},{"edgeType":"contains","source":3591,"target":3802},{"edgeType":"calls","source":2026,"target":345},{"edgeType":"calls","source":3987,"target":1922},{"edgeType":"calls","source":3964,"target":1578},{"edgeType":"calls","source":119,"target":269},{"edgeType":"calls","source":1409,"target":449},{"edgeType":"calls","source":5627,"target":2875},{"edgeType":"calls","source":5620,"target":978},{"edgeType":"contains","source":2375,"target":2386},{"edgeType":"calls","source":3330,"target":89},{"edgeType":"contains","source":1483,"target":1498},{"edgeType":"calls","source":3998,"target":1578},{"edgeType":"contains","source":93,"target":196},{"edgeType":"calls","source":4086,"target":964},{"edgeType":"calls","source":1992,"target":345},{"edgeType":"contains","source":2570,"target":2683},{"edgeType":"contains","source":3034,"target":3097},{"edgeType":"calls","source":5006,"target":984},{"edgeType":"contains","source":2375,"target":2387},{"edgeType":"calls","source":1409,"target":448},{"edgeType":"calls","source":1501,"target":767},{"edgeType":"calls","source":4815,"target":4791},{"edgeType":"calls","source":5620,"target":977},{"edgeType":"calls","source":1215,"target":120},{"edgeType":"contains","source":1374,"target":1707},{"edgeType":"contains","source":2698,"target":5058},{"edgeType":"calls","source":3964,"target":1576},{"edgeType":"calls","source":4035,"target":1489},{"edgeType":"calls","source":829,"target":453},{"edgeType":"calls","source":5055,"target":521},{"edgeType":"calls","source":3610,"target":920},{"edgeType":"calls","source":946,"target":1054},{"edgeType":"calls","source":5006,"target":983},{"edgeType":"imports","source":435,"target":838},{"edgeType":"contains","source":1781,"target":1779},{"edgeType":"calls","source":3143,"target":598},{"edgeType":"calls","source":5175,"target":1029},{"edgeType":"calls","source":5620,"target":976},{"edgeType":"calls","source":1521,"target":142},{"edgeType":"calls","source":1209,"target":300},{"edgeType":"calls","source":5444,"target":89},{"edgeType":"contains","source":2035,"target":2362},{"edgeType":"calls","source":4822,"target":345},{"edgeType":"calls","source":1977,"target":1861},{"edgeType":"calls","source":3983,"target":984},{"edgeType":"calls","source":3964,"target":1573},{"edgeType":"calls","source":3998,"target":1576},{"edgeType":"contains","source":93,"target":198},{"edgeType":"calls","source":4831,"target":2180},{"edgeType":"contains","source":11,"target":3797},{"edgeType":"contains","source":2247,"target":3189},{"edgeType":"contains","source":2375,"target":2392},{"edgeType":"contains","source":2374,"target":2423},{"edgeType":"calls","source":829,"target":452},{"edgeType":"calls","source":5006,"target":982},{"edgeType":"calls","source":5620,"target":975},{"edgeType":"calls","source":1771,"target":847},{"edgeType":"contains","source":1285,"target":1301},{"edgeType":"contains","source":4019,"target":4280},{"edgeType":"calls","source":1253,"target":1049},{"edgeType":"calls","source":2006,"target":961},{"edgeType":"contains","source":57,"target":256},{"edgeType":"calls","source":3998,"target":1577},{"edgeType":"contains","source":3865,"target":4826},{"edgeType":"contains","source":2698,"target":5064},{"edgeType":"calls","source":1056,"target":814},{"edgeType":"calls","source":2743,"target":315},{"edgeType":"contains","source":93,"target":197},{"edgeType":"contains","source":2533,"target":2780},{"edgeType":"contains","source":2375,"target":2393},{"edgeType":"contains","source":2375,"target":2390},{"edgeType":"calls","source":5197,"target":345},{"edgeType":"calls","source":5006,"target":981},{"edgeType":"calls","source":2112,"target":846},{"edgeType":"calls","source":2131,"target":257},{"edgeType":"calls","source":5031,"target":2320},{"edgeType":"calls","source":5065,"target":2323},{"edgeType":"calls","source":5620,"target":974},{"edgeType":"calls","source":5178,"target":5162},{"edgeType":"calls","source":5274,"target":2186},{"edgeType":"calls","source":1240,"target":1456},{"edgeType":"calls","source":1377,"target":380},{"edgeType":"calls","source":3967,"target":3592},{"edgeType":"calls","source":3350,"target":521},{"edgeType":"calls","source":5375,"target":1169},{"edgeType":"contains","source":2698,"target":5061},{"edgeType":"calls","source":3983,"target":982},{"edgeType":"calls","source":3964,"target":1571},{"edgeType":"contains","source":93,"target":200},{"edgeType":"calls","source":2097,"target":257},{"edgeType":"contains","source":108,"target":792},{"edgeType":"calls","source":4644,"target":1633},{"edgeType":"calls","source":829,"target":454},{"edgeType":"calls","source":2928,"target":920},{"edgeType":"contains","source":1606,"target":1918},{"edgeType":"contains","source":2915,"target":3621},{"edgeType":"imports","source":2886,"target":961},{"edgeType":"calls","source":5006,"target":980},{"edgeType":"calls","source":2112,"target":847},{"edgeType":"calls","source":5175,"target":1026},{"edgeType":"contains","source":3865,"target":4823},{"edgeType":"calls","source":1756,"target":257},{"edgeType":"calls","source":3810,"target":1061},{"edgeType":"calls","source":5721,"target":1013},{"edgeType":"calls","source":5620,"target":973},{"edgeType":"calls","source":5458,"target":2823},{"edgeType":"calls","source":5455,"target":802},{"edgeType":"contains","source":2078,"target":2085},{"edgeType":"contains","source":3994,"target":3996},{"edgeType":"calls","source":3983,"target":983},{"edgeType":"calls","source":3964,"target":1572},{"edgeType":"calls","source":4027,"target":2790},{"edgeType":"contains","source":1867,"target":2284},{"edgeType":"calls","source":2743,"target":313},{"edgeType":"calls","source":4494,"target":997},{"edgeType":"contains","source":2375,"target":2391},{"edgeType":"calls","source":2459,"target":1718},{"edgeType":"imports","source":3717,"target":3731},{"edgeType":"calls","source":2138,"target":2152},{"edgeType":"calls","source":4306,"target":481},{"edgeType":"calls","source":3983,"target":980},{"edgeType":"calls","source":3964,"target":1569},{"edgeType":"calls","source":5746,"target":1294},{"edgeType":"calls","source":5756,"target":984},{"edgeType":"calls","source":5620,"target":972},{"edgeType":"contains","source":3865,"target":4831},{"edgeType":"calls","source":3998,"target":1572},{"edgeType":"calls","source":5415,"target":984},{"edgeType":"imports","source":317,"target":263},{"edgeType":"calls","source":5006,"target":979},{"edgeType":"contains","source":2375,"target":2396},{"edgeType":"contains","source":2374,"target":2427},{"edgeType":"calls","source":829,"target":449},{"edgeType":"contains","source":93,"target":202},{"edgeType":"calls","source":2778,"target":282},{"edgeType":"contains","source":4286,"target":4463},{"edgeType":"calls","source":2334,"target":305},{"edgeType":"calls","source":5582,"target":1092},{"edgeType":"calls","source":5620,"target":971},{"edgeType":"calls","source":5746,"target":1293},{"edgeType":"calls","source":5756,"target":983},{"edgeType":"calls","source":3998,"target":1573},{"edgeType":"calls","source":5599,"target":564},{"edgeType":"contains","source":2517,"target":1166},{"edgeType":"calls","source":3983,"target":981},{"edgeType":"calls","source":3964,"target":1570},{"edgeType":"calls","source":3229,"target":2157},{"edgeType":"calls","source":3303,"target":920},{"edgeType":"calls","source":5415,"target":983},{"edgeType":"imports","source":280,"target":354},{"edgeType":"contains","source":2375,"target":2397},{"edgeType":"calls","source":5006,"target":978},{"edgeType":"calls","source":829,"target":448},{"edgeType":"calls","source":4756,"target":272},{"edgeType":"contains","source":4286,"target":4462},{"edgeType":"calls","source":829,"target":451},{"edgeType":"calls","source":4536,"target":1805},{"edgeType":"contains","source":3658,"target":3846},{"edgeType":"contains","source":2698,"target":5066},{"edgeType":"calls","source":3913,"target":3148},{"edgeType":"calls","source":3983,"target":978},{"edgeType":"calls","source":1771,"target":846},{"edgeType":"calls","source":3998,"target":1570},{"edgeType":"calls","source":3823,"target":3824},{"edgeType":"calls","source":5746,"target":1292},{"edgeType":"calls","source":5756,"target":982},{"edgeType":"calls","source":2709,"target":305},{"edgeType":"contains","source":3437,"target":126},{"edgeType":"contains","source":1814,"target":1816},{"edgeType":"calls","source":3518,"target":594},{"edgeType":"calls","source":5415,"target":982},{"edgeType":"calls","source":5006,"target":977},{"edgeType":"calls","source":4740,"target":767},{"edgeType":"calls","source":4815,"target":3727},{"edgeType":"contains","source":2375,"target":2394},{"edgeType":"calls","source":4716,"target":454},{"edgeType":"contains","source":93,"target":204},{"edgeType":"contains","source":1483,"target":1507},{"edgeType":"contains","source":2838,"target":2841},{"edgeType":"calls","source":4361,"target":887},{"edgeType":"calls","source":3537,"target":2121},{"edgeType":"calls","source":5746,"target":1291},{"edgeType":"calls","source":5756,"target":981},{"edgeType":"calls","source":3983,"target":979},{"edgeType":"calls","source":3964,"target":1568},{"edgeType":"calls","source":3987,"target":1912},{"edgeType":"calls","source":3998,"target":1571},{"edgeType":"calls","source":5575,"target":1306},{"edgeType":"calls","source":5415,"target":981},{"edgeType":"calls","source":5449,"target":984},{"edgeType":"imports","source":280,"target":352},{"edgeType":"calls","source":5006,"target":976},{"edgeType":"contains","source":2375,"target":2395},{"edgeType":"calls","source":4716,"target":453},{"edgeType":"calls","source":2431,"target":2582},{"edgeType":"calls","source":829,"target":450},{"edgeType":"calls","source":4740,"target":766},{"edgeType":"calls","source":2743,"target":309},{"edgeType":"calls","source":2843,"target":380},{"edgeType":"contains","source":4178,"target":4638},{"edgeType":"contains","source":93,"target":173},{"edgeType":"contains","source":4178,"target":4612},{"edgeType":"calls","source":4504,"target":1771},{"edgeType":"calls","source":3774,"target":89},{"edgeType":"contains","source":1581,"target":1612},{"edgeType":"calls","source":2279,"target":981},{"edgeType":"calls","source":5348,"target":976},{"edgeType":"contains","source":3393,"target":3578},{"edgeType":"calls","source":2211,"target":975},{"edgeType":"calls","source":5689,"target":976},{"edgeType":"calls","source":4074,"target":302},{"edgeType":"contains","source":2698,"target":5039},{"edgeType":"contains","source":2888,"target":3377},{"edgeType":"contains","source":1781,"target":2812},{"edgeType":"calls","source":5551,"target":4196},{"edgeType":"contains","source":2570,"target":2664},{"edgeType":"calls","source":5416,"target":982},{"edgeType":"calls","source":1150,"target":1097},{"edgeType":"contains","source":2247,"target":4221},{"edgeType":"contains","source":1581,"target":1613},{"edgeType":"calls","source":4649,"target":448},{"edgeType":"calls","source":1205,"target":449},{"edgeType":"calls","source":2798,"target":1805},{"edgeType":"contains","source":1747,"target":1752},{"edgeType":"calls","source":4715,"target":1573},{"edgeType":"contains","source":3958,"target":4033},{"edgeType":"calls","source":4831,"target":2205},{"edgeType":"calls","source":2279,"target":982},{"edgeType":"calls","source":5348,"target":975},{"edgeType":"calls","source":2211,"target":976},{"edgeType":"calls","source":4362,"target":887},{"edgeType":"calls","source":4233,"target":2772},{"edgeType":"calls","source":4282,"target":1253},{"edgeType":"calls","source":3592,"target":447},{"edgeType":"calls","source":5689,"target":975},{"edgeType":"contains","source":2570,"target":2666},{"edgeType":"contains","source":2735,"target":2836},{"edgeType":"calls","source":1959,"target":329},{"edgeType":"contains","source":2698,"target":5040},{"edgeType":"calls","source":5689,"target":974},{"edgeType":"calls","source":3330,"target":1169},{"edgeType":"contains","source":2570,"target":2665},{"edgeType":"calls","source":5463,"target":581},{"edgeType":"contains","source":2247,"target":4222},{"edgeType":"calls","source":5416,"target":981},{"edgeType":"calls","source":1205,"target":448},{"edgeType":"calls","source":4649,"target":447},{"edgeType":"contains","source":2011,"target":2025},{"edgeType":"contains","source":3663,"target":3664},{"edgeType":"calls","source":4715,"target":1572},{"edgeType":"contains","source":1581,"target":1614},{"edgeType":"contains","source":93,"target":172},{"edgeType":"calls","source":1046,"target":92},{"edgeType":"calls","source":4815,"target":4814},{"edgeType":"calls","source":5266,"target":345},{"edgeType":"calls","source":1537,"target":1787},{"edgeType":"contains","source":93,"target":175},{"edgeType":"calls","source":5348,"target":974},{"edgeType":"contains","source":1581,"target":1610},{"edgeType":"calls","source":4362,"target":886},{"edgeType":"calls","source":3694,"target":453},{"edgeType":"calls","source":2211,"target":973},{"edgeType":"calls","source":2279,"target":979},{"edgeType":"calls","source":5732,"target":2812},{"edgeType":"contains","source":2698,"target":5037},{"edgeType":"calls","source":1861,"target":1256},{"edgeType":"calls","source":4054,"target":920},{"edgeType":"contains","source":3034,"target":3077},{"edgeType":"calls","source":589,"target":521},{"edgeType":"contains","source":3297,"target":3380},{"edgeType":"calls","source":1214,"target":1229},{"edgeType":"calls","source":5689,"target":973},{"edgeType":"calls","source":1205,"target":451},{"edgeType":"calls","source":3587,"target":598},{"edgeType":"contains","source":2570,"target":2662},{"edgeType":"contains","source":1671,"target":1992},{"edgeType":"calls","source":5416,"target":980},{"edgeType":"contains","source":1747,"target":1750},{"edgeType":"calls","source":4715,"target":1571},{"edgeType":"calls","source":5348,"target":973},{"edgeType":"contains","source":1581,"target":1611},{"edgeType":"calls","source":4439,"target":3783},{"edgeType":"calls","source":2436,"target":2455},{"edgeType":"calls","source":3608,"target":2063},{"edgeType":"calls","source":2279,"target":980},{"edgeType":"calls","source":3694,"target":454},{"edgeType":"calls","source":2211,"target":974},{"edgeType":"calls","source":3877,"target":2180},{"edgeType":"contains","source":2698,"target":5038},{"edgeType":"calls","source":4925,"target":345},{"edgeType":"contains","source":3297,"target":3381},{"edgeType":"calls","source":5527,"target":2823},{"edgeType":"calls","source":5599,"target":591},{"edgeType":"calls","source":5689,"target":972},{"edgeType":"contains","source":2570,"target":2663},{"edgeType":"calls","source":5390,"target":2842},{"edgeType":"calls","source":4715,"target":1570},{"edgeType":"calls","source":5507,"target":272},{"edgeType":"calls","source":5419,"target":886},{"edgeType":"calls","source":5416,"target":979},{"edgeType":"calls","source":1205,"target":450},{"edgeType":"contains","source":1747,"target":1751},{"edgeType":"contains","source":1890,"target":1546},{"edgeType":"contains","source":4019,"target":4253},{"edgeType":"contains","source":2698,"target":5043},{"edgeType":"calls","source":5348,"target":972},{"edgeType":"calls","source":1739,"target":804},{"edgeType":"calls","source":3694,"target":2565},{"edgeType":"calls","source":4715,"target":1568},{"edgeType":"contains","source":2570,"target":2669},{"edgeType":"calls","source":2279,"target":977},{"edgeType":"calls","source":4413,"target":360},{"edgeType":"contains","source":2829,"target":3096},{"edgeType":"calls","source":2211,"target":971},{"edgeType":"contains","source":2584,"target":3292},{"edgeType":"calls","source":3515,"target":1771},{"edgeType":"calls","source":3694,"target":450},{"edgeType":"contains","source":3230,"target":3349},{"edgeType":"calls","source":5689,"target":971},{"edgeType":"calls","source":4715,"target":1569},{"edgeType":"calls","source":1583,"target":354},{"edgeType":"calls","source":3426,"target":302},{"edgeType":"calls","source":5416,"target":978},{"edgeType":"contains","source":1483,"target":1484},{"edgeType":"contains","source":1581,"target":1617},{"edgeType":"calls","source":5073,"target":1041},{"edgeType":"calls","source":5348,"target":971},{"edgeType":"contains","source":93,"target":176},{"edgeType":"contains","source":3393,"target":3581},{"edgeType":"calls","source":1641,"target":1727},{"edgeType":"calls","source":1739,"target":803},{"edgeType":"calls","source":2279,"target":978},{"edgeType":"calls","source":3694,"target":452},{"edgeType":"calls","source":3710,"target":1013},{"edgeType":"calls","source":4413,"target":359},{"edgeType":"calls","source":1944,"target":790},{"edgeType":"calls","source":4420,"target":142},{"edgeType":"calls","source":2063,"target":272},{"edgeType":"calls","source":2211,"target":972},{"edgeType":"calls","source":364,"target":89},{"edgeType":"contains","source":2517,"target":3256},{"edgeType":"contains","source":2533,"target":2760},{"edgeType":"contains","source":2570,"target":2670},{"edgeType":"calls","source":2845,"target":345},{"edgeType":"calls","source":2832,"target":1805},{"edgeType":"imports","source":1518,"target":1061},{"edgeType":"calls","source":3694,"target":451},{"edgeType":"calls","source":2968,"target":1817},{"edgeType":"calls","source":5416,"target":977},{"edgeType":"calls","source":5254,"target":1771},{"edgeType":"calls","source":3023,"target":1169},{"edgeType":"calls","source":1771,"target":1928},{"edgeType":"contains","source":3393,"target":3580},{"edgeType":"contains","source":93,"target":179},{"edgeType":"calls","source":4796,"target":1169},{"edgeType":"calls","source":4120,"target":984},{"edgeType":"calls","source":2722,"target":983},{"edgeType":"calls","source":4453,"target":2289},{"edgeType":"contains","source":2915,"target":3599},{"edgeType":"contains","source":2570,"target":2667},{"edgeType":"calls","source":4413,"target":358},{"edgeType":"calls","source":2279,"target":975},{"edgeType":"contains","source":4654,"target":4657},{"edgeType":"calls","source":5740,"target":445},{"edgeType":"calls","source":3669,"target":1223},{"edgeType":"calls","source":3694,"target":448},{"edgeType":"calls","source":2722,"target":984},{"edgeType":"contains","source":1581,"target":1615},{"edgeType":"calls","source":5499,"target":1574},{"edgeType":"calls","source":1205,"target":447},{"edgeType":"contains","source":5446,"target":5473},{"edgeType":"contains","source":3865,"target":4804},{"edgeType":"calls","source":5416,"target":976},{"edgeType":"contains","source":2698,"target":5042},{"edgeType":"calls","source":1739,"target":805},{"edgeType":"contains","source":93,"target":178},{"edgeType":"contains","source":2570,"target":2668},{"edgeType":"calls","source":4413,"target":357},{"edgeType":"contains","source":4621,"target":4622},{"edgeType":"calls","source":2279,"target":976},{"edgeType":"contains","source":2740,"target":1626},{"edgeType":"calls","source":5675,"target":345},{"edgeType":"calls","source":2785,"target":89},{"edgeType":"calls","source":3669,"target":1224},{"edgeType":"calls","source":3694,"target":449},{"edgeType":"contains","source":1581,"target":1616},{"edgeType":"calls","source":5031,"target":3397},{"edgeType":"calls","source":5416,"target":975},{"edgeType":"calls","source":4639,"target":749},{"edgeType":"contains","source":2044,"target":2066},{"edgeType":"contains","source":2698,"target":5047},{"edgeType":"calls","source":3914,"target":1026},{"edgeType":"calls","source":2063,"target":269},{"edgeType":"calls","source":2746,"target":1294},{"edgeType":"calls","source":2768,"target":1669},{"edgeType":"calls","source":2812,"target":305},{"edgeType":"calls","source":4120,"target":982},{"edgeType":"calls","source":2722,"target":981},{"edgeType":"calls","source":4185,"target":3195},{"edgeType":"contains","source":2570,"target":2673},{"edgeType":"calls","source":2279,"target":973},{"edgeType":"calls","source":4440,"target":1633},{"edgeType":"calls","source":4413,"target":356},{"edgeType":"contains","source":2375,"target":2376},{"edgeType":"calls","source":5659,"target":4011},{"edgeType":"contains","source":96,"target":4316},{"edgeType":"calls","source":4874,"target":864},{"edgeType":"contains","source":1351,"target":1352},{"edgeType":"calls","source":5416,"target":974},{"edgeType":"calls","source":5416,"target":973},{"edgeType":"contains","source":2570,"target":2674},{"edgeType":"calls","source":1787,"target":1425},{"edgeType":"calls","source":3936,"target":345},{"edgeType":"contains","source":93,"target":180},{"edgeType":"contains","source":2698,"target":5048},{"edgeType":"contains","source":2048,"target":5114},{"edgeType":"calls","source":2722,"target":982},{"edgeType":"contains","source":40,"target":3937},{"edgeType":"calls","source":4120,"target":983},{"edgeType":"contains","source":2375,"target":2377},{"edgeType":"calls","source":2279,"target":974},{"edgeType":"calls","source":4413,"target":355},{"edgeType":"calls","source":4502,"target":767},{"edgeType":"calls","source":3582,"target":1805},{"edgeType":"imports","source":2740,"target":1244},{"edgeType":"calls","source":3694,"target":447},{"edgeType":"calls","source":4980,"target":1805},{"edgeType":"contains","source":3951,"target":1086},{"edgeType":"calls","source":3065,"target":920},{"edgeType":"imports","source":2948,"target":81},{"edgeType":"calls","source":3739,"target":1166},{"edgeType":"calls","source":5306,"target":2269},{"edgeType":"calls","source":1583,"target":349},{"edgeType":"calls","source":456,"target":407},{"edgeType":"calls","source":5416,"target":972},{"edgeType":"calls","source":1762,"target":89},{"edgeType":"calls","source":4120,"target":980},{"edgeType":"contains","source":2011,"target":2030},{"edgeType":"contains","source":2044,"target":2064},{"edgeType":"imports","source":3056,"target":961},{"edgeType":"calls","source":2746,"target":1292},{"edgeType":"contains","source":93,"target":183},{"edgeType":"contains","source":54,"target":3506},{"edgeType":"calls","source":2722,"target":979},{"edgeType":"calls","source":4502,"target":766},{"edgeType":"contains","source":2570,"target":2671},{"edgeType":"contains","source":2505,"target":2572},{"edgeType":"calls","source":2279,"target":971},{"edgeType":"calls","source":845,"target":1033},{"edgeType":"calls","source":1704,"target":829},{"edgeType":"contains","source":3385,"target":4890},{"edgeType":"calls","source":456,"target":406},{"edgeType":"calls","source":1856,"target":345},{"edgeType":"calls","source":5416,"target":971},{"edgeType":"calls","source":3232,"target":1026},{"edgeType":"calls","source":4016,"target":3148},{"edgeType":"calls","source":4120,"target":981},{"edgeType":"contains","source":93,"target":182},{"edgeType":"contains","source":60,"target":148},{"edgeType":"calls","source":2034,"target":1169},{"edgeType":"calls","source":2722,"target":980},{"edgeType":"calls","source":2746,"target":1293},{"edgeType":"calls","source":4926,"target":305},{"edgeType":"contains","source":4683,"target":4818},{"edgeType":"contains","source":4356,"target":4384},{"edgeType":"contains","source":2570,"target":2672},{"edgeType":"calls","source":2572,"target":345},{"edgeType":"calls","source":2279,"target":972},{"edgeType":"contains","source":3642,"target":2207},{"edgeType":"calls","source":5267,"target":305},{"edgeType":"contains","source":3865,"target":4807},{"edgeType":"calls","source":3424,"target":1416},{"edgeType":"contains","source":2570,"target":2677},{"edgeType":"calls","source":3411,"target":759},{"edgeType":"calls","source":3396,"target":1224},{"edgeType":"calls","source":3961,"target":2736},{"edgeType":"calls","source":4120,"target":978},{"edgeType":"contains","source":2375,"target":2380},{"edgeType":"calls","source":2746,"target":1290},{"edgeType":"contains","source":93,"target":185},{"edgeType":"calls","source":2722,"target":977},{"edgeType":"calls","source":1602,"target":814},{"edgeType":"calls","source":3020,"target":1253},{"edgeType":"calls","source":5346,"target":1026},{"edgeType":"calls","source":5567,"target":1574},{"edgeType":"calls","source":5649,"target":89},{"edgeType":"calls","source":5617,"target":3195},{"edgeType":"calls","source":5722,"target":997},{"edgeType":"calls","source":5577,"target":206},{"edgeType":"calls","source":1409,"target":454},{"edgeType":"calls","source":1229,"target":749},{"edgeType":"calls","source":4120,"target":979},{"edgeType":"contains","source":2570,"target":2678},{"edgeType":"contains","source":2375,"target":2381},{"edgeType":"calls","source":4967,"target":89},{"edgeType":"calls","source":2722,"target":978},{"edgeType":"contains","source":4286,"target":3389},{"edgeType":"calls","source":2746,"target":1291},{"edgeType":"calls","source":1641,"target":1718},{"edgeType":"calls","source":1583,"target":345},{"edgeType":"calls","source":3598,"target":1305},{"edgeType":"calls","source":3647,"target":843},{"edgeType":"calls","source":4120,"target":976},{"edgeType":"calls","source":2722,"target":975},{"edgeType":"contains","source":2570,"target":2675},{"edgeType":"calls","source":5531,"target":1631},{"edgeType":"calls","source":5290,"target":4874},{"edgeType":"calls","source":5342,"target":2205},{"edgeType":"calls","source":4285,"target":89},{"edgeType":"calls","source":1056,"target":830},{"edgeType":"contains","source":2698,"target":5049},{"edgeType":"contains","source":2375,"target":2378},{"edgeType":"contains","source":93,"target":187},{"edgeType":"contains","source":3658,"target":3830},{"edgeType":"contains","source":1483,"target":1490},{"edgeType":"calls","source":1681,"target":481},{"edgeType":"contains","source":1285,"target":1286},{"edgeType":"calls","source":5531,"target":1630},{"edgeType":"calls","source":3396,"target":1223},{"edgeType":"calls","source":4120,"target":977},{"edgeType":"contains","source":2570,"target":2676},{"edgeType":"calls","source":5601,"target":1574},{"edgeType":"contains","source":2735,"target":2846},{"edgeType":"calls","source":328,"target":142},{"edgeType":"contains","source":2375,"target":2379},{"edgeType":"imports","source":3717,"target":1604},{"edgeType":"contains","source":93,"target":186},{"edgeType":"calls","source":2722,"target":976},{"edgeType":"calls","source":2746,"target":1289},{"edgeType":"calls","source":2812,"target":300},{"edgeType":"contains","source":1483,"target":1491},{"edgeType":"calls","source":4253,"target":3195},{"edgeType":"calls","source":5339,"target":1240},{"edgeType":"calls","source":4822,"target":452},{"edgeType":"calls","source":4025,"target":4018},{"edgeType":"calls","source":5453,"target":975},{"edgeType":"imports","source":118,"target":119},{"edgeType":"calls","source":5538,"target":454},{"edgeType":"calls","source":2043,"target":980},{"edgeType":"contains","source":2570,"target":2648},{"edgeType":"calls","source":4219,"target":2232},{"edgeType":"calls","source":5063,"target":380},{"edgeType":"contains","source":96,"target":4292},{"edgeType":"calls","source":4836,"target":1075},{"edgeType":"calls","source":4841,"target":920},{"edgeType":"calls","source":1644,"target":1721},{"edgeType":"calls","source":3066,"target":979},{"edgeType":"contains","source":778,"target":1119},{"edgeType":"calls","source":5180,"target":982},{"edgeType":"contains","source":3359,"target":3559},{"edgeType":"contains","source":4356,"target":4363},{"edgeType":"calls","source":5078,"target":5201},{"edgeType":"calls","source":5619,"target":3228},{"edgeType":"contains","source":1117,"target":1180},{"edgeType":"calls","source":5538,"target":453},{"edgeType":"calls","source":2043,"target":979},{"edgeType":"calls","source":2100,"target":269},{"edgeType":"calls","source":2075,"target":1044},{"edgeType":"contains","source":2570,"target":2649},{"edgeType":"calls","source":5453,"target":974},{"edgeType":"calls","source":5380,"target":2180},{"edgeType":"contains","source":2247,"target":4206},{"edgeType":"contains","source":1671,"target":1978},{"edgeType":"calls","source":4822,"target":451},{"edgeType":"calls","source":5180,"target":981},{"edgeType":"calls","source":4477,"target":1633},{"edgeType":"contains","source":854,"target":876},{"edgeType":"calls","source":3094,"target":1169},{"edgeType":"calls","source":3066,"target":980},{"edgeType":"contains","source":2207,"target":2275},{"edgeType":"calls","source":395,"target":272},{"edgeType":"contains","source":4356,"target":4362},{"edgeType":"calls","source":327,"target":266},{"edgeType":"contains","source":2584,"target":3272},{"edgeType":"calls","source":5604,"target":1578},{"edgeType":"contains","source":2698,"target":5023},{"edgeType":"calls","source":3439,"target":1041},{"edgeType":"calls","source":3424,"target":1506},{"edgeType":"calls","source":5538,"target":452},{"edgeType":"calls","source":5604,"target":1577},{"edgeType":"calls","source":5453,"target":973},{"edgeType":"contains","source":3329,"target":3429},{"edgeType":"calls","source":2043,"target":982},{"edgeType":"calls","source":3236,"target":3106},{"edgeType":"contains","source":2570,"target":2646},{"edgeType":"calls","source":4689,"target":345},{"edgeType":"calls","source":4522,"target":4465},{"edgeType":"contains","source":4178,"target":4593},{"edgeType":"contains","source":4176,"target":4655},{"edgeType":"calls","source":4822,"target":450},{"edgeType":"calls","source":4967,"target":1240},{"edgeType":"calls","source":3066,"target":977},{"edgeType":"calls","source":5180,"target":980},{"edgeType":"contains","source":4176,"target":4656},{"edgeType":"calls","source":297,"target":142},{"edgeType":"contains","source":4356,"target":4361},{"edgeType":"calls","source":3573,"target":1115},{"edgeType":"contains","source":1284,"target":1288},{"edgeType":"calls","source":3570,"target":3322},{"edgeType":"contains","source":889,"target":851},{"edgeType":"imports","source":3642,"target":1868},{"edgeType":"calls","source":5604,"target":1576},{"edgeType":"contains","source":1152,"target":1154},{"edgeType":"calls","source":2043,"target":981},{"edgeType":"calls","source":5538,"target":451},{"edgeType":"contains","source":2570,"target":2647},{"edgeType":"calls","source":5453,"target":972},{"edgeType":"contains","source":3761,"target":3778},{"edgeType":"calls","source":4638,"target":2982},{"edgeType":"calls","source":4822,"target":449},{"edgeType":"calls","source":3066,"target":978},{"edgeType":"calls","source":5180,"target":979},{"edgeType":"contains","source":4356,"target":4360},{"edgeType":"calls","source":4348,"target":345},{"edgeType":"calls","source":4302,"target":1771},{"edgeType":"calls","source":3634,"target":282},{"edgeType":"contains","source":2698,"target":5021},{"edgeType":"imports","source":1781,"target":1416},{"edgeType":"imports","source":2948,"target":120},{"edgeType":"calls","source":1436,"target":766},{"edgeType":"calls","source":5453,"target":971},{"edgeType":"calls","source":5538,"target":450},{"edgeType":"calls","source":4822,"target":448},{"edgeType":"calls","source":5180,"target":977},{"edgeType":"calls","source":4963,"target":305},{"edgeType":"calls","source":3066,"target":974},{"edgeType":"calls","source":5180,"target":978},{"edgeType":"contains","source":93,"target":161},{"edgeType":"calls","source":5377,"target":156},{"edgeType":"calls","source":4571,"target":830},{"edgeType":"contains","source":2570,"target":2652},{"edgeType":"contains","source":4356,"target":4367},{"edgeType":"contains","source":4319,"target":4457},{"edgeType":"contains","source":2533,"target":2742},{"edgeType":"contains","source":854,"target":881},{"edgeType":"calls","source":2043,"target":975},{"edgeType":"calls","source":5604,"target":1574},{"edgeType":"calls","source":2795,"target":920},{"edgeType":"calls","source":5538,"target":449},{"edgeType":"calls","source":2591,"target":1959},{"edgeType":"calls","source":4822,"target":447},{"edgeType":"contains","source":3329,"target":3436},{"edgeType":"calls","source":5180,"target":976},{"edgeType":"calls","source":3066,"target":975},{"edgeType":"calls","source":5124,"target":598},{"edgeType":"calls","source":3066,"target":976},{"edgeType":"contains","source":2698,"target":5027},{"edgeType":"contains","source":93,"target":160},{"edgeType":"calls","source":2439,"target":2443},{"edgeType":"calls","source":5373,"target":279},{"edgeType":"contains","source":2011,"target":2013},{"edgeType":"contains","source":2570,"target":2653},{"edgeType":"contains","source":2207,"target":2279},{"edgeType":"contains","source":4356,"target":4366},{"edgeType":"contains","source":4747,"target":4929},{"edgeType":"calls","source":2043,"target":974},{"edgeType":"calls","source":3917,"target":2077},{"edgeType":"contains","source":291,"target":1424},{"edgeType":"calls","source":2043,"target":978},{"edgeType":"calls","source":4900,"target":142},{"edgeType":"calls","source":5538,"target":448},{"edgeType":"calls","source":5604,"target":1573},{"edgeType":"calls","source":3066,"target":972},{"edgeType":"calls","source":5180,"target":975},{"edgeType":"calls","source":5250,"target":920},{"edgeType":"contains","source":93,"target":163},{"edgeType":"calls","source":1514,"target":1521},{"edgeType":"contains","source":4356,"target":4365},{"edgeType":"contains","source":2570,"target":2650},{"edgeType":"contains","source":2915,"target":3582},{"edgeType":"contains","source":2698,"target":5024},{"edgeType":"calls","source":2043,"target":977},{"edgeType":"calls","source":1349,"target":1350},{"edgeType":"contains","source":291,"target":1423},{"edgeType":"calls","source":4817,"target":4828},{"edgeType":"calls","source":1436,"target":767},{"edgeType":"calls","source":5604,"target":1572},{"edgeType":"calls","source":3554,"target":2758},{"edgeType":"calls","source":5015,"target":5032},{"edgeType":"imports","source":3969,"target":1249},{"edgeType":"contains","source":3658,"target":3804},{"edgeType":"calls","source":810,"target":89},{"edgeType":"calls","source":5538,"target":447},{"edgeType":"calls","source":5397,"target":4818},{"edgeType":"calls","source":5379,"target":2205},{"edgeType":"calls","source":3066,"target":973},{"edgeType":"calls","source":5180,"target":974},{"edgeType":"calls","source":5181,"target":5172},{"edgeType":"calls","source":5309,"target":2261},{"edgeType":"contains","source":2044,"target":2045},{"edgeType":"contains","source":93,"target":162},{"edgeType":"calls","source":4559,"target":142},{"edgeType":"calls","source":4522,"target":4460},{"edgeType":"contains","source":889,"target":854},{"edgeType":"calls","source":5769,"target":3856},{"edgeType":"contains","source":2570,"target":2651},{"edgeType":"calls","source":2289,"target":749},{"edgeType":"calls","source":4267,"target":1795},{"edgeType":"calls","source":4110,"target":320},{"edgeType":"contains","source":4747,"target":4927},{"edgeType":"calls","source":2043,"target":976},{"edgeType":"calls","source":5604,"target":1571},{"edgeType":"calls","source":2717,"target":1219},{"edgeType":"calls","source":5758,"target":1025},{"edgeType":"calls","source":1641,"target":749},{"edgeType":"calls","source":5180,"target":973},{"edgeType":"calls","source":990,"target":846},{"edgeType":"contains","source":3591,"target":3774},{"edgeType":"calls","source":5421,"target":902},{"edgeType":"contains","source":3359,"target":3567},{"edgeType":"calls","source":4622,"target":302},{"edgeType":"calls","source":4583,"target":454},{"edgeType":"contains","source":2769,"target":2829},{"edgeType":"contains","source":3865,"target":4794},{"edgeType":"calls","source":3794,"target":1657},{"edgeType":"imports","source":4286,"target":920},{"edgeType":"contains","source":93,"target":165},{"edgeType":"contains","source":854,"target":885},{"edgeType":"calls","source":2043,"target":971},{"edgeType":"contains","source":2570,"target":2656},{"edgeType":"contains","source":4356,"target":4371},{"edgeType":"contains","source":3761,"target":3788},{"edgeType":"contains","source":1606,"target":1887},{"edgeType":"calls","source":5604,"target":1570},{"edgeType":"contains","source":2888,"target":3370},{"edgeType":"calls","source":4963,"target":300},{"edgeType":"calls","source":5180,"target":972},{"edgeType":"calls","source":3066,"target":971},{"edgeType":"calls","source":5299,"target":454},{"edgeType":"calls","source":1230,"target":805},{"edgeType":"contains","source":3297,"target":3375},{"edgeType":"contains","source":5399,"target":4805},{"edgeType":"calls","source":4671,"target":896},{"edgeType":"contains","source":1189,"target":3187},{"edgeType":"calls","source":4583,"target":453},{"edgeType":"calls","source":3812,"target":2157},{"edgeType":"contains","source":3927,"target":3928},{"edgeType":"calls","source":2066,"target":257},{"edgeType":"calls","source":4403,"target":1805},{"edgeType":"calls","source":4054,"target":997},{"edgeType":"contains","source":2570,"target":2657},{"edgeType":"calls","source":5706,"target":521},{"edgeType":"calls","source":5132,"target":345},{"edgeType":"calls","source":4932,"target":2317},{"edgeType":"calls","source":5180,"target":971},{"edgeType":"calls","source":5604,"target":1569},{"edgeType":"calls","source":5577,"target":2406},{"edgeType":"calls","source":5313,"target":5305},{"edgeType":"calls","source":5473,"target":345},{"edgeType":"calls","source":5299,"target":453},{"edgeType":"calls","source":5261,"target":1631},{"edgeType":"contains","source":5446,"target":5461},{"edgeType":"calls","source":4671,"target":895},{"edgeType":"calls","source":4697,"target":89},{"edgeType":"calls","source":4104,"target":501},{"edgeType":"calls","source":4110,"target":315},{"edgeType":"contains","source":3926,"target":3958},{"edgeType":"contains","source":55,"target":288},{"edgeType":"calls","source":2032,"target":257},{"edgeType":"contains","source":93,"target":167},{"edgeType":"calls","source":4583,"target":452},{"edgeType":"calls","source":2043,"target":973},{"edgeType":"contains","source":4356,"target":4369},{"edgeType":"contains","source":2585,"target":3246},{"edgeType":"contains","source":2570,"target":2654},{"edgeType":"calls","source":5299,"target":452},{"edgeType":"calls","source":5604,"target":1568},{"edgeType":"calls","source":5261,"target":1630},{"edgeType":"calls","source":990,"target":847},{"edgeType":"calls","source":2514,"target":1169},{"edgeType":"calls","source":5413,"target":89},{"edgeType":"calls","source":4671,"target":894},{"edgeType":"calls","source":3794,"target":1656},{"edgeType":"calls","source":1797,"target":142},{"edgeType":"calls","source":2043,"target":972},{"edgeType":"contains","source":4356,"target":4368},{"edgeType":"calls","source":4617,"target":454},{"edgeType":"calls","source":4583,"target":451},{"edgeType":"contains","source":2570,"target":2655},{"edgeType":"calls","source":5747,"target":305},{"edgeType":"calls","source":2279,"target":1051},{"edgeType":"contains","source":3641,"target":5399},{"edgeType":"calls","source":2836,"target":2811},{"edgeType":"calls","source":5072,"target":89},{"edgeType":"calls","source":3779,"target":1061},{"edgeType":"calls","source":5299,"target":451},{"edgeType":"calls","source":5261,"target":1629},{"edgeType":"calls","source":5691,"target":984},{"edgeType":"contains","source":1335,"target":778},{"edgeType":"calls","source":5450,"target":1056},{"edgeType":"contains","source":3230,"target":3341},{"edgeType":"calls","source":1543,"target":1669},{"edgeType":"contains","source":2570,"target":2660},{"edgeType":"calls","source":5377,"target":2261},{"edgeType":"calls","source":3399,"target":156},{"edgeType":"contains","source":3865,"target":4798},{"edgeType":"calls","source":1858,"target":360},{"edgeType":"calls","source":1276,"target":1489},{"edgeType":"contains","source":2740,"target":1618},{"edgeType":"calls","source":4110,"target":313},{"edgeType":"contains","source":2044,"target":2054},{"edgeType":"contains","source":55,"target":290},{"edgeType":"imports","source":3811,"target":851},{"edgeType":"calls","source":4617,"target":453},{"edgeType":"calls","source":419,"target":1631},{"edgeType":"calls","source":4583,"target":450},{"edgeType":"calls","source":1585,"target":366},{"edgeType":"calls","source":2269,"target":305},{"edgeType":"calls","source":5120,"target":1771},{"edgeType":"calls","source":5299,"target":450},{"edgeType":"calls","source":5190,"target":2772},{"edgeType":"imports","source":898,"target":256},{"edgeType":"calls","source":1381,"target":348},{"edgeType":"calls","source":1644,"target":1708},{"edgeType":"calls","source":1858,"target":359},{"edgeType":"contains","source":1164,"target":1849},{"edgeType":"calls","source":5691,"target":983},{"edgeType":"calls","source":5507,"target":345},{"edgeType":"calls","source":5461,"target":1771},{"edgeType":"calls","source":1239,"target":521},{"edgeType":"calls","source":1969,"target":89},{"edgeType":"contains","source":2570,"target":2661},{"edgeType":"contains","source":3865,"target":4797},{"edgeType":"contains","source":4747,"target":4937},{"edgeType":"calls","source":1042,"target":286},{"edgeType":"contains","source":3761,"target":3793},{"edgeType":"contains","source":93,"target":168},{"edgeType":"contains","source":1747,"target":1749},{"edgeType":"contains","source":55,"target":289},{"edgeType":"contains","source":74,"target":1814},{"edgeType":"calls","source":419,"target":1630},{"edgeType":"contains","source":42,"target":3863},{"edgeType":"contains","source":2011,"target":2021},{"edgeType":"calls","source":4617,"target":452},{"edgeType":"calls","source":4583,"target":449},{"edgeType":"calls","source":820,"target":829},{"edgeType":"contains","source":4356,"target":4373},{"edgeType":"calls","source":5735,"target":2789},{"edgeType":"calls","source":5003,"target":1169},{"edgeType":"contains","source":1671,"target":1987},{"edgeType":"contains","source":4873,"target":3145},{"edgeType":"calls","source":5299,"target":449},{"edgeType":"calls","source":5251,"target":1937},{"edgeType":"calls","source":1230,"target":804},{"edgeType":"imports","source":2948,"target":126},{"edgeType":"calls","source":3604,"target":142},{"edgeType":"calls","source":5691,"target":982},{"edgeType":"calls","source":1401,"target":788},{"edgeType":"calls","source":1422,"target":137},{"edgeType":"contains","source":4019,"target":4250},{"edgeType":"calls","source":1230,"target":803},{"edgeType":"calls","source":1209,"target":397},{"edgeType":"calls","source":5424,"target":802},{"edgeType":"contains","source":3927,"target":3931},{"edgeType":"contains","source":2570,"target":2658},{"edgeType":"contains","source":3865,"target":4796},{"edgeType":"imports","source":3318,"target":283},{"edgeType":"calls","source":997,"target":2741},{"edgeType":"contains","source":4260,"target":1007},{"edgeType":"calls","source":4583,"target":448},{"edgeType":"calls","source":4817,"target":4821},{"edgeType":"calls","source":4869,"target":2152},{"edgeType":"calls","source":4876,"target":1935},{"edgeType":"calls","source":4838,"target":999},{"edgeType":"contains","source":2247,"target":4215},{"edgeType":"calls","source":4617,"target":451},{"edgeType":"calls","source":2279,"target":1050},{"edgeType":"contains","source":4356,"target":4372},{"edgeType":"calls","source":5770,"target":3817},{"edgeType":"calls","source":5299,"target":448},{"edgeType":"calls","source":3073,"target":1805},{"edgeType":"contains","source":2698,"target":5034},{"edgeType":"calls","source":5652,"target":4304},{"edgeType":"calls","source":5664,"target":2875},{"edgeType":"calls","source":5691,"target":981},{"edgeType":"imports","source":4654,"target":89},{"edgeType":"contains","source":2570,"target":2659},{"edgeType":"calls","source":5541,"target":345},{"edgeType":"calls","source":3264,"target":1169},{"edgeType":"contains","source":2698,"target":5033},{"edgeType":"calls","source":4617,"target":450},{"edgeType":"calls","source":4583,"target":447},{"edgeType":"contains","source":93,"target":170},{"edgeType":"contains","source":60,"target":136},{"edgeType":"contains","source":2247,"target":4216},{"edgeType":"contains","source":56,"target":2374},{"edgeType":"contains","source":2241,"target":2260},{"edgeType":"calls","source":4917,"target":4923},{"edgeType":"calls","source":119,"target":389},{"edgeType":"calls","source":2304,"target":305},{"edgeType":"calls","source":5249,"target":973},{"edgeType":"imports","source":2048,"target":1581},{"edgeType":"calls","source":1525,"target":142},{"edgeType":"contains","source":1189,"target":3161},{"edgeType":"calls","source":4009,"target":302},{"edgeType":"imports","source":76,"target":348},{"edgeType":"calls","source":1922,"target":1576},{"edgeType":"calls","source":5428,"target":2823},{"edgeType":"calls","source":1214,"target":269},{"edgeType":"calls","source":5448,"target":89},{"edgeType":"calls","source":5281,"target":5266},{"edgeType":"contains","source":523,"target":551},{"edgeType":"calls","source":4925,"target":447},{"edgeType":"calls","source":2733,"target":1805},{"edgeType":"contains","source":5677,"target":5678},{"edgeType":"contains","source":5710,"target":5712},{"edgeType":"contains","source":11,"target":1625},{"edgeType":"calls","source":5771,"target":3817},{"edgeType":"imports","source":3318,"target":264},{"edgeType":"calls","source":1537,"target":1883},{"edgeType":"calls","source":5249,"target":972},{"edgeType":"calls","source":3074,"target":1805},{"edgeType":"contains","source":1546,"target":1608},{"edgeType":"imports","source":1238,"target":266},{"edgeType":"contains","source":1189,"target":3162},{"edgeType":"contains","source":941,"target":277},{"edgeType":"contains","source":2698,"target":5007},{"edgeType":"contains","source":1117,"target":1163},{"edgeType":"calls","source":5653,"target":4304},{"edgeType":"calls","source":5505,"target":1492},{"edgeType":"contains","source":523,"target":550},{"edgeType":"calls","source":2042,"target":1026},{"edgeType":"calls","source":4050,"target":89},{"edgeType":"calls","source":4932,"target":3400},{"edgeType":"contains","source":5637,"target":4805},{"edgeType":"calls","source":887,"target":892},{"edgeType":"calls","source":4796,"target":2331},{"edgeType":"contains","source":5710,"target":5713},{"edgeType":"contains","source":1512,"target":1602},{"edgeType":"calls","source":4393,"target":3195},{"edgeType":"calls","source":865,"target":520},{"edgeType":"contains","source":56,"target":3403},{"edgeType":"calls","source":5239,"target":1281},{"edgeType":"calls","source":5249,"target":971},{"edgeType":"calls","source":2274,"target":2290},{"edgeType":"contains","source":3097,"target":3205},{"edgeType":"calls","source":1922,"target":1578},{"edgeType":"calls","source":2743,"target":436},{"edgeType":"contains","source":523,"target":553},{"edgeType":"calls","source":5379,"target":1169},{"edgeType":"contains","source":5710,"target":5714},{"edgeType":"contains","source":2035,"target":2302},{"edgeType":"calls","source":5044,"target":984},{"edgeType":"contains","source":3761,"target":3763},{"edgeType":"contains","source":2888,"target":3343},{"edgeType":"imports","source":1238,"target":264},{"edgeType":"calls","source":4498,"target":4167},{"edgeType":"calls","source":3154,"target":380},{"edgeType":"contains","source":2737,"target":2739},{"edgeType":"contains","source":2698,"target":5005},{"edgeType":"calls","source":3812,"target":2180},{"edgeType":"calls","source":1531,"target":1014},{"edgeType":"contains","source":854,"target":862},{"edgeType":"contains","source":3230,"target":3311},{"edgeType":"calls","source":1922,"target":1577},{"edgeType":"contains","source":523,"target":552},{"edgeType":"calls","source":1240,"target":521},{"edgeType":"calls","source":5044,"target":983},{"edgeType":"contains","source":5710,"target":5715},{"edgeType":"calls","source":4703,"target":984},{"edgeType":"contains","source":2698,"target":5010},{"edgeType":"contains","source":28,"target":45},{"edgeType":"contains","source":1189,"target":3165},{"edgeType":"contains","source":2570,"target":2636},{"edgeType":"contains","source":2901,"target":2945},{"edgeType":"calls","source":5772,"target":1669},{"edgeType":"contains","source":523,"target":556},{"edgeType":"contains","source":4747,"target":4914},{"edgeType":"calls","source":1922,"target":1572},{"edgeType":"calls","source":5743,"target":5739},{"edgeType":"contains","source":3265,"target":3288},{"edgeType":"calls","source":5444,"target":1266},{"edgeType":"calls","source":5044,"target":982},{"edgeType":"calls","source":2957,"target":142},{"edgeType":"calls","source":3256,"target":3557},{"edgeType":"contains","source":1515,"target":1516},{"edgeType":"calls","source":4703,"target":983},{"edgeType":"contains","source":60,"target":109},{"edgeType":"contains","source":2698,"target":5011},{"edgeType":"contains","source":42,"target":2781},{"edgeType":"contains","source":3460,"target":3585},{"edgeType":"calls","source":5243,"target":2211},{"edgeType":"imports","source":1781,"target":340},{"edgeType":"contains","source":2570,"target":2637},{"edgeType":"calls","source":1922,"target":1571},{"edgeType":"contains","source":523,"target":555},{"edgeType":"contains","source":2901,"target":2946},{"edgeType":"calls","source":1829,"target":1283},{"edgeType":"calls","source":2038,"target":89},{"edgeType":"calls","source":119,"target":384},{"edgeType":"contains","source":2533,"target":2727},{"edgeType":"calls","source":4834,"target":3263},{"edgeType":"calls","source":4879,"target":811},{"edgeType":"calls","source":4107,"target":1489},{"edgeType":"contains","source":1117,"target":1167},{"edgeType":"contains","source":523,"target":554},{"edgeType":"calls","source":4703,"target":982},{"edgeType":"calls","source":3303,"target":1044},{"edgeType":"contains","source":4019,"target":4226},{"edgeType":"calls","source":1075,"target":345},{"edgeType":"calls","source":5044,"target":981},{"edgeType":"contains","source":2305,"target":278},{"edgeType":"calls","source":4703,"target":980},{"edgeType":"calls","source":1845,"target":790},{"edgeType":"contains","source":523,"target":558},{"edgeType":"contains","source":2570,"target":2634},{"edgeType":"calls","source":1821,"target":477},{"edgeType":"calls","source":3434,"target":3322},{"edgeType":"contains","source":2247,"target":4190},{"edgeType":"calls","source":5516,"target":89},{"edgeType":"calls","source":4703,"target":981},{"edgeType":"calls","source":3436,"target":89},{"edgeType":"calls","source":3170,"target":3050},{"edgeType":"calls","source":5044,"target":980},{"edgeType":"calls","source":4499,"target":961},{"edgeType":"calls","source":4706,"target":886},{"edgeType":"calls","source":4703,"target":979},{"edgeType":"contains","source":4316,"target":4530},{"edgeType":"contains","source":523,"target":557},{"edgeType":"calls","source":119,"target":386},{"edgeType":"calls","source":4365,"target":887},{"edgeType":"contains","source":2570,"target":2635},{"edgeType":"calls","source":2304,"target":300},{"edgeType":"imports","source":435,"target":841},{"edgeType":"contains","source":2737,"target":2743},{"edgeType":"calls","source":1922,"target":1573},{"edgeType":"contains","source":2698,"target":5009},{"edgeType":"calls","source":4231,"target":814},{"edgeType":"calls","source":4921,"target":564},{"edgeType":"calls","source":5620,"target":1092},{"edgeType":"calls","source":5735,"target":2812},{"edgeType":"calls","source":2590,"target":948},{"edgeType":"calls","source":5453,"target":984},{"edgeType":"contains","source":1671,"target":1964},{"edgeType":"calls","source":5044,"target":979},{"edgeType":"contains","source":5710,"target":5711},{"edgeType":"calls","source":3020,"target":302},{"edgeType":"calls","source":5175,"target":89},{"edgeType":"contains","source":5446,"target":5447},{"edgeType":"contains","source":4654,"target":5687},{"edgeType":"calls","source":4703,"target":978},{"edgeType":"contains","source":2698,"target":5014},{"edgeType":"calls","source":1922,"target":1568},{"edgeType":"contains","source":4286,"target":1239},{"edgeType":"contains","source":4316,"target":4537},{"edgeType":"calls","source":4365,"target":886},{"edgeType":"contains","source":523,"target":560},{"edgeType":"calls","source":4931,"target":3424},{"edgeType":"contains","source":1710,"target":1817},{"edgeType":"contains","source":96,"target":4283},{"edgeType":"calls","source":779,"target":1062},{"edgeType":"contains","source":1117,"target":1172},{"edgeType":"contains","source":5710,"target":5720},{"edgeType":"calls","source":5515,"target":2232},{"edgeType":"calls","source":5453,"target":983},{"edgeType":"calls","source":1563,"target":1069},{"edgeType":"calls","source":5348,"target":5295},{"edgeType":"calls","source":5044,"target":978},{"edgeType":"calls","source":3189,"target":345},{"edgeType":"calls","source":5269,"target":345},{"edgeType":"calls","source":5195,"target":1582},{"edgeType":"calls","source":3858,"target":1805},{"edgeType":"contains","source":3359,"target":3549},{"edgeType":"calls","source":4652,"target":1501},{"edgeType":"calls","source":4504,"target":3975},{"edgeType":"calls","source":1024,"target":865},{"edgeType":"calls","source":4637,"target":4080},{"edgeType":"contains","source":2735,"target":2811},{"edgeType":"calls","source":4703,"target":977},{"edgeType":"calls","source":1858,"target":380},{"edgeType":"calls","source":3966,"target":3742},{"edgeType":"contains","source":854,"target":868},{"edgeType":"contains","source":2570,"target":2641},{"edgeType":"contains","source":523,"target":559},{"edgeType":"calls","source":3530,"target":345},{"edgeType":"contains","source":1606,"target":1871},{"edgeType":"calls","source":5044,"target":977},{"edgeType":"contains","source":2901,"target":2950},{"edgeType":"contains","source":5710,"target":5721},{"edgeType":"calls","source":3389,"target":1545},{"edgeType":"calls","source":5045,"target":3060},{"edgeType":"calls","source":5530,"target":2823},{"edgeType":"calls","source":5453,"target":982},{"edgeType":"calls","source":5354,"target":1937},{"edgeType":"calls","source":4703,"target":976},{"edgeType":"imports","source":3208,"target":510},{"edgeType":"contains","source":1189,"target":3167},{"edgeType":"calls","source":1922,"target":1570},{"edgeType":"calls","source":4224,"target":1026},{"edgeType":"calls","source":4233,"target":747},{"edgeType":"calls","source":2052,"target":1768},{"edgeType":"contains","source":2584,"target":3261},{"edgeType":"contains","source":2506,"target":2508},{"edgeType":"calls","source":2344,"target":1169},{"edgeType":"contains","source":2570,"target":2638},{"edgeType":"contains","source":5710,"target":5722},{"edgeType":"calls","source":5761,"target":946},{"edgeType":"calls","source":5044,"target":976},{"edgeType":"calls","source":5105,"target":142},{"edgeType":"calls","source":2875,"target":564},{"edgeType":"contains","source":5545,"target":5552},{"edgeType":"calls","source":5453,"target":981},{"edgeType":"calls","source":986,"target":989},{"edgeType":"calls","source":1146,"target":257},{"edgeType":"contains","source":4223,"target":1075},{"edgeType":"calls","source":4703,"target":975},{"edgeType":"contains","source":2698,"target":5013},{"edgeType":"contains","source":1189,"target":3168},{"edgeType":"contains","source":59,"target":146},{"edgeType":"contains","source":4153,"target":4302},{"edgeType":"calls","source":1687,"target":398},{"edgeType":"calls","source":4502,"target":864},{"edgeType":"contains","source":2533,"target":2729},{"edgeType":"calls","source":4471,"target":2882},{"edgeType":"calls","source":1922,"target":1569},{"edgeType":"calls","source":119,"target":382},{"edgeType":"imports","source":3969,"target":1220},{"edgeType":"contains","source":523,"target":561},{"edgeType":"contains","source":2570,"target":2639},{"edgeType":"calls","source":4419,"target":266},{"edgeType":"calls","source":5044,"target":975},{"edgeType":"contains","source":5710,"target":5723},{"edgeType":"calls","source":2961,"target":1070},{"edgeType":"contains","source":1117,"target":1173},{"edgeType":"calls","source":3479,"target":867},{"edgeType":"calls","source":5303,"target":345},{"edgeType":"contains","source":3460,"target":3588},{"edgeType":"calls","source":5453,"target":980},{"edgeType":"calls","source":4703,"target":974},{"edgeType":"imports","source":331,"target":903},{"edgeType":"contains","source":2570,"target":2644},{"edgeType":"calls","source":1933,"target":1223},{"edgeType":"calls","source":2043,"target":984},{"edgeType":"calls","source":4817,"target":3782},{"edgeType":"imports","source":3297,"target":920},{"edgeType":"calls","source":4280,"target":345},{"edgeType":"imports","source":4176,"target":89},{"edgeType":"calls","source":5044,"target":974},{"edgeType":"contains","source":2888,"target":3356},{"edgeType":"contains","source":4356,"target":4359},{"edgeType":"calls","source":3066,"target":983},{"edgeType":"contains","source":2698,"target":5018},{"edgeType":"calls","source":5290,"target":747},{"edgeType":"calls","source":5195,"target":521},{"edgeType":"contains","source":5710,"target":5716},{"edgeType":"calls","source":5453,"target":979},{"edgeType":"contains","source":2570,"target":2645},{"edgeType":"calls","source":4703,"target":973},{"edgeType":"calls","source":5453,"target":978},{"edgeType":"calls","source":1320,"target":141},{"edgeType":"imports","source":255,"target":89},{"edgeType":"calls","source":3961,"target":2836},{"edgeType":"calls","source":2043,"target":983},{"edgeType":"calls","source":4186,"target":89},{"edgeType":"calls","source":119,"target":376},{"edgeType":"contains","source":854,"target":872},{"edgeType":"calls","source":5044,"target":973},{"edgeType":"calls","source":3066,"target":984},{"edgeType":"contains","source":5710,"target":5717},{"edgeType":"contains","source":5545,"target":5547},{"edgeType":"calls","source":5453,"target":977},{"edgeType":"calls","source":4822,"target":454},{"edgeType":"contains","source":5446,"target":5449},{"edgeType":"contains","source":2570,"target":2642},{"edgeType":"calls","source":3966,"target":564},{"edgeType":"contains","source":2036,"target":2283},{"edgeType":"calls","source":4220,"target":89},{"edgeType":"calls","source":1883,"target":1718},{"edgeType":"contains","source":4747,"target":4920},{"edgeType":"calls","source":4817,"target":4837},{"edgeType":"calls","source":2916,"target":345},{"edgeType":"calls","source":2870,"target":1771},{"edgeType":"calls","source":4443,"target":1633},{"edgeType":"calls","source":4561,"target":89},{"edgeType":"calls","source":4703,"target":972},{"edgeType":"contains","source":54,"target":3477},{"edgeType":"contains","source":3644,"target":4231},{"edgeType":"contains","source":854,"target":875},{"edgeType":"calls","source":119,"target":379},{"edgeType":"contains","source":2901,"target":2951},{"edgeType":"calls","source":3066,"target":981},{"edgeType":"calls","source":5180,"target":984},{"edgeType":"contains","source":5710,"target":5718},{"edgeType":"calls","source":5216,"target":925},{"edgeType":"calls","source":4852,"target":4810},{"edgeType":"calls","source":5044,"target":972},{"edgeType":"calls","source":5337,"target":345},{"edgeType":"calls","source":5329,"target":593},{"edgeType":"calls","source":1286,"target":141},{"edgeType":"calls","source":3576,"target":1026},{"edgeType":"contains","source":4019,"target":4232},{"edgeType":"calls","source":4705,"target":4080},{"edgeType":"calls","source":4822,"target":453},{"edgeType":"contains","source":4654,"target":5688},{"edgeType":"contains","source":2570,"target":2643},{"edgeType":"calls","source":5453,"target":976},{"edgeType":"calls","source":1807,"target":902},{"edgeType":"calls","source":1933,"target":1224},{"edgeType":"contains","source":2698,"target":5017},{"edgeType":"calls","source":2822,"target":89},{"edgeType":"contains","source":4286,"target":1240},{"edgeType":"calls","source":4833,"target":1169},{"edgeType":"imports","source":1867,"target":851},{"edgeType":"calls","source":4703,"target":971},{"edgeType":"calls","source":2255,"target":754},{"edgeType":"contains","source":5727,"target":4135},{"edgeType":"calls","source":5044,"target":971},{"edgeType":"contains","source":5710,"target":5719},{"edgeType":"calls","source":3066,"target":982},{"edgeType":"calls","source":5180,"target":983},{"edgeType":"calls","source":3907,"target":279},{"edgeType":"calls","source":1661,"target":142},{"edgeType":"calls","source":5536,"target":1574},{"edgeType":"calls","source":3463,"target":302},{"edgeType":"contains","source":3194,"target":3382},{"edgeType":"calls","source":5745,"target":380},{"edgeType":"contains","source":1164,"target":1805},{"edgeType":"calls","source":2042,"target":978},{"edgeType":"calls","source":4054,"target":972},{"edgeType":"calls","source":5569,"target":1574},{"edgeType":"calls","source":4212,"target":302},{"edgeType":"contains","source":523,"target":535},{"edgeType":"calls","source":5342,"target":2269},{"edgeType":"calls","source":2895,"target":961},{"edgeType":"contains","source":52,"target":337},{"edgeType":"calls","source":4820,"target":481},{"edgeType":"calls","source":5074,"target":4235},{"edgeType":"contains","source":2901,"target":2924},{"edgeType":"calls","source":5073,"target":2152},{"edgeType":"calls","source":3065,"target":977},{"edgeType":"calls","source":3189,"target":304},{"edgeType":"calls","source":5348,"target":1026},{"edgeType":"contains","source":962,"target":1724},{"edgeType":"calls","source":5619,"target":3195},{"edgeType":"calls","source":3534,"target":1236},{"edgeType":"calls","source":4054,"target":971},{"edgeType":"calls","source":5626,"target":864},{"edgeType":"calls","source":1926,"target":345},{"edgeType":"contains","source":1164,"target":1804},{"edgeType":"contains","source":523,"target":534},{"edgeType":"calls","source":2042,"target":977},{"edgeType":"calls","source":4054,"target":973},{"edgeType":"contains","source":4581,"target":1582},{"edgeType":"imports","source":2740,"target":262},{"edgeType":"calls","source":1086,"target":1016},{"edgeType":"calls","source":1075,"target":300},{"edgeType":"calls","source":4869,"target":1075},{"edgeType":"calls","source":3065,"target":978},{"edgeType":"contains","source":4223,"target":4224},{"edgeType":"contains","source":2241,"target":2245},{"edgeType":"calls","source":5310,"target":89},{"edgeType":"calls","source":2410,"target":1199},{"edgeType":"calls","source":3189,"target":305},{"edgeType":"calls","source":4420,"target":1253},{"edgeType":"contains","source":2901,"target":2925},{"edgeType":"contains","source":2888,"target":3328},{"edgeType":"calls","source":2701,"target":2745},{"edgeType":"calls","source":520,"target":595},{"edgeType":"contains","source":3871,"target":4564},{"edgeType":"contains","source":1164,"target":1807},{"edgeType":"contains","source":523,"target":537},{"edgeType":"calls","source":2042,"target":980},{"edgeType":"calls","source":5521,"target":946},{"edgeType":"contains","source":2533,"target":2703},{"edgeType":"calls","source":5063,"target":345},{"edgeType":"imports","source":2740,"target":261},{"edgeType":"calls","source":1042,"target":269},{"edgeType":"calls","source":4536,"target":3998},{"edgeType":"calls","source":802,"target":309},{"edgeType":"calls","source":3065,"target":974},{"edgeType":"calls","source":3065,"target":975},{"edgeType":"calls","source":2444,"target":1199},{"edgeType":"calls","source":3946,"target":89},{"edgeType":"contains","source":4907,"target":4159},{"edgeType":"contains","source":5114,"target":5141},{"edgeType":"contains","source":3265,"target":3267},{"edgeType":"contains","source":3871,"target":4563},{"edgeType":"calls","source":2042,"target":979},{"edgeType":"contains","source":523,"target":536},{"edgeType":"contains","source":259,"target":1321},{"edgeType":"calls","source":779,"target":1021},{"edgeType":"contains","source":4289,"target":4290},{"edgeType":"calls","source":4548,"target":454},{"edgeType":"calls","source":3065,"target":976},{"edgeType":"calls","source":2445,"target":1169},{"edgeType":"calls","source":4662,"target":91},{"edgeType":"contains","source":3588,"target":3823},{"edgeType":"contains","source":962,"target":1725},{"edgeType":"calls","source":3589,"target":1644},{"edgeType":"contains","source":2698,"target":4988},{"edgeType":"contains","source":1250,"target":1253},{"edgeType":"calls","source":1728,"target":142},{"edgeType":"contains","source":5114,"target":5140},{"edgeType":"calls","source":2812,"target":359},{"edgeType":"contains","source":259,"target":1324},{"edgeType":"contains","source":3230,"target":3300},{"edgeType":"contains","source":3329,"target":3402},{"edgeType":"calls","source":853,"target":836},{"edgeType":"calls","source":3065,"target":972},{"edgeType":"calls","source":3189,"target":300},{"edgeType":"contains","source":28,"target":29},{"edgeType":"calls","source":3877,"target":1169},{"edgeType":"calls","source":3883,"target":983},{"edgeType":"calls","source":4662,"target":90},{"edgeType":"calls","source":2436,"target":2502},{"edgeType":"calls","source":4548,"target":453},{"edgeType":"contains","source":4153,"target":4285},{"edgeType":"contains","source":523,"target":539},{"edgeType":"calls","source":2299,"target":407},{"edgeType":"calls","source":2042,"target":973},{"edgeType":"contains","source":2698,"target":4993},{"edgeType":"contains","source":317,"target":3753},{"edgeType":"calls","source":2812,"target":360},{"edgeType":"calls","source":2688,"target":1033},{"edgeType":"calls","source":5555,"target":946},{"edgeType":"contains","source":523,"target":538},{"edgeType":"calls","source":5507,"target":320},{"edgeType":"calls","source":853,"target":835},{"edgeType":"calls","source":5378,"target":2205},{"edgeType":"calls","source":1126,"target":829},{"edgeType":"calls","source":3065,"target":973},{"edgeType":"contains","source":61,"target":62},{"edgeType":"calls","source":3883,"target":984},{"edgeType":"calls","source":398,"target":142},{"edgeType":"contains","source":11,"target":3726},{"edgeType":"calls","source":4548,"target":452},{"edgeType":"calls","source":3603,"target":3322},{"edgeType":"calls","source":2042,"target":972},{"edgeType":"imports","source":898,"target":278},{"edgeType":"calls","source":2042,"target":976},{"edgeType":"contains","source":962,"target":1731},{"edgeType":"calls","source":1239,"target":1557},{"edgeType":"calls","source":5757,"target":1025},{"edgeType":"calls","source":2812,"target":357},{"edgeType":"calls","source":5620,"target":1044},{"edgeType":"calls","source":2716,"target":1219},{"edgeType":"calls","source":5719,"target":89},{"edgeType":"calls","source":3883,"target":981},{"edgeType":"calls","source":2575,"target":305},{"edgeType":"calls","source":364,"target":142},{"edgeType":"calls","source":4548,"target":451},{"edgeType":"calls","source":4756,"target":345},{"edgeType":"calls","source":4662,"target":88},{"edgeType":"imports","source":2740,"target":256},{"edgeType":"contains","source":523,"target":541},{"edgeType":"calls","source":2042,"target":975},{"edgeType":"calls","source":2768,"target":2779},{"edgeType":"calls","source":2812,"target":358},{"edgeType":"calls","source":2843,"target":1511},{"edgeType":"contains","source":962,"target":1730},{"edgeType":"calls","source":2895,"target":956},{"edgeType":"calls","source":2916,"target":305},{"edgeType":"calls","source":4933,"target":142},{"edgeType":"calls","source":853,"target":837},{"edgeType":"calls","source":802,"target":304},{"edgeType":"calls","source":1086,"target":1014},{"edgeType":"calls","source":1075,"target":1355},{"edgeType":"calls","source":3065,"target":971},{"edgeType":"calls","source":5272,"target":2317},{"edgeType":"calls","source":5298,"target":454},{"edgeType":"calls","source":3883,"target":982},{"edgeType":"contains","source":3591,"target":3734},{"edgeType":"calls","source":4671,"target":1922},{"edgeType":"calls","source":4548,"target":450},{"edgeType":"contains","source":54,"target":3452},{"edgeType":"calls","source":2299,"target":406},{"edgeType":"calls","source":4455,"target":1219},{"edgeType":"contains","source":523,"target":540},{"edgeType":"calls","source":2042,"target":974},{"edgeType":"calls","source":5030,"target":305},{"edgeType":"contains","source":5114,"target":5152},{"edgeType":"calls","source":3576,"target":983},{"edgeType":"contains","source":259,"target":1328},{"edgeType":"calls","source":2812,"target":355},{"edgeType":"calls","source":853,"target":832},{"edgeType":"contains","source":2915,"target":3556},{"edgeType":"contains","source":3265,"target":3276},{"edgeType":"calls","source":5298,"target":453},{"edgeType":"calls","source":3197,"target":3219},{"edgeType":"contains","source":3359,"target":3534},{"edgeType":"calls","source":4696,"target":89},{"edgeType":"calls","source":3229,"target":1169},{"edgeType":"calls","source":4582,"target":1509},{"edgeType":"calls","source":1118,"target":1073},{"edgeType":"contains","source":3926,"target":3927},{"edgeType":"calls","source":3883,"target":979},{"edgeType":"calls","source":2318,"target":1928},{"edgeType":"calls","source":3987,"target":4097},{"edgeType":"calls","source":4548,"target":449},{"edgeType":"contains","source":523,"target":543},{"edgeType":"calls","source":3576,"target":984},{"edgeType":"calls","source":3598,"target":302},{"edgeType":"calls","source":3528,"target":3529},{"edgeType":"contains","source":259,"target":1327},{"edgeType":"calls","source":2812,"target":356},{"edgeType":"calls","source":2785,"target":1193},{"edgeType":"calls","source":5625,"target":886},{"edgeType":"calls","source":5298,"target":452},{"edgeType":"calls","source":1056,"target":880},{"edgeType":"calls","source":2572,"target":2511},{"edgeType":"calls","source":1883,"target":1669},{"edgeType":"calls","source":3883,"target":980},{"edgeType":"contains","source":523,"target":542},{"edgeType":"calls","source":4432,"target":1930},{"edgeType":"calls","source":4548,"target":448},{"edgeType":"calls","source":354,"target":445},{"edgeType":"calls","source":1455,"target":142},{"edgeType":"contains","source":255,"target":1454},{"edgeType":"calls","source":1401,"target":759},{"edgeType":"contains","source":854,"target":855},{"edgeType":"calls","source":2074,"target":2090},{"edgeType":"calls","source":2916,"target":300},{"edgeType":"contains","source":3034,"target":3036},{"edgeType":"calls","source":2991,"target":89},{"edgeType":"contains","source":1117,"target":1158},{"edgeType":"calls","source":1640,"target":749},{"edgeType":"calls","source":5298,"target":451},{"edgeType":"contains","source":3865,"target":4758},{"edgeType":"calls","source":5507,"target":315},{"edgeType":"calls","source":3576,"target":981},{"edgeType":"calls","source":5349,"target":984},{"edgeType":"contains","source":1671,"target":1950},{"edgeType":"contains","source":28,"target":35},{"edgeType":"calls","source":3883,"target":977},{"edgeType":"calls","source":4548,"target":447},{"edgeType":"calls","source":2795,"target":880},{"edgeType":"calls","source":2063,"target":320},{"edgeType":"calls","source":2042,"target":971},{"edgeType":"contains","source":523,"target":545},{"edgeType":"contains","source":337,"target":3140},{"edgeType":"calls","source":4403,"target":1771},{"edgeType":"contains","source":255,"target":1453},{"edgeType":"contains","source":259,"target":1329},{"edgeType":"calls","source":3576,"target":982},{"edgeType":"calls","source":92,"target":112},{"edgeType":"calls","source":4294,"target":920},{"edgeType":"calls","source":853,"target":833},{"edgeType":"calls","source":5192,"target":565},{"edgeType":"contains","source":5114,"target":5149},{"edgeType":"calls","source":5298,"target":450},{"edgeType":"calls","source":5349,"target":983},{"edgeType":"calls","source":1118,"target":1074},{"edgeType":"imports","source":291,"target":81},{"edgeType":"imports","source":960,"target":1540},{"edgeType":"calls","source":3228,"target":142},{"edgeType":"contains","source":3359,"target":3531},{"edgeType":"calls","source":3883,"target":978},{"edgeType":"calls","source":3987,"target":3039},{"edgeType":"calls","source":4830,"target":2274},{"edgeType":"contains","source":851,"target":946},{"edgeType":"calls","source":4612,"target":1633},{"edgeType":"contains","source":523,"target":544},{"edgeType":"calls","source":1563,"target":1016},{"edgeType":"calls","source":2928,"target":983},{"edgeType":"contains","source":784,"target":1970},{"edgeType":"imports","source":118,"target":156},{"edgeType":"calls","source":5298,"target":449},{"edgeType":"contains","source":2698,"target":5002},{"edgeType":"calls","source":3883,"target":975},{"edgeType":"calls","source":5349,"target":982},{"edgeType":"calls","source":5507,"target":313},{"edgeType":"calls","source":3612,"target":920},{"edgeType":"calls","source":3576,"target":979},{"edgeType":"contains","source":1189,"target":3157},{"edgeType":"calls","source":1961,"target":305},{"edgeType":"contains","source":523,"target":547},{"edgeType":"imports","source":317,"target":329},{"edgeType":"calls","source":4824,"target":345},{"edgeType":"calls","source":1156,"target":948},{"edgeType":"contains","source":4654,"target":5674},{"edgeType":"contains","source":2698,"target":5001},{"edgeType":"calls","source":2795,"target":878},{"edgeType":"calls","source":4833,"target":2180},{"edgeType":"calls","source":4650,"target":454},{"edgeType":"calls","source":460,"target":327},{"edgeType":"calls","source":4497,"target":969},{"edgeType":"calls","source":2928,"target":984},{"edgeType":"calls","source":2211,"target":1013},{"edgeType":"calls","source":5769,"target":3817},{"edgeType":"calls","source":2205,"target":142},{"edgeType":"calls","source":5030,"target":300},{"edgeType":"calls","source":5105,"target":89},{"edgeType":"calls","source":5298,"target":448},{"edgeType":"imports","source":96,"target":1896},{"edgeType":"calls","source":3883,"target":976},{"edgeType":"calls","source":5349,"target":981},{"edgeType":"contains","source":1117,"target":1159},{"edgeType":"calls","source":3576,"target":980},{"edgeType":"calls","source":5663,"target":2875},{"edgeType":"calls","source":3426,"target":345},{"edgeType":"contains","source":1189,"target":3158},{"edgeType":"contains","source":4019,"target":4218},{"edgeType":"calls","source":2063,"target":313},{"edgeType":"calls","source":5390,"target":767},{"edgeType":"calls","source":4932,"target":1224},{"edgeType":"contains","source":523,"target":546},{"edgeType":"calls","source":2575,"target":300},{"edgeType":"calls","source":4650,"target":453},{"edgeType":"calls","source":753,"target":759},{"edgeType":"calls","source":3073,"target":1771},{"edgeType":"calls","source":5298,"target":447},{"edgeType":"calls","source":2269,"target":269},{"edgeType":"calls","source":3576,"target":977},{"edgeType":"calls","source":3883,"target":973},{"edgeType":"calls","source":5349,"target":980},{"edgeType":"calls","source":1687,"target":345},{"edgeType":"contains","source":1512,"target":1598},{"edgeType":"contains","source":5114,"target":5154},{"edgeType":"calls","source":1529,"target":2072},{"edgeType":"calls","source":3779,"target":1026},{"edgeType":"contains","source":523,"target":549},{"edgeType":"imports","source":3969,"target":1273},{"edgeType":"calls","source":5486,"target":961},{"edgeType":"calls","source":5490,"target":837},{"edgeType":"contains","source":2584,"target":3248},{"edgeType":"calls","source":5337,"target":2409},{"edgeType":"calls","source":5390,"target":766},{"edgeType":"contains","source":2698,"target":4999},{"edgeType":"calls","source":4932,"target":1223},{"edgeType":"calls","source":2928,"target":981},{"edgeType":"contains","source":2241,"target":2254},{"edgeType":"contains","source":4223,"target":4235},{"edgeType":"calls","source":4650,"target":452},{"edgeType":"calls","source":2933,"target":2941},{"edgeType":"contains","source":5114,"target":5153},{"edgeType":"calls","source":2928,"target":982},{"edgeType":"calls","source":4504,"target":1805},{"edgeType":"contains","source":2901,"target":2936},{"edgeType":"calls","source":3883,"target":974},{"edgeType":"calls","source":5349,"target":979},{"edgeType":"calls","source":1463,"target":946},{"edgeType":"calls","source":3801,"target":345},{"edgeType":"contains","source":1117,"target":1161},{"edgeType":"calls","source":3576,"target":978},{"edgeType":"calls","source":3721,"target":1768},{"edgeType":"calls","source":4104,"target":465},{"edgeType":"calls","source":5507,"target":309},{"edgeType":"calls","source":5490,"target":836},{"edgeType":"contains","source":523,"target":548},{"edgeType":"calls","source":2063,"target":315},{"edgeType":"contains","source":2849,"target":1376},{"edgeType":"calls","source":1056,"target":878},{"edgeType":"contains","source":4223,"target":4234},{"edgeType":"calls","source":4650,"target":451},{"edgeType":"contains","source":59,"target":134},{"edgeType":"contains","source":259,"target":276},{"edgeType":"calls","source":3074,"target":1771},{"edgeType":"calls","source":2269,"target":300},{"edgeType":"calls","source":5099,"target":305},{"edgeType":"calls","source":3189,"target":320},{"edgeType":"calls","source":4424,"target":89},{"edgeType":"calls","source":5239,"target":3364},{"edgeType":"calls","source":5299,"target":447},{"edgeType":"calls","source":2344,"target":89},{"edgeType":"imports","source":1605,"target":1606},{"edgeType":"calls","source":3573,"target":1101},{"edgeType":"calls","source":5691,"target":980},{"edgeType":"calls","source":5522,"target":5162},{"edgeType":"calls","source":1881,"target":1757},{"edgeType":"contains","source":2910,"target":3686},{"edgeType":"calls","source":5732,"target":2880},{"edgeType":"calls","source":1858,"target":356},{"edgeType":"contains","source":3871,"target":4550},{"edgeType":"calls","source":4025,"target":4001},{"edgeType":"calls","source":4110,"target":309},{"edgeType":"calls","source":4210,"target":380},{"edgeType":"calls","source":5378,"target":1169},{"edgeType":"contains","source":4410,"target":4753},{"edgeType":"calls","source":4617,"target":449},{"edgeType":"calls","source":2590,"target":920},{"edgeType":"contains","source":3591,"target":3715},{"edgeType":"calls","source":1007,"target":310},{"edgeType":"calls","source":5137,"target":1240},{"edgeType":"calls","source":1661,"target":120},{"edgeType":"calls","source":1662,"target":89},{"edgeType":"calls","source":4344,"target":454},{"edgeType":"calls","source":1858,"target":355},{"edgeType":"calls","source":5691,"target":979},{"edgeType":"calls","source":5747,"target":300},{"edgeType":"calls","source":5722,"target":3189},{"edgeType":"calls","source":3789,"target":1805},{"edgeType":"calls","source":3848,"target":1033},{"edgeType":"calls","source":1881,"target":1756},{"edgeType":"contains","source":3871,"target":4549},{"edgeType":"calls","source":5458,"target":802},{"edgeType":"calls","source":5428,"target":2789},{"edgeType":"contains","source":4410,"target":4752},{"edgeType":"calls","source":4617,"target":448},{"edgeType":"contains","source":1710,"target":1777},{"edgeType":"contains","source":1561,"target":2164},{"edgeType":"calls","source":4464,"target":961},{"edgeType":"calls","source":5362,"target":606},{"edgeType":"calls","source":4344,"target":453},{"edgeType":"calls","source":5691,"target":978},{"edgeType":"calls","source":1858,"target":358},{"edgeType":"calls","source":3959,"target":3931},{"edgeType":"calls","source":5575,"target":345},{"edgeType":"calls","source":2005,"target":1086},{"edgeType":"calls","source":1169,"target":1633},{"edgeType":"contains","source":4410,"target":4751},{"edgeType":"calls","source":4617,"target":447},{"edgeType":"calls","source":419,"target":1629},{"edgeType":"calls","source":753,"target":788},{"edgeType":"contains","source":5506,"target":5663},{"edgeType":"calls","source":4571,"target":814},{"edgeType":"contains","source":2735,"target":2768},{"edgeType":"calls","source":4344,"target":452},{"edgeType":"calls","source":5691,"target":977},{"edgeType":"calls","source":5704,"target":1631},{"edgeType":"calls","source":4003,"target":1511},{"edgeType":"calls","source":1881,"target":1758},{"edgeType":"calls","source":3831,"target":501},{"edgeType":"calls","source":1858,"target":357},{"edgeType":"contains","source":1867,"target":2193},{"edgeType":"calls","source":5691,"target":976},{"edgeType":"calls","source":5412,"target":1169},{"edgeType":"contains","source":3826,"target":3828},{"edgeType":"calls","source":4695,"target":142},{"edgeType":"calls","source":4799,"target":89},{"edgeType":"calls","source":4774,"target":864},{"edgeType":"calls","source":2733,"target":1771},{"edgeType":"calls","source":1777,"target":749},{"edgeType":"calls","source":1762,"target":1214},{"edgeType":"contains","source":1189,"target":3132},{"edgeType":"calls","source":5704,"target":1630},{"edgeType":"calls","source":4344,"target":451},{"edgeType":"contains","source":4747,"target":4881},{"edgeType":"calls","source":4054,"target":984},{"edgeType":"calls","source":4893,"target":345},{"edgeType":"calls","source":5691,"target":975},{"edgeType":"calls","source":5704,"target":1629},{"edgeType":"calls","source":5433,"target":1574},{"edgeType":"calls","source":886,"target":887},{"edgeType":"calls","source":802,"target":320},{"edgeType":"contains","source":3871,"target":4554},{"edgeType":"contains","source":1671,"target":1932},{"edgeType":"calls","source":5015,"target":5019},{"edgeType":"calls","source":1007,"target":307},{"edgeType":"calls","source":5126,"target":521},{"edgeType":"calls","source":3154,"target":345},{"edgeType":"calls","source":4510,"target":589},{"edgeType":"calls","source":2304,"target":269},{"edgeType":"calls","source":2274,"target":142},{"edgeType":"calls","source":4344,"target":450},{"edgeType":"calls","source":1501,"target":847},{"edgeType":"calls","source":5609,"target":345},{"edgeType":"calls","source":5691,"target":974},{"edgeType":"calls","source":910,"target":142},{"edgeType":"contains","source":3871,"target":4553},{"edgeType":"contains","source":3641,"target":5341},{"edgeType":"calls","source":5099,"target":300},{"edgeType":"contains","source":4178,"target":4548},{"edgeType":"calls","source":5255,"target":1805},{"edgeType":"calls","source":2422,"target":836},{"edgeType":"contains","source":523,"target":525},{"edgeType":"calls","source":4054,"target":982},{"edgeType":"calls","source":5734,"target":2812},{"edgeType":"calls","source":4467,"target":864},{"edgeType":"calls","source":4344,"target":449},{"edgeType":"imports","source":96,"target":1868},{"edgeType":"calls","source":4125,"target":895},{"edgeType":"calls","source":2191,"target":598},{"edgeType":"calls","source":4240,"target":501},{"edgeType":"calls","source":4879,"target":777},{"edgeType":"contains","source":4410,"target":4755},{"edgeType":"calls","source":5691,"target":973},{"edgeType":"calls","source":4671,"target":2997},{"edgeType":"calls","source":4833,"target":89},{"edgeType":"calls","source":5313,"target":4235},{"edgeType":"contains","source":3871,"target":4552},{"edgeType":"calls","source":876,"target":142},{"edgeType":"calls","source":3189,"target":315},{"edgeType":"calls","source":2422,"target":837},{"edgeType":"calls","source":4584,"target":407},{"edgeType":"calls","source":4054,"target":983},{"edgeType":"calls","source":3959,"target":3928},{"edgeType":"contains","source":4747,"target":4878},{"edgeType":"contains","source":523,"target":524},{"edgeType":"calls","source":4344,"target":448},{"edgeType":"calls","source":4110,"target":304},{"edgeType":"calls","source":4125,"target":896},{"edgeType":"calls","source":2037,"target":89},{"edgeType":"calls","source":2795,"target":902},{"edgeType":"calls","source":5691,"target":972},{"edgeType":"contains","source":2532,"target":1665},{"edgeType":"calls","source":5015,"target":788},{"edgeType":"calls","source":4927,"target":345},{"edgeType":"calls","source":4879,"target":776},{"edgeType":"contains","source":4410,"target":4754},{"edgeType":"calls","source":2999,"target":920},{"edgeType":"calls","source":5549,"target":89},{"edgeType":"contains","source":3871,"target":4551},{"edgeType":"calls","source":4584,"target":406},{"edgeType":"calls","source":2692,"target":920},{"edgeType":"calls","source":2055,"target":583},{"edgeType":"calls","source":4054,"target":980},{"edgeType":"contains","source":523,"target":527},{"edgeType":"calls","source":4236,"target":1680},{"edgeType":"calls","source":4318,"target":1253},{"edgeType":"calls","source":4344,"target":447},{"edgeType":"calls","source":5691,"target":971},{"edgeType":"calls","source":4811,"target":2883},{"edgeType":"calls","source":3396,"target":1294},{"edgeType":"calls","source":4819,"target":521},{"edgeType":"calls","source":3413,"target":767},{"edgeType":"contains","source":5506,"target":5669},{"edgeType":"calls","source":5469,"target":454},{"edgeType":"contains","source":1546,"target":1583},{"edgeType":"calls","source":2590,"target":912},{"edgeType":"calls","source":1946,"target":790},{"edgeType":"calls","source":3810,"target":89},{"edgeType":"contains","source":523,"target":526},{"edgeType":"calls","source":4125,"target":894},{"edgeType":"calls","source":4054,"target":981},{"edgeType":"calls","source":2422,"target":835},{"edgeType":"calls","source":802,"target":315},{"edgeType":"calls","source":2916,"target":1377},{"edgeType":"contains","source":3871,"target":4557},{"edgeType":"calls","source":3343,"target":2938},{"edgeType":"calls","source":3000,"target":3001},{"edgeType":"contains","source":5506,"target":5670},{"edgeType":"calls","source":5469,"target":453},{"edgeType":"imports","source":108,"target":455},{"edgeType":"calls","source":3189,"target":313},{"edgeType":"calls","source":3232,"target":1094},{"edgeType":"calls","source":4670,"target":4080},{"edgeType":"calls","source":4054,"target":978},{"edgeType":"calls","source":4798,"target":1169},{"edgeType":"contains","source":2910,"target":3692},{"edgeType":"calls","source":4144,"target":302},{"edgeType":"calls","source":4231,"target":776},{"edgeType":"contains","source":523,"target":529},{"edgeType":"calls","source":119,"target":350},{"edgeType":"calls","source":4279,"target":345},{"edgeType":"calls","source":2422,"target":832},{"edgeType":"calls","source":4219,"target":3263},{"edgeType":"calls","source":1501,"target":846},{"edgeType":"calls","source":5592,"target":867},{"edgeType":"calls","source":3065,"target":983},{"edgeType":"contains","source":3871,"target":4556},{"edgeType":"contains","source":5506,"target":5671},{"edgeType":"calls","source":3389,"target":1509},{"edgeType":"calls","source":3396,"target":1292},{"edgeType":"calls","source":5501,"target":1574},{"edgeType":"calls","source":5469,"target":452},{"edgeType":"calls","source":3377,"target":2938},{"edgeType":"contains","source":3393,"target":3517},{"edgeType":"calls","source":4662,"target":4327},{"edgeType":"calls","source":4054,"target":979},{"edgeType":"contains","source":40,"target":2816},{"edgeType":"calls","source":4901,"target":89},{"edgeType":"calls","source":4160,"target":864},{"edgeType":"calls","source":4231,"target":777},{"edgeType":"calls","source":2422,"target":833},{"edgeType":"contains","source":2505,"target":2507},{"edgeType":"contains","source":523,"target":528},{"edgeType":"imports","source":3641,"target":851},{"edgeType":"calls","source":3065,"target":984},{"edgeType":"contains","source":1164,"target":1797},{"edgeType":"contains","source":5506,"target":5672},{"edgeType":"calls","source":5469,"target":451},{"edgeType":"calls","source":3396,"target":1293},{"edgeType":"calls","source":3413,"target":766},{"edgeType":"contains","source":5506,"target":5664},{"edgeType":"calls","source":5469,"target":450},{"edgeType":"contains","source":523,"target":531},{"edgeType":"calls","source":3243,"target":1805},{"edgeType":"calls","source":2042,"target":982},{"edgeType":"calls","source":1056,"target":894},{"edgeType":"calls","source":1075,"target":305},{"edgeType":"calls","source":4054,"target":976},{"edgeType":"calls","source":4915,"target":1768},{"edgeType":"calls","source":326,"target":269},{"edgeType":"contains","source":2901,"target":2920},{"edgeType":"calls","source":3065,"target":981},{"edgeType":"contains","source":5114,"target":5139},{"edgeType":"calls","source":3396,"target":1290},{"edgeType":"contains","source":5506,"target":5665},{"edgeType":"calls","source":5469,"target":449},{"edgeType":"contains","source":4019,"target":4201},{"edgeType":"contains","source":1781,"target":3816},{"edgeType":"calls","source":2042,"target":981},{"edgeType":"calls","source":4054,"target":977},{"edgeType":"contains","source":523,"target":530},{"edgeType":"contains","source":2247,"target":997},{"edgeType":"calls","source":1537,"target":1837},{"edgeType":"contains","source":2901,"target":2921},{"edgeType":"contains","source":959,"target":3926},{"edgeType":"calls","source":3065,"target":982},{"edgeType":"imports","source":3460,"target":1179},{"edgeType":"calls","source":3189,"target":309},{"edgeType":"calls","source":3722,"target":3869},{"edgeType":"calls","source":5744,"target":380},{"edgeType":"calls","source":3396,"target":1291},{"edgeType":"calls","source":5617,"target":89},{"edgeType":"calls","source":3569,"target":156},{"edgeType":"contains","source":523,"target":533},{"edgeType":"calls","source":4054,"target":974},{"edgeType":"calls","source":5469,"target":448},{"edgeType":"calls","source":3959,"target":1805},{"edgeType":"calls","source":1056,"target":896},{"edgeType":"contains","source":2735,"target":2779},{"edgeType":"contains","source":3871,"target":4560},{"edgeType":"calls","source":2042,"target":984},{"edgeType":"imports","source":3717,"target":1669},{"edgeType":"contains","source":259,"target":1318},{"edgeType":"calls","source":5192,"target":1636},{"edgeType":"calls","source":3065,"target":979},{"edgeType":"contains","source":2901,"target":2918},{"edgeType":"calls","source":1314,"target":1354},{"edgeType":"contains","source":3329,"target":3391},{"edgeType":"calls","source":4054,"target":975},{"edgeType":"calls","source":5469,"target":447},{"edgeType":"calls","source":1858,"target":345},{"edgeType":"contains","source":523,"target":532},{"edgeType":"calls","source":3396,"target":1289},{"edgeType":"calls","source":5379,"target":2180},{"edgeType":"calls","source":1056,"target":895},{"edgeType":"calls","source":4210,"target":367},{"edgeType":"calls","source":2042,"target":983},{"edgeType":"contains","source":2505,"target":2511},{"edgeType":"calls","source":4494,"target":3189},{"edgeType":"contains","source":60,"target":86},{"edgeType":"calls","source":4721,"target":380},{"edgeType":"calls","source":802,"target":313},{"edgeType":"contains","source":2901,"target":2919},{"edgeType":"calls","source":3065,"target":980},{"edgeType":"calls","source":3093,"target":1169},{"edgeType":"calls","source":2114,"target":864},{"edgeType":"calls","source":3442,"target":920},{"edgeType":"imports","source":2948,"target":141},{"edgeType":"calls","source":4023,"target":975},{"edgeType":"calls","source":4756,"target":450},{"edgeType":"calls","source":1352,"target":269},{"edgeType":"contains","source":3644,"target":4699},{"edgeType":"calls","source":1990,"target":1632},{"edgeType":"contains","source":3591,"target":4228},{"edgeType":"contains","source":1606,"target":2340},{"edgeType":"calls","source":4125,"target":984},{"edgeType":"calls","source":4478,"target":3783},{"edgeType":"calls","source":779,"target":1119},{"edgeType":"calls","source":4473,"target":767},{"edgeType":"calls","source":2583,"target":1219},{"edgeType":"calls","source":1602,"target":975},{"edgeType":"imports","source":1988,"target":89},{"edgeType":"calls","source":4381,"target":448},{"edgeType":"calls","source":4973,"target":2180},{"edgeType":"calls","source":5242,"target":1240},{"edgeType":"calls","source":3507,"target":1115},{"edgeType":"contains","source":3644,"target":4700},{"edgeType":"calls","source":1861,"target":345},{"edgeType":"calls","source":5504,"target":1574},{"edgeType":"contains","source":4038,"target":4113},{"edgeType":"calls","source":5713,"target":380},{"edgeType":"calls","source":3595,"target":501},{"edgeType":"calls","source":4023,"target":976},{"edgeType":"contains","source":851,"target":1432},{"edgeType":"calls","source":3273,"target":971},{"edgeType":"calls","source":5523,"target":984},{"edgeType":"contains","source":1606,"target":2341},{"edgeType":"calls","source":4188,"target":89},{"edgeType":"contains","source":2569,"target":5257},{"edgeType":"calls","source":4756,"target":449},{"edgeType":"calls","source":1602,"target":974},{"edgeType":"calls","source":4381,"target":447},{"edgeType":"calls","source":4473,"target":766},{"edgeType":"contains","source":5260,"target":5340},{"edgeType":"calls","source":4399,"target":946},{"edgeType":"contains","source":1606,"target":2342},{"edgeType":"contains","source":337,"target":1510},{"edgeType":"contains","source":4006,"target":4047},{"edgeType":"calls","source":4125,"target":982},{"edgeType":"calls","source":3408,"target":1011},{"edgeType":"contains","source":1518,"target":1895},{"edgeType":"calls","source":4023,"target":973},{"edgeType":"calls","source":5523,"target":983},{"edgeType":"calls","source":1787,"target":1585},{"edgeType":"contains","source":1606,"target":2338},{"edgeType":"calls","source":3256,"target":3609},{"edgeType":"calls","source":4998,"target":345},{"edgeType":"calls","source":2934,"target":906},{"edgeType":"calls","source":4756,"target":448},{"edgeType":"contains","source":1827,"target":1830},{"edgeType":"contains","source":340,"target":363},{"edgeType":"calls","source":1486,"target":345},{"edgeType":"calls","source":4023,"target":972},{"edgeType":"calls","source":1602,"target":977},{"edgeType":"contains","source":73,"target":2297},{"edgeType":"calls","source":5523,"target":982},{"edgeType":"calls","source":4023,"target":974},{"edgeType":"calls","source":3965,"target":2772},{"edgeType":"contains","source":4356,"target":4822},{"edgeType":"contains","source":2829,"target":4594},{"edgeType":"calls","source":5620,"target":89},{"edgeType":"contains","source":1606,"target":2339},{"edgeType":"calls","source":4125,"target":983},{"edgeType":"calls","source":2913,"target":501},{"edgeType":"calls","source":4756,"target":447},{"edgeType":"calls","source":5244,"target":2232},{"edgeType":"contains","source":340,"target":362},{"edgeType":"contains","source":72,"target":3385},{"edgeType":"calls","source":1602,"target":976},{"edgeType":"imports","source":317,"target":93},{"edgeType":"calls","source":5523,"target":981},{"edgeType":"calls","source":4125,"target":980},{"edgeType":"calls","source":4231,"target":1922},{"edgeType":"calls","source":3408,"target":1009},{"edgeType":"calls","source":5044,"target":3145},{"edgeType":"calls","source":2947,"target":501},{"edgeType":"calls","source":3812,"target":1169},{"edgeType":"calls","source":5175,"target":142},{"edgeType":"calls","source":1602,"target":971},{"edgeType":"contains","source":340,"target":365},{"edgeType":"calls","source":3198,"target":120},{"edgeType":"contains","source":3378,"target":264},{"edgeType":"contains","source":5163,"target":5181},{"edgeType":"calls","source":4002,"target":564},{"edgeType":"calls","source":5621,"target":3228},{"edgeType":"calls","source":5714,"target":345},{"edgeType":"contains","source":3970,"target":4111},{"edgeType":"calls","source":3621,"target":1805},{"edgeType":"contains","source":1517,"target":2990},{"edgeType":"contains","source":1827,"target":1836},{"edgeType":"calls","source":4125,"target":981},{"edgeType":"calls","source":3408,"target":1010},{"edgeType":"contains","source":11,"target":3164},{"edgeType":"calls","source":3366,"target":3369},{"edgeType":"contains","source":3476,"target":3568},{"edgeType":"calls","source":5606,"target":1578},{"edgeType":"calls","source":4213,"target":367},{"edgeType":"calls","source":5526,"target":887},{"edgeType":"calls","source":5523,"target":980},{"edgeType":"contains","source":1189,"target":2588},{"edgeType":"contains","source":2838,"target":2207},{"edgeType":"calls","source":4498,"target":1044},{"edgeType":"calls","source":4479,"target":1633},{"edgeType":"calls","source":2991,"target":1253},{"edgeType":"calls","source":4493,"target":142},{"edgeType":"calls","source":3975,"target":345},{"edgeType":"calls","source":4343,"target":564},{"edgeType":"calls","source":2110,"target":2138},{"edgeType":"calls","source":4023,"target":971},{"edgeType":"contains","source":1814,"target":126},{"edgeType":"calls","source":5606,"target":1577},{"edgeType":"calls","source":2795,"target":983},{"edgeType":"contains","source":1517,"target":2987},{"edgeType":"calls","source":1253,"target":1222},{"edgeType":"calls","source":5526,"target":886},{"edgeType":"calls","source":5523,"target":979},{"edgeType":"imports","source":3374,"target":455},{"edgeType":"contains","source":785,"target":1371},{"edgeType":"calls","source":1602,"target":973},{"edgeType":"contains","source":340,"target":367},{"edgeType":"contains","source":4038,"target":4115},{"edgeType":"contains","source":4006,"target":4050},{"edgeType":"calls","source":1511,"target":1680},{"edgeType":"calls","source":4125,"target":977},{"edgeType":"calls","source":5606,"target":1576},{"edgeType":"calls","source":2795,"target":984},{"edgeType":"calls","source":4125,"target":979},{"edgeType":"calls","source":2024,"target":1632},{"edgeType":"calls","source":4219,"target":1236},{"edgeType":"calls","source":5523,"target":978},{"edgeType":"calls","source":3408,"target":1008},{"edgeType":"calls","source":986,"target":1042},{"edgeType":"calls","source":1602,"target":972},{"edgeType":"calls","source":4498,"target":1042},{"edgeType":"calls","source":396,"target":305},{"edgeType":"contains","source":340,"target":366},{"edgeType":"contains","source":4038,"target":4114},{"edgeType":"contains","source":3644,"target":4701},{"edgeType":"calls","source":4125,"target":978},{"edgeType":"calls","source":4004,"target":501},{"edgeType":"calls","source":2795,"target":981},{"edgeType":"calls","source":2812,"target":454},{"edgeType":"calls","source":5523,"target":977},{"edgeType":"contains","source":1989,"target":2103},{"edgeType":"calls","source":5640,"target":1578},{"edgeType":"contains","source":4237,"target":4294},{"edgeType":"calls","source":5250,"target":983},{"edgeType":"calls","source":5250,"target":984},{"edgeType":"imports","source":1043,"target":851},{"edgeType":"calls","source":3854,"target":920},{"edgeType":"calls","source":396,"target":300},{"edgeType":"calls","source":4710,"target":811},{"edgeType":"calls","source":4125,"target":975},{"edgeType":"calls","source":2795,"target":982},{"edgeType":"calls","source":5640,"target":1577},{"edgeType":"contains","source":4000,"target":4241},{"edgeType":"contains","source":4890,"target":5191},{"edgeType":"calls","source":5606,"target":1574},{"edgeType":"calls","source":5523,"target":976},{"edgeType":"calls","source":5250,"target":982},{"edgeType":"contains","source":340,"target":368},{"edgeType":"contains","source":5163,"target":5184},{"edgeType":"calls","source":5344,"target":1240},{"edgeType":"imports","source":3247,"target":1234},{"edgeType":"calls","source":1714,"target":1722},{"edgeType":"calls","source":2507,"target":2511},{"edgeType":"imports","source":1232,"target":278},{"edgeType":"calls","source":2224,"target":1771},{"edgeType":"calls","source":4125,"target":976},{"edgeType":"calls","source":5006,"target":89},{"edgeType":"calls","source":3599,"target":367},{"edgeType":"calls","source":5640,"target":1576},{"edgeType":"calls","source":2926,"target":89},{"edgeType":"contains","source":4038,"target":4119},{"edgeType":"contains","source":4890,"target":5190},{"edgeType":"calls","source":5606,"target":1573},{"edgeType":"calls","source":2812,"target":452},{"edgeType":"calls","source":2795,"target":979},{"edgeType":"imports","source":3999,"target":1164},{"edgeType":"calls","source":5523,"target":975},{"edgeType":"calls","source":5250,"target":981},{"edgeType":"calls","source":5183,"target":5172},{"edgeType":"contains","source":5163,"target":5183},{"edgeType":"imports","source":1238,"target":89},{"edgeType":"imports","source":3318,"target":89},{"edgeType":"calls","source":4125,"target":973},{"edgeType":"contains","source":1859,"target":1903},{"edgeType":"imports","source":1561,"target":1705},{"edgeType":"contains","source":1827,"target":1838},{"edgeType":"calls","source":5030,"target":2515},{"edgeType":"calls","source":5606,"target":1572},{"edgeType":"calls","source":2913,"target":1550},{"edgeType":"calls","source":2795,"target":980},{"edgeType":"calls","source":2812,"target":453},{"edgeType":"calls","source":5523,"target":974},{"edgeType":"calls","source":5558,"target":946},{"edgeType":"calls","source":5250,"target":980},{"edgeType":"calls","source":3305,"target":1026},{"edgeType":"calls","source":1054,"target":1044},{"edgeType":"calls","source":3227,"target":272},{"edgeType":"contains","source":3205,"target":345},{"edgeType":"calls","source":4125,"target":974},{"edgeType":"imports","source":4654,"target":2001},{"edgeType":"calls","source":4411,"target":564},{"edgeType":"contains","source":3644,"target":3648},{"edgeType":"calls","source":5760,"target":1025},{"edgeType":"calls","source":4876,"target":3060},{"edgeType":"calls","source":2812,"target":450},{"edgeType":"calls","source":2795,"target":977},{"edgeType":"calls","source":1322,"target":130},{"edgeType":"calls","source":5523,"target":973},{"edgeType":"calls","source":5250,"target":979},{"edgeType":"calls","source":5606,"target":1571},{"edgeType":"calls","source":5381,"target":89},{"edgeType":"contains","source":785,"target":1377},{"edgeType":"contains","source":3641,"target":4805},{"edgeType":"calls","source":4497,"target":1068},{"edgeType":"calls","source":4125,"target":971},{"edgeType":"calls","source":4585,"target":454},{"edgeType":"calls","source":806,"target":269},{"edgeType":"calls","source":2795,"target":978},{"edgeType":"calls","source":2812,"target":451},{"edgeType":"contains","source":1827,"target":1845},{"edgeType":"calls","source":3692,"target":1711},{"edgeType":"imports","source":1518,"target":920},{"edgeType":"calls","source":2885,"target":302},{"edgeType":"calls","source":5606,"target":1570},{"edgeType":"calls","source":5250,"target":978},{"edgeType":"calls","source":5640,"target":1573},{"edgeType":"calls","source":5523,"target":972},{"edgeType":"calls","source":2511,"target":269},{"edgeType":"contains","source":2910,"target":3154},{"edgeType":"imports","source":4286,"target":1784},{"edgeType":"calls","source":4125,"target":972},{"edgeType":"contains","source":1280,"target":1890},{"edgeType":"calls","source":4585,"target":453},{"edgeType":"calls","source":4418,"target":345},{"edgeType":"contains","source":4038,"target":4123},{"edgeType":"calls","source":4956,"target":4806},{"edgeType":"calls","source":4358,"target":89},{"edgeType":"contains","source":3970,"target":4117},{"edgeType":"calls","source":5250,"target":977},{"edgeType":"calls","source":1609,"target":1805},{"edgeType":"calls","source":5606,"target":1569},{"edgeType":"contains","source":317,"target":4260},{"edgeType":"calls","source":5640,"target":1572},{"edgeType":"calls","source":5657,"target":1045},{"edgeType":"calls","source":5475,"target":345},{"edgeType":"calls","source":3507,"target":1101},{"edgeType":"calls","source":5523,"target":971},{"edgeType":"calls","source":5393,"target":772},{"edgeType":"calls","source":3353,"target":589},{"edgeType":"calls","source":4772,"target":997},{"edgeType":"calls","source":4017,"target":89},{"edgeType":"contains","source":2983,"target":3002},{"edgeType":"calls","source":4799,"target":2274},{"edgeType":"calls","source":2795,"target":975},{"edgeType":"calls","source":2812,"target":448},{"edgeType":"calls","source":4585,"target":452},{"edgeType":"calls","source":2960,"target":89},{"edgeType":"calls","source":5765,"target":867},{"edgeType":"calls","source":5026,"target":521},{"edgeType":"contains","source":3999,"target":4274},{"edgeType":"calls","source":5628,"target":886},{"edgeType":"calls","source":5606,"target":1568},{"edgeType":"calls","source":5250,"target":976},{"edgeType":"calls","source":5364,"target":613},{"edgeType":"calls","source":5640,"target":1571},{"edgeType":"calls","source":5452,"target":1056},{"edgeType":"calls","source":3256,"target":3597},{"edgeType":"contains","source":5163,"target":5186},{"edgeType":"contains","source":2959,"target":1633},{"edgeType":"calls","source":4057,"target":964},{"edgeType":"calls","source":2795,"target":976},{"edgeType":"calls","source":2812,"target":449},{"edgeType":"calls","source":4856,"target":506},{"edgeType":"calls","source":4585,"target":451},{"edgeType":"calls","source":2420,"target":2031},{"edgeType":"calls","source":4359,"target":89},{"edgeType":"calls","source":2205,"target":269},{"edgeType":"calls","source":3154,"target":447},{"edgeType":"calls","source":5276,"target":1259},{"edgeType":"calls","source":5266,"target":1569},{"edgeType":"calls","source":3434,"target":1281},{"edgeType":"calls","source":5609,"target":450},{"edgeType":"calls","source":3347,"target":806},{"edgeType":"calls","source":1314,"target":406},{"edgeType":"contains","source":3591,"target":4212},{"edgeType":"contains","source":1517,"target":2969},{"edgeType":"calls","source":4876,"target":975},{"edgeType":"calls","source":4478,"target":3800},{"edgeType":"calls","source":5772,"target":3852},{"edgeType":"contains","source":3247,"target":3249},{"edgeType":"calls","source":4318,"target":302},{"edgeType":"calls","source":5072,"target":1240},{"edgeType":"calls","source":3154,"target":448},{"edgeType":"calls","source":5241,"target":3400},{"edgeType":"calls","source":5276,"target":1258},{"edgeType":"calls","source":5266,"target":1568},{"edgeType":"calls","source":5766,"target":867},{"edgeType":"contains","source":4006,"target":4030},{"edgeType":"calls","source":5609,"target":449},{"edgeType":"calls","source":5659,"target":1013},{"edgeType":"calls","source":477,"target":984},{"edgeType":"calls","source":5416,"target":89},{"edgeType":"imports","source":2886,"target":2887},{"edgeType":"contains","source":1606,"target":2325},{"edgeType":"contains","source":1517,"target":2970},{"edgeType":"calls","source":327,"target":349},{"edgeType":"calls","source":4876,"target":974},{"edgeType":"calls","source":4436,"target":1930},{"edgeType":"calls","source":5771,"target":3882},{"edgeType":"calls","source":747,"target":1073},{"edgeType":"calls","source":4412,"target":3729},{"edgeType":"calls","source":2995,"target":89},{"edgeType":"calls","source":5075,"target":89},{"edgeType":"calls","source":5276,"target":1257},{"edgeType":"calls","source":5232,"target":1564},{"edgeType":"calls","source":3935,"target":1603},{"edgeType":"calls","source":5609,"target":448},{"edgeType":"calls","source":5633,"target":2875},{"edgeType":"contains","source":1562,"target":1572},{"edgeType":"calls","source":1897,"target":305},{"edgeType":"contains","source":1518,"target":1879},{"edgeType":"calls","source":4039,"target":1550},{"edgeType":"calls","source":1118,"target":142},{"edgeType":"calls","source":3273,"target":984},{"edgeType":"calls","source":3264,"target":206},{"edgeType":"calls","source":4937,"target":2253},{"edgeType":"calls","source":2428,"target":754},{"edgeType":"calls","source":4876,"target":973},{"edgeType":"calls","source":994,"target":814},{"edgeType":"calls","source":4231,"target":2997},{"edgeType":"calls","source":5294,"target":2812},{"edgeType":"calls","source":5609,"target":447},{"edgeType":"imports","source":4103,"target":2161},{"edgeType":"contains","source":1562,"target":1573},{"edgeType":"imports","source":960,"target":1284},{"edgeType":"calls","source":3432,"target":284},{"edgeType":"calls","source":1314,"target":407},{"edgeType":"calls","source":3210,"target":2938},{"edgeType":"contains","source":3886,"target":349},{"edgeType":"imports","source":2948,"target":963},{"edgeType":"calls","source":3232,"target":142},{"edgeType":"contains","source":5194,"target":5253},{"edgeType":"calls","source":4876,"target":972},{"edgeType":"calls","source":1574,"target":799},{"edgeType":"contains","source":3204,"target":3528},{"edgeType":"calls","source":327,"target":345},{"edgeType":"calls","source":4366,"target":925},{"edgeType":"contains","source":5260,"target":5329},{"edgeType":"contains","source":4006,"target":4035},{"edgeType":"contains","source":1562,"target":1578},{"edgeType":"calls","source":5663,"target":886},{"edgeType":"calls","source":5590,"target":3149},{"edgeType":"contains","source":1606,"target":2328},{"edgeType":"imports","source":3994,"target":256},{"edgeType":"calls","source":1336,"target":777},{"edgeType":"calls","source":4100,"target":1771},{"edgeType":"calls","source":477,"target":981},{"edgeType":"calls","source":5427,"target":802},{"edgeType":"calls","source":3273,"target":982},{"edgeType":"calls","source":4886,"target":1718},{"edgeType":"calls","source":4876,"target":971},{"edgeType":"contains","source":3115,"target":3117},{"edgeType":"contains","source":5163,"target":5164},{"edgeType":"calls","source":5655,"target":4304},{"edgeType":"contains","source":1606,"target":2329},{"edgeType":"calls","source":5711,"target":454},{"edgeType":"contains","source":1562,"target":1579},{"edgeType":"contains","source":1517,"target":2974},{"edgeType":"calls","source":4027,"target":864},{"edgeType":"calls","source":1777,"target":847},{"edgeType":"calls","source":5773,"target":3817},{"edgeType":"imports","source":3811,"target":3816},{"edgeType":"calls","source":1336,"target":776},{"edgeType":"contains","source":118,"target":888},{"edgeType":"calls","source":3273,"target":983},{"edgeType":"calls","source":477,"target":980},{"edgeType":"calls","source":4973,"target":2191},{"edgeType":"calls","source":2988,"target":305},{"edgeType":"contains","source":3247,"target":79},{"edgeType":"contains","source":5194,"target":5259},{"edgeType":"calls","source":5203,"target":345},{"edgeType":"contains","source":960,"target":3329},{"edgeType":"contains","source":1606,"target":2326},{"edgeType":"calls","source":4323,"target":142},{"edgeType":"calls","source":5711,"target":453},{"edgeType":"calls","source":4022,"target":1016},{"edgeType":"calls","source":477,"target":983},{"edgeType":"contains","source":1562,"target":1576},{"edgeType":"calls","source":5711,"target":452},{"edgeType":"contains","source":1517,"target":2971},{"edgeType":"contains","source":4356,"target":4811},{"edgeType":"calls","source":2934,"target":919},{"edgeType":"calls","source":3273,"target":980},{"edgeType":"calls","source":4650,"target":1633},{"edgeType":"calls","source":811,"target":142},{"edgeType":"calls","source":4874,"target":3145},{"edgeType":"calls","source":4688,"target":453},{"edgeType":"calls","source":1897,"target":300},{"edgeType":"calls","source":1868,"target":142},{"edgeType":"calls","source":4816,"target":1771},{"edgeType":"contains","source":40,"target":1194},{"edgeType":"calls","source":477,"target":982},{"edgeType":"calls","source":3537,"target":1253},{"edgeType":"contains","source":1562,"target":1577},{"edgeType":"calls","source":5711,"target":451},{"edgeType":"contains","source":1517,"target":2972},{"edgeType":"calls","source":3273,"target":981},{"edgeType":"imports","source":3374,"target":437},{"edgeType":"calls","source":4688,"target":454},{"edgeType":"calls","source":5389,"target":920},{"edgeType":"calls","source":4688,"target":452},{"edgeType":"calls","source":4698,"target":142},{"edgeType":"contains","source":2983,"target":2984},{"edgeType":"contains","source":259,"target":750},{"edgeType":"calls","source":4688,"target":1509},{"edgeType":"imports","source":1232,"target":261},{"edgeType":"calls","source":1602,"target":984},{"edgeType":"contains","source":61,"target":3717},{"edgeType":"calls","source":4413,"target":521},{"edgeType":"calls","source":4023,"target":983},{"edgeType":"calls","source":4022,"target":1014},{"edgeType":"calls","source":3964,"target":2812},{"edgeType":"calls","source":477,"target":976},{"edgeType":"calls","source":4358,"target":1169},{"edgeType":"imports","source":1781,"target":3326},{"edgeType":"contains","source":3591,"target":4220},{"edgeType":"contains","source":1606,"target":2332},{"edgeType":"calls","source":2809,"target":564},{"edgeType":"imports","source":3999,"target":89},{"edgeType":"calls","source":2797,"target":3050},{"edgeType":"calls","source":5578,"target":345},{"edgeType":"calls","source":5711,"target":450},{"edgeType":"calls","source":1602,"target":983},{"edgeType":"calls","source":2968,"target":920},{"edgeType":"calls","source":2988,"target":300},{"edgeType":"calls","source":2934,"target":917},{"edgeType":"calls","source":3273,"target":978},{"edgeType":"calls","source":5217,"target":4136},{"edgeType":"calls","source":4688,"target":451},{"edgeType":"imports","source":1232,"target":262},{"edgeType":"calls","source":4023,"target":984},{"edgeType":"calls","source":477,"target":975},{"edgeType":"calls","source":5740,"target":1664},{"edgeType":"calls","source":5605,"target":564},{"edgeType":"contains","source":73,"target":2287},{"edgeType":"calls","source":5711,"target":449},{"edgeType":"calls","source":2934,"target":918},{"edgeType":"calls","source":1602,"target":982},{"edgeType":"contains","source":5114,"target":1401},{"edgeType":"calls","source":3379,"target":864},{"edgeType":"calls","source":3273,"target":979},{"edgeType":"contains","source":3115,"target":3118},{"edgeType":"contains","source":5163,"target":5167},{"edgeType":"calls","source":2443,"target":1337},{"edgeType":"calls","source":2511,"target":286},{"edgeType":"calls","source":1777,"target":846},{"edgeType":"calls","source":4688,"target":450},{"edgeType":"calls","source":477,"target":978},{"edgeType":"contains","source":1562,"target":1580},{"edgeType":"calls","source":4420,"target":302},{"edgeType":"calls","source":4023,"target":981},{"edgeType":"imports","source":1561,"target":1688},{"edgeType":"calls","source":2006,"target":89},{"edgeType":"contains","source":1606,"target":2330},{"edgeType":"calls","source":4381,"target":454},{"edgeType":"calls","source":2208,"target":1223},{"edgeType":"calls","source":5711,"target":448},{"edgeType":"calls","source":4947,"target":1935},{"edgeType":"calls","source":2934,"target":915},{"edgeType":"calls","source":3723,"target":767},{"edgeType":"calls","source":2770,"target":1771},{"edgeType":"calls","source":477,"target":979},{"edgeType":"calls","source":5129,"target":521},{"edgeType":"calls","source":5498,"target":2823},{"edgeType":"calls","source":5436,"target":1574},{"edgeType":"calls","source":5174,"target":1240},{"edgeType":"calls","source":3273,"target":976},{"edgeType":"calls","source":5239,"target":282},{"edgeType":"calls","source":4688,"target":449},{"edgeType":"calls","source":4582,"target":564},{"edgeType":"calls","source":2456,"target":935},{"edgeType":"calls","source":4708,"target":886},{"edgeType":"contains","source":3115,"target":3119},{"edgeType":"calls","source":477,"target":977},{"edgeType":"calls","source":4120,"target":89},{"edgeType":"contains","source":1517,"target":2976},{"edgeType":"calls","source":4023,"target":982},{"edgeType":"calls","source":2208,"target":1224},{"edgeType":"calls","source":4088,"target":3195},{"edgeType":"calls","source":4381,"target":453},{"edgeType":"calls","source":4367,"target":887},{"edgeType":"calls","source":5711,"target":447},{"edgeType":"imports","source":77,"target":126},{"edgeType":"calls","source":1225,"target":1044},{"edgeType":"calls","source":2934,"target":916},{"edgeType":"calls","source":5566,"target":1771},{"edgeType":"calls","source":3273,"target":977},{"edgeType":"calls","source":4688,"target":448},{"edgeType":"calls","source":3273,"target":974},{"edgeType":"calls","source":4059,"target":920},{"edgeType":"calls","source":1766,"target":1181},{"edgeType":"calls","source":4023,"target":979},{"edgeType":"calls","source":4756,"target":454},{"edgeType":"calls","source":4096,"target":4001},{"edgeType":"calls","source":4054,"target":3189},{"edgeType":"calls","source":4126,"target":4128},{"edgeType":"calls","source":477,"target":972},{"edgeType":"calls","source":4381,"target":452},{"edgeType":"calls","source":4367,"target":886},{"edgeType":"contains","source":2569,"target":5251},{"edgeType":"calls","source":5672,"target":598},{"edgeType":"imports","source":3969,"target":1023},{"edgeType":"contains","source":1827,"target":1828},{"edgeType":"calls","source":5424,"target":5115},{"edgeType":"calls","source":3813,"target":89},{"edgeType":"imports","source":3641,"target":2735},{"edgeType":"calls","source":1602,"target":979},{"edgeType":"calls","source":5258,"target":1805},{"edgeType":"calls","source":5449,"target":1169},{"edgeType":"calls","source":5271,"target":345},{"edgeType":"contains","source":4237,"target":4282},{"edgeType":"contains","source":1606,"target":2337},{"edgeType":"calls","source":4756,"target":453},{"edgeType":"calls","source":4639,"target":4080},{"edgeType":"calls","source":4688,"target":447},{"edgeType":"contains","source":869,"target":870},{"edgeType":"calls","source":4023,"target":980},{"edgeType":"calls","source":1956,"target":1632},{"edgeType":"contains","source":3476,"target":4617},{"edgeType":"calls","source":4876,"target":961},{"edgeType":"contains","source":3057,"target":2809},{"edgeType":"calls","source":4126,"target":4129},{"edgeType":"contains","source":5163,"target":5172},{"edgeType":"calls","source":4381,"target":451},{"edgeType":"calls","source":4424,"target":2289},{"edgeType":"calls","source":477,"target":971},{"edgeType":"calls","source":129,"target":132},{"edgeType":"calls","source":3694,"target":608},{"edgeType":"calls","source":3723,"target":766},{"edgeType":"calls","source":2939,"target":759},{"edgeType":"calls","source":2934,"target":914},{"edgeType":"calls","source":1602,"target":978},{"edgeType":"calls","source":3273,"target":975},{"edgeType":"calls","source":3273,"target":972},{"edgeType":"calls","source":4756,"target":452},{"edgeType":"calls","source":4002,"target":3742},{"edgeType":"calls","source":1765,"target":1214},{"edgeType":"calls","source":4023,"target":977},{"edgeType":"calls","source":4228,"target":964},{"edgeType":"calls","source":477,"target":974},{"edgeType":"calls","source":4538,"target":2982},{"edgeType":"calls","source":2536,"target":564},{"edgeType":"calls","source":4381,"target":450},{"edgeType":"calls","source":1602,"target":981},{"edgeType":"contains","source":42,"target":3255},{"edgeType":"calls","source":3431,"target":302},{"edgeType":"calls","source":4756,"target":451},{"edgeType":"calls","source":3273,"target":973},{"edgeType":"contains","source":1606,"target":2335},{"edgeType":"imports","source":1232,"target":256},{"edgeType":"calls","source":1766,"target":1182},{"edgeType":"calls","source":4023,"target":978},{"edgeType":"calls","source":1793,"target":345},{"edgeType":"calls","source":4126,"target":4127},{"edgeType":"calls","source":477,"target":973},{"edgeType":"calls","source":4381,"target":449},{"edgeType":"calls","source":2155,"target":749},{"edgeType":"calls","source":913,"target":142},{"edgeType":"calls","source":1602,"target":980},{"edgeType":"calls","source":3733,"target":1511},{"edgeType":"contains","source":898,"target":1000},{"edgeType":"contains","source":2829,"target":4562},{"edgeType":"calls","source":5471,"target":450},{"edgeType":"calls","source":5420,"target":974},{"edgeType":"calls","source":3377,"target":2998},{"edgeType":"calls","source":3436,"target":1169},{"edgeType":"calls","source":2054,"target":1729},{"edgeType":"contains","source":5194,"target":5240},{"edgeType":"calls","source":2689,"target":1071},{"edgeType":"calls","source":2317,"target":976},{"edgeType":"contains","source":1859,"target":1864},{"edgeType":"calls","source":327,"target":300},{"edgeType":"calls","source":5079,"target":975},{"edgeType":"calls","source":1726,"target":269},{"edgeType":"imports","source":108,"target":264},{"edgeType":"imports","source":3641,"target":2789},{"edgeType":"calls","source":1915,"target":1809},{"edgeType":"calls","source":5471,"target":449},{"edgeType":"calls","source":5537,"target":1574},{"edgeType":"calls","source":5420,"target":973},{"edgeType":"calls","source":3986,"target":1033},{"edgeType":"calls","source":1355,"target":142},{"edgeType":"calls","source":2772,"target":613},{"edgeType":"calls","source":2317,"target":977},{"edgeType":"calls","source":2954,"target":257},{"edgeType":"calls","source":2927,"target":1094},{"edgeType":"calls","source":5079,"target":974},{"edgeType":"calls","source":119,"target":405},{"edgeType":"calls","source":3907,"target":310},{"edgeType":"calls","source":5340,"target":282},{"edgeType":"contains","source":3741,"target":3773},{"edgeType":"contains","source":5724,"target":5725},{"edgeType":"calls","source":5619,"target":89},{"edgeType":"contains","source":4237,"target":4252},{"edgeType":"calls","source":5746,"target":380},{"edgeType":"calls","source":3599,"target":345},{"edgeType":"contains","source":3591,"target":4193},{"edgeType":"calls","source":5471,"target":448},{"edgeType":"calls","source":5420,"target":972},{"edgeType":"calls","source":2100,"target":305},{"edgeType":"calls","source":4571,"target":1922},{"edgeType":"calls","source":5079,"target":972},{"edgeType":"calls","source":137,"target":907},{"edgeType":"contains","source":1164,"target":2269},{"edgeType":"calls","source":5079,"target":973},{"edgeType":"calls","source":994,"target":766},{"edgeType":"calls","source":4302,"target":1805},{"edgeType":"calls","source":2317,"target":974},{"edgeType":"calls","source":5357,"target":811},{"edgeType":"calls","source":5713,"target":345},{"edgeType":"contains","source":5724,"target":5726},{"edgeType":"calls","source":5740,"target":565},{"edgeType":"calls","source":3589,"target":3823},{"edgeType":"calls","source":3907,"target":307},{"edgeType":"contains","source":3642,"target":3668},{"edgeType":"calls","source":5471,"target":447},{"edgeType":"contains","source":1606,"target":2306},{"edgeType":"calls","source":2038,"target":1169},{"edgeType":"calls","source":5420,"target":971},{"edgeType":"calls","source":5079,"target":971},{"edgeType":"calls","source":4930,"target":305},{"edgeType":"calls","source":2317,"target":975},{"edgeType":"calls","source":5215,"target":984},{"edgeType":"calls","source":4353,"target":4451},{"edgeType":"calls","source":4584,"target":461},{"edgeType":"calls","source":3916,"target":1086},{"edgeType":"contains","source":52,"target":3972},{"edgeType":"calls","source":3694,"target":3740},{"edgeType":"calls","source":5571,"target":1574},{"edgeType":"calls","source":1428,"target":1047},{"edgeType":"contains","source":4316,"target":2865},{"edgeType":"calls","source":3170,"target":3069},{"edgeType":"calls","source":5215,"target":983},{"edgeType":"calls","source":2317,"target":972},{"edgeType":"calls","source":5374,"target":282},{"edgeType":"calls","source":4353,"target":4450},{"edgeType":"calls","source":119,"target":402},{"edgeType":"calls","source":3649,"target":904},{"edgeType":"contains","source":3644,"target":4671},{"edgeType":"contains","source":3717,"target":1351},{"edgeType":"calls","source":5621,"target":3195},{"edgeType":"calls","source":3260,"target":1337},{"edgeType":"calls","source":892,"target":749},{"edgeType":"calls","source":1152,"target":89},{"edgeType":"calls","source":3810,"target":142},{"edgeType":"calls","source":5215,"target":982},{"edgeType":"calls","source":4455,"target":4458},{"edgeType":"calls","source":2317,"target":973},{"edgeType":"calls","source":4353,"target":4449},{"edgeType":"calls","source":4349,"target":345},{"edgeType":"calls","source":5747,"target":345},{"edgeType":"calls","source":1977,"target":1996},{"edgeType":"contains","source":3871,"target":1861},{"edgeType":"calls","source":4915,"target":767},{"edgeType":"calls","source":4231,"target":830},{"edgeType":"contains","source":40,"target":2235},{"edgeType":"calls","source":5393,"target":1805},{"edgeType":"calls","source":2896,"target":990},{"edgeType":"calls","source":5215,"target":980},{"edgeType":"calls","source":5239,"target":1294},{"edgeType":"calls","source":5249,"target":984},{"edgeType":"contains","source":3127,"target":4839},{"edgeType":"calls","source":5215,"target":981},{"edgeType":"calls","source":4353,"target":4448},{"edgeType":"calls","source":2436,"target":2566},{"edgeType":"calls","source":395,"target":304},{"edgeType":"calls","source":4376,"target":564},{"edgeType":"calls","source":4308,"target":3729},{"edgeType":"calls","source":3987,"target":4165},{"edgeType":"calls","source":4957,"target":521},{"edgeType":"calls","source":2100,"target":300},{"edgeType":"calls","source":4915,"target":766},{"edgeType":"contains","source":3477,"target":3502},{"edgeType":"imports","source":898,"target":81},{"edgeType":"calls","source":2980,"target":501},{"edgeType":"calls","source":5215,"target":979},{"edgeType":"calls","source":5239,"target":1292},{"edgeType":"calls","source":5249,"target":982},{"edgeType":"contains","source":851,"target":1405},{"edgeType":"calls","source":5173,"target":1224},{"edgeType":"calls","source":5239,"target":1293},{"edgeType":"calls","source":5249,"target":983},{"edgeType":"contains","source":1164,"target":1215},{"edgeType":"calls","source":5373,"target":310},{"edgeType":"calls","source":5343,"target":1240},{"edgeType":"calls","source":2317,"target":971},{"edgeType":"calls","source":2274,"target":2304},{"edgeType":"calls","source":4353,"target":4447},{"edgeType":"imports","source":74,"target":256},{"edgeType":"calls","source":3621,"target":1771},{"edgeType":"contains","source":3709,"target":3710},{"edgeType":"calls","source":1858,"target":2516},{"edgeType":"calls","source":1993,"target":445},{"edgeType":"calls","source":4901,"target":1199},{"edgeType":"calls","source":4930,"target":300},{"edgeType":"calls","source":5607,"target":454},{"edgeType":"calls","source":2795,"target":948},{"edgeType":"calls","source":5091,"target":594},{"edgeType":"calls","source":5173,"target":1223},{"edgeType":"calls","source":3266,"target":89},{"edgeType":"calls","source":5239,"target":1291},{"edgeType":"calls","source":5249,"target":981},{"edgeType":"calls","source":5215,"target":978},{"edgeType":"contains","source":2305,"target":1787},{"edgeType":"contains","source":72,"target":3359},{"edgeType":"calls","source":5697,"target":5063},{"edgeType":"calls","source":4353,"target":4446},{"edgeType":"calls","source":5607,"target":453},{"edgeType":"calls","source":4925,"target":454},{"edgeType":"calls","source":3696,"target":501},{"edgeType":"calls","source":5557,"target":946},{"edgeType":"calls","source":5065,"target":2456},{"edgeType":"calls","source":5449,"target":2180},{"edgeType":"calls","source":5239,"target":1290},{"edgeType":"calls","source":5249,"target":980},{"edgeType":"calls","source":5269,"target":360},{"edgeType":"calls","source":5215,"target":977},{"edgeType":"contains","source":331,"target":1671},{"edgeType":"calls","source":4590,"target":269},{"edgeType":"calls","source":1807,"target":920},{"edgeType":"calls","source":2015,"target":814},{"edgeType":"calls","source":2029,"target":380},{"edgeType":"contains","source":1859,"target":1873},{"edgeType":"contains","source":3204,"target":3516},{"edgeType":"calls","source":4353,"target":4445},{"edgeType":"contains","source":3644,"target":4674},{"edgeType":"calls","source":5668,"target":2789},{"edgeType":"calls","source":5689,"target":2138},{"edgeType":"calls","source":5721,"target":89},{"edgeType":"calls","source":5045,"target":961},{"edgeType":"calls","source":4925,"target":453},{"edgeType":"calls","source":5759,"target":1025},{"edgeType":"contains","source":1238,"target":5265},{"edgeType":"contains","source":52,"target":1867},{"edgeType":"calls","source":5215,"target":976},{"edgeType":"calls","source":5607,"target":452},{"edgeType":"calls","source":5239,"target":1289},{"edgeType":"calls","source":5249,"target":979},{"edgeType":"calls","source":5269,"target":359},{"edgeType":"calls","source":5276,"target":142},{"edgeType":"calls","source":5412,"target":2269},{"edgeType":"calls","source":3342,"target":1959},{"edgeType":"calls","source":5373,"target":307},{"edgeType":"calls","source":1713,"target":1723},{"edgeType":"calls","source":354,"target":514},{"edgeType":"calls","source":1644,"target":1748},{"edgeType":"calls","source":4353,"target":4444},{"edgeType":"contains","source":1781,"target":5345},{"edgeType":"calls","source":4498,"target":2063},{"edgeType":"contains","source":1606,"target":2314},{"edgeType":"calls","source":4254,"target":1169},{"edgeType":"calls","source":4950,"target":4962},{"edgeType":"contains","source":75,"target":96},{"edgeType":"calls","source":4925,"target":452},{"edgeType":"calls","source":5215,"target":975},{"edgeType":"calls","source":3400,"target":1219},{"edgeType":"calls","source":5249,"target":978},{"edgeType":"calls","source":5269,"target":358},{"edgeType":"calls","source":5607,"target":451},{"edgeType":"calls","source":3472,"target":1101},{"edgeType":"calls","source":5507,"target":380},{"edgeType":"contains","source":4006,"target":4020},{"edgeType":"calls","source":4282,"target":302},{"edgeType":"calls","source":2208,"target":2232},{"edgeType":"calls","source":4366,"target":867},{"edgeType":"calls","source":3715,"target":964},{"edgeType":"calls","source":5120,"target":1805},{"edgeType":"calls","source":2789,"target":2187},{"edgeType":"calls","source":4925,"target":451},{"edgeType":"contains","source":11,"target":2083},{"edgeType":"calls","source":5607,"target":450},{"edgeType":"calls","source":5525,"target":1935},{"edgeType":"calls","source":1314,"target":345},{"edgeType":"calls","source":5249,"target":977},{"edgeType":"calls","source":5269,"target":357},{"edgeType":"calls","source":5250,"target":946},{"edgeType":"calls","source":5215,"target":974},{"edgeType":"calls","source":5461,"target":1805},{"edgeType":"calls","source":5403,"target":1489},{"edgeType":"calls","source":3345,"target":806},{"edgeType":"contains","source":1562,"target":1570},{"edgeType":"calls","source":3189,"target":1414},{"edgeType":"calls","source":1105,"target":481},{"edgeType":"contains","source":3741,"target":3786},{"edgeType":"contains","source":2829,"target":4574},{"edgeType":"contains","source":5194,"target":5252},{"edgeType":"calls","source":2320,"target":1928},{"edgeType":"calls","source":2354,"target":874},{"edgeType":"contains","source":1988,"target":3163},{"edgeType":"calls","source":119,"target":392},{"edgeType":"calls","source":5249,"target":976},{"edgeType":"calls","source":5269,"target":356},{"edgeType":"calls","source":5607,"target":449},{"edgeType":"calls","source":3729,"target":3702},{"edgeType":"calls","source":5627,"target":886},{"edgeType":"contains","source":4237,"target":4264},{"edgeType":"calls","source":5082,"target":5096},{"edgeType":"calls","source":5215,"target":973},{"edgeType":"calls","source":5279,"target":2160},{"edgeType":"calls","source":5306,"target":266},{"edgeType":"contains","source":373,"target":374},{"edgeType":"calls","source":1531,"target":1016},{"edgeType":"contains","source":2981,"target":3034},{"edgeType":"calls","source":5391,"target":802},{"edgeType":"calls","source":5414,"target":89},{"edgeType":"contains","source":1562,"target":1571},{"edgeType":"contains","source":1517,"target":2966},{"edgeType":"contains","source":3826,"target":1150},{"edgeType":"calls","source":1156,"target":1013},{"edgeType":"calls","source":4925,"target":450},{"edgeType":"calls","source":2898,"target":920},{"edgeType":"contains","source":4038,"target":1976},{"edgeType":"calls","source":4205,"target":3742},{"edgeType":"calls","source":5082,"target":5095},{"edgeType":"calls","source":5215,"target":972},{"edgeType":"imports","source":1561,"target":1733},{"edgeType":"calls","source":5240,"target":2311},{"edgeType":"calls","source":5249,"target":975},{"edgeType":"calls","source":5269,"target":355},{"edgeType":"calls","source":5631,"target":2875},{"edgeType":"calls","source":5607,"target":448},{"edgeType":"calls","source":3579,"target":2007},{"edgeType":"calls","source":3634,"target":302},{"edgeType":"calls","source":3428,"target":345},{"edgeType":"calls","source":1996,"target":345},{"edgeType":"calls","source":4925,"target":449},{"edgeType":"contains","source":1859,"target":1874},{"edgeType":"contains","source":1562,"target":1568},{"edgeType":"calls","source":4491,"target":1219},{"edgeType":"contains","source":3477,"target":3512},{"edgeType":"calls","source":119,"target":394},{"edgeType":"calls","source":89,"target":267},{"edgeType":"calls","source":4470,"target":811},{"edgeType":"calls","source":5215,"target":971},{"edgeType":"contains","source":1859,"target":1875},{"edgeType":"calls","source":5191,"target":2772},{"edgeType":"calls","source":5249,"target":974},{"edgeType":"calls","source":1655,"target":345},{"edgeType":"calls","source":1609,"target":1771},{"edgeType":"calls","source":5607,"target":447},{"edgeType":"calls","source":1402,"target":789},{"edgeType":"contains","source":1605,"target":2350},{"edgeType":"calls","source":4811,"target":811},{"edgeType":"calls","source":4813,"target":749},{"edgeType":"calls","source":5445,"target":1240},{"edgeType":"calls","source":4925,"target":448},{"edgeType":"calls","source":4832,"target":2274},{"edgeType":"contains","source":1562,"target":1569},{"edgeType":"calls","source":2354,"target":873},{"edgeType":"calls","source":2504,"target":2565},{"edgeType":"calls","source":4464,"target":1029},{"edgeType":"calls","source":855,"target":861},{"edgeType":"calls","source":5250,"target":975},{"edgeType":"calls","source":5357,"target":829},{"edgeType":"contains","source":1,"target":3421},{"edgeType":"imports","source":2048,"target":1416},{"edgeType":"calls","source":5640,"target":1570},{"edgeType":"imports","source":3641,"target":2772},{"edgeType":"contains","source":1497,"target":2499},{"edgeType":"calls","source":4003,"target":521},{"edgeType":"contains","source":3477,"target":3485},{"edgeType":"calls","source":1301,"target":776},{"edgeType":"calls","source":4585,"target":450},{"edgeType":"calls","source":2795,"target":973},{"edgeType":"calls","source":4979,"target":920},{"edgeType":"contains","source":5062,"target":5087},{"edgeType":"calls","source":810,"target":142},{"edgeType":"calls","source":2208,"target":2258},{"edgeType":"calls","source":5250,"target":974},{"edgeType":"calls","source":5640,"target":1569},{"edgeType":"contains","source":3871,"target":2897},{"edgeType":"calls","source":1393,"target":1095},{"edgeType":"contains","source":1495,"target":1505},{"edgeType":"contains","source":72,"target":3333},{"edgeType":"contains","source":4326,"target":4648},{"edgeType":"calls","source":3227,"target":266},{"edgeType":"calls","source":2795,"target":974},{"edgeType":"calls","source":2812,"target":447},{"edgeType":"calls","source":4585,"target":449},{"edgeType":"contains","source":3477,"target":3484},{"edgeType":"contains","source":1189,"target":2535},{"edgeType":"contains","source":5062,"target":5086},{"edgeType":"calls","source":4571,"target":2997},{"edgeType":"calls","source":5073,"target":2232},{"edgeType":"contains","source":4006,"target":3996},{"edgeType":"calls","source":5250,"target":973},{"edgeType":"contains","source":4600,"target":4609},{"edgeType":"calls","source":119,"target":424},{"edgeType":"contains","source":280,"target":1117},{"edgeType":"calls","source":5589,"target":3149},{"edgeType":"calls","source":5640,"target":1568},{"edgeType":"contains","source":2517,"target":1531},{"edgeType":"imports","source":3811,"target":2789},{"edgeType":"calls","source":4013,"target":1266},{"edgeType":"contains","source":3642,"target":3653},{"edgeType":"contains","source":4326,"target":4647},{"edgeType":"contains","source":5062,"target":5085},{"edgeType":"contains","source":4356,"target":4774},{"edgeType":"contains","source":851,"target":1385},{"edgeType":"contains","source":3741,"target":3755},{"edgeType":"calls","source":4653,"target":454},{"edgeType":"calls","source":4585,"target":448},{"edgeType":"calls","source":465,"target":269},{"edgeType":"calls","source":2795,"target":971},{"edgeType":"calls","source":5189,"target":749},{"edgeType":"contains","source":2585,"target":2595},{"edgeType":"calls","source":5250,"target":972},{"edgeType":"calls","source":4413,"target":1550},{"edgeType":"contains","source":1781,"target":2150},{"edgeType":"calls","source":5654,"target":4304},{"edgeType":"calls","source":5772,"target":3817},{"edgeType":"contains","source":1497,"target":2498},{"edgeType":"contains","source":3741,"target":3754},{"edgeType":"calls","source":1301,"target":777},{"edgeType":"calls","source":3266,"target":1169},{"edgeType":"calls","source":4653,"target":453},{"edgeType":"calls","source":4585,"target":447},{"edgeType":"calls","source":5108,"target":89},{"edgeType":"contains","source":5165,"target":5062},{"edgeType":"calls","source":2795,"target":972},{"edgeType":"calls","source":4797,"target":2331},{"edgeType":"calls","source":5250,"target":971},{"edgeType":"calls","source":4426,"target":89},{"edgeType":"calls","source":3592,"target":1631},{"edgeType":"contains","source":2305,"target":1767},{"edgeType":"contains","source":291,"target":778},{"edgeType":"calls","source":5524,"target":5162},{"edgeType":"calls","source":2005,"target":89},{"edgeType":"contains","source":107,"target":1197},{"edgeType":"calls","source":5380,"target":1169},{"edgeType":"calls","source":753,"target":848},{"edgeType":"calls","source":4653,"target":452},{"edgeType":"contains","source":851,"target":1387},{"edgeType":"calls","source":920,"target":956},{"edgeType":"contains","source":3951,"target":1478},{"edgeType":"contains","source":1784,"target":2063},{"edgeType":"calls","source":4653,"target":450},{"edgeType":"calls","source":1857,"target":1505},{"edgeType":"contains","source":1,"target":253},{"edgeType":"contains","source":4237,"target":4240},{"edgeType":"contains","source":851,"target":1386},{"edgeType":"contains","source":3591,"target":4182},{"edgeType":"calls","source":3537,"target":1222},{"edgeType":"contains","source":3466,"target":1715},{"edgeType":"calls","source":5094,"target":521},{"edgeType":"calls","source":5309,"target":3369},{"edgeType":"calls","source":4653,"target":451},{"edgeType":"calls","source":4758,"target":367},{"edgeType":"calls","source":4885,"target":4886},{"edgeType":"calls","source":990,"target":902},{"edgeType":"calls","source":4653,"target":449},{"edgeType":"calls","source":2334,"target":1516},{"edgeType":"calls","source":395,"target":320},{"edgeType":"contains","source":5392,"target":5430},{"edgeType":"calls","source":4302,"target":3931},{"edgeType":"calls","source":5744,"target":5739},{"edgeType":"contains","source":42,"target":43},{"edgeType":"contains","source":4237,"target":4239},{"edgeType":"contains","source":3642,"target":3657},{"edgeType":"calls","source":1215,"target":269},{"edgeType":"calls","source":5706,"target":1631},{"edgeType":"calls","source":5420,"target":984},{"edgeType":"calls","source":5403,"target":454},{"edgeType":"contains","source":851,"target":1389},{"edgeType":"calls","source":5004,"target":2253},{"edgeType":"calls","source":3077,"target":1739},{"edgeType":"contains","source":5260,"target":5293},{"edgeType":"contains","source":5392,"target":5429},{"edgeType":"calls","source":4653,"target":448},{"edgeType":"imports","source":2305,"target":841},{"edgeType":"calls","source":3592,"target":1630},{"edgeType":"contains","source":1781,"target":5325},{"edgeType":"contains","source":75,"target":76},{"edgeType":"contains","source":11,"target":1003},{"edgeType":"calls","source":2043,"target":1026},{"edgeType":"calls","source":4880,"target":811},{"edgeType":"contains","source":4237,"target":4238},{"edgeType":"calls","source":4252,"target":1253},{"edgeType":"calls","source":5706,"target":1630},{"edgeType":"calls","source":3412,"target":867},{"edgeType":"calls","source":3592,"target":1629},{"edgeType":"calls","source":5604,"target":564},{"edgeType":"calls","source":5469,"target":521},{"edgeType":"calls","source":4801,"target":89},{"edgeType":"calls","source":5420,"target":983},{"edgeType":"calls","source":5403,"target":453},{"edgeType":"contains","source":851,"target":1388},{"edgeType":"contains","source":5062,"target":5088},{"edgeType":"calls","source":5079,"target":984},{"edgeType":"contains","source":5194,"target":5232},{"edgeType":"contains","source":3204,"target":3499},{"edgeType":"calls","source":4653,"target":447},{"edgeType":"calls","source":2317,"target":984},{"edgeType":"contains","source":1606,"target":2299},{"edgeType":"contains","source":3642,"target":3663},{"edgeType":"calls","source":4849,"target":1771},{"edgeType":"contains","source":4006,"target":4007},{"edgeType":"calls","source":5497,"target":2823},{"edgeType":"calls","source":5706,"target":1629},{"edgeType":"calls","source":5435,"target":1574},{"edgeType":"calls","source":5420,"target":982},{"edgeType":"calls","source":5403,"target":452},{"edgeType":"calls","source":5079,"target":983},{"edgeType":"calls","source":4491,"target":4411},{"edgeType":"calls","source":395,"target":313},{"edgeType":"contains","source":1518,"target":1857},{"edgeType":"calls","source":4024,"target":920},{"edgeType":"calls","source":4302,"target":3928},{"edgeType":"calls","source":137,"target":912},{"edgeType":"calls","source":4366,"target":887},{"edgeType":"contains","source":1,"target":258},{"edgeType":"calls","source":3669,"target":1354},{"edgeType":"calls","source":1215,"target":262},{"edgeType":"calls","source":5420,"target":981},{"edgeType":"calls","source":5079,"target":982},{"edgeType":"calls","source":5403,"target":451},{"edgeType":"contains","source":851,"target":1390},{"edgeType":"calls","source":4826,"target":367},{"edgeType":"contains","source":5392,"target":5434},{"edgeType":"calls","source":4366,"target":886},{"edgeType":"calls","source":4230,"target":1930},{"edgeType":"calls","source":2317,"target":982},{"edgeType":"calls","source":2809,"target":1586},{"edgeType":"contains","source":4105,"target":4107},{"edgeType":"imports","source":3969,"target":2111},{"edgeType":"calls","source":3812,"target":89},{"edgeType":"calls","source":5120,"target":767},{"edgeType":"calls","source":5079,"target":981},{"edgeType":"calls","source":5420,"target":980},{"edgeType":"calls","source":5403,"target":450},{"edgeType":"calls","source":1063,"target":749},{"edgeType":"calls","source":395,"target":315},{"edgeType":"calls","source":3771,"target":305},{"edgeType":"imports","source":1238,"target":1164},{"edgeType":"calls","source":2317,"target":983},{"edgeType":"contains","source":4000,"target":4189},{"edgeType":"calls","source":4193,"target":964},{"edgeType":"contains","source":1606,"target":2298},{"edgeType":"calls","source":4453,"target":302},{"edgeType":"calls","source":4231,"target":4013},{"edgeType":"contains","source":3476,"target":3521},{"edgeType":"calls","source":5079,"target":980},{"edgeType":"calls","source":4929,"target":345},{"edgeType":"calls","source":4762,"target":3408},{"edgeType":"calls","source":5551,"target":89},{"edgeType":"calls","source":3096,"target":89},{"edgeType":"calls","source":5120,"target":766},{"edgeType":"calls","source":5423,"target":886},{"edgeType":"calls","source":5420,"target":979},{"edgeType":"calls","source":5403,"target":449},{"edgeType":"calls","source":5403,"target":448},{"edgeType":"calls","source":3232,"target":3269},{"edgeType":"contains","source":2829,"target":4558},{"edgeType":"contains","source":3476,"target":4585},{"edgeType":"calls","source":4869,"target":89},{"edgeType":"calls","source":2284,"target":946},{"edgeType":"calls","source":2317,"target":980},{"edgeType":"calls","source":5079,"target":979},{"edgeType":"calls","source":2851,"target":282},{"edgeType":"contains","source":1781,"target":5335},{"edgeType":"calls","source":920,"target":948},{"edgeType":"calls","source":1485,"target":345},{"edgeType":"calls","source":5471,"target":454},{"edgeType":"calls","source":5420,"target":978},{"edgeType":"calls","source":5420,"target":977},{"edgeType":"calls","source":5403,"target":447},{"edgeType":"calls","source":3987,"target":2063},{"edgeType":"contains","source":4997,"target":5000},{"edgeType":"calls","source":3889,"target":1930},{"edgeType":"calls","source":4861,"target":1393},{"edgeType":"contains","source":1165,"target":1174},{"edgeType":"calls","source":395,"target":309},{"edgeType":"calls","source":2317,"target":981},{"edgeType":"calls","source":2858,"target":2180},{"edgeType":"calls","source":5079,"target":978},{"edgeType":"calls","source":5770,"target":3868},{"edgeType":"calls","source":994,"target":767},{"edgeType":"calls","source":5604,"target":3729},{"edgeType":"calls","source":5471,"target":453},{"edgeType":"calls","source":3472,"target":1115},{"edgeType":"calls","source":5471,"target":452},{"edgeType":"calls","source":5420,"target":976},{"edgeType":"contains","source":52,"target":3969},{"edgeType":"calls","source":4672,"target":4080},{"edgeType":"calls","source":3986,"target":3148},{"edgeType":"calls","source":2015,"target":830},{"edgeType":"calls","source":2432,"target":1641},{"edgeType":"calls","source":4622,"target":345},{"edgeType":"calls","source":2588,"target":1033},{"edgeType":"calls","source":5079,"target":977},{"edgeType":"calls","source":2956,"target":1253},{"edgeType":"calls","source":2317,"target":978},{"edgeType":"contains","source":1781,"target":5333},{"edgeType":"calls","source":2870,"target":1805},{"edgeType":"calls","source":3000,"target":946},{"edgeType":"calls","source":4963,"target":345},{"edgeType":"calls","source":5503,"target":1574},{"edgeType":"calls","source":1215,"target":261},{"edgeType":"contains","source":4326,"target":4659},{"edgeType":"calls","source":1343,"target":521},{"edgeType":"calls","source":5471,"target":451},{"edgeType":"calls","source":2572,"target":2587},{"edgeType":"calls","source":5420,"target":975},{"edgeType":"contains","source":4997,"target":4998},{"edgeType":"calls","source":2317,"target":979},{"edgeType":"calls","source":327,"target":305},{"edgeType":"contains","source":3591,"target":4188},{"edgeType":"contains","source":1781,"target":5334},{"edgeType":"calls","source":5079,"target":976},{"edgeType":"calls","source":3036,"target":3002},{"edgeType":"calls","source":3771,"target":300},{"edgeType":"calls","source":3343,"target":2998},{"edgeType":"calls","source":3402,"target":1169},{"edgeType":"calls","source":3516,"target":806},{"edgeType":"calls","source":5679,"target":345},{"edgeType":"calls","source":1917,"target":790},{"edgeType":"calls","source":5389,"target":977},{"edgeType":"calls","source":4756,"target":1573},{"edgeType":"calls","source":4098,"target":830},{"edgeType":"calls","source":4059,"target":982},{"edgeType":"calls","source":4052,"target":142},{"edgeType":"calls","source":2426,"target":867},{"edgeType":"contains","source":3438,"target":3620},{"edgeType":"calls","source":4932,"target":345},{"edgeType":"contains","source":5194,"target":5207},{"edgeType":"calls","source":4369,"target":886},{"edgeType":"calls","source":5643,"target":3673},{"edgeType":"calls","source":5162,"target":615},{"edgeType":"calls","source":4935,"target":3424},{"edgeType":"calls","source":2968,"target":978},{"edgeType":"calls","source":1371,"target":803},{"edgeType":"contains","source":3871,"target":2882},{"edgeType":"calls","source":1661,"target":269},{"edgeType":"calls","source":5696,"target":973},{"edgeType":"calls","source":5342,"target":320},{"edgeType":"calls","source":5372,"target":447},{"edgeType":"contains","source":2120,"target":2196},{"edgeType":"calls","source":1525,"target":1314},{"edgeType":"calls","source":4708,"target":2003},{"edgeType":"calls","source":5325,"target":5074},{"edgeType":"imports","source":2305,"target":897},{"edgeType":"calls","source":5426,"target":886},{"edgeType":"calls","source":4756,"target":1572},{"edgeType":"calls","source":5389,"target":976},{"edgeType":"calls","source":4824,"target":521},{"edgeType":"calls","source":4059,"target":983},{"edgeType":"calls","source":4053,"target":1169},{"edgeType":"contains","source":841,"target":1676},{"edgeType":"calls","source":2069,"target":305},{"edgeType":"contains","source":1117,"target":519},{"edgeType":"calls","source":4218,"target":282},{"edgeType":"contains","source":5260,"target":5274},{"edgeType":"imports","source":1331,"target":437},{"edgeType":"calls","source":3712,"target":1169},{"edgeType":"calls","source":2169,"target":1436},{"edgeType":"calls","source":2968,"target":979},{"edgeType":"calls","source":4956,"target":2772},{"edgeType":"contains","source":40,"target":2195},{"edgeType":"contains","source":76,"target":1079},{"edgeType":"calls","source":5696,"target":972},{"edgeType":"contains","source":2120,"target":2197},{"edgeType":"calls","source":4059,"target":980},{"edgeType":"calls","source":4756,"target":1571},{"edgeType":"contains","source":841,"target":1679},{"edgeType":"contains","source":5114,"target":1343},{"edgeType":"calls","source":5389,"target":975},{"edgeType":"contains","source":2849,"target":2850},{"edgeType":"calls","source":2425,"target":896},{"edgeType":"contains","source":3438,"target":3618},{"edgeType":"contains","source":1518,"target":1829},{"edgeType":"calls","source":4772,"target":3189},{"edgeType":"calls","source":2968,"target":976},{"edgeType":"contains","source":2120,"target":2194},{"edgeType":"calls","source":3568,"target":345},{"edgeType":"calls","source":1219,"target":1289},{"edgeType":"calls","source":1371,"target":805},{"edgeType":"calls","source":5696,"target":971},{"edgeType":"contains","source":1588,"target":1774},{"edgeType":"contains","source":841,"target":1678},{"edgeType":"calls","source":4756,"target":1570},{"edgeType":"calls","source":1817,"target":1777},{"edgeType":"imports","source":3056,"target":869},{"edgeType":"calls","source":5389,"target":974},{"edgeType":"imports","source":1781,"target":1283},{"edgeType":"calls","source":4059,"target":981},{"edgeType":"calls","source":4250,"target":345},{"edgeType":"calls","source":2410,"target":305},{"edgeType":"calls","source":2772,"target":2824},{"edgeType":"calls","source":2511,"target":345},{"edgeType":"imports","source":3385,"target":1240},{"edgeType":"calls","source":2968,"target":977},{"edgeType":"calls","source":5726,"target":5325},{"edgeType":"calls","source":2989,"target":1383},{"edgeType":"calls","source":1371,"target":804},{"edgeType":"calls","source":5307,"target":345},{"edgeType":"imports","source":108,"target":296},{"edgeType":"calls","source":3774,"target":302},{"edgeType":"calls","source":3570,"target":284},{"edgeType":"contains","source":2120,"target":2200},{"edgeType":"calls","source":4059,"target":978},{"edgeType":"calls","source":5453,"target":2160},{"edgeType":"calls","source":2047,"target":984},{"edgeType":"contains","source":3591,"target":4166},{"edgeType":"calls","source":5389,"target":973},{"edgeType":"calls","source":2968,"target":973},{"edgeType":"calls","source":4756,"target":1569},{"edgeType":"contains","source":5260,"target":5279},{"edgeType":"calls","source":2968,"target":974},{"edgeType":"calls","source":2425,"target":894},{"edgeType":"calls","source":2444,"target":305},{"edgeType":"calls","source":3039,"target":3001},{"edgeType":"calls","source":5199,"target":1578},{"edgeType":"calls","source":5244,"target":1240},{"edgeType":"calls","source":5715,"target":380},{"edgeType":"contains","source":2247,"target":4605},{"edgeType":"contains","source":1693,"target":1696},{"edgeType":"imports","source":108,"target":293},{"edgeType":"calls","source":3786,"target":984},{"edgeType":"calls","source":4059,"target":979},{"edgeType":"calls","source":2047,"target":983},{"edgeType":"calls","source":5389,"target":972},{"edgeType":"calls","source":3181,"target":1771},{"edgeType":"contains","source":5062,"target":5074},{"edgeType":"calls","source":2425,"target":895},{"edgeType":"calls","source":4756,"target":1568},{"edgeType":"contains","source":2829,"target":4534},{"edgeType":"calls","source":4866,"target":272},{"edgeType":"calls","source":2968,"target":975},{"edgeType":"calls","source":5199,"target":1577},{"edgeType":"calls","source":5342,"target":315},{"edgeType":"contains","source":2247,"target":4606},{"edgeType":"calls","source":3570,"target":282},{"edgeType":"imports","source":108,"target":294},{"edgeType":"imports","source":3057,"target":2949},{"edgeType":"contains","source":2188,"target":2204},{"edgeType":"contains","source":2849,"target":2854},{"edgeType":"calls","source":4120,"target":142},{"edgeType":"contains","source":54,"target":2825},{"edgeType":"imports","source":4103,"target":2247},{"edgeType":"contains","source":3438,"target":3622},{"edgeType":"contains","source":1606,"target":2276},{"edgeType":"calls","source":5389,"target":971},{"edgeType":"calls","source":5132,"target":481},{"edgeType":"calls","source":4930,"target":2515},{"edgeType":"calls","source":2968,"target":971},{"edgeType":"calls","source":2907,"target":1805},{"edgeType":"calls","source":5199,"target":1576},{"edgeType":"calls","source":3786,"target":982},{"edgeType":"calls","source":5281,"target":2205},{"edgeType":"calls","source":2410,"target":300},{"edgeType":"calls","source":3934,"target":2736},{"edgeType":"calls","source":4059,"target":975},{"edgeType":"calls","source":4756,"target":4737},{"edgeType":"contains","source":28,"target":2573},{"edgeType":"calls","source":4059,"target":977},{"edgeType":"contains","source":3476,"target":3500},{"edgeType":"contains","source":1606,"target":2277},{"edgeType":"calls","source":2968,"target":972},{"edgeType":"calls","source":806,"target":345},{"edgeType":"calls","source":793,"target":748},{"edgeType":"calls","source":4502,"target":984},{"edgeType":"imports","source":2769,"target":1305},{"edgeType":"calls","source":3786,"target":983},{"edgeType":"contains","source":5392,"target":5412},{"edgeType":"contains","source":317,"target":1013},{"edgeType":"imports","source":3969,"target":1117},{"edgeType":"calls","source":5342,"target":313},{"edgeType":"contains","source":2517,"target":3633},{"edgeType":"calls","source":2273,"target":1377},{"edgeType":"calls","source":1456,"target":279},{"edgeType":"contains","source":3741,"target":3742},{"edgeType":"contains","source":1606,"target":2278},{"edgeType":"calls","source":3556,"target":1771},{"edgeType":"calls","source":4059,"target":976},{"edgeType":"contains","source":2120,"target":2199},{"edgeType":"calls","source":3889,"target":961},{"edgeType":"calls","source":3400,"target":3433},{"edgeType":"calls","source":2765,"target":920},{"edgeType":"calls","source":5716,"target":345},{"edgeType":"contains","source":2188,"target":2210},{"edgeType":"contains","source":4326,"target":4640},{"edgeType":"calls","source":3786,"target":980},{"edgeType":"calls","source":1661,"target":261},{"edgeType":"calls","source":4502,"target":983},{"edgeType":"calls","source":501,"target":282},{"edgeType":"calls","source":4305,"target":1805},{"edgeType":"calls","source":2005,"target":1224},{"edgeType":"calls","source":3955,"target":1026},{"edgeType":"calls","source":2029,"target":1537},{"edgeType":"calls","source":2047,"target":979},{"edgeType":"calls","source":4059,"target":973},{"edgeType":"calls","source":5608,"target":1578},{"edgeType":"calls","source":2812,"target":521},{"edgeType":"contains","source":3438,"target":3627},{"edgeType":"calls","source":5694,"target":1026},{"edgeType":"calls","source":5662,"target":961},{"edgeType":"calls","source":3273,"target":1029},{"edgeType":"calls","source":3206,"target":3106},{"edgeType":"calls","source":1215,"target":345},{"edgeType":"calls","source":5362,"target":1805},{"edgeType":"calls","source":5199,"target":1572},{"edgeType":"contains","source":4600,"target":4602},{"edgeType":"calls","source":5199,"target":1573},{"edgeType":"calls","source":3786,"target":981},{"edgeType":"calls","source":5375,"target":345},{"edgeType":"calls","source":4502,"target":982},{"edgeType":"calls","source":2005,"target":1223},{"edgeType":"calls","source":2047,"target":978},{"edgeType":"calls","source":4059,"target":974},{"edgeType":"calls","source":3987,"target":1092},{"edgeType":"calls","source":2047,"target":982},{"edgeType":"calls","source":2069,"target":300},{"edgeType":"contains","source":38,"target":154},{"edgeType":"calls","source":5624,"target":3195},{"edgeType":"calls","source":3649,"target":997},{"edgeType":"calls","source":5608,"target":1577},{"edgeType":"contains","source":438,"target":439},{"edgeType":"calls","source":4825,"target":481},{"edgeType":"calls","source":5199,"target":1571},{"edgeType":"calls","source":2436,"target":1604},{"edgeType":"calls","source":296,"target":297},{"edgeType":"contains","source":259,"target":1759},{"edgeType":"calls","source":4502,"target":981},{"edgeType":"calls","source":3786,"target":978},{"edgeType":"calls","source":4536,"target":984},{"edgeType":"calls","source":2567,"target":1771},{"edgeType":"contains","source":2247,"target":4607},{"edgeType":"calls","source":4059,"target":971},{"edgeType":"calls","source":2289,"target":1933},{"edgeType":"contains","source":1867,"target":1589},{"edgeType":"calls","source":4226,"target":3195},{"edgeType":"calls","source":4100,"target":3928},{"edgeType":"calls","source":4189,"target":1169},{"edgeType":"calls","source":2047,"target":981},{"edgeType":"calls","source":2764,"target":2007},{"edgeType":"contains","source":2120,"target":2203},{"edgeType":"calls","source":5608,"target":1576},{"edgeType":"imports","source":898,"target":126},{"edgeType":"calls","source":2954,"target":345},{"edgeType":"calls","source":5199,"target":1570},{"edgeType":"calls","source":5257,"target":829},{"edgeType":"calls","source":5342,"target":309},{"edgeType":"calls","source":2444,"target":300},{"edgeType":"calls","source":3917,"target":89},{"edgeType":"calls","source":4502,"target":980},{"edgeType":"calls","source":3786,"target":979},{"edgeType":"calls","source":1661,"target":262},{"edgeType":"calls","source":4536,"target":983},{"edgeType":"calls","source":4059,"target":972},{"edgeType":"calls","source":3968,"target":2736},{"edgeType":"calls","source":1897,"target":345},{"edgeType":"calls","source":4398,"target":1033},{"edgeType":"calls","source":2047,"target":980},{"edgeType":"calls","source":5022,"target":1771},{"edgeType":"contains","source":1906,"target":2500},{"edgeType":"contains","source":438,"target":441},{"edgeType":"calls","source":5349,"target":2205},{"edgeType":"calls","source":5199,"target":1569},{"edgeType":"contains","source":2247,"target":4613},{"edgeType":"contains","source":1588,"target":1788},{"edgeType":"calls","source":1056,"target":1042},{"edgeType":"calls","source":4534,"target":1044},{"edgeType":"calls","source":4536,"target":982},{"edgeType":"calls","source":1797,"target":269},{"edgeType":"calls","source":3786,"target":976},{"edgeType":"calls","source":4311,"target":3729},{"edgeType":"calls","source":2047,"target":975},{"edgeType":"calls","source":4502,"target":979},{"edgeType":"contains","source":3466,"target":1708},{"edgeType":"contains","source":3378,"target":3379},{"edgeType":"calls","source":2251,"target":995},{"edgeType":"calls","source":2894,"target":89},{"edgeType":"calls","source":5608,"target":1574},{"edgeType":"contains","source":1906,"target":2501},{"edgeType":"calls","source":887,"target":995},{"edgeType":"contains","source":438,"target":440},{"edgeType":"calls","source":5199,"target":1568},{"edgeType":"calls","source":1219,"target":1274},{"edgeType":"imports","source":898,"target":124},{"edgeType":"contains","source":2247,"target":4615},{"edgeType":"calls","source":3235,"target":89},{"edgeType":"contains","source":2247,"target":4614},{"edgeType":"calls","source":5346,"target":1240},{"edgeType":"contains","source":3642,"target":3650},{"edgeType":"calls","source":1965,"target":345},{"edgeType":"calls","source":3694,"target":3829},{"edgeType":"calls","source":3786,"target":977},{"edgeType":"calls","source":2047,"target":974},{"edgeType":"calls","source":4502,"target":978},{"edgeType":"calls","source":4536,"target":981},{"edgeType":"contains","source":3477,"target":3480},{"edgeType":"contains","source":2120,"target":2206},{"edgeType":"calls","source":3786,"target":974},{"edgeType":"contains","source":2849,"target":2862},{"edgeType":"calls","source":5608,"target":1573},{"edgeType":"contains","source":4326,"target":4642},{"edgeType":"calls","source":5276,"target":1294},{"edgeType":"calls","source":1193,"target":1026},{"edgeType":"contains","source":2585,"target":2590},{"edgeType":"contains","source":5194,"target":5217},{"edgeType":"contains","source":959,"target":3318},{"edgeType":"imports","source":4654,"target":1013},{"edgeType":"calls","source":4502,"target":977},{"edgeType":"calls","source":4536,"target":980},{"edgeType":"calls","source":1964,"target":1436},{"edgeType":"calls","source":2047,"target":977},{"edgeType":"contains","source":5392,"target":5421},{"edgeType":"contains","source":2569,"target":5201},{"edgeType":"calls","source":3786,"target":975},{"edgeType":"calls","source":5276,"target":1293},{"edgeType":"calls","source":5608,"target":1572},{"edgeType":"calls","source":5342,"target":304},{"edgeType":"calls","source":3389,"target":598},{"edgeType":"contains","source":438,"target":442},{"edgeType":"calls","source":5443,"target":345},{"edgeType":"calls","source":5430,"target":1805},{"edgeType":"contains","source":2374,"target":1732},{"edgeType":"calls","source":5411,"target":279},{"edgeType":"contains","source":52,"target":3951},{"edgeType":"contains","source":5062,"target":5080},{"edgeType":"calls","source":4502,"target":976},{"edgeType":"calls","source":2002,"target":257},{"edgeType":"calls","source":4536,"target":979},{"edgeType":"imports","source":3811,"target":1779},{"edgeType":"calls","source":2047,"target":976},{"edgeType":"imports","source":1988,"target":156},{"edgeType":"imports","source":4103,"target":2240},{"edgeType":"calls","source":5701,"target":835},{"edgeType":"contains","source":5392,"target":5395},{"edgeType":"imports","source":2740,"target":81},{"edgeType":"calls","source":2834,"target":920},{"edgeType":"calls","source":3855,"target":980},{"edgeType":"calls","source":5611,"target":454},{"edgeType":"calls","source":3787,"target":974},{"edgeType":"contains","source":40,"target":2179},{"edgeType":"contains","source":56,"target":2740},{"edgeType":"contains","source":4953,"target":5262},{"edgeType":"calls","source":3945,"target":304},{"edgeType":"calls","source":1132,"target":829},{"edgeType":"calls","source":3883,"target":1169},{"edgeType":"calls","source":2037,"target":257},{"edgeType":"calls","source":4026,"target":964},{"edgeType":"calls","source":4520,"target":450},{"edgeType":"calls","source":4196,"target":979},{"edgeType":"calls","source":4120,"target":3335},{"edgeType":"calls","source":4876,"target":1041},{"edgeType":"contains","source":3476,"target":3483},{"edgeType":"calls","source":397,"target":360},{"edgeType":"calls","source":4374,"target":1805},{"edgeType":"calls","source":4295,"target":3195},{"edgeType":"calls","source":5057,"target":1771},{"edgeType":"imports","source":3374,"target":510},{"edgeType":"contains","source":2517,"target":3615},{"edgeType":"calls","source":4328,"target":1115},{"edgeType":"contains","source":3811,"target":5781},{"edgeType":"calls","source":5611,"target":453},{"edgeType":"contains","source":3814,"target":4631},{"edgeType":"calls","source":3787,"target":975},{"edgeType":"calls","source":5281,"target":1169},{"edgeType":"contains","source":2247,"target":4586},{"edgeType":"imports","source":74,"target":278},{"edgeType":"imports","source":96,"target":1710},{"edgeType":"calls","source":5411,"target":310},{"edgeType":"contains","source":1606,"target":2259},{"edgeType":"calls","source":4033,"target":1805},{"edgeType":"calls","source":3855,"target":981},{"edgeType":"calls","source":4759,"target":4667},{"edgeType":"calls","source":4196,"target":980},{"edgeType":"calls","source":4229,"target":1014},{"edgeType":"calls","source":397,"target":359},{"edgeType":"calls","source":4520,"target":449},{"edgeType":"calls","source":4364,"target":2112},{"edgeType":"contains","source":4000,"target":4149},{"edgeType":"calls","source":3734,"target":501},{"edgeType":"contains","source":5392,"target":5393},{"edgeType":"calls","source":2274,"target":2422},{"edgeType":"calls","source":920,"target":1061},{"edgeType":"contains","source":3811,"target":5780},{"edgeType":"calls","source":4988,"target":4966},{"edgeType":"contains","source":317,"target":994},{"edgeType":"calls","source":3855,"target":978},{"edgeType":"calls","source":5384,"target":89},{"edgeType":"contains","source":2517,"target":3612},{"edgeType":"calls","source":3787,"target":972},{"edgeType":"calls","source":5701,"target":833},{"edgeType":"calls","source":5459,"target":4107},{"edgeType":"calls","source":5611,"target":452},{"edgeType":"contains","source":899,"target":921},{"edgeType":"contains","source":3591,"target":4144},{"edgeType":"calls","source":5288,"target":5179},{"edgeType":"contains","source":1606,"target":2256},{"edgeType":"calls","source":1777,"target":920},{"edgeType":"calls","source":4196,"target":977},{"edgeType":"contains","source":3438,"target":3602},{"edgeType":"contains","source":1512,"target":1999},{"edgeType":"calls","source":4361,"target":3263},{"edgeType":"calls","source":4454,"target":380},{"edgeType":"calls","source":4520,"target":448},{"edgeType":"contains","source":3811,"target":5779},{"edgeType":"calls","source":3855,"target":979},{"edgeType":"imports","source":3717,"target":2566},{"edgeType":"calls","source":3787,"target":973},{"edgeType":"calls","source":3351,"target":1805},{"edgeType":"calls","source":5611,"target":451},{"edgeType":"calls","source":5701,"target":832},{"edgeType":"contains","source":1606,"target":2257},{"edgeType":"calls","source":1150,"target":272},{"edgeType":"contains","source":1512,"target":2000},{"edgeType":"calls","source":1779,"target":857},{"edgeType":"calls","source":1086,"target":142},{"edgeType":"calls","source":1966,"target":345},{"edgeType":"calls","source":4196,"target":978},{"edgeType":"contains","source":3438,"target":3601},{"edgeType":"calls","source":4520,"target":447},{"edgeType":"calls","source":2588,"target":89},{"edgeType":"calls","source":5124,"target":1805},{"edgeType":"calls","source":4988,"target":4964},{"edgeType":"contains","source":5194,"target":5195},{"edgeType":"calls","source":1543,"target":1826},{"edgeType":"contains","source":370,"target":410},{"edgeType":"calls","source":4361,"target":89},{"edgeType":"calls","source":4304,"target":799},{"edgeType":"contains","source":2517,"target":1504},{"edgeType":"contains","source":2247,"target":4589},{"edgeType":"contains","source":1606,"target":2262},{"edgeType":"calls","source":3589,"target":766},{"edgeType":"imports","source":74,"target":273},{"edgeType":"calls","source":4020,"target":89},{"edgeType":"contains","source":2120,"target":2183},{"edgeType":"calls","source":3855,"target":976},{"edgeType":"calls","source":5611,"target":450},{"edgeType":"calls","source":5711,"target":521},{"edgeType":"calls","source":4775,"target":997},{"edgeType":"calls","source":4109,"target":501},{"edgeType":"calls","source":3400,"target":282},{"edgeType":"calls","source":5505,"target":564},{"edgeType":"calls","source":4196,"target":975},{"edgeType":"calls","source":5411,"target":307},{"edgeType":"calls","source":1316,"target":406},{"edgeType":"calls","source":397,"target":356},{"edgeType":"contains","source":899,"target":923},{"edgeType":"calls","source":2688,"target":1214},{"edgeType":"calls","source":2963,"target":89},{"edgeType":"contains","source":2517,"target":3619},{"edgeType":"calls","source":1525,"target":269},{"edgeType":"calls","source":3855,"target":977},{"edgeType":"contains","source":317,"target":995},{"edgeType":"contains","source":370,"target":409},{"edgeType":"calls","source":1714,"target":1809},{"edgeType":"calls","source":5493,"target":4107},{"edgeType":"calls","source":5611,"target":449},{"edgeType":"calls","source":3787,"target":971},{"edgeType":"calls","source":5631,"target":886},{"edgeType":"calls","source":3589,"target":767},{"edgeType":"calls","source":5759,"target":89},{"edgeType":"contains","source":899,"target":922},{"edgeType":"calls","source":5611,"target":448},{"edgeType":"calls","source":5455,"target":1056},{"edgeType":"contains","source":4326,"target":4619},{"edgeType":"calls","source":4196,"target":976},{"edgeType":"calls","source":397,"target":355},{"edgeType":"calls","source":2519,"target":1169},{"edgeType":"contains","source":2517,"target":3616},{"edgeType":"contains","source":3926,"target":4333},{"edgeType":"contains","source":5260,"target":5261},{"edgeType":"calls","source":4360,"target":2232},{"edgeType":"contains","source":370,"target":412},{"edgeType":"calls","source":1393,"target":1193},{"edgeType":"calls","source":5696,"target":984},{"edgeType":"contains","source":2247,"target":4587},{"edgeType":"calls","source":3855,"target":974},{"edgeType":"calls","source":4196,"target":973},{"edgeType":"calls","source":5611,"target":447},{"edgeType":"calls","source":4030,"target":4005},{"edgeType":"contains","source":4326,"target":4618},{"edgeType":"calls","source":3400,"target":1337},{"edgeType":"contains","source":5194,"target":4135},{"edgeType":"imports","source":1238,"target":126},{"edgeType":"calls","source":397,"target":358},{"edgeType":"contains","source":4873,"target":344},{"edgeType":"contains","source":370,"target":411},{"edgeType":"calls","source":5309,"target":2409},{"edgeType":"calls","source":5349,"target":1169},{"edgeType":"contains","source":2517,"target":3617},{"edgeType":"calls","source":4355,"target":272},{"edgeType":"calls","source":5745,"target":521},{"edgeType":"calls","source":5696,"target":983},{"edgeType":"calls","source":3570,"target":297},{"edgeType":"calls","source":3855,"target":975},{"edgeType":"contains","source":2120,"target":2182},{"edgeType":"contains","source":2188,"target":2189},{"edgeType":"contains","source":107,"target":108},{"edgeType":"calls","source":5665,"target":886},{"edgeType":"calls","source":4196,"target":974},{"edgeType":"calls","source":1316,"target":407},{"edgeType":"calls","source":5430,"target":772},{"edgeType":"contains","source":3438,"target":3605},{"edgeType":"calls","source":397,"target":357},{"edgeType":"calls","source":2703,"target":1805},{"edgeType":"calls","source":4774,"target":4196},{"edgeType":"contains","source":370,"target":414},{"edgeType":"calls","source":3855,"target":972},{"edgeType":"calls","source":3802,"target":501},{"edgeType":"contains","source":5062,"target":5063},{"edgeType":"contains","source":1164,"target":1169},{"edgeType":"contains","source":5656,"target":5676},{"edgeType":"calls","source":4368,"target":925},{"edgeType":"calls","source":5696,"target":982},{"edgeType":"calls","source":4196,"target":971},{"edgeType":"imports","source":3811,"target":2812},{"edgeType":"contains","source":4038,"target":4039},{"edgeType":"calls","source":5696,"target":981},{"edgeType":"imports","source":2305,"target":890},{"edgeType":"contains","source":4326,"target":4624},{"edgeType":"calls","source":3264,"target":266},{"edgeType":"calls","source":5108,"target":1240},{"edgeType":"calls","source":4947,"target":3060},{"edgeType":"calls","source":5008,"target":1169},{"edgeType":"calls","source":5239,"target":349},{"edgeType":"calls","source":5372,"target":454},{"edgeType":"contains","source":3194,"target":3777},{"edgeType":"contains","source":370,"target":413},{"edgeType":"imports","source":4037,"target":1092},{"edgeType":"calls","source":2222,"target":858},{"edgeType":"contains","source":5392,"target":5402},{"edgeType":"calls","source":2146,"target":2157},{"edgeType":"contains","source":1606,"target":2267},{"edgeType":"calls","source":2014,"target":961},{"edgeType":"calls","source":4022,"target":3195},{"edgeType":"calls","source":3855,"target":973},{"edgeType":"calls","source":3935,"target":1664},{"edgeType":"calls","source":4167,"target":814},{"edgeType":"calls","source":4196,"target":972},{"edgeType":"calls","source":5696,"target":980},{"edgeType":"calls","source":5533,"target":1805},{"edgeType":"calls","source":3210,"target":2998},{"edgeType":"calls","source":1219,"target":1294},{"edgeType":"calls","source":5389,"target":984},{"edgeType":"calls","source":4721,"target":3723},{"edgeType":"contains","source":2506,"target":2907},{"edgeType":"calls","source":2956,"target":302},{"edgeType":"calls","source":297,"target":282},{"edgeType":"contains","source":3113,"target":3114},{"edgeType":"calls","source":5372,"target":453},{"edgeType":"calls","source":336,"target":130},{"edgeType":"contains","source":2247,"target":4591},{"edgeType":"calls","source":4088,"target":89},{"edgeType":"contains","source":1606,"target":2264},{"edgeType":"calls","source":3993,"target":920},{"edgeType":"calls","source":1352,"target":345},{"edgeType":"calls","source":3530,"target":1531},{"edgeType":"calls","source":3589,"target":759},{"edgeType":"calls","source":5696,"target":979},{"edgeType":"calls","source":5496,"target":837},{"edgeType":"calls","source":2968,"target":984},{"edgeType":"calls","source":5389,"target":983},{"edgeType":"calls","source":3112,"target":1805},{"edgeType":"calls","source":3855,"target":971},{"edgeType":"contains","source":370,"target":415},{"edgeType":"calls","source":5372,"target":452},{"edgeType":"calls","source":2595,"target":920},{"edgeType":"imports","source":4654,"target":994},{"edgeType":"calls","source":4851,"target":1805},{"edgeType":"calls","source":1525,"target":266},{"edgeType":"calls","source":5696,"target":978},{"edgeType":"calls","source":5496,"target":836},{"edgeType":"calls","source":5486,"target":89},{"edgeType":"calls","source":905,"target":460},{"edgeType":"calls","source":5389,"target":982},{"edgeType":"contains","source":2910,"target":3065},{"edgeType":"contains","source":2247,"target":4597},{"edgeType":"calls","source":5372,"target":451},{"edgeType":"calls","source":4756,"target":1577},{"edgeType":"imports","source":4654,"target":995},{"edgeType":"contains","source":5260,"target":5271},{"edgeType":"contains","source":5194,"target":5203},{"edgeType":"calls","source":4510,"target":747},{"edgeType":"calls","source":4469,"target":961},{"edgeType":"contains","source":1517,"target":1858},{"edgeType":"calls","source":2211,"target":2251},{"edgeType":"calls","source":5696,"target":977},{"edgeType":"calls","source":881,"target":142},{"edgeType":"calls","source":3733,"target":521},{"edgeType":"contains","source":4286,"target":1640},{"edgeType":"calls","source":4756,"target":1578},{"edgeType":"contains","source":2120,"target":2192},{"edgeType":"contains","source":2188,"target":2198},{"edgeType":"calls","source":5496,"target":835},{"edgeType":"calls","source":2968,"target":982},{"edgeType":"calls","source":5045,"target":1075},{"edgeType":"calls","source":5389,"target":981},{"edgeType":"calls","source":1219,"target":1291},{"edgeType":"calls","source":3365,"target":302},{"edgeType":"calls","source":5372,"target":450},{"edgeType":"contains","source":2915,"target":2917},{"edgeType":"calls","source":1933,"target":1354},{"edgeType":"calls","source":4756,"target":1576},{"edgeType":"contains","source":5194,"target":5202},{"edgeType":"calls","source":4901,"target":3424},{"edgeType":"calls","source":5696,"target":976},{"edgeType":"calls","source":3572,"target":3399},{"edgeType":"calls","source":3667,"target":1511},{"edgeType":"calls","source":2968,"target":983},{"edgeType":"calls","source":3237,"target":2157},{"edgeType":"calls","source":1219,"target":1290},{"edgeType":"calls","source":5239,"target":345},{"edgeType":"calls","source":5389,"target":980},{"edgeType":"contains","source":2247,"target":4595},{"edgeType":"calls","source":4622,"target":1501},{"edgeType":"calls","source":4059,"target":984},{"edgeType":"contains","source":3644,"target":1456},{"edgeType":"calls","source":4529,"target":1213},{"edgeType":"contains","source":1754,"target":1908},{"edgeType":"contains","source":1606,"target":2268},{"edgeType":"calls","source":5030,"target":481},{"edgeType":"imports","source":108,"target":283},{"edgeType":"calls","source":4922,"target":4886},{"edgeType":"calls","source":5696,"target":975},{"edgeType":"contains","source":1957,"target":1958},{"edgeType":"calls","source":2968,"target":980},{"edgeType":"contains","source":3972,"target":3973},{"edgeType":"calls","source":1219,"target":1293},{"edgeType":"calls","source":5500,"target":2823},{"edgeType":"contains","source":76,"target":1078},{"edgeType":"contains","source":4326,"target":4626},{"edgeType":"calls","source":5496,"target":833},{"edgeType":"calls","source":5372,"target":449},{"edgeType":"calls","source":5389,"target":979},{"edgeType":"calls","source":5389,"target":978},{"edgeType":"contains","source":2247,"target":4596},{"edgeType":"contains","source":2981,"target":2983},{"edgeType":"calls","source":4529,"target":1212},{"edgeType":"imports","source":1781,"target":1271},{"edgeType":"calls","source":2279,"target":142},{"edgeType":"contains","source":3476,"target":3492},{"edgeType":"calls","source":4506,"target":2982},{"edgeType":"calls","source":4369,"target":887},{"edgeType":"calls","source":4348,"target":481},{"edgeType":"calls","source":4328,"target":1101},{"edgeType":"calls","source":5041,"target":2253},{"edgeType":"calls","source":5084,"target":920},{"edgeType":"calls","source":5696,"target":974},{"edgeType":"calls","source":3623,"target":2873},{"edgeType":"calls","source":2968,"target":981},{"edgeType":"calls","source":5568,"target":1771},{"edgeType":"calls","source":1574,"target":857},{"edgeType":"contains","source":4326,"target":4625},{"edgeType":"calls","source":5496,"target":832},{"edgeType":"calls","source":5372,"target":448},{"edgeType":"calls","source":1219,"target":1292},{"edgeType":"calls","source":4024,"target":977},{"edgeType":"calls","source":5473,"target":454},{"edgeType":"calls","source":4774,"target":982},{"edgeType":"contains","source":4953,"target":5246},{"edgeType":"contains","source":2948,"target":5035},{"edgeType":"calls","source":3362,"target":358},{"edgeType":"calls","source":3227,"target":315},{"edgeType":"contains","source":1754,"target":1881},{"edgeType":"calls","source":4433,"target":983},{"edgeType":"calls","source":2984,"target":449},{"edgeType":"calls","source":2307,"target":1352},{"edgeType":"calls","source":994,"target":830},{"edgeType":"calls","source":3916,"target":1153},{"edgeType":"imports","source":280,"target":283},{"edgeType":"contains","source":54,"target":2786},{"edgeType":"calls","source":1525,"target":1281},{"edgeType":"calls","source":5473,"target":453},{"edgeType":"calls","source":4774,"target":981},{"edgeType":"calls","source":3362,"target":359},{"edgeType":"calls","source":1849,"target":1807},{"edgeType":"contains","source":4953,"target":5245},{"edgeType":"calls","source":2034,"target":300},{"edgeType":"calls","source":4024,"target":978},{"edgeType":"calls","source":3954,"target":3148},{"edgeType":"contains","source":3438,"target":3586},{"edgeType":"contains","source":2948,"target":5036},{"edgeType":"calls","source":4658,"target":349},{"edgeType":"contains","source":3194,"target":3752},{"edgeType":"calls","source":2939,"target":788},{"edgeType":"calls","source":3589,"target":3892},{"edgeType":"calls","source":5725,"target":5325},{"edgeType":"calls","source":4433,"target":982},{"edgeType":"calls","source":4350,"target":384},{"edgeType":"calls","source":2851,"target":345},{"edgeType":"contains","source":4873,"target":2439},{"edgeType":"calls","source":2984,"target":450},{"edgeType":"calls","source":1748,"target":1766},{"edgeType":"calls","source":1779,"target":805},{"edgeType":"calls","source":5306,"target":345},{"edgeType":"contains","source":4135,"target":4177},{"edgeType":"calls","source":1834,"target":1214},{"edgeType":"calls","source":5606,"target":3729},{"edgeType":"imports","source":76,"target":266},{"edgeType":"calls","source":3473,"target":89},{"edgeType":"calls","source":3489,"target":2764},{"edgeType":"calls","source":4774,"target":980},{"edgeType":"calls","source":3362,"target":356},{"edgeType":"calls","source":4024,"target":975},{"edgeType":"calls","source":5505,"target":1574},{"edgeType":"calls","source":5473,"target":452},{"edgeType":"contains","source":4953,"target":5244},{"edgeType":"calls","source":3227,"target":313},{"edgeType":"calls","source":4457,"target":4465},{"edgeType":"contains","source":3194,"target":3749},{"edgeType":"calls","source":4736,"target":1101},{"edgeType":"calls","source":2984,"target":447},{"edgeType":"calls","source":4433,"target":981},{"edgeType":"contains","source":3938,"target":3941},{"edgeType":"calls","source":5016,"target":1935},{"edgeType":"calls","source":870,"target":448},{"edgeType":"calls","source":5288,"target":902},{"edgeType":"contains","source":40,"target":51},{"edgeType":"contains","source":40,"target":2165},{"edgeType":"calls","source":5714,"target":380},{"edgeType":"calls","source":3362,"target":357},{"edgeType":"calls","source":4024,"target":976},{"edgeType":"calls","source":5473,"target":451},{"edgeType":"calls","source":3964,"target":1779},{"edgeType":"contains","source":3476,"target":4520},{"edgeType":"calls","source":4774,"target":979},{"edgeType":"calls","source":4433,"target":980},{"edgeType":"calls","source":870,"target":447},{"edgeType":"calls","source":2984,"target":448},{"edgeType":"calls","source":2281,"target":2157},{"edgeType":"calls","source":2211,"target":1156},{"edgeType":"calls","source":4350,"target":382},{"edgeType":"contains","source":331,"target":1599},{"edgeType":"contains","source":4135,"target":4175},{"edgeType":"calls","source":3744,"target":1199},{"edgeType":"contains","source":2247,"target":344},{"edgeType":"contains","source":97,"target":1457},{"edgeType":"calls","source":5469,"target":1631},{"edgeType":"calls","source":3971,"target":3673},{"edgeType":"contains","source":1588,"target":1746},{"edgeType":"calls","source":5473,"target":450},{"edgeType":"calls","source":4986,"target":1805},{"edgeType":"contains","source":962,"target":1068},{"edgeType":"calls","source":4774,"target":978},{"edgeType":"contains","source":4953,"target":5250},{"edgeType":"contains","source":1164,"target":2205},{"edgeType":"calls","source":4433,"target":979},{"edgeType":"calls","source":1728,"target":269},{"edgeType":"calls","source":5327,"target":1805},{"edgeType":"calls","source":5708,"target":564},{"edgeType":"calls","source":3613,"target":1029},{"edgeType":"calls","source":4024,"target":972},{"edgeType":"calls","source":4104,"target":1665},{"edgeType":"calls","source":5621,"target":89},{"edgeType":"calls","source":4024,"target":974},{"edgeType":"calls","source":5473,"target":449},{"edgeType":"calls","source":5469,"target":1630},{"edgeType":"calls","source":3362,"target":355},{"edgeType":"calls","source":5340,"target":2458},{"edgeType":"calls","source":747,"target":1082},{"edgeType":"calls","source":4945,"target":961},{"edgeType":"calls","source":4774,"target":977},{"edgeType":"calls","source":4877,"target":2012},{"edgeType":"calls","source":5277,"target":1240},{"edgeType":"calls","source":4433,"target":978},{"edgeType":"contains","source":1626,"target":1627},{"edgeType":"calls","source":4024,"target":973},{"edgeType":"calls","source":3589,"target":3888},{"edgeType":"contains","source":4953,"target":5248},{"edgeType":"contains","source":118,"target":808},{"edgeType":"contains","source":54,"target":2792},{"edgeType":"contains","source":97,"target":1459},{"edgeType":"calls","source":4231,"target":896},{"edgeType":"calls","source":5469,"target":1629},{"edgeType":"calls","source":5473,"target":448},{"edgeType":"contains","source":2735,"target":3184},{"edgeType":"contains","source":4873,"target":2443},{"edgeType":"calls","source":3227,"target":309},{"edgeType":"calls","source":4774,"target":976},{"edgeType":"contains","source":899,"target":909},{"edgeType":"calls","source":3783,"target":1042},{"edgeType":"contains","source":3811,"target":5768},{"edgeType":"imports","source":2740,"target":124},{"edgeType":"calls","source":5142,"target":2253},{"edgeType":"calls","source":5172,"target":266},{"edgeType":"calls","source":2289,"target":847},{"edgeType":"calls","source":4433,"target":977},{"edgeType":"calls","source":2224,"target":1805},{"edgeType":"calls","source":5715,"target":345},{"edgeType":"contains","source":4135,"target":4180},{"edgeType":"calls","source":1779,"target":804},{"edgeType":"calls","source":3446,"target":920},{"edgeType":"contains","source":97,"target":1458},{"edgeType":"contains","source":4953,"target":5247},{"edgeType":"calls","source":4876,"target":984},{"edgeType":"imports","source":280,"target":278},{"edgeType":"calls","source":4182,"target":302},{"edgeType":"calls","source":5473,"target":447},{"edgeType":"calls","source":4774,"target":975},{"edgeType":"contains","source":899,"target":908},{"edgeType":"calls","source":5200,"target":453},{"edgeType":"calls","source":2797,"target":3069},{"edgeType":"calls","source":5200,"target":454},{"edgeType":"calls","source":4433,"target":976},{"edgeType":"calls","source":4457,"target":4460},{"edgeType":"imports","source":3717,"target":1563},{"edgeType":"calls","source":1779,"target":803},{"edgeType":"calls","source":4024,"target":971},{"edgeType":"contains","source":4135,"target":4179},{"edgeType":"calls","source":4231,"target":894},{"edgeType":"calls","source":4248,"target":367},{"edgeType":"calls","source":4876,"target":983},{"edgeType":"contains","source":97,"target":1461},{"edgeType":"calls","source":5573,"target":1574},{"edgeType":"calls","source":4774,"target":974},{"edgeType":"calls","source":3272,"target":1026},{"edgeType":"calls","source":5200,"target":452},{"edgeType":"calls","source":1056,"target":1014},{"edgeType":"calls","source":5311,"target":1240},{"edgeType":"calls","source":5266,"target":1578},{"edgeType":"calls","source":4692,"target":345},{"edgeType":"calls","source":4433,"target":975},{"edgeType":"contains","source":253,"target":2967},{"edgeType":"contains","source":3811,"target":5774},{"edgeType":"calls","source":2186,"target":867},{"edgeType":"contains","source":1781,"target":2110},{"edgeType":"contains","source":3641,"target":4702},{"edgeType":"contains","source":2735,"target":3191},{"edgeType":"calls","source":4231,"target":895},{"edgeType":"calls","source":4257,"target":89},{"edgeType":"contains","source":97,"target":1460},{"edgeType":"calls","source":4876,"target":982},{"edgeType":"calls","source":5749,"target":345},{"edgeType":"contains","source":1368,"target":115},{"edgeType":"calls","source":5599,"target":767},{"edgeType":"calls","source":3417,"target":1817},{"edgeType":"imports","source":3972,"target":1042},{"edgeType":"calls","source":4774,"target":973},{"edgeType":"calls","source":2907,"target":1771},{"edgeType":"contains","source":899,"target":910},{"edgeType":"calls","source":5200,"target":451},{"edgeType":"calls","source":5266,"target":1577},{"edgeType":"calls","source":5304,"target":1456},{"edgeType":"imports","source":280,"target":292},{"edgeType":"calls","source":5729,"target":4136},{"edgeType":"calls","source":1883,"target":1801},{"edgeType":"calls","source":2289,"target":846},{"edgeType":"calls","source":4433,"target":974},{"edgeType":"calls","source":4305,"target":1771},{"edgeType":"calls","source":4876,"target":981},{"edgeType":"contains","source":56,"target":1677},{"edgeType":"calls","source":5599,"target":766},{"edgeType":"calls","source":1405,"target":767},{"edgeType":"calls","source":5686,"target":1240},{"edgeType":"calls","source":4774,"target":972},{"edgeType":"contains","source":899,"target":913},{"edgeType":"calls","source":5395,"target":1805},{"edgeType":"imports","source":2719,"target":788},{"edgeType":"calls","source":1056,"target":1016},{"edgeType":"calls","source":3154,"target":453},{"edgeType":"calls","source":5200,"target":450},{"edgeType":"calls","source":3227,"target":304},{"edgeType":"calls","source":5307,"target":305},{"edgeType":"calls","source":5266,"target":1576},{"edgeType":"contains","source":3194,"target":3757},{"edgeType":"calls","source":2448,"target":142},{"edgeType":"contains","source":96,"target":4665},{"edgeType":"contains","source":1626,"target":1628},{"edgeType":"calls","source":4433,"target":973},{"edgeType":"calls","source":2269,"target":406},{"edgeType":"calls","source":4945,"target":2012},{"edgeType":"calls","source":5686,"target":1239},{"edgeType":"calls","source":1405,"target":766},{"edgeType":"calls","source":2795,"target":1013},{"edgeType":"imports","source":3717,"target":1550},{"edgeType":"calls","source":3568,"target":305},{"edgeType":"contains","source":40,"target":2172},{"edgeType":"calls","source":5591,"target":1013},{"edgeType":"calls","source":4886,"target":1727},{"edgeType":"calls","source":4876,"target":980},{"edgeType":"imports","source":1331,"target":476},{"edgeType":"calls","source":4839,"target":1070},{"edgeType":"calls","source":4858,"target":481},{"edgeType":"calls","source":1214,"target":345},{"edgeType":"calls","source":5200,"target":449},{"edgeType":"calls","source":5250,"target":1013},{"edgeType":"calls","source":3154,"target":454},{"edgeType":"calls","source":5348,"target":89},{"edgeType":"calls","source":4623,"target":367},{"edgeType":"calls","source":1779,"target":799},{"edgeType":"contains","source":96,"target":4664},{"edgeType":"contains","source":2247,"target":4575},{"edgeType":"calls","source":4774,"target":971},{"edgeType":"calls","source":4433,"target":972},{"edgeType":"calls","source":2269,"target":407},{"edgeType":"contains","source":1781,"target":4223},{"edgeType":"imports","source":4103,"target":3326},{"edgeType":"calls","source":4876,"target":979},{"edgeType":"calls","source":5200,"target":448},{"edgeType":"calls","source":3712,"target":2180},{"edgeType":"contains","source":4289,"target":3644},{"edgeType":"calls","source":5609,"target":454},{"edgeType":"calls","source":3154,"target":451},{"edgeType":"calls","source":5266,"target":1573},{"edgeType":"contains","source":2517,"target":3610},{"edgeType":"calls","source":5184,"target":5172},{"edgeType":"contains","source":2247,"target":4580},{"edgeType":"calls","source":4603,"target":986},{"edgeType":"calls","source":1145,"target":364},{"edgeType":"contains","source":72,"target":3297},{"edgeType":"contains","source":3811,"target":5778},{"edgeType":"calls","source":4433,"target":971},{"edgeType":"calls","source":4232,"target":858},{"edgeType":"contains","source":3438,"target":3600},{"edgeType":"contains","source":1512,"target":1997},{"edgeType":"contains","source":3410,"target":3411},{"edgeType":"calls","source":790,"target":798},{"edgeType":"calls","source":747,"target":1074},{"edgeType":"contains","source":73,"target":2208},{"edgeType":"calls","source":4876,"target":978},{"edgeType":"calls","source":5609,"target":453},{"edgeType":"calls","source":5200,"target":447},{"edgeType":"contains","source":2584,"target":2591},{"edgeType":"calls","source":3154,"target":452},{"edgeType":"calls","source":5429,"target":1805},{"edgeType":"calls","source":5276,"target":1262},{"edgeType":"calls","source":5266,"target":1572},{"edgeType":"imports","source":4037,"target":89},{"edgeType":"contains","source":96,"target":4666},{"edgeType":"imports","source":1238,"target":1244},{"edgeType":"calls","source":2279,"target":2209},{"edgeType":"contains","source":3811,"target":5777},{"edgeType":"calls","source":4571,"target":920},{"edgeType":"calls","source":4548,"target":1633},{"edgeType":"contains","source":1512,"target":1998},{"edgeType":"contains","source":5656,"target":5657},{"edgeType":"calls","source":4096,"target":4018},{"edgeType":"contains","source":3476,"target":3478},{"edgeType":"calls","source":5761,"target":1025},{"edgeType":"calls","source":5691,"target":2138},{"edgeType":"calls","source":2858,"target":1169},{"edgeType":"calls","source":5609,"target":452},{"edgeType":"calls","source":3154,"target":449},{"edgeType":"imports","source":3385,"target":3389},{"edgeType":"calls","source":5276,"target":1261},{"edgeType":"calls","source":5307,"target":300},{"edgeType":"calls","source":5266,"target":1571},{"edgeType":"calls","source":5287,"target":920},{"edgeType":"calls","source":5278,"target":142},{"edgeType":"calls","source":3568,"target":300},{"edgeType":"calls","source":5342,"target":272},{"edgeType":"contains","source":2518,"target":2520},{"edgeType":"calls","source":1142,"target":460},{"edgeType":"calls","source":1205,"target":621},{"edgeType":"calls","source":2577,"target":367},{"edgeType":"calls","source":4007,"target":1489},{"edgeType":"calls","source":4876,"target":977},{"edgeType":"calls","source":2812,"target":481},{"edgeType":"contains","source":3871,"target":3916},{"edgeType":"calls","source":2811,"target":512},{"edgeType":"contains","source":3811,"target":5776},{"edgeType":"calls","source":4584,"target":516},{"edgeType":"calls","source":4359,"target":3263},{"edgeType":"calls","source":1455,"target":269},{"edgeType":"calls","source":5609,"target":451},{"edgeType":"calls","source":3154,"target":450},{"edgeType":"calls","source":5276,"target":1260},{"edgeType":"calls","source":5266,"target":1570},{"edgeType":"contains","source":2584,"target":2589},{"edgeType":"contains","source":2518,"target":2521},{"edgeType":"calls","source":3876,"target":266},{"edgeType":"calls","source":3815,"target":2157},{"edgeType":"calls","source":4876,"target":976},{"edgeType":"contains","source":3811,"target":5775},{"edgeType":"contains","source":5656,"target":5659},{"edgeType":"calls","source":4374,"target":1771},{"edgeType":"calls","source":2278,"target":2267},{"edgeType":"contains","source":4000,"target":4118},{"edgeType":"contains","source":4600,"target":4545},{"edgeType":"contains","source":72,"target":97},{"edgeType":"calls","source":5608,"target":1571},{"edgeType":"imports","source":2374,"target":890},{"edgeType":"calls","source":5276,"target":1292},{"edgeType":"calls","source":3786,"target":972},{"edgeType":"calls","source":3607,"target":1236},{"edgeType":"contains","source":2244,"target":2530},{"edgeType":"contains","source":3709,"target":1512},{"edgeType":"contains","source":4356,"target":4710},{"edgeType":"calls","source":4715,"target":1771},{"edgeType":"calls","source":2047,"target":971},{"edgeType":"calls","source":4033,"target":1771},{"edgeType":"contains","source":1754,"target":1865},{"edgeType":"calls","source":4536,"target":978},{"edgeType":"calls","source":4257,"target":1169},{"edgeType":"contains","source":3438,"target":3571},{"edgeType":"calls","source":4360,"target":3263},{"edgeType":"calls","source":396,"target":358},{"edgeType":"calls","source":4502,"target":975},{"edgeType":"contains","source":2735,"target":3166},{"edgeType":"calls","source":5276,"target":1291},{"edgeType":"calls","source":5608,"target":1570},{"edgeType":"calls","source":3786,"target":973},{"edgeType":"contains","source":502,"target":508},{"edgeType":"calls","source":3232,"target":3348},{"edgeType":"calls","source":1977,"target":1026},{"edgeType":"contains","source":851,"target":1316},{"edgeType":"calls","source":4098,"target":814},{"edgeType":"calls","source":3945,"target":272},{"edgeType":"calls","source":2026,"target":564},{"edgeType":"calls","source":4074,"target":501},{"edgeType":"contains","source":1351,"target":2732},{"edgeType":"calls","source":396,"target":357},{"edgeType":"contains","source":3194,"target":3735},{"edgeType":"calls","source":4502,"target":974},{"edgeType":"calls","source":4536,"target":977},{"edgeType":"contains","source":502,"target":511},{"edgeType":"calls","source":4360,"target":89},{"edgeType":"calls","source":3066,"target":1092},{"edgeType":"calls","source":5182,"target":1033},{"edgeType":"calls","source":5276,"target":1290},{"edgeType":"calls","source":5369,"target":521},{"edgeType":"calls","source":3955,"target":1016},{"edgeType":"calls","source":3945,"target":269},{"edgeType":"calls","source":5608,"target":1569},{"edgeType":"calls","source":3338,"target":1116},{"edgeType":"calls","source":1131,"target":829},{"edgeType":"calls","source":5395,"target":772},{"edgeType":"calls","source":2047,"target":973},{"edgeType":"contains","source":3460,"target":3944},{"edgeType":"calls","source":4979,"target":984},{"edgeType":"calls","source":4801,"target":2274},{"edgeType":"calls","source":4502,"target":973},{"edgeType":"calls","source":4536,"target":976},{"edgeType":"calls","source":396,"target":360},{"edgeType":"calls","source":3667,"target":1489},{"edgeType":"contains","source":1953,"target":2037},{"edgeType":"calls","source":4454,"target":345},{"edgeType":"calls","source":2323,"target":1928},{"edgeType":"calls","source":4502,"target":971},{"edgeType":"contains","source":1988,"target":3066},{"edgeType":"calls","source":5276,"target":1289},{"edgeType":"contains","source":4181,"target":4846},{"edgeType":"calls","source":3786,"target":971},{"edgeType":"calls","source":5608,"target":1568},{"edgeType":"calls","source":4007,"target":1519},{"edgeType":"calls","source":5454,"target":1056},{"edgeType":"calls","source":3351,"target":1771},{"edgeType":"contains","source":3078,"target":3101},{"edgeType":"calls","source":5394,"target":802},{"edgeType":"calls","source":2047,"target":972},{"edgeType":"calls","source":4242,"target":1633},{"edgeType":"calls","source":4979,"target":983},{"edgeType":"calls","source":4973,"target":1169},{"edgeType":"calls","source":4502,"target":972},{"edgeType":"calls","source":396,"target":359},{"edgeType":"calls","source":4536,"target":975},{"edgeType":"calls","source":4804,"target":2180},{"edgeType":"calls","source":3712,"target":2205},{"edgeType":"calls","source":4536,"target":973},{"edgeType":"calls","source":4359,"target":2232},{"edgeType":"calls","source":3955,"target":1014},{"edgeType":"contains","source":1953,"target":2042},{"edgeType":"calls","source":4093,"target":964},{"edgeType":"calls","source":5390,"target":3039},{"edgeType":"contains","source":3438,"target":3575},{"edgeType":"calls","source":4979,"target":982},{"edgeType":"contains","source":2735,"target":3169},{"edgeType":"calls","source":5076,"target":89},{"edgeType":"calls","source":4536,"target":974},{"edgeType":"calls","source":4687,"target":521},{"edgeType":"calls","source":802,"target":452},{"edgeType":"contains","source":4953,"target":5233},{"edgeType":"calls","source":2278,"target":2264},{"edgeType":"contains","source":2506,"target":2870},{"edgeType":"calls","source":4536,"target":972},{"edgeType":"calls","source":5124,"target":1771},{"edgeType":"calls","source":361,"target":380},{"edgeType":"calls","source":2361,"target":1805},{"edgeType":"calls","source":2273,"target":305},{"edgeType":"calls","source":3604,"target":269},{"edgeType":"calls","source":5744,"target":521},{"edgeType":"contains","source":2048,"target":3326},{"edgeType":"calls","source":3678,"target":89},{"edgeType":"contains","source":1953,"target":2043},{"edgeType":"imports","source":280,"target":264},{"edgeType":"calls","source":5391,"target":5121},{"edgeType":"calls","source":4100,"target":1805},{"edgeType":"calls","source":3235,"target":3251},{"edgeType":"contains","source":3438,"target":3574},{"edgeType":"calls","source":5429,"target":772},{"edgeType":"contains","source":3476,"target":4510},{"edgeType":"calls","source":5403,"target":521},{"edgeType":"calls","source":802,"target":451},{"edgeType":"calls","source":2853,"target":1352},{"edgeType":"calls","source":4979,"target":981},{"edgeType":"calls","source":1193,"target":1014},{"edgeType":"calls","source":4736,"target":1115},{"edgeType":"contains","source":3078,"target":3107},{"edgeType":"calls","source":4835,"target":2274},{"edgeType":"calls","source":4536,"target":971},{"edgeType":"contains","source":1164,"target":2191},{"edgeType":"imports","source":2719,"target":759},{"edgeType":"calls","source":4367,"target":925},{"edgeType":"calls","source":5664,"target":886},{"edgeType":"calls","source":3723,"target":805},{"edgeType":"calls","source":1858,"target":1543},{"edgeType":"calls","source":1729,"target":257},{"edgeType":"calls","source":2703,"target":1771},{"edgeType":"calls","source":4816,"target":1805},{"edgeType":"contains","source":52,"target":1781},{"edgeType":"calls","source":4094,"target":4102},{"edgeType":"calls","source":1377,"target":598},{"edgeType":"imports","source":3057,"target":851},{"edgeType":"calls","source":5428,"target":802},{"edgeType":"contains","source":1238,"target":5179},{"edgeType":"calls","source":396,"target":356},{"edgeType":"calls","source":802,"target":454},{"edgeType":"calls","source":4979,"target":980},{"edgeType":"contains","source":3127,"target":4756},{"edgeType":"calls","source":3774,"target":282},{"edgeType":"calls","source":4434,"target":961},{"edgeType":"calls","source":4350,"target":394},{"edgeType":"calls","source":5712,"target":454},{"edgeType":"contains","source":4181,"target":4850},{"edgeType":"contains","source":4326,"target":4584},{"edgeType":"calls","source":1193,"target":1016},{"edgeType":"calls","source":5712,"target":453},{"edgeType":"imports","source":1043,"target":920},{"edgeType":"calls","source":5581,"target":286},{"edgeType":"contains","source":3078,"target":3105},{"edgeType":"calls","source":396,"target":355},{"edgeType":"calls","source":802,"target":453},{"edgeType":"calls","source":4979,"target":979},{"edgeType":"calls","source":1704,"target":1026},{"edgeType":"contains","source":3078,"target":3111},{"edgeType":"contains","source":3194,"target":3743},{"edgeType":"calls","source":2274,"target":269},{"edgeType":"calls","source":2273,"target":300},{"edgeType":"calls","source":3589,"target":3900},{"edgeType":"contains","source":3591,"target":4121},{"edgeType":"calls","source":3723,"target":803},{"edgeType":"calls","source":4333,"target":920},{"edgeType":"contains","source":40,"target":41},{"edgeType":"contains","source":4135,"target":4170},{"edgeType":"contains","source":2120,"target":2155},{"edgeType":"calls","source":4842,"target":997},{"edgeType":"calls","source":5712,"target":452},{"edgeType":"calls","source":3463,"target":406},{"edgeType":"contains","source":4103,"target":4105},{"edgeType":"contains","source":4181,"target":4858},{"edgeType":"calls","source":870,"target":454},{"edgeType":"calls","source":1219,"target":1262},{"edgeType":"calls","source":3379,"target":896},{"edgeType":"calls","source":5382,"target":1169},{"edgeType":"calls","source":802,"target":448},{"edgeType":"calls","source":4979,"target":978},{"edgeType":"calls","source":3023,"target":305},{"edgeType":"calls","source":5197,"target":4789},{"edgeType":"imports","source":2374,"target":897},{"edgeType":"calls","source":3723,"target":804},{"edgeType":"calls","source":4304,"target":2875},{"edgeType":"calls","source":4350,"target":392},{"edgeType":"contains","source":3826,"target":1063},{"edgeType":"contains","source":1781,"target":4208},{"edgeType":"calls","source":4901,"target":1281},{"edgeType":"contains","source":4135,"target":4169},{"edgeType":"calls","source":1352,"target":1366},{"edgeType":"calls","source":802,"target":447},{"edgeType":"calls","source":3433,"target":1337},{"edgeType":"calls","source":5712,"target":451},{"edgeType":"calls","source":3463,"target":407},{"edgeType":"calls","source":1219,"target":1261},{"edgeType":"calls","source":3281,"target":1821},{"edgeType":"calls","source":870,"target":453},{"edgeType":"calls","source":4979,"target":977},{"edgeType":"calls","source":4980,"target":946},{"edgeType":"contains","source":4873,"target":2431},{"edgeType":"calls","source":3876,"target":286},{"edgeType":"calls","source":1583,"target":1608},{"edgeType":"contains","source":1988,"target":2016},{"edgeType":"calls","source":5690,"target":4304},{"edgeType":"calls","source":4024,"target":983},{"edgeType":"calls","source":4323,"target":2285},{"edgeType":"imports","source":1957,"target":81},{"edgeType":"calls","source":5746,"target":5739},{"edgeType":"calls","source":4979,"target":976},{"edgeType":"contains","source":4135,"target":4168},{"edgeType":"contains","source":3438,"target":3577},{"edgeType":"calls","source":5533,"target":1771},{"edgeType":"calls","source":5566,"target":1805},{"edgeType":"calls","source":5712,"target":450},{"edgeType":"calls","source":3379,"target":894},{"edgeType":"calls","source":802,"target":450},{"edgeType":"calls","source":3315,"target":1821},{"edgeType":"imports","source":2740,"target":120},{"edgeType":"contains","source":2517,"target":2531},{"edgeType":"calls","source":4024,"target":984},{"edgeType":"calls","source":4088,"target":3228},{"edgeType":"calls","source":5712,"target":449},{"edgeType":"calls","source":2770,"target":1805},{"edgeType":"calls","source":3478,"target":997},{"edgeType":"calls","source":4979,"target":975},{"edgeType":"calls","source":4882,"target":811},{"edgeType":"calls","source":5606,"target":564},{"edgeType":"calls","source":802,"target":449},{"edgeType":"calls","source":3379,"target":895},{"edgeType":"contains","source":3078,"target":3109},{"edgeType":"contains","source":2735,"target":3172},{"edgeType":"calls","source":1056,"target":1026},{"edgeType":"calls","source":4024,"target":981},{"edgeType":"contains","source":4953,"target":5242},{"edgeType":"contains","source":3194,"target":3747},{"edgeType":"calls","source":2034,"target":305},{"edgeType":"calls","source":4167,"target":776},{"edgeType":"calls","source":2055,"target":1768},{"edgeType":"contains","source":5363,"target":4159},{"edgeType":"calls","source":4350,"target":389},{"edgeType":"calls","source":4979,"target":974},{"edgeType":"calls","source":747,"target":1092},{"edgeType":"calls","source":5712,"target":448},{"edgeType":"calls","source":870,"target":450},{"edgeType":"calls","source":2984,"target":453},{"edgeType":"contains","source":3938,"target":3939},{"edgeType":"calls","source":2995,"target":1169},{"edgeType":"calls","source":1219,"target":1258},{"edgeType":"calls","source":1352,"target":1363},{"edgeType":"calls","source":3335,"target":142},{"edgeType":"calls","source":3227,"target":320},{"edgeType":"calls","source":4121,"target":89},{"edgeType":"calls","source":4024,"target":982},{"edgeType":"calls","source":4167,"target":777},{"edgeType":"calls","source":4368,"target":887},{"edgeType":"calls","source":4979,"target":973},{"edgeType":"calls","source":5045,"target":1041},{"edgeType":"calls","source":5712,"target":447},{"edgeType":"contains","source":1890,"target":1891},{"edgeType":"calls","source":4817,"target":3881},{"edgeType":"contains","source":4890,"target":5079},{"edgeType":"contains","source":4135,"target":4173},{"edgeType":"calls","source":3676,"target":142},{"edgeType":"calls","source":870,"target":449},{"edgeType":"calls","source":3389,"target":1640},{"edgeType":"contains","source":4181,"target":4861},{"edgeType":"calls","source":5582,"target":1306},{"edgeType":"calls","source":2984,"target":454},{"edgeType":"calls","source":1219,"target":1257},{"edgeType":"calls","source":3112,"target":1771},{"edgeType":"calls","source":3227,"target":1377},{"edgeType":"calls","source":4774,"target":984},{"edgeType":"contains","source":960,"target":3238},{"edgeType":"contains","source":899,"target":901},{"edgeType":"calls","source":4024,"target":979},{"edgeType":"calls","source":3854,"target":964},{"edgeType":"calls","source":1922,"target":1665},{"edgeType":"calls","source":2289,"target":1912},{"edgeType":"calls","source":4368,"target":886},{"edgeType":"calls","source":3710,"target":142},{"edgeType":"calls","source":4979,"target":972},{"edgeType":"calls","source":2884,"target":380},{"edgeType":"contains","source":4135,"target":4172},{"edgeType":"calls","source":2984,"target":451},{"edgeType":"calls","source":4839,"target":3198},{"edgeType":"calls","source":5591,"target":1026},{"edgeType":"calls","source":870,"target":452},{"edgeType":"calls","source":3362,"target":360},{"edgeType":"calls","source":5426,"target":4027},{"edgeType":"calls","source":1219,"target":1260},{"edgeType":"calls","source":5425,"target":886},{"edgeType":"calls","source":5449,"target":142},{"edgeType":"calls","source":4774,"target":983},{"edgeType":"calls","source":1937,"target":142},{"edgeType":"contains","source":899,"target":900},{"edgeType":"calls","source":4024,"target":980},{"edgeType":"calls","source":3883,"target":2180},{"edgeType":"calls","source":3874,"target":345},{"edgeType":"calls","source":4433,"target":984},{"edgeType":"contains","source":2735,"target":3176},{"edgeType":"calls","source":4350,"target":386},{"edgeType":"calls","source":870,"target":451},{"edgeType":"calls","source":2984,"target":452},{"edgeType":"calls","source":3023,"target":300},{"edgeType":"contains","source":1989,"target":1991},{"edgeType":"calls","source":4979,"target":971},{"edgeType":"contains","source":4135,"target":4171},{"edgeType":"calls","source":1219,"target":1259},{"edgeType":"calls","source":5471,"target":1574},{"edgeType":"calls","source":4013,"target":360},{"edgeType":"calls","source":4658,"target":449},{"edgeType":"calls","source":4027,"target":983},{"edgeType":"calls","source":4758,"target":1577},{"edgeType":"imports","source":2948,"target":851},{"edgeType":"contains","source":3205,"target":206},{"edgeType":"calls","source":5711,"target":1631},{"edgeType":"calls","source":5732,"target":980},{"edgeType":"calls","source":5734,"target":918},{"edgeType":"calls","source":1525,"target":1380},{"edgeType":"contains","source":2735,"target":3148},{"edgeType":"contains","source":2737,"target":3086},{"edgeType":"contains","source":1784,"target":3033},{"edgeType":"calls","source":998,"target":805},{"edgeType":"contains","source":62,"target":1448},{"edgeType":"calls","source":5471,"target":615},{"edgeType":"calls","source":3399,"target":3538},{"edgeType":"contains","source":2244,"target":2514},{"edgeType":"calls","source":3456,"target":1771},{"edgeType":"contains","source":435,"target":455},{"edgeType":"contains","source":1605,"target":2240},{"edgeType":"calls","source":1150,"target":320},{"edgeType":"calls","source":4658,"target":448},{"edgeType":"contains","source":2910,"target":3010},{"edgeType":"contains","source":96,"target":4621},{"edgeType":"calls","source":4027,"target":984},{"edgeType":"calls","source":4758,"target":1576},{"edgeType":"calls","source":1024,"target":1055},{"edgeType":"contains","source":5553,"target":5641},{"edgeType":"contains","source":1351,"target":2715},{"edgeType":"contains","source":3438,"target":3553},{"edgeType":"calls","source":4593,"target":349},{"edgeType":"calls","source":1525,"target":1379},{"edgeType":"calls","source":5084,"target":984},{"edgeType":"calls","source":5711,"target":1630},{"edgeType":"calls","source":5732,"target":979},{"edgeType":"calls","source":5734,"target":917},{"edgeType":"calls","source":3723,"target":894},{"edgeType":"calls","source":5773,"target":3936},{"edgeType":"contains","source":2737,"target":3087},{"edgeType":"calls","source":3435,"target":309},{"edgeType":"calls","source":998,"target":804},{"edgeType":"calls","source":5241,"target":345},{"edgeType":"calls","source":1322,"target":1330},{"edgeType":"calls","source":5609,"target":564},{"edgeType":"imports","source":4654,"target":2932},{"edgeType":"calls","source":3399,"target":3539},{"edgeType":"calls","source":5249,"target":2211},{"edgeType":"contains","source":4319,"target":4782},{"edgeType":"contains","source":3057,"target":1621},{"edgeType":"calls","source":5418,"target":142},{"edgeType":"contains","source":898,"target":903},{"edgeType":"calls","source":3347,"target":920},{"edgeType":"calls","source":3800,"target":3790},{"edgeType":"calls","source":4013,"target":358},{"edgeType":"calls","source":4027,"target":981},{"edgeType":"calls","source":3923,"target":3148},{"edgeType":"contains","source":5553,"target":5642},{"edgeType":"calls","source":4218,"target":345},{"edgeType":"calls","source":4846,"target":961},{"edgeType":"contains","source":3127,"target":4736},{"edgeType":"calls","source":4658,"target":447},{"edgeType":"calls","source":4424,"target":302},{"edgeType":"calls","source":2875,"target":2868},{"edgeType":"calls","source":5084,"target":983},{"edgeType":"calls","source":5711,"target":1629},{"edgeType":"calls","source":5732,"target":978},{"edgeType":"calls","source":5734,"target":916},{"edgeType":"imports","source":4037,"target":920},{"edgeType":"calls","source":2152,"target":969},{"edgeType":"calls","source":5119,"target":2012},{"edgeType":"contains","source":2087,"target":2094},{"edgeType":"contains","source":317,"target":2001},{"edgeType":"calls","source":1585,"target":1636},{"edgeType":"calls","source":5178,"target":1240},{"edgeType":"contains","source":62,"target":1450},{"edgeType":"calls","source":5326,"target":1937},{"edgeType":"calls","source":1230,"target":1014},{"edgeType":"contains","source":4319,"target":4781},{"edgeType":"calls","source":4013,"target":359},{"edgeType":"calls","source":1091,"target":1094},{"edgeType":"contains","source":5553,"target":5643},{"edgeType":"calls","source":1930,"target":1511},{"edgeType":"calls","source":4027,"target":982},{"edgeType":"contains","source":3127,"target":4737},{"edgeType":"calls","source":2003,"target":305},{"edgeType":"contains","source":1784,"target":3031},{"edgeType":"contains","source":3944,"target":1606},{"edgeType":"calls","source":2046,"target":1086},{"edgeType":"calls","source":4130,"target":4131},{"edgeType":"contains","source":3591,"target":4093},{"edgeType":"contains","source":3438,"target":3551},{"edgeType":"calls","source":4371,"target":887},{"edgeType":"calls","source":5084,"target":982},{"edgeType":"contains","source":2048,"target":2247},{"edgeType":"contains","source":1784,"target":3032},{"edgeType":"contains","source":62,"target":1449},{"edgeType":"contains","source":2120,"target":2129},{"edgeType":"calls","source":3573,"target":257},{"edgeType":"calls","source":1253,"target":300},{"edgeType":"calls","source":5732,"target":977},{"edgeType":"calls","source":5734,"target":915},{"edgeType":"contains","source":4319,"target":4780},{"edgeType":"calls","source":5570,"target":1771},{"edgeType":"calls","source":4027,"target":979},{"edgeType":"calls","source":4758,"target":1573},{"edgeType":"calls","source":2003,"target":300},{"edgeType":"contains","source":2247,"target":2425},{"edgeType":"calls","source":4831,"target":367},{"edgeType":"calls","source":3435,"target":304},{"edgeType":"calls","source":4013,"target":356},{"edgeType":"contains","source":3644,"target":4571},{"edgeType":"contains","source":3438,"target":3558},{"edgeType":"contains","source":3476,"target":4494},{"edgeType":"calls","source":4130,"target":4128},{"edgeType":"imports","source":1561,"target":1562},{"edgeType":"calls","source":4674,"target":2063},{"edgeType":"calls","source":4371,"target":886},{"edgeType":"contains","source":1784,"target":3037},{"edgeType":"calls","source":5084,"target":981},{"edgeType":"calls","source":3891,"target":3080},{"edgeType":"calls","source":5732,"target":976},{"edgeType":"calls","source":5734,"target":914},{"edgeType":"contains","source":62,"target":1452},{"edgeType":"contains","source":76,"target":1018},{"edgeType":"calls","source":5643,"target":564},{"edgeType":"calls","source":4027,"target":980},{"edgeType":"calls","source":4758,"target":1572},{"edgeType":"contains","source":2244,"target":2519},{"edgeType":"calls","source":4013,"target":357},{"edgeType":"calls","source":4493,"target":4502},{"edgeType":"calls","source":4130,"target":4129},{"edgeType":"calls","source":4871,"target":4411},{"edgeType":"calls","source":4961,"target":564},{"edgeType":"contains","source":3078,"target":3091},{"edgeType":"contains","source":1784,"target":3038},{"edgeType":"contains","source":3811,"target":5736},{"edgeType":"calls","source":4328,"target":4332},{"edgeType":"calls","source":2847,"target":1621},{"edgeType":"calls","source":5084,"target":980},{"edgeType":"calls","source":2092,"target":1771},{"edgeType":"calls","source":5683,"target":380},{"edgeType":"imports","source":2948,"target":2959},{"edgeType":"contains","source":3814,"target":3529},{"edgeType":"contains","source":62,"target":1451},{"edgeType":"contains","source":4181,"target":4836},{"edgeType":"calls","source":5732,"target":975},{"edgeType":"calls","source":4095,"target":983},{"edgeType":"calls","source":4027,"target":977},{"edgeType":"calls","source":4167,"target":1922},{"edgeType":"calls","source":1152,"target":257},{"edgeType":"calls","source":1063,"target":902},{"edgeType":"calls","source":4279,"target":564},{"edgeType":"calls","source":2860,"target":1214},{"edgeType":"calls","source":4571,"target":1026},{"edgeType":"calls","source":4758,"target":1571},{"edgeType":"contains","source":1953,"target":2024},{"edgeType":"calls","source":3079,"target":2882},{"edgeType":"calls","source":4231,"target":4167},{"edgeType":"calls","source":5084,"target":979},{"edgeType":"calls","source":998,"target":803},{"edgeType":"calls","source":4027,"target":976},{"edgeType":"calls","source":3889,"target":1026},{"edgeType":"contains","source":62,"target":397},{"edgeType":"contains","source":2120,"target":2132},{"edgeType":"calls","source":3800,"target":3785},{"edgeType":"calls","source":5732,"target":974},{"edgeType":"calls","source":4095,"target":984},{"edgeType":"calls","source":4027,"target":978},{"edgeType":"calls","source":4013,"target":355},{"edgeType":"contains","source":1588,"target":1712},{"edgeType":"calls","source":4107,"target":1669},{"edgeType":"calls","source":4130,"target":4127},{"edgeType":"contains","source":5553,"target":5639},{"edgeType":"contains","source":1238,"target":5163},{"edgeType":"contains","source":2735,"target":3152},{"edgeType":"contains","source":3438,"target":3555},{"edgeType":"calls","source":5084,"target":977},{"edgeType":"contains","source":3334,"target":3608},{"edgeType":"calls","source":4758,"target":1570},{"edgeType":"calls","source":4493,"target":272},{"edgeType":"calls","source":2898,"target":2152},{"edgeType":"contains","source":3871,"target":3874},{"edgeType":"calls","source":5084,"target":978},{"edgeType":"calls","source":4429,"target":142},{"edgeType":"calls","source":5197,"target":4874},{"edgeType":"calls","source":5309,"target":345},{"edgeType":"calls","source":5296,"target":1805},{"edgeType":"calls","source":3880,"target":1306},{"edgeType":"calls","source":5732,"target":973},{"edgeType":"imports","source":960,"target":1164},{"edgeType":"calls","source":1352,"target":1455},{"edgeType":"contains","source":62,"target":396},{"edgeType":"calls","source":4095,"target":981},{"edgeType":"contains","source":3438,"target":3562},{"edgeType":"contains","source":4181,"target":4841},{"edgeType":"calls","source":2534,"target":1805},{"edgeType":"contains","source":1189,"target":2459},{"edgeType":"calls","source":3227,"target":406},{"edgeType":"calls","source":5084,"target":976},{"edgeType":"calls","source":1150,"target":313},{"edgeType":"calls","source":886,"target":1097},{"edgeType":"calls","source":4756,"target":1631},{"edgeType":"contains","source":4598,"target":4599},{"edgeType":"calls","source":4758,"target":1569},{"edgeType":"imports","source":3969,"target":903},{"edgeType":"calls","source":4470,"target":984},{"edgeType":"calls","source":1761,"target":398},{"edgeType":"calls","source":5246,"target":1240},{"edgeType":"calls","source":4399,"target":2128},{"edgeType":"calls","source":4453,"target":454},{"edgeType":"calls","source":4328,"target":4329},{"edgeType":"calls","source":1511,"target":749},{"edgeType":"calls","source":5732,"target":972},{"edgeType":"calls","source":3526,"target":2764},{"edgeType":"calls","source":4095,"target":980},{"edgeType":"calls","source":3967,"target":3891},{"edgeType":"calls","source":4027,"target":974},{"edgeType":"contains","source":2087,"target":2105},{"edgeType":"contains","source":1351,"target":2723},{"edgeType":"contains","source":4890,"target":5059},{"edgeType":"calls","source":1326,"target":141},{"edgeType":"calls","source":4095,"target":982},{"edgeType":"contains","source":3438,"target":3561},{"edgeType":"calls","source":3227,"target":407},{"edgeType":"calls","source":5084,"target":975},{"edgeType":"calls","source":4756,"target":1630},{"edgeType":"contains","source":4953,"target":5220},{"edgeType":"calls","source":4758,"target":1568},{"edgeType":"calls","source":3000,"target":1101},{"edgeType":"calls","source":4470,"target":983},{"edgeType":"calls","source":4453,"target":453},{"edgeType":"calls","source":4355,"target":320},{"edgeType":"contains","source":1510,"target":3080},{"edgeType":"calls","source":5732,"target":971},{"edgeType":"calls","source":4027,"target":975},{"edgeType":"contains","source":2120,"target":2136},{"edgeType":"contains","source":1351,"target":2720},{"edgeType":"contains","source":3438,"target":3560},{"edgeType":"calls","source":5084,"target":974},{"edgeType":"calls","source":1150,"target":315},{"edgeType":"calls","source":5383,"target":1219},{"edgeType":"contains","source":502,"target":503},{"edgeType":"calls","source":4756,"target":1629},{"edgeType":"calls","source":3250,"target":1805},{"edgeType":"calls","source":5186,"target":983},{"edgeType":"calls","source":5186,"target":984},{"edgeType":"calls","source":997,"target":830},{"edgeType":"calls","source":4453,"target":452},{"edgeType":"calls","source":4470,"target":982},{"edgeType":"calls","source":4027,"target":972},{"edgeType":"imports","source":1781,"target":1095},{"edgeType":"calls","source":5672,"target":3887},{"edgeType":"contains","source":5553,"target":5651},{"edgeType":"calls","source":4095,"target":978},{"edgeType":"calls","source":1858,"target":564},{"edgeType":"contains","source":11,"target":1981},{"edgeType":"contains","source":2120,"target":2137},{"edgeType":"calls","source":3604,"target":345},{"edgeType":"calls","source":5624,"target":89},{"edgeType":"calls","source":5186,"target":982},{"edgeType":"calls","source":3097,"target":206},{"edgeType":"calls","source":887,"target":1067},{"edgeType":"calls","source":5084,"target":973},{"edgeType":"imports","source":3460,"target":830},{"edgeType":"calls","source":4470,"target":981},{"edgeType":"calls","source":4453,"target":451},{"edgeType":"calls","source":2439,"target":521},{"edgeType":"calls","source":4095,"target":979},{"edgeType":"calls","source":4027,"target":973},{"edgeType":"calls","source":2811,"target":613},{"edgeType":"calls","source":3469,"target":3470},{"edgeType":"contains","source":11,"target":1984},{"edgeType":"calls","source":5734,"target":906},{"edgeType":"contains","source":502,"target":505},{"edgeType":"calls","source":4838,"target":142},{"edgeType":"calls","source":5084,"target":972},{"edgeType":"calls","source":1150,"target":309},{"edgeType":"calls","source":5186,"target":981},{"edgeType":"calls","source":4688,"target":564},{"edgeType":"calls","source":4470,"target":980},{"edgeType":"imports","source":2734,"target":89},{"edgeType":"contains","source":52,"target":3884},{"edgeType":"calls","source":4095,"target":976},{"edgeType":"calls","source":4453,"target":450},{"edgeType":"calls","source":4320,"target":345},{"edgeType":"contains","source":3591,"target":4109},{"edgeType":"calls","source":2138,"target":1393},{"edgeType":"contains","source":3476,"target":4503},{"edgeType":"contains","source":3438,"target":3565},{"edgeType":"calls","source":4219,"target":305},{"edgeType":"calls","source":4915,"target":3039},{"edgeType":"contains","source":2087,"target":2109},{"edgeType":"contains","source":2048,"target":2261},{"edgeType":"calls","source":5610,"target":1578},{"edgeType":"calls","source":779,"target":181},{"edgeType":"contains","source":502,"target":504},{"edgeType":"calls","source":5413,"target":1343},{"edgeType":"calls","source":3232,"target":1305},{"edgeType":"calls","source":3148,"target":2852},{"edgeType":"calls","source":5044,"target":2211},{"edgeType":"calls","source":5084,"target":971},{"edgeType":"calls","source":5186,"target":980},{"edgeType":"contains","source":2948,"target":5015},{"edgeType":"imports","source":1781,"target":1092},{"edgeType":"calls","source":4027,"target":971},{"edgeType":"calls","source":4470,"target":979},{"edgeType":"contains","source":1781,"target":1025},{"edgeType":"calls","source":4453,"target":449},{"edgeType":"contains","source":1351,"target":2728},{"edgeType":"contains","source":3438,"target":3566},{"edgeType":"calls","source":4095,"target":977},{"edgeType":"calls","source":2146,"target":89},{"edgeType":"calls","source":4157,"target":1169},{"edgeType":"contains","source":3438,"target":3564},{"edgeType":"contains","source":1351,"target":2724},{"edgeType":"calls","source":5626,"target":3195},{"edgeType":"calls","source":5063,"target":564},{"edgeType":"calls","source":779,"target":184},{"edgeType":"calls","source":5576,"target":1574},{"edgeType":"calls","source":5610,"target":1577},{"edgeType":"calls","source":1506,"target":902},{"edgeType":"contains","source":12,"target":898},{"edgeType":"calls","source":5186,"target":979},{"edgeType":"contains","source":2829,"target":4473},{"edgeType":"calls","source":1062,"target":925},{"edgeType":"calls","source":333,"target":269},{"edgeType":"calls","source":4013,"target":345},{"edgeType":"calls","source":2458,"target":984},{"edgeType":"calls","source":4530,"target":2289},{"edgeType":"calls","source":2514,"target":305},{"edgeType":"contains","source":851,"target":1315},{"edgeType":"calls","source":3868,"target":1669},{"edgeType":"calls","source":4453,"target":448},{"edgeType":"calls","source":2314,"target":2277},{"edgeType":"calls","source":4095,"target":974},{"edgeType":"calls","source":4470,"target":978},{"edgeType":"contains","source":1953,"target":2032},{"edgeType":"calls","source":4355,"target":315},{"edgeType":"calls","source":2811,"target":1669},{"edgeType":"calls","source":5739,"target":748},{"edgeType":"contains","source":1351,"target":2725},{"edgeType":"calls","source":1369,"target":920},{"edgeType":"calls","source":5610,"target":1576},{"edgeType":"calls","source":4876,"target":1075},{"edgeType":"contains","source":54,"target":2766},{"edgeType":"contains","source":75,"target":2115},{"edgeType":"calls","source":5186,"target":978},{"edgeType":"calls","source":1326,"target":139},{"edgeType":"contains","source":502,"target":506},{"edgeType":"calls","source":5368,"target":621},{"edgeType":"calls","source":1024,"target":1044},{"edgeType":"calls","source":4644,"target":2982},{"edgeType":"contains","source":3194,"target":3729},{"edgeType":"calls","source":4095,"target":975},{"edgeType":"calls","source":4470,"target":977},{"edgeType":"calls","source":1932,"target":1436},{"edgeType":"calls","source":4399,"target":2121},{"edgeType":"calls","source":4453,"target":447},{"edgeType":"calls","source":2314,"target":2278},{"edgeType":"calls","source":794,"target":803},{"edgeType":"contains","source":4000,"target":4085},{"edgeType":"calls","source":4929,"target":521},{"edgeType":"calls","source":5659,"target":89},{"edgeType":"contains","source":1784,"target":3016},{"edgeType":"contains","source":3814,"target":4566},{"edgeType":"calls","source":5530,"target":917},{"edgeType":"calls","source":995,"target":914},{"edgeType":"contains","source":69,"target":157},{"edgeType":"calls","source":5243,"target":300},{"edgeType":"calls","source":3039,"target":973},{"edgeType":"contains","source":2506,"target":2832},{"edgeType":"calls","source":5564,"target":920},{"edgeType":"calls","source":1393,"target":1261},{"edgeType":"contains","source":459,"target":752},{"edgeType":"calls","source":1369,"target":948},{"edgeType":"calls","source":4593,"target":367},{"edgeType":"calls","source":1054,"target":142},{"edgeType":"calls","source":4001,"target":1805},{"edgeType":"calls","source":4812,"target":977},{"edgeType":"calls","source":4829,"target":450},{"edgeType":"contains","source":5260,"target":4135},{"edgeType":"calls","source":2051,"target":946},{"edgeType":"imports","source":1232,"target":120},{"edgeType":"calls","source":4098,"target":4083},{"edgeType":"calls","source":2049,"target":2065},{"edgeType":"calls","source":2811,"target":2757},{"edgeType":"calls","source":2853,"target":1455},{"edgeType":"calls","source":5753,"target":345},{"edgeType":"contains","source":1953,"target":2006},{"edgeType":"contains","source":1970,"target":2536},{"edgeType":"contains","source":1852,"target":1966},{"edgeType":"calls","source":2812,"target":1669},{"edgeType":"contains","source":62,"target":1430},{"edgeType":"calls","source":1322,"target":1347},{"edgeType":"contains","source":4223,"target":4570},{"edgeType":"calls","source":5530,"target":916},{"edgeType":"calls","source":5403,"target":4853},{"edgeType":"calls","source":3039,"target":974},{"edgeType":"calls","source":1393,"target":1260},{"edgeType":"calls","source":1146,"target":460},{"edgeType":"calls","source":4009,"target":501},{"edgeType":"calls","source":2588,"target":1214},{"edgeType":"calls","source":1883,"target":1925},{"edgeType":"calls","source":4812,"target":976},{"edgeType":"calls","source":4829,"target":449},{"edgeType":"contains","source":3814,"target":4565},{"edgeType":"calls","source":2448,"target":269},{"edgeType":"contains","source":3194,"target":3702},{"edgeType":"calls","source":4220,"target":302},{"edgeType":"contains","source":3375,"target":3376},{"edgeType":"calls","source":4355,"target":345},{"edgeType":"contains","source":2737,"target":3068},{"edgeType":"calls","source":3039,"target":971},{"edgeType":"contains","source":1189,"target":2432},{"edgeType":"calls","source":5079,"target":2211},{"edgeType":"calls","source":794,"target":805},{"edgeType":"contains","source":4223,"target":4569},{"edgeType":"calls","source":3859,"target":920},{"edgeType":"calls","source":995,"target":916},{"edgeType":"calls","source":5530,"target":915},{"edgeType":"calls","source":1190,"target":1214},{"edgeType":"calls","source":3499,"target":453},{"edgeType":"calls","source":419,"target":803},{"edgeType":"calls","source":4688,"target":591},{"edgeType":"calls","source":4658,"target":1521},{"edgeType":"calls","source":3998,"target":4010},{"edgeType":"calls","source":4812,"target":975},{"edgeType":"calls","source":4829,"target":448},{"edgeType":"contains","source":1784,"target":3014},{"edgeType":"calls","source":4518,"target":1633},{"edgeType":"contains","source":1351,"target":2696},{"edgeType":"calls","source":2314,"target":2306},{"edgeType":"contains","source":3408,"target":3409},{"edgeType":"calls","source":4343,"target":1771},{"edgeType":"calls","source":3039,"target":972},{"edgeType":"calls","source":794,"target":804},{"edgeType":"imports","source":108,"target":81},{"edgeType":"contains","source":69,"target":158},{"edgeType":"calls","source":5214,"target":2253},{"edgeType":"calls","source":5257,"target":920},{"edgeType":"calls","source":995,"target":915},{"edgeType":"contains","source":40,"target":3171},{"edgeType":"calls","source":5690,"target":1239},{"edgeType":"contains","source":2244,"target":2496},{"edgeType":"calls","source":1393,"target":1262},{"edgeType":"calls","source":5693,"target":89},{"edgeType":"calls","source":3499,"target":454},{"edgeType":"calls","source":5530,"target":914},{"edgeType":"calls","source":4688,"target":4818},{"edgeType":"calls","source":4812,"target":974},{"edgeType":"calls","source":4829,"target":447},{"edgeType":"contains","source":1784,"target":3015},{"edgeType":"calls","source":4098,"target":4082},{"edgeType":"calls","source":2453,"target":1169},{"edgeType":"contains","source":1351,"target":2697},{"edgeType":"calls","source":3020,"target":501},{"edgeType":"calls","source":2146,"target":1169},{"edgeType":"calls","source":5045,"target":3263},{"edgeType":"calls","source":1393,"target":1257},{"edgeType":"calls","source":5294,"target":829},{"edgeType":"calls","source":3499,"target":451},{"edgeType":"contains","source":96,"target":4610},{"edgeType":"contains","source":62,"target":1435},{"edgeType":"contains","source":4181,"target":4820},{"edgeType":"calls","source":5390,"target":4196},{"edgeType":"contains","source":54,"target":3798},{"edgeType":"calls","source":3435,"target":320},{"edgeType":"calls","source":4812,"target":973},{"edgeType":"calls","source":3412,"target":1033},{"edgeType":"calls","source":4229,"target":1075},{"edgeType":"calls","source":4791,"target":4795},{"edgeType":"calls","source":747,"target":142},{"edgeType":"contains","source":1351,"target":2702},{"edgeType":"contains","source":5553,"target":5620},{"edgeType":"contains","source":1784,"target":3021},{"edgeType":"calls","source":5749,"target":5750},{"edgeType":"calls","source":5105,"target":345},{"edgeType":"calls","source":3499,"target":452},{"edgeType":"calls","source":3412,"target":3149},{"edgeType":"calls","source":3613,"target":89},{"edgeType":"imports","source":2948,"target":829},{"edgeType":"contains","source":4953,"target":5199},{"edgeType":"calls","source":4812,"target":972},{"edgeType":"calls","source":3272,"target":89},{"edgeType":"calls","source":4571,"target":1044},{"edgeType":"contains","source":3438,"target":3541},{"edgeType":"calls","source":1025,"target":1036},{"edgeType":"calls","source":2701,"target":1935},{"edgeType":"calls","source":5004,"target":305},{"edgeType":"calls","source":4670,"target":89},{"edgeType":"calls","source":2431,"target":788},{"edgeType":"contains","source":1852,"target":1967},{"edgeType":"contains","source":2737,"target":3072},{"edgeType":"calls","source":5386,"target":89},{"edgeType":"calls","source":3446,"target":3149},{"edgeType":"calls","source":3499,"target":449},{"edgeType":"contains","source":4223,"target":4573},{"edgeType":"calls","source":5765,"target":1025},{"edgeType":"calls","source":1393,"target":1259},{"edgeType":"contains","source":62,"target":1438},{"edgeType":"calls","source":4812,"target":971},{"edgeType":"calls","source":3499,"target":448},{"edgeType":"calls","source":5376,"target":1456},{"edgeType":"contains","source":1351,"target":2700},{"edgeType":"calls","source":4590,"target":454},{"edgeType":"calls","source":4942,"target":1169},{"edgeType":"calls","source":2939,"target":896},{"edgeType":"calls","source":436,"target":272},{"edgeType":"calls","source":419,"target":799},{"edgeType":"calls","source":4571,"target":4214},{"edgeType":"contains","source":1164,"target":2157},{"edgeType":"contains","source":1852,"target":1968},{"edgeType":"calls","source":1726,"target":1505},{"edgeType":"contains","source":3814,"target":4567},{"edgeType":"calls","source":1393,"target":1258},{"edgeType":"calls","source":3499,"target":450},{"edgeType":"contains","source":11,"target":1960},{"edgeType":"calls","source":1661,"target":349},{"edgeType":"contains","source":54,"target":1684},{"edgeType":"calls","source":3676,"target":1305},{"edgeType":"calls","source":5531,"target":1935},{"edgeType":"calls","source":4601,"target":1169},{"edgeType":"calls","source":4590,"target":453},{"edgeType":"calls","source":5045,"target":89},{"edgeType":"calls","source":995,"target":906},{"edgeType":"calls","source":4590,"target":451},{"edgeType":"calls","source":2314,"target":2299},{"edgeType":"calls","source":4363,"target":89},{"edgeType":"calls","source":2209,"target":269},{"edgeType":"calls","source":5713,"target":521},{"edgeType":"calls","source":129,"target":269},{"edgeType":"calls","source":3739,"target":406},{"edgeType":"contains","source":3811,"target":5724},{"edgeType":"contains","source":72,"target":73},{"edgeType":"contains","source":2120,"target":2122},{"edgeType":"contains","source":5553,"target":5632},{"edgeType":"contains","source":62,"target":1440},{"edgeType":"contains","source":3438,"target":3546},{"edgeType":"calls","source":5633,"target":886},{"edgeType":"contains","source":1351,"target":2706},{"edgeType":"contains","source":4181,"target":4825},{"edgeType":"calls","source":3412,"target":1029},{"edgeType":"calls","source":3237,"target":1169},{"edgeType":"calls","source":4590,"target":452},{"edgeType":"calls","source":2908,"target":2912},{"edgeType":"calls","source":2939,"target":894},{"edgeType":"calls","source":297,"target":345},{"edgeType":"calls","source":4590,"target":450},{"edgeType":"contains","source":1953,"target":2014},{"edgeType":"contains","source":280,"target":1023},{"edgeType":"contains","source":259,"target":1674},{"edgeType":"calls","source":3739,"target":407},{"edgeType":"calls","source":1951,"target":1923},{"edgeType":"contains","source":2087,"target":2089},{"edgeType":"calls","source":4807,"target":2180},{"edgeType":"calls","source":2049,"target":2056},{"edgeType":"contains","source":1351,"target":2707},{"edgeType":"contains","source":2120,"target":2123},{"edgeType":"imports","source":2948,"target":841},{"edgeType":"contains","source":62,"target":1439},{"edgeType":"contains","source":4135,"target":4136},{"edgeType":"contains","source":3438,"target":3545},{"edgeType":"calls","source":3499,"target":447},{"edgeType":"contains","source":4223,"target":4579},{"edgeType":"calls","source":3354,"target":1771},{"edgeType":"calls","source":5457,"target":1056},{"edgeType":"calls","source":5420,"target":89},{"edgeType":"calls","source":3216,"target":1821},{"edgeType":"imports","source":4103,"target":962},{"edgeType":"calls","source":1156,"target":142},{"edgeType":"calls","source":5076,"target":1240},{"edgeType":"calls","source":2939,"target":895},{"edgeType":"contains","source":889,"target":1170},{"edgeType":"calls","source":2965,"target":89},{"edgeType":"calls","source":4930,"target":481},{"edgeType":"imports","source":3926,"target":1164},{"edgeType":"contains","source":1784,"target":3022},{"edgeType":"contains","source":344,"target":1156},{"edgeType":"calls","source":3784,"target":2180},{"edgeType":"calls","source":3198,"target":262},{"edgeType":"calls","source":2355,"target":1026},{"edgeType":"calls","source":4590,"target":449},{"edgeType":"contains","source":5553,"target":5634},{"edgeType":"contains","source":62,"target":1442},{"edgeType":"contains","source":3642,"target":2505},{"edgeType":"contains","source":3438,"target":3544},{"edgeType":"contains","source":3591,"target":4086},{"edgeType":"calls","source":3434,"target":345},{"edgeType":"calls","source":5523,"target":2180},{"edgeType":"calls","source":5530,"target":906},{"edgeType":"calls","source":5079,"target":89},{"edgeType":"calls","source":4690,"target":521},{"edgeType":"calls","source":4658,"target":1513},{"edgeType":"calls","source":2811,"target":2746},{"edgeType":"calls","source":3000,"target":1115},{"edgeType":"calls","source":5004,"target":300},{"edgeType":"imports","source":1232,"target":126},{"edgeType":"calls","source":2999,"target":89},{"edgeType":"calls","source":1661,"target":345},{"edgeType":"calls","source":4658,"target":454},{"edgeType":"calls","source":2297,"target":1768},{"edgeType":"calls","source":2314,"target":2298},{"edgeType":"calls","source":4590,"target":448},{"edgeType":"calls","source":2727,"target":2180},{"edgeType":"contains","source":2120,"target":2121},{"edgeType":"contains","source":62,"target":1441},{"edgeType":"calls","source":3435,"target":315},{"edgeType":"calls","source":5173,"target":345},{"edgeType":"calls","source":811,"target":269},{"edgeType":"calls","source":4590,"target":447},{"edgeType":"imports","source":3460,"target":814},{"edgeType":"calls","source":4658,"target":453},{"edgeType":"calls","source":3715,"target":89},{"edgeType":"contains","source":1784,"target":3028},{"edgeType":"calls","source":4328,"target":4341},{"edgeType":"calls","source":2353,"target":1086},{"edgeType":"calls","source":4304,"target":857},{"edgeType":"contains","source":3438,"target":3550},{"edgeType":"calls","source":4876,"target":2152},{"edgeType":"contains","source":2737,"target":3082},{"edgeType":"calls","source":3399,"target":3542},{"edgeType":"imports","source":2948,"target":838},{"edgeType":"contains","source":2120,"target":2126},{"edgeType":"calls","source":5732,"target":984},{"edgeType":"contains","source":62,"target":1444},{"edgeType":"contains","source":3970,"target":3971},{"edgeType":"calls","source":1230,"target":1016},{"edgeType":"contains","source":4286,"target":1574},{"edgeType":"contains","source":889,"target":1175},{"edgeType":"calls","source":5431,"target":802},{"edgeType":"contains","source":4319,"target":4779},{"edgeType":"imports","source":1232,"target":124},{"edgeType":"calls","source":5119,"target":961},{"edgeType":"calls","source":3102,"target":2180},{"edgeType":"calls","source":1787,"target":1718},{"edgeType":"calls","source":3198,"target":261},{"edgeType":"contains","source":2247,"target":4532},{"edgeType":"contains","source":3078,"target":3083},{"edgeType":"calls","source":4772,"target":89},{"edgeType":"calls","source":4658,"target":452},{"edgeType":"calls","source":3667,"target":521},{"edgeType":"calls","source":2003,"target":307},{"edgeType":"contains","source":3811,"target":5727},{"edgeType":"calls","source":4328,"target":4340},{"edgeType":"contains","source":1351,"target":2711},{"edgeType":"calls","source":4184,"target":349},{"edgeType":"calls","source":3399,"target":3543},{"edgeType":"calls","source":4231,"target":2063},{"edgeType":"contains","source":5553,"target":5629},{"edgeType":"calls","source":3435,"target":313},{"edgeType":"calls","source":4859,"target":564},{"edgeType":"contains","source":2120,"target":2127},{"edgeType":"contains","source":62,"target":1443},{"edgeType":"calls","source":5732,"target":983},{"edgeType":"contains","source":519,"target":1017},{"edgeType":"calls","source":5502,"target":1771},{"edgeType":"contains","source":4319,"target":4778},{"edgeType":"calls","source":5340,"target":2565},{"edgeType":"calls","source":4658,"target":451},{"edgeType":"contains","source":889,"target":1178},{"edgeType":"calls","source":4328,"target":4339},{"edgeType":"imports","source":74,"target":81},{"edgeType":"calls","source":4431,"target":89},{"edgeType":"calls","source":2003,"target":310},{"edgeType":"contains","source":1754,"target":1842},{"edgeType":"contains","source":1351,"target":2708},{"edgeType":"contains","source":3438,"target":3548},{"edgeType":"contains","source":5553,"target":5630},{"edgeType":"calls","source":4845,"target":997},{"edgeType":"contains","source":4000,"target":4096},{"edgeType":"contains","source":2120,"target":2124},{"edgeType":"calls","source":3723,"target":895},{"edgeType":"calls","source":5732,"target":982},{"edgeType":"contains","source":62,"target":1446},{"edgeType":"calls","source":1253,"target":305},{"edgeType":"contains","source":4319,"target":4777},{"edgeType":"contains","source":785,"target":1230},{"edgeType":"calls","source":3399,"target":3540},{"edgeType":"calls","source":5385,"target":1169},{"edgeType":"calls","source":3136,"target":2180},{"edgeType":"contains","source":3078,"target":3081},{"edgeType":"calls","source":4658,"target":450},{"edgeType":"contains","source":889,"target":1177},{"edgeType":"calls","source":4758,"target":1578},{"edgeType":"imports","source":74,"target":82},{"edgeType":"calls","source":4328,"target":4338},{"edgeType":"contains","source":1784,"target":3027},{"edgeType":"calls","source":2248,"target":1169},{"edgeType":"calls","source":5732,"target":981},{"edgeType":"calls","source":5734,"target":919},{"edgeType":"contains","source":4890,"target":5044},{"edgeType":"imports","source":2948,"target":2949},{"edgeType":"calls","source":3723,"target":896},{"edgeType":"contains","source":2120,"target":2125},{"edgeType":"contains","source":62,"target":1445},{"edgeType":"contains","source":5062,"target":4997},{"edgeType":"contains","source":889,"target":1176},{"edgeType":"calls","source":3099,"target":1214},{"edgeType":"calls","source":4956,"target":4954},{"edgeType":"contains","source":5090,"target":5161},{"edgeType":"contains","source":259,"target":1650},{"edgeType":"calls","source":4749,"target":766},{"edgeType":"contains","source":4953,"target":5180},{"edgeType":"calls","source":1895,"target":1505},{"edgeType":"contains","source":3506,"target":3527},{"edgeType":"calls","source":398,"target":345},{"edgeType":"imports","source":1331,"target":273},{"edgeType":"calls","source":5077,"target":1169},{"edgeType":"calls","source":5697,"target":975},{"edgeType":"calls","source":3138,"target":1026},{"edgeType":"calls","source":5177,"target":1240},{"edgeType":"contains","source":459,"target":735},{"edgeType":"calls","source":3273,"target":1070},{"edgeType":"contains","source":259,"target":1649},{"edgeType":"contains","source":1784,"target":886},{"edgeType":"calls","source":4866,"target":309},{"edgeType":"calls","source":4212,"target":501},{"edgeType":"contains","source":3438,"target":3520},{"edgeType":"contains","source":1953,"target":1990},{"edgeType":"calls","source":946,"target":269},{"edgeType":"calls","source":956,"target":1016},{"edgeType":"contains","source":69,"target":140},{"edgeType":"contains","source":3865,"target":5082},{"edgeType":"contains","source":38,"target":44},{"edgeType":"calls","source":5697,"target":974},{"edgeType":"calls","source":5471,"target":581},{"edgeType":"contains","source":889,"target":1149},{"edgeType":"contains","source":5090,"target":5159},{"edgeType":"calls","source":5403,"target":1631},{"edgeType":"calls","source":3181,"target":1805},{"edgeType":"contains","source":4953,"target":5178},{"edgeType":"contains","source":5553,"target":5609},{"edgeType":"contains","source":1852,"target":1946},{"edgeType":"contains","source":1784,"target":2997},{"edgeType":"contains","source":3438,"target":3519},{"edgeType":"calls","source":779,"target":164},{"edgeType":"calls","source":4423,"target":300},{"edgeType":"contains","source":38,"target":47},{"edgeType":"calls","source":5274,"target":345},{"edgeType":"calls","source":927,"target":861},{"edgeType":"contains","source":2769,"target":5230},{"edgeType":"calls","source":1583,"target":1665},{"edgeType":"contains","source":69,"target":143},{"edgeType":"calls","source":5282,"target":2211},{"edgeType":"calls","source":1218,"target":296},{"edgeType":"calls","source":5697,"target":973},{"edgeType":"calls","source":5420,"target":2160},{"edgeType":"calls","source":5403,"target":1630},{"edgeType":"calls","source":3945,"target":320},{"edgeType":"contains","source":4953,"target":5177},{"edgeType":"contains","source":1588,"target":1675},{"edgeType":"calls","source":4521,"target":1489},{"edgeType":"calls","source":4601,"target":2180},{"edgeType":"calls","source":1519,"target":477},{"edgeType":"calls","source":2982,"target":1633},{"edgeType":"calls","source":5301,"target":564},{"edgeType":"calls","source":3858,"target":902},{"edgeType":"contains","source":2769,"target":5231},{"edgeType":"contains","source":459,"target":736},{"edgeType":"calls","source":5697,"target":972},{"edgeType":"calls","source":3535,"target":345},{"edgeType":"contains","source":889,"target":1151},{"edgeType":"calls","source":5403,"target":1629},{"edgeType":"calls","source":5475,"target":454},{"edgeType":"calls","source":3968,"target":1718},{"edgeType":"imports","source":280,"target":81},{"edgeType":"calls","source":4033,"target":3931},{"edgeType":"contains","source":3591,"target":4067},{"edgeType":"contains","source":1351,"target":2685},{"edgeType":"calls","source":3060,"target":269},{"edgeType":"contains","source":1784,"target":3004},{"edgeType":"calls","source":2211,"target":1219},{"edgeType":"calls","source":3556,"target":1805},{"edgeType":"contains","source":69,"target":145},{"edgeType":"contains","source":4103,"target":1937},{"edgeType":"calls","source":5697,"target":971},{"edgeType":"calls","source":2007,"target":142},{"edgeType":"calls","source":3292,"target":2591},{"edgeType":"calls","source":5425,"target":2003},{"edgeType":"calls","source":5475,"target":453},{"edgeType":"calls","source":1952,"target":790},{"edgeType":"calls","source":3435,"target":272},{"edgeType":"contains","source":1351,"target":2686},{"edgeType":"calls","source":2690,"target":1169},{"edgeType":"calls","source":4793,"target":454},{"edgeType":"calls","source":4458,"target":269},{"edgeType":"contains","source":1784,"target":3005},{"edgeType":"imports","source":74,"target":126},{"edgeType":"calls","source":5608,"target":3729},{"edgeType":"calls","source":1456,"target":310},{"edgeType":"calls","source":3473,"target":3322},{"edgeType":"contains","source":69,"target":144},{"edgeType":"calls","source":3955,"target":1064},{"edgeType":"contains","source":2247,"target":4507},{"edgeType":"contains","source":459,"target":738},{"edgeType":"calls","source":1770,"target":89},{"edgeType":"contains","source":4953,"target":5182},{"edgeType":"imports","source":3717,"target":1363},{"edgeType":"contains","source":2829,"target":4432},{"edgeType":"calls","source":5475,"target":452},{"edgeType":"calls","source":3509,"target":89},{"edgeType":"contains","source":2813,"target":2814},{"edgeType":"calls","source":1054,"target":1148},{"edgeType":"contains","source":1784,"target":887},{"edgeType":"contains","source":5553,"target":5605},{"edgeType":"calls","source":2586,"target":1219},{"edgeType":"calls","source":2591,"target":2121},{"edgeType":"calls","source":4676,"target":4080},{"edgeType":"calls","source":4793,"target":453},{"edgeType":"calls","source":4866,"target":304},{"edgeType":"calls","source":4804,"target":1169},{"edgeType":"calls","source":3787,"target":984},{"edgeType":"contains","source":1189,"target":2420},{"edgeType":"imports","source":4654,"target":4027},{"edgeType":"calls","source":3010,"target":1817},{"edgeType":"calls","source":5245,"target":1240},{"edgeType":"calls","source":5099,"target":481},{"edgeType":"calls","source":5254,"target":961},{"edgeType":"calls","source":1013,"target":305},{"edgeType":"calls","source":5716,"target":380},{"edgeType":"calls","source":5756,"target":2311},{"edgeType":"contains","source":76,"target":987},{"edgeType":"calls","source":5582,"target":305},{"edgeType":"calls","source":5475,"target":451},{"edgeType":"calls","source":1300,"target":920},{"edgeType":"imports","source":3333,"target":1626},{"edgeType":"calls","source":3237,"target":2180},{"edgeType":"calls","source":3228,"target":345},{"edgeType":"calls","source":1054,"target":1147},{"edgeType":"contains","source":4873,"target":3433},{"edgeType":"contains","source":4890,"target":5020},{"edgeType":"calls","source":2960,"target":1253},{"edgeType":"calls","source":4793,"target":452},{"edgeType":"calls","source":2765,"target":956},{"edgeType":"calls","source":1563,"target":2280},{"edgeType":"contains","source":459,"target":740},{"edgeType":"imports","source":74,"target":124},{"edgeType":"contains","source":1852,"target":1952},{"edgeType":"calls","source":956,"target":1014},{"edgeType":"calls","source":297,"target":302},{"edgeType":"contains","source":1784,"target":3003},{"edgeType":"calls","source":4327,"target":4328},{"edgeType":"calls","source":3945,"target":315},{"edgeType":"contains","source":3837,"target":3838},{"edgeType":"calls","source":5683,"target":345},{"edgeType":"calls","source":4167,"target":830},{"edgeType":"calls","source":1456,"target":307},{"edgeType":"contains","source":2207,"target":2579},{"edgeType":"calls","source":5685,"target":282},{"edgeType":"contains","source":1351,"target":2689},{"edgeType":"calls","source":3399,"target":3497},{"edgeType":"calls","source":5475,"target":450},{"edgeType":"calls","source":5045,"target":2152},{"edgeType":"contains","source":1189,"target":2426},{"edgeType":"calls","source":4645,"target":811},{"edgeType":"calls","source":4793,"target":451},{"edgeType":"calls","source":2822,"target":1300},{"edgeType":"calls","source":297,"target":297},{"edgeType":"contains","source":1043,"target":3780},{"edgeType":"contains","source":3837,"target":3845},{"edgeType":"calls","source":3787,"target":982},{"edgeType":"imports","source":1232,"target":1235},{"edgeType":"calls","source":5296,"target":1771},{"edgeType":"contains","source":459,"target":743},{"edgeType":"calls","source":4125,"target":1074},{"edgeType":"contains","source":3938,"target":3885},{"edgeType":"calls","source":5623,"target":89},{"edgeType":"contains","source":5553,"target":5616},{"edgeType":"calls","source":4033,"target":3928},{"edgeType":"contains","source":2263,"target":844},{"edgeType":"contains","source":2207,"target":2580},{"edgeType":"calls","source":5475,"target":449},{"edgeType":"contains","source":4326,"target":4540},{"edgeType":"calls","source":4793,"target":450},{"edgeType":"contains","source":4953,"target":5187},{"edgeType":"contains","source":2737,"target":3063},{"edgeType":"calls","source":4947,"target":961},{"edgeType":"calls","source":4973,"target":2269},{"edgeType":"contains","source":459,"target":742},{"edgeType":"calls","source":1048,"target":269},{"edgeType":"calls","source":3787,"target":983},{"edgeType":"calls","source":5292,"target":837},{"edgeType":"calls","source":4492,"target":4496},{"edgeType":"contains","source":2247,"target":4511},{"edgeType":"calls","source":2205,"target":345},{"edgeType":"calls","source":3603,"target":345},{"edgeType":"calls","source":3945,"target":313},{"edgeType":"contains","source":3837,"target":3844},{"edgeType":"imports","source":2948,"target":890},{"edgeType":"contains","source":2829,"target":4436},{"edgeType":"calls","source":4866,"target":1357},{"edgeType":"calls","source":4841,"target":1075},{"edgeType":"contains","source":889,"target":1157},{"edgeType":"calls","source":5475,"target":448},{"edgeType":"calls","source":4793,"target":449},{"edgeType":"calls","source":4891,"target":4810},{"edgeType":"contains","source":1784,"target":3006},{"edgeType":"calls","source":3815,"target":1169},{"edgeType":"contains","source":1784,"target":892},{"edgeType":"calls","source":5292,"target":836},{"edgeType":"calls","source":5186,"target":5179},{"edgeType":"calls","source":3787,"target":980},{"edgeType":"calls","source":3965,"target":747},{"edgeType":"calls","source":1779,"target":866},{"edgeType":"contains","source":1953,"target":1995},{"edgeType":"calls","source":4160,"target":1044},{"edgeType":"contains","source":69,"target":150},{"edgeType":"calls","source":3434,"target":297},{"edgeType":"contains","source":3506,"target":3532},{"edgeType":"calls","source":5400,"target":2772},{"edgeType":"calls","source":5475,"target":447},{"edgeType":"calls","source":2567,"target":1805},{"edgeType":"calls","source":4793,"target":448},{"edgeType":"imports","source":1331,"target":278},{"edgeType":"calls","source":5342,"target":2456},{"edgeType":"contains","source":2737,"target":3061},{"edgeType":"calls","source":5022,"target":1805},{"edgeType":"calls","source":5292,"target":835},{"edgeType":"calls","source":1013,"target":300},{"edgeType":"calls","source":3787,"target":981},{"edgeType":"imports","source":1232,"target":1234},{"edgeType":"calls","source":3843,"target":302},{"edgeType":"contains","source":459,"target":744},{"edgeType":"calls","source":2534,"target":1771},{"edgeType":"contains","source":96,"target":4598},{"edgeType":"calls","source":4125,"target":1073},{"edgeType":"calls","source":4112,"target":419},{"edgeType":"calls","source":4927,"target":521},{"edgeType":"calls","source":1506,"target":867},{"edgeType":"contains","source":1351,"target":2693},{"edgeType":"calls","source":5582,"target":300},{"edgeType":"calls","source":5703,"target":777},{"edgeType":"calls","source":4793,"target":447},{"edgeType":"contains","source":4953,"target":5192},{"edgeType":"calls","source":1393,"target":142},{"edgeType":"calls","source":5292,"target":833},{"edgeType":"contains","source":2247,"target":4514},{"edgeType":"calls","source":4520,"target":454},{"edgeType":"calls","source":3855,"target":984},{"edgeType":"calls","source":3787,"target":978},{"edgeType":"contains","source":1784,"target":3012},{"edgeType":"calls","source":4196,"target":983},{"edgeType":"calls","source":5703,"target":776},{"edgeType":"contains","source":69,"target":152},{"edgeType":"contains","source":1953,"target":2002},{"edgeType":"calls","source":3250,"target":1771},{"edgeType":"calls","source":5292,"target":832},{"edgeType":"contains","source":2247,"target":4515},{"edgeType":"calls","source":3945,"target":309},{"edgeType":"contains","source":960,"target":3185},{"edgeType":"contains","source":459,"target":746},{"edgeType":"calls","source":3787,"target":979},{"edgeType":"contains","source":96,"target":4600},{"edgeType":"calls","source":4520,"target":453},{"edgeType":"contains","source":1784,"target":3013},{"edgeType":"contains","source":1351,"target":2695},{"edgeType":"calls","source":4196,"target":984},{"edgeType":"calls","source":5701,"target":837},{"edgeType":"calls","source":2114,"target":1044},{"edgeType":"contains","source":2207,"target":2581},{"edgeType":"contains","source":1400,"target":115},{"edgeType":"calls","source":3787,"target":976},{"edgeType":"contains","source":2584,"target":3579},{"edgeType":"contains","source":2948,"target":4979},{"edgeType":"calls","source":1168,"target":777},{"edgeType":"calls","source":5346,"target":1271},{"edgeType":"calls","source":5347,"target":1240},{"edgeType":"calls","source":396,"target":397},{"edgeType":"calls","source":4707,"target":997},{"edgeType":"contains","source":2247,"target":4512},{"edgeType":"calls","source":3855,"target":982},{"edgeType":"calls","source":1969,"target":257},{"edgeType":"contains","source":3591,"target":4074},{"edgeType":"calls","source":4520,"target":452},{"edgeType":"calls","source":4196,"target":981},{"edgeType":"contains","source":3811,"target":5710},{"edgeType":"calls","source":4252,"target":302},{"edgeType":"contains","source":4223,"target":1393},{"edgeType":"calls","source":5006,"target":1240},{"edgeType":"calls","source":5701,"target":836},{"edgeType":"contains","source":62,"target":1428},{"edgeType":"contains","source":97,"target":1400},{"edgeType":"contains","source":889,"target":1160},{"edgeType":"calls","source":5382,"target":2269},{"edgeType":"calls","source":1168,"target":776},{"edgeType":"calls","source":3880,"target":3379},{"edgeType":"calls","source":2451,"target":1169},{"edgeType":"calls","source":3855,"target":983},{"edgeType":"calls","source":4715,"target":1805},{"edgeType":"calls","source":3787,"target":977},{"edgeType":"calls","source":4520,"target":451},{"edgeType":"calls","source":4370,"target":1930},{"edgeType":"contains","source":1784,"target":3011},{"edgeType":"calls","source":4196,"target":982},{"edgeType":"calls","source":4229,"target":1016},{"edgeType":"calls","source":2273,"target":345},{"edgeType":"imports","source":4037,"target":4105},{"edgeType":"imports","source":1331,"target":256},{"edgeType":"calls","source":5057,"target":1805},{"edgeType":"calls","source":3652,"target":964},{"edgeType":"contains","source":2505,"target":2830},{"edgeType":"contains","source":40,"target":3137},{"edgeType":"calls","source":3784,"target":2157},{"edgeType":"calls","source":5186,"target":977},{"edgeType":"calls","source":5348,"target":1240},{"edgeType":"calls","source":3366,"target":2431},{"edgeType":"calls","source":1150,"target":304},{"edgeType":"calls","source":3148,"target":2846},{"edgeType":"contains","source":5090,"target":5144},{"edgeType":"calls","source":4095,"target":972},{"edgeType":"calls","source":4080,"target":380},{"edgeType":"calls","source":3964,"target":805},{"edgeType":"contains","source":5553,"target":5591},{"edgeType":"calls","source":4470,"target":976},{"edgeType":"calls","source":2458,"target":982},{"edgeType":"calls","source":4355,"target":313},{"edgeType":"contains","source":4747,"target":5206},{"edgeType":"calls","source":779,"target":177},{"edgeType":"calls","source":892,"target":902},{"edgeType":"contains","source":54,"target":1645},{"edgeType":"contains","source":62,"target":1397},{"edgeType":"contains","source":3865,"target":5065},{"edgeType":"contains","source":459,"target":718},{"edgeType":"calls","source":5186,"target":976},{"edgeType":"calls","source":3537,"target":302},{"edgeType":"contains","source":3641,"target":5667},{"edgeType":"calls","source":3993,"target":964},{"edgeType":"calls","source":5255,"target":5179},{"edgeType":"calls","source":4073,"target":598},{"edgeType":"calls","source":1967,"target":345},{"edgeType":"contains","source":2829,"target":4414},{"edgeType":"calls","source":2314,"target":2276},{"edgeType":"calls","source":4861,"target":481},{"edgeType":"calls","source":4095,"target":973},{"edgeType":"calls","source":4219,"target":300},{"edgeType":"calls","source":398,"target":361},{"edgeType":"calls","source":2458,"target":983},{"edgeType":"calls","source":4294,"target":89},{"edgeType":"calls","source":4373,"target":811},{"edgeType":"calls","source":4470,"target":975},{"edgeType":"contains","source":4747,"target":5205},{"edgeType":"calls","source":4415,"target":564},{"edgeType":"calls","source":2306,"target":406},{"edgeType":"calls","source":5186,"target":975},{"edgeType":"calls","source":3077,"target":817},{"edgeType":"calls","source":5612,"target":454},{"edgeType":"calls","source":5610,"target":1573},{"edgeType":"contains","source":2769,"target":5214},{"edgeType":"calls","source":5685,"target":305},{"edgeType":"calls","source":5385,"target":2205},{"edgeType":"calls","source":3964,"target":803},{"edgeType":"calls","source":4224,"target":1199},{"edgeType":"calls","source":4233,"target":920},{"edgeType":"contains","source":3811,"target":5681},{"edgeType":"calls","source":4210,"target":1633},{"edgeType":"calls","source":4327,"target":4350},{"edgeType":"calls","source":2458,"target":980},{"edgeType":"imports","source":1561,"target":1581},{"edgeType":"calls","source":4470,"target":974},{"edgeType":"calls","source":2306,"target":407},{"edgeType":"calls","source":4355,"target":309},{"edgeType":"contains","source":4747,"target":5204},{"edgeType":"calls","source":5186,"target":974},{"edgeType":"calls","source":3077,"target":818},{"edgeType":"contains","source":1988,"target":3000},{"edgeType":"contains","source":4953,"target":5160},{"edgeType":"calls","source":5610,"target":1572},{"edgeType":"contains","source":2506,"target":2798},{"edgeType":"contains","source":40,"target":2081},{"edgeType":"contains","source":62,"target":1399},{"edgeType":"calls","source":3070,"target":3149},{"edgeType":"contains","source":459,"target":720},{"edgeType":"calls","source":5612,"target":453},{"edgeType":"calls","source":3367,"target":284},{"edgeType":"calls","source":4095,"target":971},{"edgeType":"contains","source":54,"target":3761},{"edgeType":"calls","source":3964,"target":804},{"edgeType":"calls","source":3934,"target":3848},{"edgeType":"calls","source":4047,"target":345},{"edgeType":"calls","source":4001,"target":1771},{"edgeType":"contains","source":1043,"target":3756},{"edgeType":"calls","source":4915,"target":1976},{"edgeType":"contains","source":3951,"target":1340},{"edgeType":"imports","source":1238,"target":1023},{"edgeType":"calls","source":4470,"target":973},{"edgeType":"contains","source":1510,"target":4077},{"edgeType":"calls","source":2458,"target":981},{"edgeType":"contains","source":3506,"target":3508},{"edgeType":"imports","source":3969,"target":1989},{"edgeType":"calls","source":4470,"target":971},{"edgeType":"imports","source":108,"target":111},{"edgeType":"contains","source":4598,"target":4545},{"edgeType":"calls","source":3136,"target":2157},{"edgeType":"calls","source":5186,"target":973},{"edgeType":"contains","source":2569,"target":5078},{"edgeType":"contains","source":76,"target":968},{"edgeType":"calls","source":5764,"target":1025},{"edgeType":"calls","source":5612,"target":452},{"edgeType":"contains","source":253,"target":1824},{"edgeType":"calls","source":5610,"target":1571},{"edgeType":"calls","source":3305,"target":89},{"edgeType":"calls","source":4210,"target":1631},{"edgeType":"calls","source":2458,"target":978},{"edgeType":"contains","source":4747,"target":5211},{"edgeType":"calls","source":794,"target":766},{"edgeType":"contains","source":1043,"target":3759},{"edgeType":"calls","source":4470,"target":972},{"edgeType":"calls","source":779,"target":174},{"edgeType":"calls","source":4434,"target":1029},{"edgeType":"calls","source":997,"target":814},{"edgeType":"calls","source":4493,"target":257},{"edgeType":"contains","source":3871,"target":3826},{"edgeType":"calls","source":3070,"target":1033},{"edgeType":"contains","source":4747,"target":5210},{"edgeType":"calls","source":5186,"target":972},{"edgeType":"contains","source":1684,"target":1860},{"edgeType":"contains","source":73,"target":1060},{"edgeType":"contains","source":459,"target":722},{"edgeType":"calls","source":3694,"target":3887},{"edgeType":"calls","source":5612,"target":451},{"edgeType":"calls","source":5610,"target":1570},{"edgeType":"contains","source":2769,"target":5221},{"edgeType":"calls","source":2431,"target":759},{"edgeType":"calls","source":2458,"target":979},{"edgeType":"contains","source":1043,"target":3758},{"edgeType":"calls","source":5044,"target":89},{"edgeType":"contains","source":3374,"target":3378},{"edgeType":"contains","source":5090,"target":5147},{"edgeType":"calls","source":4860,"target":508},{"edgeType":"calls","source":2514,"target":300},{"edgeType":"calls","source":2314,"target":2268},{"edgeType":"contains","source":459,"target":725},{"edgeType":"calls","source":5186,"target":971},{"edgeType":"contains","source":4747,"target":5209},{"edgeType":"calls","source":2458,"target":975},{"edgeType":"calls","source":4362,"target":89},{"edgeType":"calls","source":5712,"target":521},{"edgeType":"calls","source":4021,"target":89},{"edgeType":"calls","source":5612,"target":450},{"edgeType":"calls","source":5610,"target":1569},{"edgeType":"contains","source":4181,"target":4785},{"edgeType":"contains","source":4286,"target":3644},{"edgeType":"imports","source":4286,"target":2735},{"edgeType":"contains","source":4326,"target":4519},{"edgeType":"calls","source":5612,"target":449},{"edgeType":"contains","source":2878,"target":2896},{"edgeType":"calls","source":4210,"target":1629},{"edgeType":"contains","source":2769,"target":5218},{"edgeType":"calls","source":3232,"target":1293},{"edgeType":"calls","source":2884,"target":1511},{"edgeType":"calls","source":2458,"target":976},{"edgeType":"contains","source":3506,"target":3513},{"edgeType":"contains","source":459,"target":724},{"edgeType":"calls","source":944,"target":345},{"edgeType":"calls","source":5305,"target":1509},{"edgeType":"contains","source":4747,"target":5208},{"edgeType":"calls","source":1777,"target":948},{"edgeType":"calls","source":5685,"target":300},{"edgeType":"calls","source":1369,"target":912},{"edgeType":"calls","source":5610,"target":1568},{"edgeType":"contains","source":4326,"target":4517},{"edgeType":"contains","source":4356,"target":4645},{"edgeType":"calls","source":5612,"target":448},{"edgeType":"contains","source":3591,"target":4048},{"edgeType":"calls","source":5456,"target":1056},{"edgeType":"contains","source":2829,"target":4416},{"edgeType":"contains","source":2769,"target":5219},{"edgeType":"calls","source":4210,"target":1630},{"edgeType":"calls","source":3232,"target":1294},{"edgeType":"calls","source":1075,"target":512},{"edgeType":"calls","source":2515,"target":267},{"edgeType":"calls","source":4652,"target":1669},{"edgeType":"calls","source":2458,"target":977},{"edgeType":"calls","source":5075,"target":1240},{"edgeType":"calls","source":794,"target":767},{"edgeType":"contains","source":1043,"target":3760},{"edgeType":"contains","source":1189,"target":2405},{"edgeType":"calls","source":4866,"target":320},{"edgeType":"contains","source":1043,"target":3764},{"edgeType":"imports","source":3641,"target":1574},{"edgeType":"calls","source":1728,"target":348},{"edgeType":"imports","source":4176,"target":2959},{"edgeType":"imports","source":3374,"target":354},{"edgeType":"calls","source":5361,"target":829},{"edgeType":"contains","source":459,"target":727},{"edgeType":"calls","source":2458,"target":973},{"edgeType":"calls","source":4361,"target":2232},{"edgeType":"calls","source":4355,"target":304},{"edgeType":"calls","source":5753,"target":305},{"edgeType":"calls","source":3608,"target":206},{"edgeType":"calls","source":5636,"target":2875},{"edgeType":"calls","source":5697,"target":984},{"edgeType":"contains","source":4103,"target":4038},{"edgeType":"contains","source":1852,"target":1940},{"edgeType":"calls","source":2003,"target":279},{"edgeType":"contains","source":2769,"target":5224},{"edgeType":"contains","source":5553,"target":5599},{"edgeType":"calls","source":4857,"target":598},{"edgeType":"calls","source":5612,"target":447},{"edgeType":"contains","source":1376,"target":841},{"edgeType":"contains","source":4223,"target":4547},{"edgeType":"calls","source":3479,"target":1033},{"edgeType":"contains","source":4326,"target":4525},{"edgeType":"calls","source":5412,"target":305},{"edgeType":"calls","source":3232,"target":1291},{"edgeType":"calls","source":1086,"target":1223},{"edgeType":"contains","source":889,"target":1138},{"edgeType":"calls","source":2898,"target":1075},{"edgeType":"calls","source":5289,"target":946},{"edgeType":"calls","source":2458,"target":974},{"edgeType":"calls","source":4327,"target":4342},{"edgeType":"calls","source":4571,"target":2063},{"edgeType":"contains","source":2247,"target":4495},{"edgeType":"calls","source":4473,"target":1930},{"edgeType":"calls","source":3680,"target":89},{"edgeType":"calls","source":4296,"target":1075},{"edgeType":"calls","source":4301,"target":920},{"edgeType":"calls","source":5697,"target":983},{"edgeType":"contains","source":1852,"target":1941},{"edgeType":"calls","source":1355,"target":282},{"edgeType":"calls","source":4022,"target":3228},{"edgeType":"calls","source":4125,"target":1092},{"edgeType":"calls","source":5696,"target":1013},{"edgeType":"calls","source":5697,"target":982},{"edgeType":"contains","source":4326,"target":4524},{"edgeType":"contains","source":5090,"target":5151},{"edgeType":"calls","source":3232,"target":1292},{"edgeType":"calls","source":4674,"target":985},{"edgeType":"calls","source":779,"target":169},{"edgeType":"contains","source":2585,"target":3530},{"edgeType":"contains","source":889,"target":1137},{"edgeType":"contains","source":2910,"target":2968},{"edgeType":"calls","source":5172,"target":345},{"edgeType":"calls","source":1144,"target":481},{"edgeType":"contains","source":1043,"target":3762},{"edgeType":"contains","source":2769,"target":5225},{"edgeType":"calls","source":2458,"target":971},{"edgeType":"calls","source":3170,"target":1097},{"edgeType":"contains","source":1043,"target":3766},{"edgeType":"contains","source":1058,"target":1187},{"edgeType":"contains","source":459,"target":729},{"edgeType":"calls","source":4499,"target":2180},{"edgeType":"calls","source":4369,"target":925},{"edgeType":"imports","source":317,"target":1042},{"edgeType":"calls","source":1849,"target":1884},{"edgeType":"contains","source":38,"target":39},{"edgeType":"contains","source":2769,"target":5222},{"edgeType":"calls","source":2760,"target":2180},{"edgeType":"calls","source":5697,"target":981},{"edgeType":"contains","source":4326,"target":4523},{"edgeType":"calls","source":5628,"target":2063},{"edgeType":"contains","source":4747,"target":5213},{"edgeType":"calls","source":5453,"target":89},{"edgeType":"calls","source":5286,"target":5266},{"edgeType":"calls","source":3232,"target":1289},{"edgeType":"calls","source":4963,"target":481},{"edgeType":"contains","source":889,"target":1140},{"edgeType":"calls","source":956,"target":1026},{"edgeType":"contains","source":1043,"target":3765},{"edgeType":"calls","source":2458,"target":972},{"edgeType":"calls","source":5658,"target":4304},{"edgeType":"contains","source":75,"target":4176},{"edgeType":"calls","source":4144,"target":501},{"edgeType":"contains","source":2769,"target":5223},{"edgeType":"calls","source":2015,"target":2022},{"edgeType":"contains","source":2185,"target":2187},{"edgeType":"contains","source":4283,"target":3741},{"edgeType":"calls","source":5557,"target":1092},{"edgeType":"contains","source":2244,"target":2472},{"edgeType":"contains","source":4326,"target":4522},{"edgeType":"contains","source":1238,"target":5118},{"edgeType":"calls","source":5697,"target":980},{"edgeType":"calls","source":779,"target":171},{"edgeType":"calls","source":1086,"target":1224},{"edgeType":"calls","source":3232,"target":1290},{"edgeType":"contains","source":4747,"target":5212},{"edgeType":"contains","source":889,"target":1139},{"edgeType":"calls","source":3878,"target":3459},{"edgeType":"calls","source":4413,"target":3787},{"edgeType":"contains","source":1043,"target":3768},{"edgeType":"calls","source":4503,"target":997},{"edgeType":"calls","source":4671,"target":1074},{"edgeType":"imports","source":4286,"target":3781},{"edgeType":"calls","source":4398,"target":3195},{"edgeType":"contains","source":1852,"target":1944},{"edgeType":"calls","source":4430,"target":89},{"edgeType":"calls","source":4866,"target":315},{"edgeType":"calls","source":1543,"target":793},{"edgeType":"calls","source":779,"target":166},{"edgeType":"calls","source":5701,"target":1912},{"edgeType":"calls","source":5697,"target":979},{"edgeType":"calls","source":5753,"target":300},{"edgeType":"calls","source":2991,"target":302},{"edgeType":"contains","source":459,"target":731},{"edgeType":"contains","source":4326,"target":4529},{"edgeType":"contains","source":2769,"target":5228},{"edgeType":"contains","source":1058,"target":1188},{"edgeType":"imports","source":3437,"target":510},{"edgeType":"contains","source":459,"target":730},{"edgeType":"contains","source":1043,"target":3767},{"edgeType":"calls","source":4671,"target":1073},{"edgeType":"calls","source":4423,"target":305},{"edgeType":"contains","source":1852,"target":1945},{"edgeType":"contains","source":3865,"target":5077},{"edgeType":"calls","source":5697,"target":978},{"edgeType":"calls","source":92,"target":321},{"edgeType":"calls","source":4947,"target":2031},{"edgeType":"calls","source":3590,"target":1817},{"edgeType":"calls","source":5143,"target":1240},{"edgeType":"contains","source":4953,"target":5174},{"edgeType":"contains","source":4326,"target":4528},{"edgeType":"contains","source":2769,"target":5229},{"edgeType":"calls","source":5412,"target":300},{"edgeType":"calls","source":5175,"target":1305},{"edgeType":"calls","source":2595,"target":948},{"edgeType":"contains","source":1043,"target":3770},{"edgeType":"contains","source":3591,"target":4057},{"edgeType":"contains","source":1518,"target":1726},{"edgeType":"contains","source":1852,"target":1942},{"edgeType":"calls","source":2281,"target":1169},{"edgeType":"calls","source":5697,"target":977},{"edgeType":"calls","source":3589,"target":788},{"edgeType":"calls","source":3603,"target":354},{"edgeType":"calls","source":3614,"target":1070},{"edgeType":"calls","source":4866,"target":313},{"edgeType":"calls","source":853,"target":1045},{"edgeType":"contains","source":459,"target":733},{"edgeType":"contains","source":4326,"target":4527},{"edgeType":"calls","source":5475,"target":4688},{"edgeType":"calls","source":5568,"target":1805},{"edgeType":"calls","source":3132,"target":1214},{"edgeType":"contains","source":2769,"target":5226},{"edgeType":"calls","source":1056,"target":1093},{"edgeType":"contains","source":963,"target":964},{"edgeType":"calls","source":4749,"target":767},{"edgeType":"contains","source":1043,"target":3769},{"edgeType":"calls","source":2713,"target":462},{"edgeType":"contains","source":1953,"target":1983},{"edgeType":"calls","source":4048,"target":302},{"edgeType":"contains","source":1852,"target":1943},{"edgeType":"calls","source":4464,"target":89},{"edgeType":"calls","source":5697,"target":976},{"edgeType":"contains","source":69,"target":138},{"edgeType":"calls","source":1531,"target":1166},{"edgeType":"contains","source":4326,"target":4526},{"edgeType":"contains","source":4356,"target":4653},{"edgeType":"contains","source":889,"target":1143},{"edgeType":"calls","source":5608,"target":564},{"edgeType":"contains","source":2769,"target":5227},{"edgeType":"calls","source":3228,"target":449},{"edgeType":"contains","source":3057,"target":1557},{"edgeType":"calls","source":5306,"target":1568},{"edgeType":"calls","source":1075,"target":598},{"edgeType":"calls","source":4017,"target":302},{"edgeType":"calls","source":3859,"target":972},{"edgeType":"calls","source":4662,"target":4619},{"edgeType":"calls","source":4372,"target":925},{"edgeType":"contains","source":1510,"target":4061},{"edgeType":"calls","source":297,"target":404},{"edgeType":"calls","source":5012,"target":1169},{"edgeType":"calls","source":3710,"target":305},{"edgeType":"calls","source":3676,"target":302},{"edgeType":"calls","source":5661,"target":4304},{"edgeType":"contains","source":1953,"target":1956},{"edgeType":"contains","source":459,"target":702},{"edgeType":"calls","source":994,"target":995},{"edgeType":"calls","source":1239,"target":799},{"edgeType":"calls","source":5291,"target":976},{"edgeType":"calls","source":5257,"target":973},{"edgeType":"contains","source":1510,"target":4062},{"edgeType":"calls","source":3859,"target":973},{"edgeType":"calls","source":3983,"target":300},{"edgeType":"contains","source":5656,"target":5553},{"edgeType":"contains","source":4953,"target":5146},{"edgeType":"calls","source":4662,"target":4618},{"edgeType":"contains","source":2878,"target":2879},{"edgeType":"contains","source":5553,"target":5575},{"edgeType":"calls","source":4439,"target":961},{"edgeType":"contains","source":1546,"target":1889},{"edgeType":"calls","source":4411,"target":772},{"edgeType":"calls","source":2279,"target":272},{"edgeType":"calls","source":2261,"target":830},{"edgeType":"calls","source":350,"target":874},{"edgeType":"contains","source":4747,"target":5189},{"edgeType":"calls","source":2846,"target":2779},{"edgeType":"contains","source":1852,"target":1917},{"edgeType":"contains","source":2518,"target":1354},{"edgeType":"calls","source":5550,"target":345},{"edgeType":"calls","source":1713,"target":902},{"edgeType":"calls","source":2960,"target":302},{"edgeType":"calls","source":5257,"target":972},{"edgeType":"calls","source":3228,"target":450},{"edgeType":"calls","source":5291,"target":975},{"edgeType":"calls","source":3228,"target":447},{"edgeType":"contains","source":2247,"target":4467},{"edgeType":"calls","source":4662,"target":389},{"edgeType":"contains","source":2977,"target":2978},{"edgeType":"contains","source":4953,"target":5145},{"edgeType":"calls","source":2742,"target":1771},{"edgeType":"calls","source":4219,"target":380},{"edgeType":"contains","source":1781,"target":5171},{"edgeType":"calls","source":2279,"target":269},{"edgeType":"contains","source":1546,"target":1886},{"edgeType":"calls","source":2353,"target":89},{"edgeType":"calls","source":3647,"target":142},{"edgeType":"calls","source":3582,"target":2157},{"edgeType":"contains","source":2698,"target":3170},{"edgeType":"contains","source":4747,"target":5188},{"edgeType":"contains","source":2178,"target":264},{"edgeType":"contains","source":4890,"target":4983},{"edgeType":"calls","source":4847,"target":997},{"edgeType":"calls","source":5077,"target":2323},{"edgeType":"calls","source":5291,"target":974},{"edgeType":"calls","source":997,"target":904},{"edgeType":"calls","source":5257,"target":971},{"edgeType":"contains","source":459,"target":704},{"edgeType":"calls","source":5387,"target":1169},{"edgeType":"calls","source":3228,"target":448},{"edgeType":"calls","source":3859,"target":971},{"edgeType":"contains","source":3865,"target":5046},{"edgeType":"contains","source":3644,"target":4498},{"edgeType":"calls","source":2440,"target":564},{"edgeType":"calls","source":4536,"target":2180},{"edgeType":"calls","source":5046,"target":1169},{"edgeType":"calls","source":1563,"target":269},{"edgeType":"calls","source":5181,"target":2269},{"edgeType":"calls","source":3470,"target":345},{"edgeType":"contains","source":4953,"target":5143},{"edgeType":"contains","source":2263,"target":801},{"edgeType":"calls","source":5146,"target":1240},{"edgeType":"calls","source":5291,"target":973},{"edgeType":"contains","source":4694,"target":4716},{"edgeType":"contains","source":1510,"target":4065},{"edgeType":"contains","source":962,"target":969},{"edgeType":"calls","source":1817,"target":847},{"edgeType":"calls","source":4166,"target":964},{"edgeType":"calls","source":2809,"target":749},{"edgeType":"calls","source":5045,"target":1199},{"edgeType":"calls","source":5713,"target":1631},{"edgeType":"contains","source":1784,"target":857},{"edgeType":"calls","source":5016,"target":1041},{"edgeType":"contains","source":1988,"target":2989},{"edgeType":"calls","source":5291,"target":972},{"edgeType":"calls","source":1817,"target":846},{"edgeType":"contains","source":4223,"target":1355},{"edgeType":"contains","source":1518,"target":1704},{"edgeType":"contains","source":2244,"target":2453},{"edgeType":"calls","source":5421,"target":1169},{"edgeType":"calls","source":4801,"target":305},{"edgeType":"calls","source":4770,"target":1266},{"edgeType":"contains","source":1588,"target":1648},{"edgeType":"calls","source":2364,"target":1861},{"edgeType":"contains","source":4890,"target":4989},{"edgeType":"contains","source":5090,"target":5131},{"edgeType":"calls","source":4662,"target":386},{"edgeType":"contains","source":2977,"target":2985},{"edgeType":"contains","source":3204,"target":3347},{"edgeType":"calls","source":2861,"target":1253},{"edgeType":"calls","source":5243,"target":345},{"edgeType":"calls","source":5291,"target":971},{"edgeType":"contains","source":459,"target":705},{"edgeType":"calls","source":5713,"target":1630},{"edgeType":"calls","source":5740,"target":793},{"edgeType":"calls","source":3483,"target":997},{"edgeType":"calls","source":1093,"target":1095},{"edgeType":"calls","source":3261,"target":2591},{"edgeType":"contains","source":1510,"target":4063},{"edgeType":"calls","source":1791,"target":1655},{"edgeType":"calls","source":2348,"target":2354},{"edgeType":"calls","source":350,"target":873},{"edgeType":"contains","source":2584,"target":3537},{"edgeType":"calls","source":5180,"target":1240},{"edgeType":"contains","source":4873,"target":3400},{"edgeType":"calls","source":3866,"target":1805},{"edgeType":"calls","source":5215,"target":2269},{"edgeType":"contains","source":344,"target":1102},{"edgeType":"calls","source":5328,"target":1937},{"edgeType":"calls","source":1608,"target":985},{"edgeType":"calls","source":5713,"target":1629},{"edgeType":"calls","source":4027,"target":1044},{"edgeType":"contains","source":1510,"target":4064},{"edgeType":"contains","source":1518,"target":1702},{"edgeType":"contains","source":3591,"target":4031},{"edgeType":"calls","source":5461,"target":984},{"edgeType":"calls","source":2023,"target":1861},{"edgeType":"calls","source":266,"target":305},{"edgeType":"contains","source":3204,"target":3345},{"edgeType":"calls","source":436,"target":320},{"edgeType":"calls","source":4662,"target":384},{"edgeType":"calls","source":3710,"target":300},{"edgeType":"calls","source":2279,"target":266},{"edgeType":"contains","source":459,"target":707},{"edgeType":"contains","source":1784,"target":1913},{"edgeType":"contains","source":1,"target":107},{"edgeType":"contains","source":54,"target":1635},{"edgeType":"calls","source":3412,"target":2139},{"edgeType":"calls","source":5572,"target":1771},{"edgeType":"contains","source":2244,"target":2451},{"edgeType":"calls","source":5461,"target":983},{"edgeType":"calls","source":1996,"target":1636},{"edgeType":"contains","source":5553,"target":5582},{"edgeType":"calls","source":1226,"target":137},{"edgeType":"contains","source":1510,"target":4069},{"edgeType":"calls","source":4233,"target":997},{"edgeType":"calls","source":1300,"target":1014},{"edgeType":"calls","source":436,"target":315},{"edgeType":"calls","source":4582,"target":749},{"edgeType":"contains","source":5090,"target":5136},{"edgeType":"contains","source":459,"target":710},{"edgeType":"contains","source":1754,"target":1791},{"edgeType":"calls","source":4502,"target":1115},{"edgeType":"calls","source":3197,"target":345},{"edgeType":"calls","source":266,"target":300},{"edgeType":"calls","source":3536,"target":406},{"edgeType":"contains","source":52,"target":3814},{"edgeType":"contains","source":1910,"target":126},{"edgeType":"contains","source":14,"target":764},{"edgeType":"calls","source":5461,"target":982},{"edgeType":"calls","source":4222,"target":282},{"edgeType":"contains","source":5090,"target":5135},{"edgeType":"calls","source":4662,"target":382},{"edgeType":"calls","source":2841,"target":1868},{"edgeType":"calls","source":4667,"target":4455},{"edgeType":"calls","source":4430,"target":2289},{"edgeType":"contains","source":459,"target":709},{"edgeType":"calls","source":920,"target":1166},{"edgeType":"contains","source":259,"target":1624},{"edgeType":"calls","source":3536,"target":407},{"edgeType":"contains","source":1510,"target":4071},{"edgeType":"contains","source":1684,"target":1848},{"edgeType":"calls","source":3859,"target":964},{"edgeType":"contains","source":62,"target":332},{"edgeType":"contains","source":3865,"target":5057},{"edgeType":"calls","source":1866,"target":1436},{"edgeType":"calls","source":4104,"target":766},{"edgeType":"calls","source":5461,"target":981},{"edgeType":"calls","source":1300,"target":1016},{"edgeType":"calls","source":1061,"target":1026},{"edgeType":"contains","source":5090,"target":5134},{"edgeType":"calls","source":4801,"target":300},{"edgeType":"calls","source":4776,"target":1075},{"edgeType":"calls","source":2885,"target":501},{"edgeType":"calls","source":4493,"target":335},{"edgeType":"contains","source":259,"target":570},{"edgeType":"calls","source":3818,"target":2232},{"edgeType":"calls","source":4104,"target":767},{"edgeType":"contains","source":1510,"target":4068},{"edgeType":"calls","source":2034,"target":1516},{"edgeType":"calls","source":4241,"target":1805},{"edgeType":"calls","source":5461,"target":980},{"edgeType":"imports","source":889,"target":273},{"edgeType":"calls","source":2954,"target":477},{"edgeType":"contains","source":5090,"target":5133},{"edgeType":"contains","source":3865,"target":3998},{"edgeType":"calls","source":129,"target":320},{"edgeType":"calls","source":4493,"target":334},{"edgeType":"imports","source":2115,"target":1376},{"edgeType":"calls","source":3867,"target":1771},{"edgeType":"calls","source":2727,"target":1169},{"edgeType":"contains","source":62,"target":1394},{"edgeType":"contains","source":40,"target":3133},{"edgeType":"calls","source":1430,"target":1208},{"edgeType":"calls","source":3417,"target":920},{"edgeType":"calls","source":3443,"target":1171},{"edgeType":"calls","source":5461,"target":979},{"edgeType":"contains","source":2977,"target":2992},{"edgeType":"calls","source":1118,"target":310},{"edgeType":"calls","source":4807,"target":1169},{"edgeType":"calls","source":2448,"target":305},{"edgeType":"calls","source":5248,"target":1240},{"edgeType":"contains","source":459,"target":714},{"edgeType":"calls","source":129,"target":315},{"edgeType":"contains","source":1784,"target":1922},{"edgeType":"contains","source":1684,"target":1851},{"edgeType":"imports","source":2948,"target":920},{"edgeType":"contains","source":62,"target":336},{"edgeType":"contains","source":4223,"target":4533},{"edgeType":"calls","source":5529,"target":984},{"edgeType":"contains","source":1953,"target":1969},{"edgeType":"calls","source":3386,"target":2939},{"edgeType":"calls","source":5461,"target":978},{"edgeType":"contains","source":4953,"target":5158},{"edgeType":"contains","source":2915,"target":3858},{"edgeType":"calls","source":2963,"target":1253},{"edgeType":"calls","source":5330,"target":811},{"edgeType":"calls","source":4601,"target":2269},{"edgeType":"contains","source":2977,"target":2993},{"edgeType":"calls","source":2157,"target":1928},{"edgeType":"contains","source":1510,"target":4075},{"edgeType":"imports","source":2115,"target":1374},{"edgeType":"contains","source":5736,"target":4135},{"edgeType":"calls","source":5529,"target":983},{"edgeType":"calls","source":5523,"target":1169},{"edgeType":"contains","source":62,"target":1396},{"edgeType":"contains","source":115,"target":810},{"edgeType":"contains","source":97,"target":1368},{"edgeType":"calls","source":5461,"target":977},{"edgeType":"calls","source":3102,"target":1169},{"edgeType":"contains","source":2829,"target":3350},{"edgeType":"calls","source":5285,"target":2205},{"edgeType":"contains","source":5090,"target":5138},{"edgeType":"contains","source":3204,"target":3352},{"edgeType":"calls","source":436,"target":313},{"edgeType":"contains","source":1510,"target":4072},{"edgeType":"calls","source":2279,"target":1314},{"edgeType":"contains","source":1852,"target":1926},{"edgeType":"calls","source":2191,"target":1928},{"edgeType":"contains","source":3811,"target":5677},{"edgeType":"contains","source":1782,"target":3039},{"edgeType":"contains","source":4181,"target":4776},{"edgeType":"calls","source":5626,"target":89},{"edgeType":"contains","source":519,"target":970},{"edgeType":"contains","source":459,"target":716},{"edgeType":"calls","source":5529,"target":982},{"edgeType":"calls","source":5461,"target":976},{"edgeType":"contains","source":4747,"target":5200},{"edgeType":"calls","source":3077,"target":3002},{"edgeType":"calls","source":3784,"target":1169},{"edgeType":"calls","source":4228,"target":89},{"edgeType":"calls","source":1525,"target":406},{"edgeType":"contains","source":2117,"target":2140},{"edgeType":"calls","source":5592,"target":2232},{"edgeType":"calls","source":1288,"target":354},{"edgeType":"contains","source":4223,"target":4505},{"edgeType":"calls","source":5475,"target":1631},{"edgeType":"calls","source":3365,"target":447},{"edgeType":"calls","source":5189,"target":983},{"edgeType":"calls","source":5183,"target":1169},{"edgeType":"calls","source":5286,"target":2205},{"edgeType":"calls","source":1030,"target":952},{"edgeType":"contains","source":4953,"target":5130},{"edgeType":"contains","source":2910,"target":2926},{"edgeType":"contains","source":3642,"target":1376},{"edgeType":"calls","source":4452,"target":1633},{"edgeType":"calls","source":2018,"target":978},{"edgeType":"contains","source":1510,"target":4045},{"edgeType":"calls","source":4188,"target":302},{"edgeType":"calls","source":2261,"target":846},{"edgeType":"contains","source":1455,"target":1522},{"edgeType":"contains","source":1284,"target":1538},{"edgeType":"calls","source":5654,"target":309},{"edgeType":"contains","source":4000,"target":4018},{"edgeType":"calls","source":3365,"target":448},{"edgeType":"contains","source":459,"target":685},{"edgeType":"calls","source":5148,"target":2253},{"edgeType":"calls","source":5189,"target":982},{"edgeType":"calls","source":5191,"target":920},{"edgeType":"contains","source":2117,"target":2141},{"edgeType":"calls","source":1018,"target":266},{"edgeType":"calls","source":5475,"target":1630},{"edgeType":"calls","source":5523,"target":142},{"edgeType":"calls","source":1393,"target":269},{"edgeType":"calls","source":1363,"target":142},{"edgeType":"contains","source":2415,"target":2417},{"edgeType":"calls","source":2444,"target":1516},{"edgeType":"calls","source":419,"target":866},{"edgeType":"contains","source":1510,"target":4046},{"edgeType":"calls","source":1086,"target":272},{"edgeType":"calls","source":3917,"target":1305},{"edgeType":"calls","source":3975,"target":564},{"edgeType":"calls","source":1938,"target":286},{"edgeType":"calls","source":1798,"target":398},{"edgeType":"calls","source":2018,"target":977},{"edgeType":"calls","source":2261,"target":847},{"edgeType":"contains","source":3865,"target":3975},{"edgeType":"calls","source":4318,"target":501},{"edgeType":"calls","source":2211,"target":279},{"edgeType":"calls","source":4845,"target":3189},{"edgeType":"contains","source":4038,"target":1782},{"edgeType":"calls","source":4850,"target":920},{"edgeType":"calls","source":5189,"target":981},{"edgeType":"calls","source":920,"target":1193},{"edgeType":"calls","source":5475,"target":1629},{"edgeType":"imports","source":3969,"target":963},{"edgeType":"calls","source":5620,"target":305},{"edgeType":"calls","source":5362,"target":904},{"edgeType":"contains","source":5090,"target":5109},{"edgeType":"contains","source":3204,"target":3323},{"edgeType":"calls","source":4688,"target":4885},{"edgeType":"contains","source":3642,"target":1374},{"edgeType":"contains","source":3865,"target":5031},{"edgeType":"contains","source":1852,"target":1897},{"edgeType":"calls","source":2018,"target":980},{"edgeType":"calls","source":2421,"target":1169},{"edgeType":"contains","source":1510,"target":4043},{"edgeType":"contains","source":1284,"target":1536},{"edgeType":"calls","source":1525,"target":407},{"edgeType":"calls","source":5558,"target":1169},{"edgeType":"calls","source":5550,"target":360},{"edgeType":"contains","source":4953,"target":5127},{"edgeType":"calls","source":3433,"target":1509},{"edgeType":"calls","source":5620,"target":304},{"edgeType":"calls","source":5189,"target":980},{"edgeType":"calls","source":5613,"target":1578},{"edgeType":"calls","source":3206,"target":89},{"edgeType":"contains","source":459,"target":687},{"edgeType":"calls","source":1777,"target":1051},{"edgeType":"calls","source":1030,"target":953},{"edgeType":"contains","source":1058,"target":1144},{"edgeType":"contains","source":3215,"target":2983},{"edgeType":"calls","source":2018,"target":979},{"edgeType":"contains","source":1518,"target":1682},{"edgeType":"calls","source":2957,"target":406},{"edgeType":"contains","source":2001,"target":1512},{"edgeType":"contains","source":2506,"target":2770},{"edgeType":"imports","source":76,"target":79},{"edgeType":"imports","source":1238,"target":2111},{"edgeType":"calls","source":3818,"target":1198},{"edgeType":"contains","source":2117,"target":2144},{"edgeType":"calls","source":5579,"target":1574},{"edgeType":"calls","source":3859,"target":984},{"edgeType":"calls","source":5189,"target":979},{"edgeType":"calls","source":5613,"target":1577},{"edgeType":"calls","source":5550,"target":359},{"edgeType":"contains","source":1510,"target":4049},{"edgeType":"contains","source":1605,"target":2161},{"edgeType":"contains","source":2878,"target":2865},{"edgeType":"calls","source":1086,"target":269},{"edgeType":"calls","source":1056,"target":142},{"edgeType":"calls","source":2018,"target":974},{"edgeType":"calls","source":4183,"target":453},{"edgeType":"calls","source":4242,"target":1795},{"edgeType":"contains","source":5553,"target":5554},{"edgeType":"calls","source":5755,"target":345},{"edgeType":"calls","source":794,"target":864},{"edgeType":"calls","source":5189,"target":978},{"edgeType":"calls","source":2957,"target":407},{"edgeType":"contains","source":4694,"target":4706},{"edgeType":"calls","source":5605,"target":767},{"edgeType":"calls","source":5257,"target":984},{"edgeType":"calls","source":5613,"target":1576},{"edgeType":"contains","source":459,"target":689},{"edgeType":"calls","source":5550,"target":358},{"edgeType":"contains","source":3591,"target":4017},{"edgeType":"calls","source":3246,"target":961},{"edgeType":"calls","source":2018,"target":973},{"edgeType":"contains","source":1688,"target":1703},{"edgeType":"calls","source":4183,"target":454},{"edgeType":"contains","source":5553,"target":5555},{"edgeType":"contains","source":1284,"target":1539},{"edgeType":"contains","source":459,"target":692},{"edgeType":"calls","source":5189,"target":977},{"edgeType":"calls","source":5654,"target":304},{"edgeType":"calls","source":5257,"target":983},{"edgeType":"calls","source":5306,"target":1578},{"edgeType":"calls","source":3882,"target":269},{"edgeType":"calls","source":5351,"target":1240},{"edgeType":"calls","source":3859,"target":982},{"edgeType":"calls","source":5550,"target":357},{"edgeType":"calls","source":1239,"target":814},{"edgeType":"calls","source":5605,"target":766},{"edgeType":"imports","source":3247,"target":81},{"edgeType":"contains","source":1688,"target":1700},{"edgeType":"contains","source":2910,"target":2928},{"edgeType":"calls","source":3285,"target":806},{"edgeType":"contains","source":3641,"target":5637},{"edgeType":"calls","source":4183,"target":451},{"edgeType":"calls","source":2018,"target":976},{"edgeType":"calls","source":4280,"target":615},{"edgeType":"calls","source":4662,"target":402},{"edgeType":"contains","source":1250,"target":1537},{"edgeType":"calls","source":1563,"target":282},{"edgeType":"calls","source":5257,"target":982},{"edgeType":"calls","source":5189,"target":976},{"edgeType":"contains","source":2117,"target":2143},{"edgeType":"calls","source":3859,"target":983},{"edgeType":"calls","source":5306,"target":1577},{"edgeType":"calls","source":5550,"target":356},{"edgeType":"calls","source":5692,"target":1239},{"edgeType":"calls","source":5620,"target":300},{"edgeType":"calls","source":5613,"target":1574},{"edgeType":"calls","source":5655,"target":272},{"edgeType":"contains","source":96,"target":4545},{"edgeType":"calls","source":5550,"target":355},{"edgeType":"calls","source":5258,"target":5179},{"edgeType":"contains","source":815,"target":1282},{"edgeType":"calls","source":2018,"target":975},{"edgeType":"calls","source":4183,"target":452},{"edgeType":"imports","source":3297,"target":2758},{"edgeType":"contains","source":5553,"target":5557},{"edgeType":"calls","source":2795,"target":142},{"edgeType":"calls","source":4686,"target":1771},{"edgeType":"calls","source":1622,"target":1619},{"edgeType":"calls","source":4493,"target":353},{"edgeType":"calls","source":5189,"target":975},{"edgeType":"calls","source":5291,"target":984},{"edgeType":"calls","source":5296,"target":829},{"edgeType":"calls","source":5257,"target":981},{"edgeType":"calls","source":5306,"target":1576},{"edgeType":"contains","source":1781,"target":5165},{"edgeType":"calls","source":5615,"target":454},{"edgeType":"calls","source":3859,"target":980},{"edgeType":"calls","source":3876,"target":453},{"edgeType":"calls","source":5613,"target":1573},{"edgeType":"contains","source":1546,"target":1880},{"edgeType":"calls","source":5448,"target":345},{"edgeType":"calls","source":4183,"target":449},{"edgeType":"calls","source":4233,"target":1013},{"edgeType":"calls","source":4213,"target":1633},{"edgeType":"calls","source":398,"target":453},{"edgeType":"imports","source":3717,"target":1366},{"edgeType":"calls","source":1060,"target":1071},{"edgeType":"calls","source":4841,"target":1193},{"edgeType":"contains","source":2973,"target":3095},{"edgeType":"calls","source":271,"target":160},{"edgeType":"calls","source":5189,"target":974},{"edgeType":"calls","source":5257,"target":980},{"edgeType":"calls","source":398,"target":451},{"edgeType":"calls","source":5291,"target":983},{"edgeType":"calls","source":5340,"target":521},{"edgeType":"calls","source":5285,"target":1169},{"edgeType":"calls","source":3573,"target":334},{"edgeType":"calls","source":3852,"target":1198},{"edgeType":"calls","source":3859,"target":981},{"edgeType":"calls","source":3876,"target":454},{"edgeType":"calls","source":3563,"target":2758},{"edgeType":"calls","source":5615,"target":453},{"edgeType":"calls","source":1714,"target":880},{"edgeType":"calls","source":5613,"target":1572},{"edgeType":"calls","source":5615,"target":452},{"edgeType":"calls","source":4183,"target":450},{"edgeType":"contains","source":2244,"target":2441},{"edgeType":"calls","source":5430,"target":902},{"edgeType":"calls","source":398,"target":452},{"edgeType":"calls","source":4672,"target":89},{"edgeType":"contains","source":4953,"target":5137},{"edgeType":"calls","source":5189,"target":973},{"edgeType":"contains","source":3204,"target":3332},{"edgeType":"contains","source":3811,"target":5656},{"edgeType":"contains","source":341,"target":126},{"edgeType":"calls","source":2287,"target":1086},{"edgeType":"calls","source":5291,"target":982},{"edgeType":"calls","source":5257,"target":979},{"edgeType":"contains","source":459,"target":696},{"edgeType":"calls","source":3983,"target":305},{"edgeType":"calls","source":5697,"target":2138},{"edgeType":"calls","source":3649,"target":89},{"edgeType":"calls","source":5613,"target":1571},{"edgeType":"calls","source":5630,"target":1044},{"edgeType":"contains","source":4000,"target":4025},{"edgeType":"calls","source":5679,"target":3753},{"edgeType":"calls","source":5732,"target":2110},{"edgeType":"calls","source":3859,"target":978},{"edgeType":"calls","source":3876,"target":451},{"edgeType":"calls","source":5615,"target":451},{"edgeType":"calls","source":2640,"target":1771},{"edgeType":"calls","source":1922,"target":777},{"edgeType":"calls","source":5613,"target":1570},{"edgeType":"calls","source":4183,"target":447},{"edgeType":"calls","source":2018,"target":972},{"edgeType":"calls","source":5516,"target":349},{"edgeType":"calls","source":3389,"target":749},{"edgeType":"imports","source":4037,"target":961},{"edgeType":"imports","source":3247,"target":93},{"edgeType":"calls","source":477,"target":120},{"edgeType":"calls","source":892,"target":995},{"edgeType":"calls","source":5257,"target":978},{"edgeType":"calls","source":5189,"target":972},{"edgeType":"contains","source":2585,"target":3495},{"edgeType":"contains","source":2584,"target":3526},{"edgeType":"calls","source":5282,"target":2317},{"edgeType":"calls","source":5291,"target":981},{"edgeType":"contains","source":4694,"target":4708},{"edgeType":"calls","source":5306,"target":1573},{"edgeType":"calls","source":4427,"target":282},{"edgeType":"calls","source":3491,"target":1817},{"edgeType":"calls","source":3859,"target":979},{"edgeType":"calls","source":3876,"target":452},{"edgeType":"calls","source":1869,"target":305},{"edgeType":"calls","source":2713,"target":566},{"edgeType":"calls","source":5615,"target":450},{"edgeType":"calls","source":1922,"target":776},{"edgeType":"calls","source":2018,"target":971},{"edgeType":"calls","source":5613,"target":1569},{"edgeType":"calls","source":4183,"target":448},{"edgeType":"calls","source":5352,"target":2261},{"edgeType":"calls","source":398,"target":454},{"edgeType":"calls","source":4947,"target":1075},{"edgeType":"calls","source":4943,"target":142},{"edgeType":"calls","source":4759,"target":4789},{"edgeType":"calls","source":3859,"target":976},{"edgeType":"calls","source":3876,"target":449},{"edgeType":"calls","source":5189,"target":971},{"edgeType":"calls","source":5291,"target":980},{"edgeType":"calls","source":5187,"target":1033},{"edgeType":"calls","source":5257,"target":977},{"edgeType":"contains","source":459,"target":698},{"edgeType":"calls","source":5306,"target":1572},{"edgeType":"calls","source":398,"target":448},{"edgeType":"calls","source":1641,"target":1026},{"edgeType":"contains","source":3591,"target":4026},{"edgeType":"calls","source":4365,"target":89},{"edgeType":"calls","source":3710,"target":310},{"edgeType":"calls","source":2211,"target":269},{"edgeType":"calls","source":2150,"target":2160},{"edgeType":"calls","source":5772,"target":1925},{"edgeType":"calls","source":1869,"target":300},{"edgeType":"calls","source":2184,"target":2163},{"edgeType":"calls","source":5715,"target":521},{"edgeType":"calls","source":5615,"target":449},{"edgeType":"calls","source":5613,"target":1568},{"edgeType":"contains","source":2096,"target":1747},{"edgeType":"contains","source":62,"target":321},{"edgeType":"calls","source":1300,"target":1026},{"edgeType":"calls","source":3429,"target":564},{"edgeType":"imports","source":1331,"target":1351},{"edgeType":"calls","source":3239,"target":1169},{"edgeType":"calls","source":3228,"target":453},{"edgeType":"calls","source":5128,"target":1805},{"edgeType":"calls","source":4833,"target":380},{"edgeType":"calls","source":961,"target":965},{"edgeType":"calls","source":5257,"target":976},{"edgeType":"calls","source":398,"target":447},{"edgeType":"calls","source":5291,"target":979},{"edgeType":"calls","source":5306,"target":1571},{"edgeType":"calls","source":4662,"target":394},{"edgeType":"calls","source":2257,"target":2015},{"edgeType":"contains","source":3204,"target":3339},{"edgeType":"contains","source":1546,"target":1885},{"edgeType":"calls","source":5669,"target":3003},{"edgeType":"calls","source":3859,"target":977},{"edgeType":"calls","source":3876,"target":450},{"edgeType":"calls","source":4770,"target":3389},{"edgeType":"calls","source":4231,"target":1072},{"edgeType":"calls","source":3514,"target":1101},{"edgeType":"calls","source":5615,"target":448},{"edgeType":"calls","source":1193,"target":1171},{"edgeType":"contains","source":2244,"target":2445},{"edgeType":"calls","source":3228,"target":454},{"edgeType":"calls","source":4800,"target":345},{"edgeType":"contains","source":4747,"target":5185},{"edgeType":"calls","source":5291,"target":978},{"edgeType":"calls","source":5257,"target":975},{"edgeType":"calls","source":5306,"target":1570},{"edgeType":"calls","source":3859,"target":974},{"edgeType":"calls","source":3876,"target":447},{"edgeType":"contains","source":3208,"target":3212},{"edgeType":"contains","source":3204,"target":3336},{"edgeType":"calls","source":4418,"target":3729},{"edgeType":"calls","source":398,"target":450},{"edgeType":"contains","source":1546,"target":1882},{"edgeType":"contains","source":5741,"target":793},{"edgeType":"imports","source":1561,"target":1618},{"edgeType":"contains","source":69,"target":106},{"edgeType":"calls","source":1230,"target":1084},{"edgeType":"contains","source":62,"target":323},{"edgeType":"calls","source":5749,"target":521},{"edgeType":"contains","source":5553,"target":5564},{"edgeType":"calls","source":5615,"target":447},{"edgeType":"calls","source":3710,"target":307},{"edgeType":"calls","source":419,"target":857},{"edgeType":"contains","source":459,"target":700},{"edgeType":"calls","source":3228,"target":451},{"edgeType":"calls","source":5081,"target":89},{"edgeType":"calls","source":5162,"target":749},{"edgeType":"calls","source":3859,"target":975},{"edgeType":"calls","source":3876,"target":448},{"edgeType":"calls","source":3076,"target":3050},{"edgeType":"calls","source":5291,"target":977},{"edgeType":"calls","source":5306,"target":1569},{"edgeType":"calls","source":1714,"target":878},{"edgeType":"calls","source":398,"target":449},{"edgeType":"calls","source":4662,"target":392},{"edgeType":"calls","source":4047,"target":1489},{"edgeType":"calls","source":5669,"target":886},{"edgeType":"calls","source":4840,"target":2274},{"edgeType":"contains","source":40,"target":2061},{"edgeType":"contains","source":2973,"target":3098},{"edgeType":"contains","source":2915,"target":3839},{"edgeType":"calls","source":5434,"target":772},{"edgeType":"calls","source":3228,"target":452},{"edgeType":"calls","source":5257,"target":974},{"edgeType":"calls","source":5175,"target":345},{"edgeType":"calls","source":1054,"target":1216},{"edgeType":"contains","source":2915,"target":3812},{"edgeType":"calls","source":4710,"target":984},{"edgeType":"calls","source":1728,"target":406},{"edgeType":"contains","source":1058,"target":1127},{"edgeType":"calls","source":4233,"target":972},{"edgeType":"contains","source":3438,"target":3455},{"edgeType":"calls","source":2187,"target":976},{"edgeType":"calls","source":5755,"target":300},{"edgeType":"calls","source":806,"target":448},{"edgeType":"contains","source":62,"target":1349},{"edgeType":"calls","source":5499,"target":837},{"edgeType":"calls","source":5307,"target":447},{"edgeType":"calls","source":4710,"target":983},{"edgeType":"calls","source":1056,"target":1153},{"edgeType":"calls","source":4869,"target":282},{"edgeType":"calls","source":2187,"target":977},{"edgeType":"contains","source":3438,"target":3454},{"edgeType":"calls","source":4233,"target":973},{"edgeType":"calls","source":806,"target":447},{"edgeType":"calls","source":1506,"target":944},{"edgeType":"contains","source":62,"target":1348},{"edgeType":"calls","source":4854,"target":1805},{"edgeType":"contains","source":459,"target":668},{"edgeType":"calls","source":5145,"target":1240},{"edgeType":"calls","source":3456,"target":1805},{"edgeType":"imports","source":435,"target":1689},{"edgeType":"calls","source":5499,"target":836},{"edgeType":"calls","source":3281,"target":3002},{"edgeType":"calls","source":348,"target":906},{"edgeType":"calls","source":1059,"target":1063},{"edgeType":"calls","source":4710,"target":982},{"edgeType":"calls","source":4707,"target":3189},{"edgeType":"calls","source":1829,"target":1505},{"edgeType":"contains","source":3141,"target":3146},{"edgeType":"calls","source":2289,"target":983},{"edgeType":"calls","source":2283,"target":1169},{"edgeType":"contains","source":1754,"target":1747},{"edgeType":"calls","source":5073,"target":300},{"edgeType":"calls","source":2187,"target":974},{"edgeType":"calls","source":5712,"target":1631},{"edgeType":"calls","source":2092,"target":1805},{"edgeType":"contains","source":4000,"target":4001},{"edgeType":"calls","source":806,"target":450},{"edgeType":"calls","source":2957,"target":359},{"edgeType":"calls","source":5570,"target":1805},{"edgeType":"calls","source":5499,"target":835},{"edgeType":"calls","source":3315,"target":3002},{"edgeType":"calls","source":5426,"target":984},{"edgeType":"calls","source":3890,"target":3148},{"edgeType":"calls","source":4710,"target":981},{"edgeType":"calls","source":5426,"target":983},{"edgeType":"calls","source":4800,"target":305},{"edgeType":"calls","source":4798,"target":367},{"edgeType":"calls","source":1728,"target":407},{"edgeType":"contains","source":3141,"target":3147},{"edgeType":"contains","source":3962,"target":4120},{"edgeType":"calls","source":2289,"target":984},{"edgeType":"calls","source":4233,"target":971},{"edgeType":"calls","source":4493,"target":309},{"edgeType":"calls","source":2187,"target":975},{"edgeType":"calls","source":1506,"target":946},{"edgeType":"calls","source":5712,"target":1630},{"edgeType":"calls","source":2965,"target":1169},{"edgeType":"calls","source":806,"target":449},{"edgeType":"calls","source":2957,"target":360},{"edgeType":"contains","source":62,"target":1350},{"edgeType":"calls","source":5610,"target":564},{"edgeType":"calls","source":3283,"target":2938},{"edgeType":"calls","source":5475,"target":521},{"edgeType":"calls","source":3309,"target":3189},{"edgeType":"contains","source":1510,"target":4032},{"edgeType":"calls","source":4053,"target":206},{"edgeType":"calls","source":4710,"target":980},{"edgeType":"calls","source":5426,"target":982},{"edgeType":"calls","source":4793,"target":521},{"edgeType":"calls","source":5419,"target":142},{"edgeType":"calls","source":1127,"target":1063},{"edgeType":"calls","source":2957,"target":357},{"edgeType":"calls","source":2289,"target":981},{"edgeType":"contains","source":2698,"target":3143},{"edgeType":"calls","source":2187,"target":972},{"edgeType":"imports","source":4654,"target":920},{"edgeType":"contains","source":72,"target":1043},{"edgeType":"calls","source":5712,"target":1629},{"edgeType":"contains","source":2263,"target":773},{"edgeType":"calls","source":5499,"target":833},{"edgeType":"contains","source":2305,"target":1585},{"edgeType":"calls","source":1253,"target":1384},{"edgeType":"calls","source":5516,"target":305},{"edgeType":"calls","source":5499,"target":832},{"edgeType":"calls","source":5426,"target":981},{"edgeType":"calls","source":4841,"target":89},{"edgeType":"contains","source":1654,"target":1683},{"edgeType":"contains","source":1684,"target":1810},{"edgeType":"calls","source":1132,"target":907},{"edgeType":"contains","source":3141,"target":3153},{"edgeType":"calls","source":4710,"target":979},{"edgeType":"calls","source":2957,"target":358},{"edgeType":"calls","source":3710,"target":269},{"edgeType":"contains","source":2584,"target":3507},{"edgeType":"calls","source":2289,"target":982},{"edgeType":"calls","source":2187,"target":973},{"edgeType":"calls","source":4372,"target":887},{"edgeType":"calls","source":4336,"target":946},{"edgeType":"contains","source":1,"target":72},{"edgeType":"contains","source":52,"target":2719},{"edgeType":"imports","source":2517,"target":1621},{"edgeType":"contains","source":259,"target":1587},{"edgeType":"calls","source":1640,"target":1014},{"edgeType":"contains","source":459,"target":672},{"edgeType":"contains","source":399,"target":418},{"edgeType":"calls","source":5426,"target":980},{"edgeType":"calls","source":4236,"target":1930},{"edgeType":"contains","source":4890,"target":4955},{"edgeType":"contains","source":3438,"target":3457},{"edgeType":"calls","source":4710,"target":978},{"edgeType":"calls","source":3039,"target":984},{"edgeType":"contains","source":1284,"target":1523},{"edgeType":"calls","source":2289,"target":979},{"edgeType":"calls","source":4372,"target":886},{"edgeType":"contains","source":459,"target":675},{"edgeType":"calls","source":2957,"target":355},{"edgeType":"calls","source":4436,"target":1016},{"edgeType":"calls","source":2420,"target":89},{"edgeType":"calls","source":5202,"target":1582},{"edgeType":"calls","source":4938,"target":3424},{"edgeType":"calls","source":5175,"target":305},{"edgeType":"contains","source":1,"target":75},{"edgeType":"calls","source":3965,"target":817},{"edgeType":"contains","source":438,"target":269},{"edgeType":"calls","source":1286,"target":364},{"edgeType":"calls","source":3608,"target":3428},{"edgeType":"calls","source":4827,"target":521},{"edgeType":"contains","source":2915,"target":3815},{"edgeType":"calls","source":1253,"target":329},{"edgeType":"calls","source":5557,"target":89},{"edgeType":"calls","source":5426,"target":979},{"edgeType":"calls","source":5449,"target":266},{"edgeType":"calls","source":2003,"target":2448},{"edgeType":"calls","source":2045,"target":89},{"edgeType":"contains","source":3141,"target":3151},{"edgeType":"calls","source":4594,"target":345},{"edgeType":"calls","source":4710,"target":977},{"edgeType":"contains","source":1284,"target":1524},{"edgeType":"calls","source":2289,"target":980},{"edgeType":"contains","source":4103,"target":811},{"edgeType":"calls","source":2957,"target":356},{"edgeType":"calls","source":2187,"target":971},{"edgeType":"contains","source":4873,"target":3366},{"edgeType":"calls","source":5684,"target":380},{"edgeType":"calls","source":3965,"target":818},{"edgeType":"calls","source":1640,"target":1016},{"edgeType":"contains","source":459,"target":674},{"edgeType":"calls","source":3338,"target":3340},{"edgeType":"calls","source":5550,"target":305},{"edgeType":"calls","source":5426,"target":978},{"edgeType":"calls","source":1288,"target":296},{"edgeType":"contains","source":4694,"target":4695},{"edgeType":"contains","source":4873,"target":2317},{"edgeType":"contains","source":3141,"target":3156},{"edgeType":"calls","source":4710,"target":976},{"edgeType":"calls","source":4800,"target":300},{"edgeType":"imports","source":3641,"target":2714},{"edgeType":"calls","source":892,"target":944},{"edgeType":"contains","source":4890,"target":4961},{"edgeType":"calls","source":4493,"target":304},{"edgeType":"calls","source":4436,"target":1014},{"edgeType":"contains","source":459,"target":677},{"edgeType":"calls","source":4431,"target":1169},{"edgeType":"calls","source":3039,"target":982},{"edgeType":"contains","source":1754,"target":1758},{"edgeType":"calls","source":2289,"target":977},{"edgeType":"contains","source":1688,"target":1690},{"edgeType":"calls","source":5620,"target":1306},{"edgeType":"contains","source":2117,"target":2133},{"edgeType":"calls","source":5426,"target":977},{"edgeType":"contains","source":3591,"target":4004},{"edgeType":"calls","source":843,"target":348},{"edgeType":"calls","source":4710,"target":975},{"edgeType":"calls","source":4812,"target":984},{"edgeType":"contains","source":4890,"target":4960},{"edgeType":"calls","source":3039,"target":983},{"edgeType":"calls","source":270,"target":142},{"edgeType":"contains","source":337,"target":4458},{"edgeType":"calls","source":2289,"target":978},{"edgeType":"calls","source":5297,"target":1805},{"edgeType":"calls","source":1857,"target":1682},{"edgeType":"calls","source":1858,"target":594},{"edgeType":"calls","source":5610,"target":3729},{"edgeType":"calls","source":1995,"target":1632},{"edgeType":"calls","source":4184,"target":367},{"edgeType":"contains","source":69,"target":85},{"edgeType":"calls","source":5591,"target":89},{"edgeType":"contains","source":2244,"target":2421},{"edgeType":"contains","source":2829,"target":4370},{"edgeType":"calls","source":5516,"target":300},{"edgeType":"calls","source":4241,"target":1771},{"edgeType":"calls","source":3509,"target":3322},{"edgeType":"calls","source":1218,"target":354},{"edgeType":"calls","source":5426,"target":976},{"edgeType":"calls","source":4710,"target":974},{"edgeType":"calls","source":3039,"target":979},{"edgeType":"calls","source":4673,"target":4235},{"edgeType":"calls","source":5175,"target":300},{"edgeType":"contains","source":1284,"target":1527},{"edgeType":"calls","source":4812,"target":983},{"edgeType":"calls","source":5247,"target":1240},{"edgeType":"calls","source":5202,"target":521},{"edgeType":"calls","source":299,"target":303},{"edgeType":"calls","source":2289,"target":975},{"edgeType":"contains","source":1754,"target":1756},{"edgeType":"calls","source":2354,"target":1074},{"edgeType":"contains","source":459,"target":679},{"edgeType":"calls","source":1393,"target":1271},{"edgeType":"contains","source":4953,"target":5119},{"edgeType":"calls","source":4193,"target":89},{"edgeType":"calls","source":4282,"target":501},{"edgeType":"contains","source":1654,"target":1685},{"edgeType":"calls","source":4710,"target":973},{"edgeType":"calls","source":5426,"target":975},{"edgeType":"contains","source":1284,"target":1528},{"edgeType":"contains","source":3141,"target":3155},{"edgeType":"contains","source":1058,"target":1136},{"edgeType":"calls","source":4812,"target":982},{"edgeType":"calls","source":3039,"target":980},{"edgeType":"calls","source":2958,"target":1377},{"edgeType":"calls","source":3039,"target":981},{"edgeType":"contains","source":3865,"target":5022},{"edgeType":"calls","source":2289,"target":976},{"edgeType":"calls","source":332,"target":336},{"edgeType":"contains","source":1754,"target":1757},{"edgeType":"contains","source":1654,"target":1686},{"edgeType":"imports","source":1781,"target":1193},{"edgeType":"calls","source":1687,"target":1669},{"edgeType":"calls","source":2875,"target":776},{"edgeType":"contains","source":4223,"target":4501},{"edgeType":"contains","source":5553,"target":5545},{"edgeType":"contains","source":1189,"target":2364},{"edgeType":"calls","source":4710,"target":972},{"edgeType":"calls","source":5426,"target":974},{"edgeType":"calls","source":4812,"target":981},{"edgeType":"calls","source":4829,"target":454},{"edgeType":"calls","source":5181,"target":1169},{"edgeType":"calls","source":995,"target":918},{"edgeType":"calls","source":3039,"target":977},{"edgeType":"calls","source":5012,"target":2180},{"edgeType":"contains","source":337,"target":2349},{"edgeType":"calls","source":1748,"target":1887},{"edgeType":"imports","source":435,"target":1692},{"edgeType":"calls","source":5243,"target":305},{"edgeType":"calls","source":419,"target":805},{"edgeType":"calls","source":4641,"target":997},{"edgeType":"calls","source":5331,"target":1805},{"edgeType":"imports","source":4037,"target":1013},{"edgeType":"calls","source":4568,"target":89},{"edgeType":"calls","source":2289,"target":973},{"edgeType":"contains","source":1684,"target":1818},{"edgeType":"contains","source":1284,"target":1534},{"edgeType":"calls","source":5550,"target":300},{"edgeType":"contains","source":4223,"target":4500},{"edgeType":"calls","source":5337,"target":4789},{"edgeType":"contains","source":2244,"target":2428},{"edgeType":"calls","source":2875,"target":2891},{"edgeType":"calls","source":4812,"target":980},{"edgeType":"calls","source":5426,"target":973},{"edgeType":"calls","source":4829,"target":453},{"edgeType":"contains","source":4953,"target":5125},{"edgeType":"calls","source":995,"target":917},{"edgeType":"calls","source":2875,"target":777},{"edgeType":"calls","source":3039,"target":978},{"edgeType":"calls","source":5185,"target":1044},{"edgeType":"contains","source":4694,"target":4698},{"edgeType":"imports","source":435,"target":1693},{"edgeType":"imports","source":4103,"target":1082},{"edgeType":"calls","source":419,"target":804},{"edgeType":"calls","source":2354,"target":1073},{"edgeType":"contains","source":459,"target":680},{"edgeType":"calls","source":4710,"target":971},{"edgeType":"calls","source":4662,"target":345},{"edgeType":"contains","source":3591,"target":4009},{"edgeType":"calls","source":2289,"target":974},{"edgeType":"contains","source":1671,"target":2222},{"edgeType":"contains","source":126,"target":436},{"edgeType":"calls","source":1377,"target":1763},{"edgeType":"contains","source":3334,"target":3518},{"edgeType":"calls","source":5626,"target":3228},{"edgeType":"calls","source":5719,"target":345},{"edgeType":"calls","source":3039,"target":975},{"edgeType":"calls","source":4812,"target":979},{"edgeType":"calls","source":4829,"target":452},{"edgeType":"calls","source":5530,"target":919},{"edgeType":"calls","source":5426,"target":972},{"edgeType":"calls","source":1118,"target":279},{"edgeType":"contains","source":2737,"target":2998},{"edgeType":"calls","source":986,"target":142},{"edgeType":"calls","source":5214,"target":2258},{"edgeType":"imports","source":3385,"target":89},{"edgeType":"imports","source":1781,"target":2247},{"edgeType":"calls","source":4499,"target":1169},{"edgeType":"calls","source":2289,"target":971},{"edgeType":"contains","source":2117,"target":2135},{"edgeType":"calls","source":2831,"target":2139},{"edgeType":"calls","source":3634,"target":501},{"edgeType":"calls","source":2760,"target":1169},{"edgeType":"contains","source":1284,"target":1532},{"edgeType":"calls","source":1525,"target":345},{"edgeType":"calls","source":4812,"target":978},{"edgeType":"contains","source":2584,"target":3514},{"edgeType":"calls","source":4829,"target":451},{"edgeType":"calls","source":3039,"target":976},{"edgeType":"calls","source":5530,"target":918},{"edgeType":"contains","source":2829,"target":4375},{"edgeType":"calls","source":5426,"target":971},{"edgeType":"calls","source":3291,"target":564},{"edgeType":"calls","source":995,"target":919},{"edgeType":"calls","source":5215,"target":1169},{"edgeType":"imports","source":435,"target":1691},{"edgeType":"contains","source":459,"target":682},{"edgeType":"contains","source":317,"target":4027},{"edgeType":"calls","source":2289,"target":972},{"edgeType":"contains","source":1510,"target":4040},{"edgeType":"calls","source":4493,"target":297},{"edgeType":"calls","source":4280,"target":3729},{"edgeType":"calls","source":5720,"target":345},{"edgeType":"contains","source":1,"target":52},{"edgeType":"calls","source":4894,"target":4810},{"edgeType":"calls","source":4943,"target":120},{"edgeType":"calls","source":2686,"target":2436},{"edgeType":"calls","source":5461,"target":975},{"edgeType":"contains","source":4223,"target":4472},{"edgeType":"calls","source":5529,"target":981},{"edgeType":"calls","source":1397,"target":113},{"edgeType":"contains","source":2506,"target":2733},{"edgeType":"calls","source":4612,"target":2982},{"edgeType":"contains","source":1546,"target":1839},{"edgeType":"calls","source":129,"target":309},{"edgeType":"calls","source":4937,"target":305},{"edgeType":"calls","source":5532,"target":887},{"edgeType":"calls","source":5529,"target":980},{"edgeType":"calls","source":5461,"target":974},{"edgeType":"calls","source":3945,"target":404},{"edgeType":"contains","source":2247,"target":3363},{"edgeType":"calls","source":4503,"target":3189},{"edgeType":"calls","source":1061,"target":1014},{"edgeType":"calls","source":2537,"target":1771},{"edgeType":"calls","source":4688,"target":4853},{"edgeType":"calls","source":2261,"target":814},{"edgeType":"calls","source":4328,"target":1213},{"edgeType":"calls","source":2193,"target":804},{"edgeType":"contains","source":1,"target":54},{"edgeType":"calls","source":5525,"target":2160},{"edgeType":"contains","source":77,"target":869},{"edgeType":"calls","source":5532,"target":886},{"edgeType":"calls","source":5529,"target":979},{"edgeType":"calls","source":5578,"target":1574},{"edgeType":"calls","source":5620,"target":272},{"edgeType":"calls","source":5660,"target":89},{"edgeType":"calls","source":5461,"target":973},{"edgeType":"contains","source":399,"target":401},{"edgeType":"calls","source":1118,"target":307},{"edgeType":"calls","source":335,"target":269},{"edgeType":"contains","source":3871,"target":1641},{"edgeType":"calls","source":436,"target":309},{"edgeType":"calls","source":3239,"target":89},{"edgeType":"contains","source":1058,"target":1112},{"edgeType":"calls","source":4398,"target":2215},{"edgeType":"calls","source":129,"target":313},{"edgeType":"calls","source":2193,"target":805},{"edgeType":"calls","source":4328,"target":1212},{"edgeType":"contains","source":33,"target":118},{"edgeType":"contains","source":4105,"target":2842},{"edgeType":"calls","source":2958,"target":345},{"edgeType":"calls","source":5239,"target":454},{"edgeType":"calls","source":3136,"target":1169},{"edgeType":"calls","source":5529,"target":978},{"edgeType":"calls","source":5461,"target":972},{"edgeType":"calls","source":1061,"target":1016},{"edgeType":"calls","source":1051,"target":269},{"edgeType":"contains","source":3057,"target":1506},{"edgeType":"calls","source":3955,"target":92},{"edgeType":"calls","source":2448,"target":300},{"edgeType":"calls","source":4343,"target":1805},{"edgeType":"imports","source":1988,"target":1092},{"edgeType":"imports","source":77,"target":81},{"edgeType":"contains","source":1,"target":56},{"edgeType":"calls","source":1771,"target":142},{"edgeType":"contains","source":399,"target":403},{"edgeType":"contains","source":2116,"target":2142},{"edgeType":"calls","source":3891,"target":1016},{"edgeType":"calls","source":5239,"target":453},{"edgeType":"contains","source":11,"target":3974},{"edgeType":"contains","source":73,"target":2052},{"edgeType":"calls","source":5331,"target":772},{"edgeType":"calls","source":5672,"target":772},{"edgeType":"calls","source":5461,"target":971},{"edgeType":"calls","source":5529,"target":977},{"edgeType":"calls","source":1857,"target":1704},{"edgeType":"calls","source":5395,"target":902},{"edgeType":"calls","source":3278,"target":3106},{"edgeType":"calls","source":1056,"target":1166},{"edgeType":"calls","source":4233,"target":984},{"edgeType":"calls","source":348,"target":917},{"edgeType":"calls","source":4637,"target":89},{"edgeType":"calls","source":2193,"target":803},{"edgeType":"calls","source":3683,"target":2180},{"edgeType":"calls","source":5239,"target":452},{"edgeType":"contains","source":3865,"target":5003},{"edgeType":"calls","source":5654,"target":272},{"edgeType":"calls","source":5529,"target":976},{"edgeType":"calls","source":3283,"target":2953},{"edgeType":"contains","source":2932,"target":3273},{"edgeType":"calls","source":348,"target":916},{"edgeType":"calls","source":5704,"target":5063},{"edgeType":"calls","source":4349,"target":3729},{"edgeType":"calls","source":5239,"target":451},{"edgeType":"calls","source":4304,"target":896},{"edgeType":"calls","source":5273,"target":454},{"edgeType":"calls","source":3891,"target":1014},{"edgeType":"calls","source":5529,"target":975},{"edgeType":"calls","source":5614,"target":454},{"edgeType":"contains","source":3057,"target":1509},{"edgeType":"calls","source":3354,"target":1805},{"edgeType":"calls","source":5529,"target":974},{"edgeType":"calls","source":3412,"target":2121},{"edgeType":"calls","source":5387,"target":2205},{"edgeType":"calls","source":5434,"target":1805},{"edgeType":"calls","source":1933,"target":407},{"edgeType":"calls","source":3264,"target":367},{"edgeType":"calls","source":4231,"target":1044},{"edgeType":"calls","source":1951,"target":1963},{"edgeType":"calls","source":4233,"target":982},{"edgeType":"calls","source":4937,"target":300},{"edgeType":"calls","source":348,"target":919},{"edgeType":"calls","source":4502,"target":1101},{"edgeType":"calls","source":4623,"target":1578},{"edgeType":"contains","source":4747,"target":5142},{"edgeType":"contains","source":2584,"target":3489},{"edgeType":"calls","source":4298,"target":3195},{"edgeType":"imports","source":77,"target":80},{"edgeType":"calls","source":4304,"target":895},{"edgeType":"calls","source":5130,"target":2772},{"edgeType":"calls","source":5239,"target":450},{"edgeType":"contains","source":1902,"target":1376},{"edgeType":"calls","source":5273,"target":453},{"edgeType":"contains","source":1852,"target":1869},{"edgeType":"calls","source":5614,"target":453},{"edgeType":"calls","source":3614,"target":89},{"edgeType":"contains","source":3641,"target":5603},{"edgeType":"calls","source":1933,"target":406},{"edgeType":"calls","source":1253,"target":345},{"edgeType":"contains","source":1693,"target":456},{"edgeType":"calls","source":5529,"target":973},{"edgeType":"calls","source":2006,"target":257},{"edgeType":"calls","source":2112,"target":142},{"edgeType":"calls","source":4233,"target":983},{"edgeType":"calls","source":4227,"target":1169},{"edgeType":"calls","source":348,"target":918},{"edgeType":"calls","source":2691,"target":1219},{"edgeType":"calls","source":436,"target":304},{"edgeType":"contains","source":1284,"target":1508},{"edgeType":"calls","source":4623,"target":1577},{"edgeType":"contains","source":1351,"target":1545},{"edgeType":"calls","source":4493,"target":320},{"edgeType":"calls","source":4433,"target":2180},{"edgeType":"contains","source":3865,"target":5008},{"edgeType":"calls","source":5273,"target":452},{"edgeType":"calls","source":5239,"target":449},{"edgeType":"calls","source":4304,"target":894},{"edgeType":"calls","source":2187,"target":984},{"edgeType":"calls","source":1543,"target":864},{"edgeType":"calls","source":5614,"target":452},{"edgeType":"calls","source":5629,"target":1044},{"edgeType":"calls","source":5766,"target":1025},{"edgeType":"calls","source":5529,"target":972},{"edgeType":"calls","source":5614,"target":451},{"edgeType":"calls","source":4231,"target":1042},{"edgeType":"calls","source":4233,"target":980},{"edgeType":"calls","source":4623,"target":1576},{"edgeType":"contains","source":3127,"target":3573},{"edgeType":"imports","source":3717,"target":2456},{"edgeType":"calls","source":5239,"target":448},{"edgeType":"calls","source":5203,"target":1564},{"edgeType":"calls","source":5307,"target":454},{"edgeType":"calls","source":5273,"target":451},{"edgeType":"calls","source":2005,"target":282},{"edgeType":"contains","source":73,"target":2055},{"edgeType":"calls","source":2063,"target":598},{"edgeType":"calls","source":5529,"target":971},{"edgeType":"calls","source":5614,"target":450},{"edgeType":"calls","source":4233,"target":981},{"edgeType":"calls","source":5351,"target":2261},{"edgeType":"calls","source":2881,"target":1669},{"edgeType":"contains","source":4747,"target":5148},{"edgeType":"calls","source":4942,"target":142},{"edgeType":"calls","source":5239,"target":447},{"edgeType":"calls","source":5273,"target":450},{"edgeType":"calls","source":129,"target":304},{"edgeType":"calls","source":5307,"target":453},{"edgeType":"calls","source":5714,"target":521},{"edgeType":"calls","source":3710,"target":279},{"edgeType":"calls","source":2187,"target":982},{"edgeType":"calls","source":1857,"target":1702},{"edgeType":"calls","source":5614,"target":449},{"edgeType":"calls","source":4233,"target":978},{"edgeType":"contains","source":3476,"target":4381},{"edgeType":"calls","source":3352,"target":806},{"edgeType":"calls","source":348,"target":915},{"edgeType":"calls","source":4705,"target":89},{"edgeType":"imports","source":2948,"target":3053},{"edgeType":"calls","source":2811,"target":2779},{"edgeType":"contains","source":3962,"target":4112},{"edgeType":"calls","source":5307,"target":452},{"edgeType":"calls","source":5273,"target":449},{"edgeType":"calls","source":2249,"target":2232},{"edgeType":"contains","source":399,"target":408},{"edgeType":"calls","source":4623,"target":1572},{"edgeType":"calls","source":2327,"target":1928},{"edgeType":"calls","source":2187,"target":983},{"edgeType":"calls","source":4323,"target":302},{"edgeType":"contains","source":2247,"target":4427},{"edgeType":"contains","source":56,"target":3642},{"edgeType":"contains","source":1,"target":61},{"edgeType":"calls","source":5614,"target":448},{"edgeType":"calls","source":4233,"target":979},{"edgeType":"imports","source":1561,"target":1654},{"edgeType":"calls","source":5458,"target":1056},{"edgeType":"calls","source":5459,"target":4196},{"edgeType":"contains","source":1606,"target":2100},{"edgeType":"calls","source":348,"target":914},{"edgeType":"calls","source":5398,"target":802},{"edgeType":"calls","source":5045,"target":2232},{"edgeType":"calls","source":4623,"target":1573},{"edgeType":"calls","source":842,"target":398},{"edgeType":"calls","source":2572,"target":2790},{"edgeType":"calls","source":4799,"target":345},{"edgeType":"imports","source":2948,"target":3052},{"edgeType":"calls","source":5273,"target":448},{"edgeType":"calls","source":5307,"target":451},{"edgeType":"contains","source":5090,"target":5091},{"edgeType":"calls","source":4623,"target":1571},{"edgeType":"contains","source":373,"target":3331},{"edgeType":"calls","source":4417,"target":3729},{"edgeType":"contains","source":435,"target":352},{"edgeType":"contains","source":3591,"target":3993},{"edgeType":"calls","source":4355,"target":366},{"edgeType":"calls","source":5755,"target":305},{"edgeType":"contains","source":3865,"target":5012},{"edgeType":"calls","source":2187,"target":980},{"edgeType":"calls","source":1983,"target":961},{"edgeType":"calls","source":4233,"target":976},{"edgeType":"calls","source":3473,"target":1281},{"edgeType":"contains","source":1,"target":65},{"edgeType":"calls","source":3435,"target":345},{"edgeType":"calls","source":5502,"target":1805},{"edgeType":"calls","source":5748,"target":521},{"edgeType":"calls","source":5614,"target":447},{"edgeType":"contains","source":2584,"target":3498},{"edgeType":"calls","source":806,"target":452},{"edgeType":"imports","source":1280,"target":851},{"edgeType":"calls","source":4947,"target":1041},{"edgeType":"calls","source":5307,"target":450},{"edgeType":"calls","source":5273,"target":447},{"edgeType":"calls","source":4493,"target":315},{"edgeType":"calls","source":4623,"target":1570},{"edgeType":"imports","source":3994,"target":1273},{"edgeType":"contains","source":1588,"target":1607},{"edgeType":"calls","source":2187,"target":981},{"edgeType":"contains","source":2111,"target":1250},{"edgeType":"calls","source":4233,"target":977},{"edgeType":"calls","source":2764,"target":2121},{"edgeType":"calls","source":806,"target":451},{"edgeType":"contains","source":3057,"target":1520},{"edgeType":"calls","source":4812,"target":997},{"edgeType":"contains","source":4953,"target":5108},{"edgeType":"calls","source":5073,"target":305},{"edgeType":"calls","source":5128,"target":1771},{"edgeType":"calls","source":5307,"target":449},{"edgeType":"contains","source":3141,"target":3142},{"edgeType":"contains","source":435,"target":354},{"edgeType":"calls","source":4623,"target":1569},{"edgeType":"contains","source":2305,"target":1575},{"edgeType":"calls","source":4371,"target":925},{"edgeType":"contains","source":1654,"target":1672},{"edgeType":"calls","source":4233,"target":974},{"edgeType":"calls","source":2187,"target":978},{"edgeType":"calls","source":5660,"target":4304},{"edgeType":"calls","source":520,"target":864},{"edgeType":"calls","source":1393,"target":1283},{"edgeType":"calls","source":806,"target":454},{"edgeType":"calls","source":1112,"target":481},{"edgeType":"contains","source":2915,"target":3805},{"edgeType":"calls","source":4623,"target":1568},{"edgeType":"calls","source":3721,"target":3106},{"edgeType":"calls","source":4493,"target":313},{"edgeType":"calls","source":2187,"target":979},{"edgeType":"calls","source":1979,"target":1086},{"edgeType":"calls","source":4233,"target":975},{"edgeType":"contains","source":2117,"target":2119},{"edgeType":"contains","source":3438,"target":3448},{"edgeType":"calls","source":5558,"target":2180},{"edgeType":"calls","source":806,"target":453},{"edgeType":"calls","source":5307,"target":448},{"edgeType":"contains","source":2915,"target":3806},{"edgeType":"calls","source":5214,"target":2274},{"edgeType":"calls","source":4594,"target":451},{"edgeType":"calls","source":5276,"target":450},{"edgeType":"contains","source":11,"target":2368},{"edgeType":"contains","source":4868,"target":5073},{"edgeType":"calls","source":4413,"target":777},{"edgeType":"contains","source":476,"target":638},{"edgeType":"calls","source":1992,"target":777},{"edgeType":"imports","source":1988,"target":1938},{"edgeType":"calls","source":1887,"target":1918},{"edgeType":"calls","source":4367,"target":89},{"edgeType":"calls","source":4219,"target":448},{"edgeType":"calls","source":4236,"target":978},{"edgeType":"calls","source":1501,"target":142},{"edgeType":"calls","source":3400,"target":2582},{"edgeType":"calls","source":5740,"target":864},{"edgeType":"contains","source":255,"target":1146},{"edgeType":"calls","source":5651,"target":452},{"edgeType":"calls","source":2962,"target":305},{"edgeType":"calls","source":5402,"target":772},{"edgeType":"calls","source":5191,"target":971},{"edgeType":"calls","source":2928,"target":302},{"edgeType":"calls","source":4967,"target":1573},{"edgeType":"contains","source":5399,"target":5524},{"edgeType":"calls","source":4942,"target":2348},{"edgeType":"calls","source":1166,"target":1014},{"edgeType":"calls","source":3145,"target":974},{"edgeType":"calls","source":3145,"target":975},{"edgeType":"calls","source":4594,"target":450},{"edgeType":"calls","source":3732,"target":1805},{"edgeType":"contains","source":4208,"target":3334},{"edgeType":"calls","source":4013,"target":1550},{"edgeType":"contains","source":476,"target":637},{"edgeType":"calls","source":4413,"target":776},{"edgeType":"calls","source":1992,"target":776},{"edgeType":"calls","source":4360,"target":305},{"edgeType":"calls","source":4219,"target":449},{"edgeType":"calls","source":4236,"target":979},{"edgeType":"calls","source":4967,"target":1572},{"edgeType":"calls","source":4980,"target":1169},{"edgeType":"calls","source":3391,"target":1805},{"edgeType":"calls","source":5651,"target":451},{"edgeType":"calls","source":5758,"target":305},{"edgeType":"calls","source":3582,"target":1169},{"edgeType":"calls","source":4662,"target":3628},{"edgeType":"calls","source":3216,"target":3002},{"edgeType":"calls","source":5401,"target":802},{"edgeType":"calls","source":5424,"target":89},{"edgeType":"calls","source":5276,"target":449},{"edgeType":"calls","source":4594,"target":449},{"edgeType":"calls","source":4366,"target":2232},{"edgeType":"imports","source":3642,"target":348},{"edgeType":"calls","source":4236,"target":976},{"edgeType":"calls","source":2273,"target":1578},{"edgeType":"contains","source":476,"target":640},{"edgeType":"contains","source":3847,"target":3954},{"edgeType":"calls","source":4967,"target":1571},{"edgeType":"calls","source":5651,"target":450},{"edgeType":"calls","source":5751,"target":521},{"edgeType":"calls","source":1205,"target":864},{"edgeType":"calls","source":1166,"target":1016},{"edgeType":"calls","source":5518,"target":345},{"edgeType":"contains","source":5399,"target":5522},{"edgeType":"calls","source":5083,"target":89},{"edgeType":"calls","source":3145,"target":972},{"edgeType":"calls","source":5276,"target":448},{"edgeType":"calls","source":5240,"target":1564},{"edgeType":"calls","source":5198,"target":1809},{"edgeType":"calls","source":4594,"target":448},{"edgeType":"contains","source":3385,"target":3476},{"edgeType":"calls","source":3774,"target":501},{"edgeType":"contains","source":476,"target":639},{"edgeType":"calls","source":4509,"target":969},{"edgeType":"calls","source":4219,"target":447},{"edgeType":"calls","source":4236,"target":977},{"edgeType":"contains","source":2584,"target":2940},{"edgeType":"calls","source":4967,"target":1570},{"edgeType":"calls","source":1455,"target":512},{"edgeType":"calls","source":5671,"target":886},{"edgeType":"contains","source":344,"target":502},{"edgeType":"calls","source":5020,"target":984},{"edgeType":"calls","source":5651,"target":449},{"edgeType":"calls","source":2722,"target":345},{"edgeType":"calls","source":1214,"target":1641},{"edgeType":"contains","source":5399,"target":5521},{"edgeType":"calls","source":5276,"target":447},{"edgeType":"calls","source":5455,"target":1240},{"edgeType":"calls","source":3145,"target":973},{"edgeType":"contains","source":5399,"target":5529},{"edgeType":"contains","source":2016,"target":2583},{"edgeType":"calls","source":2074,"target":345},{"edgeType":"calls","source":4504,"target":2180},{"edgeType":"calls","source":4236,"target":974},{"edgeType":"calls","source":4594,"target":447},{"edgeType":"calls","source":2273,"target":1576},{"edgeType":"contains","source":476,"target":642},{"edgeType":"calls","source":5020,"target":983},{"edgeType":"contains","source":4346,"target":4347},{"edgeType":"calls","source":4967,"target":1569},{"edgeType":"calls","source":3678,"target":302},{"edgeType":"calls","source":4823,"target":1805},{"edgeType":"calls","source":5651,"target":448},{"edgeType":"calls","source":1240,"target":830},{"edgeType":"calls","source":5362,"target":5179},{"edgeType":"calls","source":3338,"target":272},{"edgeType":"calls","source":3965,"target":920},{"edgeType":"contains","source":5399,"target":5528},{"edgeType":"calls","source":4736,"target":272},{"edgeType":"contains","source":4683,"target":2355},{"edgeType":"calls","source":4236,"target":975},{"edgeType":"contains","source":476,"target":641},{"edgeType":"calls","source":2273,"target":1577},{"edgeType":"calls","source":5020,"target":982},{"edgeType":"calls","source":4967,"target":1568},{"edgeType":"calls","source":3800,"target":749},{"edgeType":"calls","source":1390,"target":407},{"edgeType":"calls","source":5651,"target":447},{"edgeType":"calls","source":3097,"target":345},{"edgeType":"calls","source":3145,"target":971},{"edgeType":"contains","source":476,"target":644},{"edgeType":"contains","source":1781,"target":4581},{"edgeType":"calls","source":2436,"target":749},{"edgeType":"calls","source":4236,"target":972},{"edgeType":"contains","source":4178,"target":4267},{"edgeType":"contains","source":330,"target":3056},{"edgeType":"contains","source":283,"target":285},{"edgeType":"calls","source":4435,"target":89},{"edgeType":"calls","source":4360,"target":300},{"edgeType":"contains","source":96,"target":2910},{"edgeType":"calls","source":5758,"target":300},{"edgeType":"calls","source":5020,"target":981},{"edgeType":"contains","source":3476,"target":4889},{"edgeType":"calls","source":5198,"target":1805},{"edgeType":"calls","source":3491,"target":2926},{"edgeType":"imports","source":3717,"target":1199},{"edgeType":"calls","source":1086,"target":320},{"edgeType":"calls","source":3945,"target":481},{"edgeType":"calls","source":4762,"target":4749},{"edgeType":"calls","source":4236,"target":973},{"edgeType":"contains","source":476,"target":643},{"edgeType":"contains","source":255,"target":1152},{"edgeType":"contains","source":283,"target":284},{"edgeType":"calls","source":4355,"target":454},{"edgeType":"calls","source":2252,"target":1169},{"edgeType":"calls","source":5020,"target":980},{"edgeType":"calls","source":2962,"target":300},{"edgeType":"calls","source":5183,"target":2269},{"edgeType":"calls","source":1399,"target":130},{"edgeType":"contains","source":3421,"target":3422},{"edgeType":"calls","source":1239,"target":857},{"edgeType":"contains","source":476,"target":646},{"edgeType":"calls","source":4810,"target":89},{"edgeType":"calls","source":1086,"target":315},{"edgeType":"contains","source":3816,"target":3868},{"edgeType":"calls","source":4517,"target":1773},{"edgeType":"calls","source":2273,"target":1572},{"edgeType":"calls","source":2317,"target":2322},{"edgeType":"calls","source":4355,"target":453},{"edgeType":"calls","source":2846,"target":2836},{"edgeType":"calls","source":5020,"target":979},{"edgeType":"calls","source":4320,"target":481},{"edgeType":"calls","source":4964,"target":4829},{"edgeType":"calls","source":3515,"target":2180},{"edgeType":"calls","source":5715,"target":1631},{"edgeType":"calls","source":5655,"target":320},{"edgeType":"contains","source":476,"target":645},{"edgeType":"calls","source":3243,"target":2157},{"edgeType":"calls","source":5370,"target":2812},{"edgeType":"calls","source":4236,"target":971},{"edgeType":"calls","source":2364,"target":1923},{"edgeType":"calls","source":5020,"target":977},{"edgeType":"calls","source":4912,"target":2211},{"edgeType":"calls","source":4828,"target":4815},{"edgeType":"contains","source":256,"target":1123},{"edgeType":"calls","source":4493,"target":2516},{"edgeType":"imports","source":3385,"target":920},{"edgeType":"calls","source":4469,"target":89},{"edgeType":"calls","source":2273,"target":1573},{"edgeType":"calls","source":4355,"target":452},{"edgeType":"calls","source":5020,"target":978},{"edgeType":"calls","source":5254,"target":2180},{"edgeType":"calls","source":5613,"target":564},{"edgeType":"calls","source":5715,"target":1630},{"edgeType":"contains","source":3944,"target":4126},{"edgeType":"contains","source":2584,"target":2947},{"edgeType":"calls","source":1855,"target":790},{"edgeType":"calls","source":3447,"target":1115},{"edgeType":"calls","source":2014,"target":89},{"edgeType":"imports","source":1781,"target":962},{"edgeType":"contains","source":476,"target":648},{"edgeType":"calls","source":5020,"target":976},{"edgeType":"calls","source":3001,"target":142},{"edgeType":"calls","source":4853,"target":1925},{"edgeType":"calls","source":137,"target":139},{"edgeType":"contains","source":55,"target":1015},{"edgeType":"contains","source":79,"target":271},{"edgeType":"calls","source":4355,"target":451},{"edgeType":"calls","source":5082,"target":1169},{"edgeType":"calls","source":5182,"target":1240},{"edgeType":"calls","source":2273,"target":1570},{"edgeType":"calls","source":5272,"target":564},{"edgeType":"calls","source":1390,"target":406},{"edgeType":"calls","source":5330,"target":1937},{"edgeType":"calls","source":5715,"target":1629},{"edgeType":"contains","source":476,"target":647},{"edgeType":"calls","source":5620,"target":345},{"edgeType":"calls","source":5574,"target":1771},{"edgeType":"calls","source":2023,"target":1923},{"edgeType":"contains","source":4610,"target":4620},{"edgeType":"calls","source":5020,"target":975},{"edgeType":"contains","source":2016,"target":2586},{"edgeType":"contains","source":3847,"target":3961},{"edgeType":"calls","source":5105,"target":454},{"edgeType":"calls","source":4716,"target":886},{"edgeType":"calls","source":4688,"target":4925},{"edgeType":"contains","source":54,"target":3159},{"edgeType":"calls","source":2273,"target":1571},{"edgeType":"calls","source":4355,"target":450},{"edgeType":"calls","source":4836,"target":1393},{"edgeType":"contains","source":3847,"target":3968},{"edgeType":"imports","source":2981,"target":1814},{"edgeType":"calls","source":3518,"target":1026},{"edgeType":"contains","source":476,"target":650},{"edgeType":"calls","source":1377,"target":803},{"edgeType":"contains","source":259,"target":1035},{"edgeType":"calls","source":5020,"target":974},{"edgeType":"contains","source":3944,"target":4132},{"edgeType":"calls","source":5105,"target":453},{"edgeType":"contains","source":5399,"target":5537},{"edgeType":"calls","source":3186,"target":1805},{"edgeType":"calls","source":3006,"target":1042},{"edgeType":"calls","source":920,"target":1228},{"edgeType":"contains","source":52,"target":53},{"edgeType":"calls","source":1018,"target":305},{"edgeType":"calls","source":5251,"target":156},{"edgeType":"calls","source":2273,"target":1568},{"edgeType":"calls","source":2319,"target":142},{"edgeType":"calls","source":4355,"target":449},{"edgeType":"contains","source":1249,"target":2057},{"edgeType":"contains","source":1189,"target":2860},{"edgeType":"calls","source":4121,"target":302},{"edgeType":"contains","source":2910,"target":3417},{"edgeType":"calls","source":3961,"target":3148},{"edgeType":"calls","source":1288,"target":1447},{"edgeType":"calls","source":5633,"target":997},{"edgeType":"calls","source":5655,"target":315},{"edgeType":"contains","source":3058,"target":3059},{"edgeType":"contains","source":476,"target":649},{"edgeType":"calls","source":5105,"target":452},{"edgeType":"contains","source":5399,"target":5536},{"edgeType":"contains","source":259,"target":1034},{"edgeType":"contains","source":1495,"target":1831},{"edgeType":"calls","source":4830,"target":521},{"edgeType":"calls","source":5020,"target":973},{"edgeType":"calls","source":4413,"target":3935},{"edgeType":"imports","source":4286,"target":1520},{"edgeType":"calls","source":3010,"target":920},{"edgeType":"contains","source":1970,"target":2962},{"edgeType":"calls","source":2273,"target":1569},{"edgeType":"calls","source":4355,"target":448},{"edgeType":"calls","source":2097,"target":1740},{"edgeType":"contains","source":3190,"target":3192},{"edgeType":"calls","source":1377,"target":805},{"edgeType":"contains","source":259,"target":1037},{"edgeType":"calls","source":5105,"target":451},{"edgeType":"contains","source":1970,"target":2958},{"edgeType":"calls","source":1086,"target":313},{"edgeType":"calls","source":4688,"target":4922},{"edgeType":"contains","source":3944,"target":4130},{"edgeType":"calls","source":5020,"target":972},{"edgeType":"calls","source":3059,"target":454},{"edgeType":"imports","source":2048,"target":81},{"edgeType":"calls","source":4355,"target":447},{"edgeType":"calls","source":1525,"target":445},{"edgeType":"contains","source":476,"target":652},{"edgeType":"calls","source":2222,"target":1033},{"edgeType":"calls","source":2131,"target":1740},{"edgeType":"calls","source":4101,"target":920},{"edgeType":"calls","source":5655,"target":313},{"edgeType":"calls","source":4256,"target":345},{"edgeType":"contains","source":476,"target":651},{"edgeType":"calls","source":3607,"target":380},{"edgeType":"calls","source":5613,"target":3729},{"edgeType":"calls","source":3440,"target":272},{"edgeType":"calls","source":1377,"target":804},{"edgeType":"contains","source":5399,"target":5534},{"edgeType":"calls","source":3481,"target":1115},{"edgeType":"calls","source":2591,"target":1222},{"edgeType":"calls","source":5020,"target":971},{"edgeType":"calls","source":4959,"target":1805},{"edgeType":"calls","source":5016,"target":2152},{"edgeType":"contains","source":3944,"target":4129},{"edgeType":"calls","source":5105,"target":450},{"edgeType":"contains","source":2829,"target":3813},{"edgeType":"calls","source":3935,"target":3953},{"edgeType":"calls","source":4762,"target":4773},{"edgeType":"calls","source":4879,"target":89},{"edgeType":"contains","source":255,"target":1130},{"edgeType":"imports","source":4286,"target":1506},{"edgeType":"contains","source":3057,"target":3060},{"edgeType":"calls","source":4662,"target":3645},{"edgeType":"calls","source":5447,"target":451},{"edgeType":"calls","source":3170,"target":3387},{"edgeType":"calls","source":997,"target":984},{"edgeType":"contains","source":3624,"target":282},{"edgeType":"calls","source":1748,"target":2015},{"edgeType":"contains","source":3334,"target":3987},{"edgeType":"contains","source":2734,"target":4616},{"edgeType":"calls","source":3856,"target":1147},{"edgeType":"calls","source":5315,"target":315},{"edgeType":"calls","source":436,"target":406},{"edgeType":"calls","source":3987,"target":3428},{"edgeType":"calls","source":3692,"target":946},{"edgeType":"contains","source":476,"target":621},{"edgeType":"calls","source":3998,"target":973},{"edgeType":"contains","source":4410,"target":4455},{"edgeType":"calls","source":4211,"target":1771},{"edgeType":"calls","source":3424,"target":799},{"edgeType":"calls","source":2591,"target":1253},{"edgeType":"calls","source":5447,"target":450},{"edgeType":"calls","source":997,"target":983},{"edgeType":"calls","source":5251,"target":1240},{"edgeType":"calls","source":3856,"target":1148},{"edgeType":"contains","source":1249,"target":2029},{"edgeType":"contains","source":2792,"target":2819},{"edgeType":"contains","source":4178,"target":4248},{"edgeType":"calls","source":3998,"target":974},{"edgeType":"calls","source":4245,"target":1771},{"edgeType":"calls","source":2842,"target":1925},{"edgeType":"contains","source":2495,"target":2510},{"edgeType":"calls","source":3515,"target":89},{"edgeType":"calls","source":5692,"target":3424},{"edgeType":"calls","source":3669,"target":1657},{"edgeType":"calls","source":5116,"target":2253},{"edgeType":"calls","source":5079,"target":3400},{"edgeType":"calls","source":5513,"target":1574},{"edgeType":"contains","source":5367,"target":5441},{"edgeType":"calls","source":5447,"target":449},{"edgeType":"calls","source":1063,"target":1055},{"edgeType":"calls","source":3236,"target":282},{"edgeType":"calls","source":5254,"target":89},{"edgeType":"calls","source":5315,"target":313},{"edgeType":"calls","source":3998,"target":971},{"edgeType":"imports","source":337,"target":1305},{"edgeType":"calls","source":3713,"target":3464},{"edgeType":"contains","source":107,"target":435},{"edgeType":"contains","source":65,"target":2794},{"edgeType":"calls","source":5689,"target":345},{"edgeType":"contains","source":5367,"target":5440},{"edgeType":"calls","source":5191,"target":984},{"edgeType":"contains","source":5399,"target":5505},{"edgeType":"calls","source":2962,"target":1377},{"edgeType":"imports","source":4286,"target":1509},{"edgeType":"calls","source":5447,"target":448},{"edgeType":"calls","source":986,"target":269},{"edgeType":"calls","source":3243,"target":2180},{"edgeType":"calls","source":5340,"target":593},{"edgeType":"calls","source":5288,"target":2205},{"edgeType":"calls","source":1060,"target":89},{"edgeType":"contains","source":2792,"target":2817},{"edgeType":"contains","source":3359,"target":4266},{"edgeType":"calls","source":436,"target":407},{"edgeType":"imports","source":2374,"target":523},{"edgeType":"contains","source":476,"target":622},{"edgeType":"calls","source":3998,"target":972},{"edgeType":"calls","source":2007,"target":329},{"edgeType":"calls","source":4336,"target":2121},{"edgeType":"calls","source":4364,"target":1253},{"edgeType":"contains","source":2825,"target":2857},{"edgeType":"calls","source":5191,"target":983},{"edgeType":"calls","source":997,"target":980},{"edgeType":"calls","source":3786,"target":142},{"edgeType":"calls","source":1239,"target":878},{"edgeType":"calls","source":5447,"target":447},{"edgeType":"calls","source":5356,"target":2211},{"edgeType":"calls","source":3342,"target":1222},{"edgeType":"calls","source":3213,"target":3106},{"edgeType":"calls","source":1166,"target":1026},{"edgeType":"calls","source":1030,"target":1014},{"edgeType":"calls","source":1895,"target":1682},{"edgeType":"contains","source":2825,"target":2856},{"edgeType":"calls","source":4454,"target":1633},{"edgeType":"calls","source":4572,"target":89},{"edgeType":"contains","source":478,"target":563},{"edgeType":"contains","source":476,"target":625},{"edgeType":"calls","source":4250,"target":3729},{"edgeType":"contains","source":255,"target":1133},{"edgeType":"calls","source":4279,"target":1771},{"edgeType":"calls","source":5555,"target":5554},{"edgeType":"calls","source":5675,"target":777},{"edgeType":"calls","source":3669,"target":1656},{"edgeType":"calls","source":2684,"target":2594},{"edgeType":"calls","source":1024,"target":142},{"edgeType":"calls","source":997,"target":979},{"edgeType":"contains","source":3657,"target":1376},{"edgeType":"contains","source":1189,"target":1776},{"edgeType":"calls","source":5191,"target":982},{"edgeType":"calls","source":5315,"target":309},{"edgeType":"calls","source":1478,"target":867},{"edgeType":"contains","source":4808,"target":4805},{"edgeType":"contains","source":72,"target":2578},{"edgeType":"contains","source":2505,"target":2207},{"edgeType":"calls","source":2211,"target":345},{"edgeType":"contains","source":478,"target":562},{"edgeType":"contains","source":476,"target":624},{"edgeType":"calls","source":2956,"target":501},{"edgeType":"contains","source":3057,"target":948},{"edgeType":"calls","source":4947,"target":89},{"edgeType":"contains","source":778,"target":779},{"edgeType":"calls","source":3145,"target":984},{"edgeType":"calls","source":990,"target":142},{"edgeType":"calls","source":5191,"target":981},{"edgeType":"calls","source":997,"target":982},{"edgeType":"calls","source":5281,"target":305},{"edgeType":"calls","source":5675,"target":776},{"edgeType":"calls","source":5322,"target":2205},{"edgeType":"calls","source":1239,"target":880},{"edgeType":"calls","source":1030,"target":1016},{"edgeType":"contains","source":476,"target":627},{"edgeType":"contains","source":118,"target":1155},{"edgeType":"contains","source":2585,"target":2895},{"edgeType":"imports","source":2115,"target":2207},{"edgeType":"calls","source":4399,"target":1222},{"edgeType":"calls","source":4360,"target":1372},{"edgeType":"calls","source":129,"target":406},{"edgeType":"contains","source":2915,"target":3237},{"edgeType":"calls","source":5191,"target":980},{"edgeType":"calls","source":2998,"target":257},{"edgeType":"calls","source":997,"target":981},{"edgeType":"contains","source":2792,"target":2821},{"edgeType":"imports","source":2734,"target":986},{"edgeType":"calls","source":2043,"target":266},{"edgeType":"contains","source":2825,"target":2855},{"edgeType":"calls","source":2064,"target":1729},{"edgeType":"calls","source":129,"target":407},{"edgeType":"contains","source":476,"target":626},{"edgeType":"contains","source":255,"target":1135},{"edgeType":"imports","source":96,"target":1374},{"edgeType":"contains","source":3644,"target":1784},{"edgeType":"calls","source":2279,"target":345},{"edgeType":"calls","source":4359,"target":345},{"edgeType":"calls","source":5191,"target":979},{"edgeType":"calls","source":997,"target":976},{"edgeType":"calls","source":3039,"target":3211},{"edgeType":"calls","source":3145,"target":982},{"edgeType":"calls","source":5663,"target":89},{"edgeType":"contains","source":4907,"target":4913},{"edgeType":"calls","source":5564,"target":1044},{"edgeType":"contains","source":476,"target":629},{"edgeType":"calls","source":1056,"target":1261},{"edgeType":"calls","source":2798,"target":1169},{"edgeType":"calls","source":1051,"target":359},{"edgeType":"contains","source":3816,"target":3852},{"edgeType":"calls","source":798,"target":803},{"edgeType":"contains","source":54,"target":3141},{"edgeType":"calls","source":997,"target":975},{"edgeType":"calls","source":5191,"target":978},{"edgeType":"calls","source":3145,"target":983},{"edgeType":"calls","source":5276,"target":1514},{"edgeType":"contains","source":4808,"target":4810},{"edgeType":"calls","source":5757,"target":345},{"edgeType":"contains","source":2915,"target":3243},{"edgeType":"contains","source":476,"target":628},{"edgeType":"contains","source":5399,"target":5515},{"edgeType":"calls","source":1241,"target":810},{"edgeType":"calls","source":1225,"target":1306},{"edgeType":"calls","source":1056,"target":1260},{"edgeType":"calls","source":1051,"target":358},{"edgeType":"contains","source":1736,"target":1739},{"edgeType":"calls","source":2535,"target":867},{"edgeType":"calls","source":798,"target":805},{"edgeType":"calls","source":3145,"target":980},{"edgeType":"contains","source":2825,"target":2859},{"edgeType":"calls","source":4216,"target":3719},{"edgeType":"calls","source":2193,"target":895},{"edgeType":"calls","source":5191,"target":977},{"edgeType":"calls","source":5315,"target":304},{"edgeType":"calls","source":997,"target":978},{"edgeType":"imports","source":1781,"target":3060},{"edgeType":"contains","source":4808,"target":4809},{"edgeType":"contains","source":476,"target":631},{"edgeType":"imports","source":3969,"target":1814},{"edgeType":"calls","source":4219,"target":454},{"edgeType":"calls","source":4236,"target":984},{"edgeType":"calls","source":2026,"target":790},{"edgeType":"calls","source":4413,"target":3955},{"edgeType":"contains","source":5667,"target":5668},{"edgeType":"calls","source":4674,"target":3263},{"edgeType":"contains","source":28,"target":1835},{"edgeType":"calls","source":5191,"target":976},{"edgeType":"contains","source":1517,"target":3240},{"edgeType":"calls","source":798,"target":804},{"edgeType":"calls","source":4336,"target":2112},{"edgeType":"calls","source":5281,"target":300},{"edgeType":"calls","source":997,"target":977},{"edgeType":"calls","source":3145,"target":981},{"edgeType":"calls","source":2193,"target":896},{"edgeType":"calls","source":5694,"target":1239},{"edgeType":"contains","source":3247,"target":348},{"edgeType":"calls","source":3382,"target":1033},{"edgeType":"contains","source":476,"target":630},{"edgeType":"contains","source":5399,"target":5513},{"edgeType":"calls","source":5415,"target":1431},{"edgeType":"calls","source":5390,"target":3263},{"edgeType":"calls","source":1056,"target":1262},{"edgeType":"calls","source":1051,"target":360},{"edgeType":"calls","source":4967,"target":1578},{"edgeType":"contains","source":72,"target":3641},{"edgeType":"contains","source":11,"target":3418},{"edgeType":"calls","source":5191,"target":975},{"edgeType":"calls","source":997,"target":972},{"edgeType":"calls","source":3145,"target":978},{"edgeType":"calls","source":5276,"target":454},{"edgeType":"calls","source":4352,"target":3729},{"edgeType":"calls","source":4395,"target":282},{"edgeType":"calls","source":5555,"target":5547},{"edgeType":"calls","source":3608,"target":367},{"edgeType":"contains","source":4610,"target":4611},{"edgeType":"contains","source":3816,"target":3856},{"edgeType":"calls","source":2043,"target":257},{"edgeType":"calls","source":4219,"target":452},{"edgeType":"calls","source":3338,"target":1337},{"edgeType":"calls","source":4236,"target":982},{"edgeType":"contains","source":476,"target":633},{"edgeType":"calls","source":4967,"target":1577},{"edgeType":"contains","source":5399,"target":5520},{"edgeType":"contains","source":255,"target":1142},{"edgeType":"calls","source":1056,"target":1257},{"edgeType":"calls","source":1051,"target":355},{"edgeType":"calls","source":4828,"target":4829},{"edgeType":"calls","source":997,"target":971},{"edgeType":"contains","source":11,"target":3420},{"edgeType":"contains","source":54,"target":2087},{"edgeType":"imports","source":4286,"target":446},{"edgeType":"calls","source":5276,"target":453},{"edgeType":"calls","source":1729,"target":477},{"edgeType":"contains","source":2016,"target":2576},{"edgeType":"calls","source":5191,"target":974},{"edgeType":"calls","source":3145,"target":979},{"edgeType":"calls","source":4594,"target":454},{"edgeType":"calls","source":4367,"target":3263},{"edgeType":"calls","source":2193,"target":894},{"edgeType":"calls","source":4233,"target":3189},{"edgeType":"calls","source":5683,"target":521},{"edgeType":"calls","source":1817,"target":920},{"edgeType":"calls","source":4219,"target":453},{"edgeType":"calls","source":4236,"target":983},{"edgeType":"calls","source":3389,"target":814},{"edgeType":"contains","source":476,"target":632},{"edgeType":"contains","source":5399,"target":5519},{"edgeType":"calls","source":5109,"target":345},{"edgeType":"calls","source":4967,"target":1576},{"edgeType":"calls","source":2832,"target":1169},{"edgeType":"contains","source":4907,"target":4915},{"edgeType":"calls","source":3145,"target":976},{"edgeType":"contains","source":11,"target":2366},{"edgeType":"calls","source":5191,"target":973},{"edgeType":"calls","source":997,"target":974},{"edgeType":"calls","source":5276,"target":452},{"edgeType":"calls","source":2334,"target":1805},{"edgeType":"calls","source":4594,"target":453},{"edgeType":"contains","source":476,"target":636},{"edgeType":"contains","source":4808,"target":4813},{"edgeType":"contains","source":2948,"target":1164},{"edgeType":"calls","source":4219,"target":450},{"edgeType":"calls","source":5651,"target":454},{"edgeType":"calls","source":4236,"target":980},{"edgeType":"contains","source":476,"target":635},{"edgeType":"calls","source":5517,"target":380},{"edgeType":"contains","source":5399,"target":5518},{"edgeType":"calls","source":1056,"target":1259},{"edgeType":"calls","source":1051,"target":357},{"edgeType":"calls","source":5276,"target":451},{"edgeType":"calls","source":3145,"target":977},{"edgeType":"calls","source":997,"target":973},{"edgeType":"contains","source":4178,"target":4258},{"edgeType":"calls","source":2274,"target":1552},{"edgeType":"calls","source":4439,"target":1029},{"edgeType":"calls","source":4594,"target":452},{"edgeType":"calls","source":4429,"target":282},{"edgeType":"calls","source":3608,"target":366},{"edgeType":"contains","source":4694,"target":5175},{"edgeType":"calls","source":5671,"target":3005},{"edgeType":"calls","source":3683,"target":2269},{"edgeType":"calls","source":5651,"target":453},{"edgeType":"calls","source":4219,"target":451},{"edgeType":"calls","source":4236,"target":981},{"edgeType":"contains","source":2584,"target":2935},{"edgeType":"contains","source":476,"target":634},{"edgeType":"contains","source":1189,"target":1786},{"edgeType":"calls","source":5717,"target":521},{"edgeType":"calls","source":1056,"target":1258},{"edgeType":"contains","source":1635,"target":1701},{"edgeType":"calls","source":1051,"target":356},{"edgeType":"calls","source":5191,"target":972},{"edgeType":"imports","source":317,"target":920},{"edgeType":"contains","source":2792,"target":2802},{"edgeType":"calls","source":477,"target":142},{"edgeType":"contains","source":1280,"target":2107},{"edgeType":"calls","source":3732,"target":1771},{"edgeType":"calls","source":4047,"target":1519},{"edgeType":"contains","source":476,"target":605},{"edgeType":"calls","source":2279,"target":304},{"edgeType":"calls","source":4035,"target":4005},{"edgeType":"contains","source":2593,"target":2629},{"edgeType":"calls","source":4874,"target":3366},{"edgeType":"calls","source":3604,"target":453},{"edgeType":"calls","source":2898,"target":142},{"edgeType":"contains","source":3847,"target":3923},{"edgeType":"imports","source":4103,"target":3001},{"edgeType":"calls","source":4692,"target":3723},{"edgeType":"contains","source":3879,"target":3988},{"edgeType":"calls","source":3391,"target":1771},{"edgeType":"contains","source":5399,"target":5491},{"edgeType":"calls","source":1118,"target":354},{"edgeType":"calls","source":1061,"target":1064},{"edgeType":"contains","source":1280,"target":2108},{"edgeType":"calls","source":4695,"target":1514},{"edgeType":"contains","source":1970,"target":2916},{"edgeType":"contains","source":2825,"target":2837},{"edgeType":"contains","source":476,"target":604},{"edgeType":"calls","source":2334,"target":1771},{"edgeType":"contains","source":963,"target":1362},{"edgeType":"contains","source":2495,"target":2497},{"edgeType":"contains","source":2593,"target":2630},{"edgeType":"calls","source":5670,"target":886},{"edgeType":"contains","source":476,"target":603},{"edgeType":"calls","source":3604,"target":454},{"edgeType":"contains","source":259,"target":988},{"edgeType":"calls","source":1640,"target":1084},{"edgeType":"contains","source":3254,"target":3279},{"edgeType":"imports","source":4286,"target":1557},{"edgeType":"contains","source":5399,"target":5490},{"edgeType":"calls","source":3273,"target":142},{"edgeType":"calls","source":5282,"target":3400},{"edgeType":"calls","source":2592,"target":1169},{"edgeType":"contains","source":118,"target":1134},{"edgeType":"contains","source":476,"target":607},{"edgeType":"contains","source":2593,"target":2627},{"edgeType":"imports","source":2048,"target":1166},{"edgeType":"contains","source":4576,"target":4577},{"edgeType":"calls","source":4328,"target":206},{"edgeType":"calls","source":5735,"target":984},{"edgeType":"calls","source":3479,"target":3269},{"edgeType":"calls","source":3604,"target":451},{"edgeType":"calls","source":779,"target":296},{"edgeType":"calls","source":5611,"target":1657},{"edgeType":"calls","source":4859,"target":2772},{"edgeType":"calls","source":4772,"target":3355},{"edgeType":"calls","source":5662,"target":4304},{"edgeType":"contains","source":5367,"target":5424},{"edgeType":"calls","source":3473,"target":284},{"edgeType":"contains","source":5399,"target":5489},{"edgeType":"contains","source":3585,"target":3587},{"edgeType":"calls","source":3955,"target":1199},{"edgeType":"contains","source":2593,"target":2628},{"edgeType":"contains","source":476,"target":606},{"edgeType":"calls","source":3604,"target":452},{"edgeType":"calls","source":5041,"target":300},{"edgeType":"calls","source":5016,"target":1075},{"edgeType":"calls","source":5735,"target":983},{"edgeType":"calls","source":4980,"target":2191},{"edgeType":"contains","source":5399,"target":5488},{"edgeType":"calls","source":5620,"target":320},{"edgeType":"calls","source":5611,"target":1656},{"edgeType":"calls","source":3433,"target":2582},{"edgeType":"contains","source":3865,"target":4419},{"edgeType":"calls","source":5385,"target":2320},{"edgeType":"calls","source":5377,"target":454},{"edgeType":"contains","source":5367,"target":5431},{"edgeType":"contains","source":5399,"target":5496},{"edgeType":"contains","source":2578,"target":4155},{"edgeType":"calls","source":4719,"target":767},{"edgeType":"calls","source":4695,"target":454},{"edgeType":"contains","source":2593,"target":2633},{"edgeType":"calls","source":4093,"target":89},{"edgeType":"contains","source":2825,"target":2840},{"edgeType":"calls","source":4182,"target":501},{"edgeType":"calls","source":4823,"target":1771},{"edgeType":"calls","source":2731,"target":1086},{"edgeType":"contains","source":4274,"target":4431},{"edgeType":"calls","source":348,"target":966},{"edgeType":"contains","source":476,"target":609},{"edgeType":"calls","source":2420,"target":1214},{"edgeType":"calls","source":4434,"target":89},{"edgeType":"calls","source":4359,"target":300},{"edgeType":"imports","source":2185,"target":89},{"edgeType":"calls","source":5735,"target":982},{"edgeType":"calls","source":5501,"target":837},{"edgeType":"calls","source":3604,"target":449},{"edgeType":"calls","source":5377,"target":453},{"edgeType":"contains","source":2578,"target":4156},{"edgeType":"calls","source":4719,"target":766},{"edgeType":"contains","source":5399,"target":5495},{"edgeType":"calls","source":2536,"target":790},{"edgeType":"contains","source":2048,"target":502},{"edgeType":"calls","source":4695,"target":453},{"edgeType":"contains","source":2584,"target":2913},{"edgeType":"contains","source":54,"target":1005},{"edgeType":"calls","source":2211,"target":2409},{"edgeType":"contains","source":476,"target":608},{"edgeType":"calls","source":3604,"target":450},{"edgeType":"calls","source":5735,"target":981},{"edgeType":"contains","source":2915,"target":3222},{"edgeType":"calls","source":3509,"target":1281},{"edgeType":"calls","source":5377,"target":452},{"edgeType":"calls","source":1521,"target":1598},{"edgeType":"contains","source":5399,"target":5494},{"edgeType":"calls","source":5501,"target":836},{"edgeType":"calls","source":4667,"target":4491},{"edgeType":"contains","source":2792,"target":2804},{"edgeType":"calls","source":4013,"target":453},{"edgeType":"calls","source":4888,"target":811},{"edgeType":"contains","source":476,"target":611},{"edgeType":"calls","source":4695,"target":452},{"edgeType":"contains","source":2593,"target":2631},{"edgeType":"contains","source":277,"target":438},{"edgeType":"calls","source":354,"target":782},{"edgeType":"contains","source":259,"target":996},{"edgeType":"calls","source":3683,"target":1169},{"edgeType":"calls","source":5277,"target":380},{"edgeType":"calls","source":5654,"target":320},{"edgeType":"calls","source":3197,"target":380},{"edgeType":"contains","source":3476,"target":4856},{"edgeType":"contains","source":5367,"target":5428},{"edgeType":"calls","source":5377,"target":451},{"edgeType":"calls","source":1240,"target":799},{"edgeType":"calls","source":1239,"target":830},{"edgeType":"contains","source":1189,"target":1762},{"edgeType":"calls","source":5714,"target":1631},{"edgeType":"calls","source":5735,"target":980},{"edgeType":"calls","source":5501,"target":835},{"edgeType":"contains","source":1515,"target":2224},{"edgeType":"calls","source":3604,"target":447},{"edgeType":"calls","source":5572,"target":1805},{"edgeType":"calls","source":4013,"target":454},{"edgeType":"calls","source":4576,"target":969},{"edgeType":"contains","source":2825,"target":2839},{"edgeType":"calls","source":4947,"target":2152},{"edgeType":"contains","source":54,"target":3121},{"edgeType":"calls","source":4695,"target":451},{"edgeType":"contains","source":2593,"target":2632},{"edgeType":"contains","source":476,"target":610},{"edgeType":"calls","source":3702,"target":581},{"edgeType":"calls","source":5173,"target":1489},{"edgeType":"contains","source":3879,"target":3989},{"edgeType":"calls","source":5377,"target":450},{"edgeType":"calls","source":3604,"target":448},{"edgeType":"calls","source":5714,"target":1630},{"edgeType":"calls","source":5735,"target":979},{"edgeType":"contains","source":5367,"target":5427},{"edgeType":"contains","source":5363,"target":5551},{"edgeType":"contains","source":5399,"target":5492},{"edgeType":"calls","source":5612,"target":564},{"edgeType":"contains","source":1189,"target":1765},{"edgeType":"calls","source":5500,"target":864},{"edgeType":"calls","source":5501,"target":833},{"edgeType":"calls","source":4086,"target":302},{"edgeType":"contains","source":476,"target":613},{"edgeType":"calls","source":4013,"target":451},{"edgeType":"contains","source":2532,"target":300},{"edgeType":"calls","source":1226,"target":1227},{"edgeType":"calls","source":1086,"target":282},{"edgeType":"contains","source":11,"target":2343},{"edgeType":"contains","source":54,"target":2067},{"edgeType":"calls","source":4695,"target":450},{"edgeType":"calls","source":956,"target":1141},{"edgeType":"calls","source":3867,"target":1805},{"edgeType":"calls","source":3955,"target":1191},{"edgeType":"calls","source":5377,"target":449},{"edgeType":"calls","source":4013,"target":450},{"edgeType":"contains","source":1273,"target":1276},{"edgeType":"calls","source":5431,"target":5117},{"edgeType":"calls","source":5620,"target":315},{"edgeType":"calls","source":1833,"target":1436},{"edgeType":"contains","source":3127,"target":4052},{"edgeType":"calls","source":5714,"target":1629},{"edgeType":"calls","source":5735,"target":978},{"edgeType":"imports","source":4037,"target":811},{"edgeType":"calls","source":3283,"target":2998},{"edgeType":"contains","source":476,"target":612},{"edgeType":"calls","source":5501,"target":832},{"edgeType":"contains","source":5399,"target":5499},{"edgeType":"calls","source":4013,"target":452},{"edgeType":"calls","source":4023,"target":142},{"edgeType":"contains","source":1705,"target":1626},{"edgeType":"calls","source":4695,"target":449},{"edgeType":"calls","source":920,"target":142},{"edgeType":"contains","source":96,"target":2878},{"edgeType":"calls","source":4294,"target":1253},{"edgeType":"calls","source":5377,"target":448},{"edgeType":"calls","source":5619,"target":345},{"edgeType":"calls","source":5735,"target":977},{"edgeType":"contains","source":476,"target":615},{"edgeType":"contains","source":3321,"target":3322},{"edgeType":"calls","source":5431,"target":5115},{"edgeType":"calls","source":5620,"target":313},{"edgeType":"imports","source":1781,"target":995},{"edgeType":"calls","source":3365,"target":453},{"edgeType":"calls","source":4695,"target":448},{"edgeType":"calls","source":4982,"target":4235},{"edgeType":"imports","source":3811,"target":419},{"edgeType":"contains","source":54,"target":2070},{"edgeType":"calls","source":3820,"target":89},{"edgeType":"calls","source":5128,"target":767},{"edgeType":"contains","source":3476,"target":4860},{"edgeType":"calls","source":5377,"target":447},{"edgeType":"calls","source":4013,"target":448},{"edgeType":"calls","source":5735,"target":976},{"edgeType":"contains","source":959,"target":1497},{"edgeType":"calls","source":1455,"target":1529},{"edgeType":"contains","source":5363,"target":5556},{"edgeType":"contains","source":476,"target":614},{"edgeType":"calls","source":5654,"target":315},{"edgeType":"contains","source":2495,"target":2503},{"edgeType":"calls","source":1086,"target":1340},{"edgeType":"imports","source":1781,"target":994},{"edgeType":"contains","source":2578,"target":4158},{"edgeType":"calls","source":3365,"target":454},{"edgeType":"calls","source":4695,"target":447},{"edgeType":"imports","source":4103,"target":1938},{"edgeType":"contains","source":11,"target":1287},{"edgeType":"calls","source":4646,"target":4080},{"edgeType":"calls","source":2772,"target":867},{"edgeType":"calls","source":2319,"target":1169},{"edgeType":"calls","source":3006,"target":1013},{"edgeType":"calls","source":3009,"target":920},{"edgeType":"calls","source":5128,"target":766},{"edgeType":"calls","source":5305,"target":564},{"edgeType":"calls","source":5735,"target":975},{"edgeType":"contains","source":4868,"target":5045},{"edgeType":"calls","source":4013,"target":449},{"edgeType":"calls","source":1655,"target":1670},{"edgeType":"calls","source":1343,"target":767},{"edgeType":"calls","source":4877,"target":89},{"edgeType":"calls","source":2069,"target":1516},{"edgeType":"calls","source":3365,"target":451},{"edgeType":"contains","source":5171,"target":5173},{"edgeType":"contains","source":476,"target":617},{"edgeType":"calls","source":3383,"target":2007},{"edgeType":"contains","source":5367,"target":5439},{"edgeType":"contains","source":5399,"target":5504},{"edgeType":"contains","source":3476,"target":4866},{"edgeType":"calls","source":348,"target":958},{"edgeType":"calls","source":354,"target":772},{"edgeType":"calls","source":4433,"target":1169},{"edgeType":"calls","source":2410,"target":1516},{"edgeType":"calls","source":3582,"target":2180},{"edgeType":"contains","source":2585,"target":2889},{"edgeType":"calls","source":5735,"target":974},{"edgeType":"calls","source":1787,"target":1801},{"edgeType":"contains","source":2915,"target":3229},{"edgeType":"calls","source":2018,"target":982},{"edgeType":"imports","source":435,"target":437},{"edgeType":"contains","source":2532,"target":305},{"edgeType":"calls","source":5654,"target":313},{"edgeType":"calls","source":1343,"target":766},{"edgeType":"contains","source":2495,"target":2509},{"edgeType":"calls","source":3365,"target":452},{"edgeType":"contains","source":5367,"target":5438},{"edgeType":"contains","source":5363,"target":5562},{"edgeType":"contains","source":476,"target":616},{"edgeType":"contains","source":5399,"target":5503},{"edgeType":"contains","source":255,"target":1125},{"edgeType":"contains","source":259,"target":1001},{"edgeType":"calls","source":2933,"target":3273},{"edgeType":"calls","source":2989,"target":2594},{"edgeType":"contains","source":3847,"target":3934},{"edgeType":"contains","source":3865,"target":4433},{"edgeType":"calls","source":4980,"target":2180},{"edgeType":"calls","source":1511,"target":2957},{"edgeType":"calls","source":1887,"target":1871},{"edgeType":"calls","source":4013,"target":447},{"edgeType":"calls","source":5735,"target":973},{"edgeType":"calls","source":2018,"target":981},{"edgeType":"contains","source":4997,"target":4223},{"edgeType":"contains","source":2792,"target":2815},{"edgeType":"calls","source":4876,"target":2232},{"edgeType":"calls","source":3514,"target":1115},{"edgeType":"calls","source":2007,"target":269},{"edgeType":"contains","source":476,"target":619},{"edgeType":"calls","source":5735,"target":972},{"edgeType":"contains","source":5367,"target":5437},{"edgeType":"calls","source":5620,"target":309},{"edgeType":"contains","source":255,"target":1128},{"edgeType":"calls","source":1060,"target":1086},{"edgeType":"calls","source":3365,"target":449},{"edgeType":"calls","source":5044,"target":3366},{"edgeType":"contains","source":3359,"target":4263},{"edgeType":"calls","source":2537,"target":1805},{"edgeType":"calls","source":1806,"target":1214},{"edgeType":"calls","source":2018,"target":984},{"edgeType":"calls","source":5735,"target":971},{"edgeType":"contains","source":476,"target":618},{"edgeType":"contains","source":5399,"target":5501},{"edgeType":"calls","source":790,"target":998},{"edgeType":"calls","source":3365,"target":450},{"edgeType":"calls","source":3186,"target":1771},{"edgeType":"calls","source":5189,"target":984},{"edgeType":"calls","source":3854,"target":89},{"edgeType":"contains","source":4178,"target":4242},{"edgeType":"calls","source":3935,"target":749},{"edgeType":"calls","source":2018,"target":983},{"edgeType":"calls","source":3572,"target":405},{"edgeType":"calls","source":2729,"target":1169},{"edgeType":"contains","source":3056,"target":3058},{"edgeType":"calls","source":4801,"target":360},{"edgeType":"calls","source":3059,"target":452},{"edgeType":"calls","source":920,"target":1224},{"edgeType":"calls","source":5253,"target":89},{"edgeType":"calls","source":1018,"target":300},{"edgeType":"calls","source":5105,"target":449},{"edgeType":"calls","source":1086,"target":1363},{"edgeType":"calls","source":5250,"target":1240},{"edgeType":"calls","source":1869,"target":345},{"edgeType":"contains","source":2593,"target":2612},{"edgeType":"contains","source":2263,"target":2272},{"edgeType":"contains","source":963,"target":1346},{"edgeType":"contains","source":3814,"target":3871},{"edgeType":"contains","source":476,"target":587},{"edgeType":"calls","source":4812,"target":3189},{"edgeType":"contains","source":1220,"target":778},{"edgeType":"calls","source":798,"target":777},{"edgeType":"contains","source":3127,"target":1915},{"edgeType":"calls","source":920,"target":1223},{"edgeType":"calls","source":4801,"target":359},{"edgeType":"calls","source":5105,"target":448},{"edgeType":"calls","source":3059,"target":453},{"edgeType":"contains","source":1988,"target":3399},{"edgeType":"contains","source":2698,"target":4643},{"edgeType":"calls","source":1061,"target":1080},{"edgeType":"calls","source":1086,"target":305},{"edgeType":"calls","source":5304,"target":2736},{"edgeType":"calls","source":3608,"target":3518},{"edgeType":"calls","source":2042,"target":266},{"edgeType":"contains","source":963,"target":1345},{"edgeType":"contains","source":2593,"target":2613},{"edgeType":"calls","source":3626,"target":843},{"edgeType":"calls","source":5184,"target":1169},{"edgeType":"contains","source":4037,"target":4356},{"edgeType":"calls","source":2999,"target":1253},{"edgeType":"contains","source":5681,"target":4135},{"edgeType":"calls","source":3059,"target":450},{"edgeType":"calls","source":5105,"target":447},{"edgeType":"calls","source":5355,"target":2211},{"edgeType":"calls","source":1086,"target":309},{"edgeType":"calls","source":5347,"target":345},{"edgeType":"calls","source":297,"target":456},{"edgeType":"contains","source":3452,"target":3465},{"edgeType":"calls","source":4801,"target":358},{"edgeType":"contains","source":476,"target":590},{"edgeType":"contains","source":2593,"target":2610},{"edgeType":"calls","source":3608,"target":345},{"edgeType":"imports","source":3969,"target":3970},{"edgeType":"calls","source":3592,"target":2955},{"edgeType":"calls","source":5655,"target":309},{"edgeType":"contains","source":1517,"target":3199},{"edgeType":"calls","source":3059,"target":451},{"edgeType":"calls","source":5564,"target":1016},{"edgeType":"contains","source":3811,"target":3962},{"edgeType":"contains","source":4178,"target":4213},{"edgeType":"calls","source":2443,"target":521},{"edgeType":"contains","source":3476,"target":4834},{"edgeType":"contains","source":12,"target":1232},{"edgeType":"calls","source":4801,"target":357},{"edgeType":"contains","source":2263,"target":2271},{"edgeType":"calls","source":4126,"target":142},{"edgeType":"contains","source":2593,"target":2611},{"edgeType":"calls","source":4530,"target":302},{"edgeType":"calls","source":2279,"target":320},{"edgeType":"calls","source":2211,"target":310},{"edgeType":"calls","source":3059,"target":448},{"edgeType":"calls","source":1240,"target":814},{"edgeType":"calls","source":3335,"target":349},{"edgeType":"calls","source":1399,"target":113},{"edgeType":"contains","source":5367,"target":5414},{"edgeType":"calls","source":4801,"target":356},{"edgeType":"contains","source":1867,"target":1868},{"edgeType":"calls","source":4846,"target":1075},{"edgeType":"contains","source":2207,"target":841},{"edgeType":"calls","source":4264,"target":89},{"edgeType":"contains","source":2593,"target":2616},{"edgeType":"contains","source":476,"target":592},{"edgeType":"calls","source":4359,"target":1372},{"edgeType":"calls","source":4232,"target":3195},{"edgeType":"contains","source":3972,"target":1091},{"edgeType":"calls","source":5564,"target":1014},{"edgeType":"calls","source":3059,"target":449},{"edgeType":"calls","source":1529,"target":2424},{"edgeType":"contains","source":5367,"target":5413},{"edgeType":"contains","source":2593,"target":2617},{"edgeType":"calls","source":1093,"target":1141},{"edgeType":"calls","source":4801,"target":355},{"edgeType":"calls","source":1061,"target":1076},{"edgeType":"contains","source":476,"target":591},{"edgeType":"calls","source":4517,"target":1760},{"edgeType":"calls","source":4337,"target":2053},{"edgeType":"calls","source":3710,"target":349},{"edgeType":"calls","source":2812,"target":2818},{"edgeType":"calls","source":2875,"target":1922},{"edgeType":"calls","source":798,"target":776},{"edgeType":"calls","source":5215,"target":2318},{"edgeType":"calls","source":3473,"target":297},{"edgeType":"calls","source":4686,"target":1805},{"edgeType":"calls","source":1086,"target":304},{"edgeType":"calls","source":2032,"target":1632},{"edgeType":"contains","source":476,"target":594},{"edgeType":"contains","source":2593,"target":2614},{"edgeType":"calls","source":2279,"target":315},{"edgeType":"calls","source":3059,"target":447},{"edgeType":"calls","source":5402,"target":1805},{"edgeType":"calls","source":5415,"target":345},{"edgeType":"calls","source":3971,"target":1772},{"edgeType":"calls","source":4413,"target":2868},{"edgeType":"calls","source":2304,"target":598},{"edgeType":"contains","source":2593,"target":2615},{"edgeType":"contains","source":476,"target":593},{"edgeType":"calls","source":4536,"target":1169},{"edgeType":"calls","source":866,"target":776},{"edgeType":"calls","source":4375,"target":1930},{"edgeType":"contains","source":3476,"target":4845},{"edgeType":"calls","source":3447,"target":1101},{"edgeType":"calls","source":1640,"target":1094},{"edgeType":"calls","source":5693,"target":1240},{"edgeType":"calls","source":5655,"target":304},{"edgeType":"calls","source":3678,"target":282},{"edgeType":"contains","source":2593,"target":2620},{"edgeType":"calls","source":4008,"target":2736},{"edgeType":"calls","source":4034,"target":1930},{"edgeType":"contains","source":3879,"target":3980},{"edgeType":"contains","source":476,"target":596},{"edgeType":"calls","source":3286,"target":806},{"edgeType":"calls","source":3227,"target":521},{"edgeType":"imports","source":3811,"target":2515},{"edgeType":"calls","source":4639,"target":89},{"edgeType":"calls","source":2279,"target":313},{"edgeType":"contains","source":2910,"target":3365},{"edgeType":"calls","source":2211,"target":307},{"edgeType":"calls","source":5315,"target":272},{"edgeType":"contains","source":1517,"target":3209},{"edgeType":"calls","source":266,"target":348},{"edgeType":"calls","source":5364,"target":867},{"edgeType":"calls","source":5693,"target":1239},{"edgeType":"calls","source":4703,"target":3389},{"edgeType":"contains","source":3879,"target":3979},{"edgeType":"calls","source":5414,"target":1431},{"edgeType":"contains","source":2593,"target":2621},{"edgeType":"imports","source":3208,"target":81},{"edgeType":"contains","source":3816,"target":3818},{"edgeType":"calls","source":995,"target":1007},{"edgeType":"contains","source":2825,"target":2826},{"edgeType":"calls","source":5249,"target":2317},{"edgeType":"calls","source":3955,"target":1206},{"edgeType":"contains","source":4868,"target":5030},{"edgeType":"calls","source":4031,"target":964},{"edgeType":"calls","source":3710,"target":345},{"edgeType":"calls","source":5706,"target":5063},{"edgeType":"calls","source":1529,"target":1366},{"edgeType":"contains","source":2593,"target":2618},{"edgeType":"calls","source":5581,"target":481},{"edgeType":"contains","source":3879,"target":3978},{"edgeType":"calls","source":3481,"target":1101},{"edgeType":"calls","source":5449,"target":345},{"edgeType":"calls","source":1086,"target":300},{"edgeType":"contains","source":3816,"target":3817},{"edgeType":"contains","source":3847,"target":3913},{"edgeType":"contains","source":96,"target":2865},{"edgeType":"contains","source":1517,"target":3207},{"edgeType":"contains","source":2888,"target":2988},{"edgeType":"calls","source":866,"target":777},{"edgeType":"calls","source":5286,"target":1169},{"edgeType":"calls","source":2211,"target":305},{"edgeType":"calls","source":5214,"target":4458},{"edgeType":"calls","source":4366,"target":3263},{"edgeType":"contains","source":4873,"target":4874},{"edgeType":"contains","source":2792,"target":2793},{"edgeType":"contains","source":960,"target":2506},{"edgeType":"contains","source":3476,"target":4842},{"edgeType":"calls","source":3614,"target":3322},{"edgeType":"calls","source":2640,"target":1805},{"edgeType":"contains","source":5367,"target":5415},{"edgeType":"contains","source":2593,"target":2619},{"edgeType":"contains","source":476,"target":597},{"edgeType":"calls","source":5632,"target":1013},{"edgeType":"contains","source":4683,"target":2307},{"edgeType":"calls","source":5421,"target":2269},{"edgeType":"contains","source":3879,"target":3977},{"edgeType":"calls","source":4963,"target":1669},{"edgeType":"calls","source":2722,"target":1377},{"edgeType":"contains","source":4181,"target":4135},{"edgeType":"calls","source":1563,"target":1363},{"edgeType":"calls","source":4426,"target":345},{"edgeType":"calls","source":5739,"target":867},{"edgeType":"contains","source":1249,"target":2007},{"edgeType":"calls","source":4231,"target":3219},{"edgeType":"contains","source":2593,"target":2625},{"edgeType":"calls","source":1807,"target":141},{"edgeType":"imports","source":3969,"target":792},{"edgeType":"calls","source":4125,"target":1219},{"edgeType":"contains","source":2593,"target":2624},{"edgeType":"contains","source":5367,"target":5422},{"edgeType":"contains","source":476,"target":600},{"edgeType":"contains","source":5399,"target":5487},{"edgeType":"calls","source":4622,"target":1669},{"edgeType":"calls","source":2778,"target":2809},{"edgeType":"contains","source":3879,"target":3984},{"edgeType":"calls","source":2279,"target":309},{"edgeType":"contains","source":963,"target":1358},{"edgeType":"contains","source":2593,"target":2626},{"edgeType":"calls","source":1951,"target":961},{"edgeType":"contains","source":476,"target":599},{"edgeType":"calls","source":5716,"target":521},{"edgeType":"contains","source":5399,"target":5486},{"edgeType":"calls","source":5353,"target":2261},{"edgeType":"imports","source":1331,"target":126},{"edgeType":"contains","source":1635,"target":1666},{"edgeType":"contains","source":3476,"target":4847},{"edgeType":"contains","source":3359,"target":4246},{"edgeType":"calls","source":4366,"target":89},{"edgeType":"calls","source":5670,"target":3004},{"edgeType":"calls","source":2211,"target":300},{"edgeType":"contains","source":3879,"target":3982},{"edgeType":"calls","source":5636,"target":886},{"edgeType":"calls","source":2042,"target":257},{"edgeType":"contains","source":476,"target":602},{"edgeType":"calls","source":3515,"target":2157},{"edgeType":"contains","source":2593,"target":2622},{"edgeType":"calls","source":3401,"target":406},{"edgeType":"calls","source":4834,"target":380},{"edgeType":"calls","source":5041,"target":305},{"edgeType":"calls","source":354,"target":789},{"edgeType":"imports","source":57,"target":510},{"edgeType":"calls","source":4359,"target":305},{"edgeType":"calls","source":1977,"target":1214},{"edgeType":"contains","source":3879,"target":3981},{"edgeType":"calls","source":4248,"target":1633},{"edgeType":"contains","source":1189,"target":1753},{"edgeType":"calls","source":3401,"target":407},{"edgeType":"contains","source":2593,"target":2623},{"edgeType":"contains","source":476,"target":601},{"edgeType":"calls","source":5460,"target":1056},{"edgeType":"calls","source":4801,"target":345},{"edgeType":"calls","source":2448,"target":449},{"edgeType":"calls","source":3138,"target":1257},{"edgeType":"calls","source":3880,"target":453},{"edgeType":"calls","source":1777,"target":1166},{"edgeType":"contains","source":3359,"target":4219},{"edgeType":"calls","source":5278,"target":454},{"edgeType":"calls","source":4676,"target":89},{"edgeType":"contains","source":2585,"target":2844},{"edgeType":"imports","source":4037,"target":851},{"edgeType":"contains","source":2593,"target":2596},{"edgeType":"contains","source":476,"target":572},{"edgeType":"calls","source":3987,"target":307},{"edgeType":"calls","source":2045,"target":257},{"edgeType":"contains","source":3847,"target":3890},{"edgeType":"contains","source":478,"target":509},{"edgeType":"contains","source":476,"target":571},{"edgeType":"imports","source":1988,"target":948},{"edgeType":"contains","source":2247,"target":4865},{"edgeType":"calls","source":5461,"target":2180},{"edgeType":"contains","source":5363,"target":5517},{"edgeType":"imports","source":2740,"target":890},{"edgeType":"imports","source":2517,"target":2518},{"edgeType":"calls","source":5278,"target":453},{"edgeType":"calls","source":3138,"target":1258},{"edgeType":"calls","source":4369,"target":3263},{"edgeType":"contains","source":2096,"target":2148},{"edgeType":"calls","source":2448,"target":450},{"edgeType":"calls","source":4303,"target":3195},{"edgeType":"calls","source":3880,"target":454},{"edgeType":"calls","source":4054,"target":345},{"edgeType":"contains","source":2593,"target":2597},{"edgeType":"calls","source":4186,"target":481},{"edgeType":"contains","source":3781,"target":3821},{"edgeType":"calls","source":5120,"target":2180},{"edgeType":"calls","source":5243,"target":2594},{"edgeType":"calls","source":5278,"target":452},{"edgeType":"calls","source":2448,"target":447},{"edgeType":"calls","source":3880,"target":451},{"edgeType":"contains","source":3359,"target":4217},{"edgeType":"contains","source":14,"target":3268},{"edgeType":"contains","source":4410,"target":2290},{"edgeType":"contains","source":476,"target":574},{"edgeType":"calls","source":2303,"target":1771},{"edgeType":"calls","source":2764,"target":1222},{"edgeType":"imports","source":3969,"target":1905},{"edgeType":"contains","source":2247,"target":4863},{"edgeType":"calls","source":5653,"target":454},{"edgeType":"contains","source":5265,"target":5382},{"edgeType":"calls","source":4770,"target":345},{"edgeType":"contains","source":5367,"target":5391},{"edgeType":"calls","source":3425,"target":814},{"edgeType":"calls","source":5016,"target":2232},{"edgeType":"calls","source":3880,"target":452},{"edgeType":"calls","source":2448,"target":448},{"edgeType":"calls","source":5312,"target":454},{"edgeType":"calls","source":3154,"target":1817},{"edgeType":"calls","source":4710,"target":89},{"edgeType":"calls","source":3715,"target":282},{"edgeType":"contains","source":476,"target":573},{"edgeType":"calls","source":3936,"target":830},{"edgeType":"calls","source":4211,"target":3931},{"edgeType":"calls","source":1974,"target":345},{"edgeType":"contains","source":3121,"target":3139},{"edgeType":"calls","source":4294,"target":302},{"edgeType":"contains","source":4610,"target":4545},{"edgeType":"contains","source":2247,"target":4864},{"edgeType":"calls","source":5653,"target":453},{"edgeType":"calls","source":5719,"target":521},{"edgeType":"calls","source":5473,"target":1805},{"edgeType":"calls","source":801,"target":769},{"edgeType":"contains","source":4078,"target":4125},{"edgeType":"calls","source":3323,"target":806},{"edgeType":"calls","source":2896,"target":302},{"edgeType":"contains","source":3741,"target":4002},{"edgeType":"calls","source":5278,"target":451},{"edgeType":"contains","source":3781,"target":3819},{"edgeType":"contains","source":4037,"target":4346},{"edgeType":"contains","source":5399,"target":5463},{"edgeType":"calls","source":3880,"target":449},{"edgeType":"calls","source":4758,"target":1771},{"edgeType":"contains","source":2593,"target":2600},{"edgeType":"contains","source":341,"target":1590},{"edgeType":"calls","source":4369,"target":89},{"edgeType":"contains","source":4410,"target":2296},{"edgeType":"contains","source":4410,"target":4411},{"edgeType":"calls","source":270,"target":312},{"edgeType":"contains","source":476,"target":576},{"edgeType":"contains","source":3121,"target":3144},{"edgeType":"calls","source":5653,"target":452},{"edgeType":"calls","source":811,"target":454},{"edgeType":"calls","source":4783,"target":997},{"edgeType":"calls","source":3065,"target":345},{"edgeType":"calls","source":3433,"target":564},{"edgeType":"calls","source":1240,"target":896},{"edgeType":"calls","source":5312,"target":453},{"edgeType":"calls","source":5278,"target":450},{"edgeType":"calls","source":3243,"target":1169},{"edgeType":"calls","source":4696,"target":521},{"edgeType":"calls","source":3880,"target":450},{"edgeType":"calls","source":1063,"target":1097},{"edgeType":"contains","source":2593,"target":2601},{"edgeType":"contains","source":1988,"target":3386},{"edgeType":"imports","source":3403,"target":416},{"edgeType":"calls","source":1839,"target":296},{"edgeType":"contains","source":476,"target":575},{"edgeType":"calls","source":2042,"target":345},{"edgeType":"calls","source":2075,"target":1436},{"edgeType":"calls","source":4362,"target":305},{"edgeType":"contains","source":2247,"target":4870},{"edgeType":"calls","source":2823,"target":1506},{"edgeType":"calls","source":5687,"target":454},{"edgeType":"calls","source":5653,"target":451},{"edgeType":"calls","source":811,"target":453},{"edgeType":"contains","source":5265,"target":5387},{"edgeType":"calls","source":5063,"target":5000},{"edgeType":"contains","source":3642,"target":2849},{"edgeType":"calls","source":5278,"target":449},{"edgeType":"calls","source":1240,"target":895},{"edgeType":"calls","source":5426,"target":89},{"edgeType":"calls","source":5312,"target":452},{"edgeType":"calls","source":5298,"target":886},{"edgeType":"calls","source":3965,"target":983},{"edgeType":"calls","source":3959,"target":1169},{"edgeType":"calls","source":3273,"target":1294},{"edgeType":"calls","source":4050,"target":1519},{"edgeType":"calls","source":4667,"target":4590},{"edgeType":"calls","source":3880,"target":447},{"edgeType":"calls","source":4368,"target":2232},{"edgeType":"contains","source":476,"target":578},{"edgeType":"calls","source":270,"target":314},{"edgeType":"contains","source":2593,"target":2598},{"edgeType":"contains","source":341,"target":1592},{"edgeType":"calls","source":4355,"target":521},{"edgeType":"calls","source":4245,"target":3931},{"edgeType":"calls","source":4211,"target":3928},{"edgeType":"contains","source":2247,"target":4867},{"edgeType":"calls","source":5687,"target":453},{"edgeType":"calls","source":5486,"target":2456},{"edgeType":"calls","source":5653,"target":450},{"edgeType":"contains","source":5260,"target":5541},{"edgeType":"calls","source":5312,"target":451},{"edgeType":"calls","source":5278,"target":448},{"edgeType":"contains","source":1635,"target":1642},{"edgeType":"contains","source":3452,"target":3453},{"edgeType":"calls","source":3965,"target":984},{"edgeType":"calls","source":3880,"target":448},{"edgeType":"imports","source":317,"target":948},{"edgeType":"calls","source":4531,"target":349},{"edgeType":"calls","source":1976,"target":279},{"edgeType":"calls","source":2079,"target":257},{"edgeType":"contains","source":2585,"target":2847},{"edgeType":"calls","source":4576,"target":1068},{"edgeType":"contains","source":2593,"target":2599},{"edgeType":"contains","source":341,"target":1591},{"edgeType":"contains","source":476,"target":577},{"edgeType":"contains","source":1635,"target":1643},{"edgeType":"calls","source":5706,"target":920},{"edgeType":"contains","source":963,"target":278},{"edgeType":"calls","source":4943,"target":262},{"edgeType":"contains","source":5367,"target":5394},{"edgeType":"calls","source":5278,"target":447},{"edgeType":"calls","source":5653,"target":449},{"edgeType":"contains","source":5265,"target":5385},{"edgeType":"calls","source":5687,"target":452},{"edgeType":"calls","source":3143,"target":1097},{"edgeType":"calls","source":5312,"target":450},{"edgeType":"calls","source":5160,"target":5162},{"edgeType":"calls","source":1205,"target":925},{"edgeType":"contains","source":3972,"target":3194},{"edgeType":"calls","source":3254,"target":2938},{"edgeType":"contains","source":2593,"target":2604},{"edgeType":"calls","source":3273,"target":1292},{"edgeType":"contains","source":476,"target":580},{"edgeType":"calls","source":4154,"target":407},{"edgeType":"calls","source":3965,"target":981},{"edgeType":"contains","source":341,"target":1594},{"edgeType":"calls","source":350,"target":999},{"edgeType":"calls","source":270,"target":308},{"edgeType":"calls","source":2685,"target":1550},{"edgeType":"contains","source":4274,"target":4403},{"edgeType":"calls","source":139,"target":141},{"edgeType":"calls","source":3712,"target":367},{"edgeType":"calls","source":811,"target":450},{"edgeType":"contains","source":963,"target":1338},{"edgeType":"contains","source":2829,"target":3744},{"edgeType":"calls","source":2875,"target":946},{"edgeType":"calls","source":4943,"target":261},{"edgeType":"calls","source":961,"target":1085},{"edgeType":"calls","source":5653,"target":448},{"edgeType":"calls","source":5312,"target":449},{"edgeType":"calls","source":5287,"target":1224},{"edgeType":"calls","source":5687,"target":451},{"edgeType":"contains","source":3204,"target":3746},{"edgeType":"calls","source":3273,"target":1293},{"edgeType":"calls","source":1228,"target":206},{"edgeType":"contains","source":3204,"target":3748},{"edgeType":"contains","source":5367,"target":5401},{"edgeType":"calls","source":3965,"target":982},{"edgeType":"contains","source":2593,"target":2605},{"edgeType":"contains","source":341,"target":1593},{"edgeType":"calls","source":4875,"target":3424},{"edgeType":"calls","source":2688,"target":2515},{"edgeType":"contains","source":40,"target":3524},{"edgeType":"calls","source":811,"target":448},{"edgeType":"contains","source":476,"target":579},{"edgeType":"contains","source":2915,"target":3193},{"edgeType":"calls","source":5065,"target":1763},{"edgeType":"calls","source":3604,"target":1602},{"edgeType":"contains","source":4410,"target":2300},{"edgeType":"contains","source":2305,"target":963},{"edgeType":"calls","source":4245,"target":3928},{"edgeType":"calls","source":811,"target":449},{"edgeType":"calls","source":964,"target":991},{"edgeType":"calls","source":5653,"target":447},{"edgeType":"calls","source":3099,"target":345},{"edgeType":"contains","source":3476,"target":3771},{"edgeType":"calls","source":5312,"target":448},{"edgeType":"calls","source":5287,"target":1223},{"edgeType":"calls","source":5554,"target":345},{"edgeType":"calls","source":5683,"target":1631},{"edgeType":"calls","source":5687,"target":450},{"edgeType":"calls","source":5564,"target":1092},{"edgeType":"contains","source":476,"target":582},{"edgeType":"calls","source":5292,"target":5295},{"edgeType":"contains","source":2593,"target":2602},{"edgeType":"calls","source":3965,"target":979},{"edgeType":"calls","source":3273,"target":1290},{"edgeType":"imports","source":3814,"target":1416},{"edgeType":"calls","source":271,"target":279},{"edgeType":"calls","source":2113,"target":257},{"edgeType":"contains","source":341,"target":1596},{"edgeType":"contains","source":2096,"target":2153},{"edgeType":"calls","source":4698,"target":454},{"edgeType":"calls","source":4826,"target":1771},{"edgeType":"calls","source":4510,"target":997},{"edgeType":"calls","source":4715,"target":984},{"edgeType":"contains","source":73,"target":2504},{"edgeType":"calls","source":811,"target":452},{"edgeType":"calls","source":4437,"target":89},{"edgeType":"calls","source":2939,"target":1074},{"edgeType":"calls","source":4362,"target":300},{"edgeType":"calls","source":4337,"target":1075},{"edgeType":"calls","source":5312,"target":447},{"edgeType":"calls","source":3456,"target":1959},{"edgeType":"calls","source":3883,"target":349},{"edgeType":"calls","source":3965,"target":978},{"edgeType":"calls","source":1240,"target":894},{"edgeType":"calls","source":5683,"target":1630},{"edgeType":"calls","source":5687,"target":449},{"edgeType":"contains","source":2585,"target":2851},{"edgeType":"contains","source":2593,"target":2603},{"edgeType":"calls","source":3273,"target":1291},{"edgeType":"contains","source":476,"target":581},{"edgeType":"calls","source":4154,"target":406},{"edgeType":"calls","source":3965,"target":980},{"edgeType":"contains","source":341,"target":1595},{"edgeType":"contains","source":14,"target":2218},{"edgeType":"calls","source":4698,"target":453},{"edgeType":"calls","source":4715,"target":983},{"edgeType":"calls","source":5105,"target":1578},{"edgeType":"calls","source":811,"target":451},{"edgeType":"calls","source":2193,"target":946},{"edgeType":"calls","source":920,"target":1300},{"edgeType":"calls","source":5687,"target":448},{"edgeType":"calls","source":1726,"target":1682},{"edgeType":"contains","source":3204,"target":3745},{"edgeType":"contains","source":1249,"target":1986},{"edgeType":"contains","source":1250,"target":1955},{"edgeType":"contains","source":5367,"target":5398},{"edgeType":"contains","source":5260,"target":5544},{"edgeType":"calls","source":1537,"target":142},{"edgeType":"calls","source":5683,"target":1629},{"edgeType":"imports","source":3926,"target":1117},{"edgeType":"contains","source":2593,"target":2608},{"edgeType":"contains","source":5363,"target":5530},{"edgeType":"calls","source":3351,"target":984},{"edgeType":"contains","source":476,"target":584},{"edgeType":"calls","source":3227,"target":1657},{"edgeType":"contains","source":5399,"target":5471},{"edgeType":"contains","source":3663,"target":2207},{"edgeType":"calls","source":4715,"target":982},{"edgeType":"calls","source":4519,"target":1773},{"edgeType":"calls","source":4698,"target":452},{"edgeType":"calls","source":5105,"target":1577},{"edgeType":"imports","source":2734,"target":3194},{"edgeType":"calls","source":4966,"target":4829},{"edgeType":"calls","source":2259,"target":1011},{"edgeType":"calls","source":270,"target":304},{"edgeType":"contains","source":963,"target":1342},{"edgeType":"calls","source":3965,"target":976},{"edgeType":"calls","source":5687,"target":447},{"edgeType":"imports","source":2517,"target":2522},{"edgeType":"calls","source":5717,"target":1631},{"edgeType":"contains","source":476,"target":583},{"edgeType":"calls","source":5555,"target":310},{"edgeType":"calls","source":5473,"target":1795},{"edgeType":"calls","source":2057,"target":1986},{"edgeType":"calls","source":5557,"target":1305},{"edgeType":"contains","source":341,"target":1597},{"edgeType":"calls","source":3273,"target":1289},{"edgeType":"calls","source":4698,"target":451},{"edgeType":"calls","source":5044,"target":2409},{"edgeType":"contains","source":1988,"target":3394},{"edgeType":"calls","source":4715,"target":981},{"edgeType":"calls","source":986,"target":305},{"edgeType":"calls","source":5105,"target":1576},{"edgeType":"calls","source":2939,"target":1073},{"edgeType":"contains","source":3452,"target":3462},{"edgeType":"contains","source":4410,"target":2304},{"edgeType":"calls","source":4302,"target":2157},{"edgeType":"contains","source":963,"target":1341},{"edgeType":"calls","source":5717,"target":1630},{"edgeType":"calls","source":3965,"target":977},{"edgeType":"contains","source":2593,"target":2609},{"edgeType":"calls","source":3789,"target":2205},{"edgeType":"calls","source":4224,"target":345},{"edgeType":"calls","source":3351,"target":982},{"edgeType":"calls","source":4211,"target":1805},{"edgeType":"calls","source":3521,"target":997},{"edgeType":"contains","source":476,"target":586},{"edgeType":"contains","source":2584,"target":2885},{"edgeType":"contains","source":2593,"target":2606},{"edgeType":"calls","source":2594,"target":137},{"edgeType":"calls","source":4698,"target":450},{"edgeType":"calls","source":1051,"target":407},{"edgeType":"contains","source":72,"target":4654},{"edgeType":"calls","source":4715,"target":980},{"edgeType":"calls","source":3010,"target":982},{"edgeType":"calls","source":811,"target":447},{"edgeType":"contains","source":4153,"target":3927},{"edgeType":"calls","source":2880,"target":2898},{"edgeType":"contains","source":4178,"target":4210},{"edgeType":"calls","source":4430,"target":302},{"edgeType":"calls","source":2259,"target":1009},{"edgeType":"calls","source":5717,"target":1629},{"edgeType":"calls","source":3965,"target":974},{"edgeType":"calls","source":5591,"target":1306},{"edgeType":"calls","source":2052,"target":1086},{"edgeType":"contains","source":5363,"target":5527},{"edgeType":"calls","source":4258,"target":349},{"edgeType":"contains","source":2593,"target":2607},{"edgeType":"calls","source":3400,"target":521},{"edgeType":"contains","source":476,"target":585},{"edgeType":"contains","source":446,"target":458},{"edgeType":"calls","source":1204,"target":948},{"edgeType":"calls","source":3351,"target":983},{"edgeType":"calls","source":3227,"target":1656},{"edgeType":"calls","source":1051,"target":406},{"edgeType":"imports","source":3374,"target":264},{"edgeType":"calls","source":4698,"target":449},{"edgeType":"calls","source":4715,"target":979},{"edgeType":"calls","source":2780,"target":1771},{"edgeType":"calls","source":5105,"target":1573},{"edgeType":"calls","source":3010,"target":983},{"edgeType":"contains","source":54,"target":2040},{"edgeType":"calls","source":3010,"target":984},{"edgeType":"calls","source":2259,"target":1010},{"edgeType":"calls","source":5315,"target":349},{"edgeType":"calls","source":3965,"target":975},{"edgeType":"imports","source":2948,"target":785},{"edgeType":"calls","source":5646,"target":2772},{"edgeType":"contains","source":4868,"target":5016},{"edgeType":"calls","source":5701,"target":5295},{"edgeType":"calls","source":3683,"target":2318},{"edgeType":"calls","source":3800,"target":1862},{"edgeType":"calls","source":1769,"target":345},{"edgeType":"calls","source":5509,"target":2823},{"edgeType":"calls","source":749,"target":282},{"edgeType":"contains","source":478,"target":493},{"edgeType":"calls","source":5432,"target":982},{"edgeType":"calls","source":4716,"target":980},{"edgeType":"calls","source":4799,"target":521},{"edgeType":"calls","source":2930,"target":2436},{"edgeType":"calls","source":4844,"target":4411},{"edgeType":"calls","source":4989,"target":973},{"edgeType":"contains","source":2096,"target":2131},{"edgeType":"contains","source":4890,"target":5365},{"edgeType":"calls","source":5330,"target":973},{"edgeType":"calls","source":4375,"target":981},{"edgeType":"contains","source":4178,"target":4183},{"edgeType":"contains","source":2585,"target":2827},{"edgeType":"calls","source":5705,"target":975},{"edgeType":"calls","source":2063,"target":772},{"edgeType":"calls","source":4034,"target":980},{"edgeType":"calls","source":5577,"target":1771},{"edgeType":"calls","source":4220,"target":501},{"edgeType":"calls","source":1326,"target":364},{"edgeType":"calls","source":4099,"target":3195},{"edgeType":"calls","source":5705,"target":974},{"edgeType":"contains","source":478,"target":492},{"edgeType":"contains","source":3057,"target":1938},{"edgeType":"calls","source":1431,"target":1337},{"edgeType":"contains","source":5363,"target":5500},{"edgeType":"calls","source":4716,"target":979},{"edgeType":"calls","source":5432,"target":981},{"edgeType":"calls","source":4847,"target":89},{"edgeType":"calls","source":4989,"target":972},{"edgeType":"calls","source":2875,"target":971},{"edgeType":"calls","source":4944,"target":3424},{"edgeType":"contains","source":1335,"target":1411},{"edgeType":"calls","source":5215,"target":309},{"edgeType":"contains","source":126,"target":834},{"edgeType":"calls","source":5330,"target":972},{"edgeType":"calls","source":4403,"target":1169},{"edgeType":"calls","source":1926,"target":790},{"edgeType":"imports","source":3385,"target":961},{"edgeType":"calls","source":4375,"target":980},{"edgeType":"calls","source":1937,"target":1506},{"edgeType":"calls","source":4357,"target":481},{"edgeType":"calls","source":3686,"target":142},{"edgeType":"calls","source":4034,"target":981},{"edgeType":"calls","source":2085,"target":89},{"edgeType":"calls","source":4104,"target":4094},{"edgeType":"imports","source":2048,"target":2240},{"edgeType":"contains","source":278,"target":353},{"edgeType":"calls","source":5705,"target":973},{"edgeType":"contains","source":1164,"target":2484},{"edgeType":"calls","source":4716,"target":978},{"edgeType":"calls","source":5432,"target":980},{"edgeType":"calls","source":1075,"target":749},{"edgeType":"calls","source":4989,"target":971},{"edgeType":"calls","source":5073,"target":481},{"edgeType":"calls","source":5282,"target":345},{"edgeType":"calls","source":2426,"target":89},{"edgeType":"calls","source":5290,"target":2211},{"edgeType":"calls","source":5330,"target":971},{"edgeType":"calls","source":4493,"target":4720},{"edgeType":"contains","source":40,"target":3503},{"edgeType":"calls","source":4375,"target":979},{"edgeType":"contains","source":4410,"target":2274},{"edgeType":"calls","source":4034,"target":978},{"edgeType":"contains","source":478,"target":495},{"edgeType":"calls","source":5740,"target":5173},{"edgeType":"contains","source":5235,"target":5238},{"edgeType":"calls","source":4878,"target":4411},{"edgeType":"contains","source":3204,"target":3721},{"edgeType":"contains","source":5363,"target":5498},{"edgeType":"calls","source":5705,"target":972},{"edgeType":"calls","source":5636,"target":997},{"edgeType":"calls","source":5658,"target":315},{"edgeType":"calls","source":5432,"target":979},{"edgeType":"contains","source":4103,"target":4390},{"edgeType":"contains","source":3741,"target":3985},{"edgeType":"calls","source":5254,"target":2269},{"edgeType":"contains","source":54,"target":2011},{"edgeType":"calls","source":4435,"target":2289},{"edgeType":"calls","source":4716,"target":977},{"edgeType":"calls","source":4034,"target":979},{"edgeType":"calls","source":4375,"target":978},{"edgeType":"contains","source":478,"target":494},{"edgeType":"calls","source":1776,"target":1214},{"edgeType":"calls","source":2928,"target":380},{"edgeType":"calls","source":4915,"target":3263},{"edgeType":"imports","source":3969,"target":1890},{"edgeType":"calls","source":5705,"target":971},{"edgeType":"contains","source":1164,"target":2486},{"edgeType":"calls","source":3442,"target":302},{"edgeType":"calls","source":5432,"target":978},{"edgeType":"contains","source":3642,"target":2833},{"edgeType":"contains","source":5367,"target":5381},{"edgeType":"calls","source":1156,"target":345},{"edgeType":"calls","source":1726,"target":1702},{"edgeType":"calls","source":4716,"target":976},{"edgeType":"contains","source":478,"target":497},{"edgeType":"calls","source":2349,"target":360},{"edgeType":"calls","source":4375,"target":977},{"edgeType":"calls","source":4034,"target":976},{"edgeType":"calls","source":4983,"target":2211},{"edgeType":"calls","source":5658,"target":313},{"edgeType":"calls","source":5711,"target":2898},{"edgeType":"contains","source":2888,"target":2953},{"edgeType":"calls","source":5215,"target":304},{"edgeType":"calls","source":3425,"target":830},{"edgeType":"calls","source":5432,"target":977},{"edgeType":"calls","source":1205,"target":940},{"edgeType":"contains","source":1335,"target":1415},{"edgeType":"calls","source":1300,"target":1166},{"edgeType":"calls","source":5303,"target":1805},{"edgeType":"calls","source":4667,"target":380},{"edgeType":"calls","source":4716,"target":975},{"edgeType":"calls","source":3744,"target":1511},{"edgeType":"contains","source":478,"target":496},{"edgeType":"calls","source":4034,"target":977},{"edgeType":"calls","source":4035,"target":946},{"edgeType":"calls","source":2055,"target":2072},{"edgeType":"calls","source":4375,"target":976},{"edgeType":"calls","source":4218,"target":3729},{"edgeType":"calls","source":306,"target":269},{"edgeType":"contains","source":3121,"target":3126},{"edgeType":"contains","source":3057,"target":2996},{"edgeType":"calls","source":5515,"target":1574},{"edgeType":"calls","source":1229,"target":1256},{"edgeType":"contains","source":5260,"target":5525},{"edgeType":"calls","source":5309,"target":4789},{"edgeType":"calls","source":5432,"target":976},{"edgeType":"calls","source":3413,"target":142},{"edgeType":"calls","source":2508,"target":1771},{"edgeType":"calls","source":1726,"target":1704},{"edgeType":"calls","source":1829,"target":1682},{"edgeType":"calls","source":3983,"target":3612},{"edgeType":"calls","source":4034,"target":974},{"edgeType":"calls","source":4716,"target":974},{"edgeType":"imports","source":435,"target":443},{"edgeType":"contains","source":2932,"target":3699},{"edgeType":"calls","source":4531,"target":367},{"edgeType":"calls","source":4375,"target":975},{"edgeType":"calls","source":2453,"target":305},{"edgeType":"contains","source":478,"target":499},{"edgeType":"calls","source":2349,"target":358},{"edgeType":"calls","source":5691,"target":345},{"edgeType":"contains","source":3127,"target":1884},{"edgeType":"calls","source":2731,"target":2258},{"edgeType":"calls","source":4838,"target":3533},{"edgeType":"calls","source":5249,"target":305},{"edgeType":"calls","source":3073,"target":1169},{"edgeType":"calls","source":5517,"target":454},{"edgeType":"calls","source":5432,"target":975},{"edgeType":"calls","source":4716,"target":973},{"edgeType":"calls","source":4034,"target":975},{"edgeType":"contains","source":4890,"target":5366},{"edgeType":"contains","source":4178,"target":4184},{"edgeType":"imports","source":435,"target":444},{"edgeType":"calls","source":3818,"target":272},{"edgeType":"calls","source":2349,"target":359},{"edgeType":"contains","source":2161,"target":2233},{"edgeType":"contains","source":2584,"target":2861},{"edgeType":"calls","source":4375,"target":974},{"edgeType":"contains","source":478,"target":498},{"edgeType":"contains","source":1606,"target":416},{"edgeType":"calls","source":4375,"target":972},{"edgeType":"calls","source":806,"target":621},{"edgeType":"calls","source":2253,"target":2274},{"edgeType":"calls","source":3732,"target":821},{"edgeType":"contains","source":3476,"target":4812},{"edgeType":"calls","source":1708,"target":142},{"edgeType":"contains","source":1023,"target":519},{"edgeType":"calls","source":5517,"target":453},{"edgeType":"calls","source":5374,"target":4886},{"edgeType":"contains","source":1335,"target":1418},{"edgeType":"contains","source":5260,"target":5531},{"edgeType":"calls","source":5322,"target":2269},{"edgeType":"contains","source":1164,"target":2490},{"edgeType":"contains","source":1250,"target":1939},{"edgeType":"calls","source":5432,"target":974},{"edgeType":"calls","source":5432,"target":973},{"edgeType":"calls","source":4653,"target":811},{"edgeType":"contains","source":5363,"target":5509},{"edgeType":"calls","source":4716,"target":972},{"edgeType":"calls","source":3965,"target":997},{"edgeType":"calls","source":4034,"target":972},{"edgeType":"calls","source":4574,"target":89},{"edgeType":"calls","source":2349,"target":356},{"edgeType":"calls","source":4375,"target":973},{"edgeType":"contains","source":4178,"target":4191},{"edgeType":"calls","source":4375,"target":971},{"edgeType":"contains","source":2932,"target":3707},{"edgeType":"calls","source":2155,"target":1085},{"edgeType":"calls","source":2180,"target":310},{"edgeType":"calls","source":3096,"target":1511},{"edgeType":"imports","source":1781,"target":1013},{"edgeType":"calls","source":5658,"target":309},{"edgeType":"calls","source":3789,"target":1169},{"edgeType":"imports","source":337,"target":1383},{"edgeType":"contains","source":5265,"target":5375},{"edgeType":"calls","source":3424,"target":857},{"edgeType":"calls","source":5517,"target":452},{"edgeType":"calls","source":5523,"target":266},{"edgeType":"contains","source":5367,"target":5384},{"edgeType":"calls","source":4716,"target":971},{"edgeType":"calls","source":5432,"target":972},{"edgeType":"calls","source":4697,"target":503},{"edgeType":"calls","source":4108,"target":793},{"edgeType":"calls","source":4034,"target":973},{"edgeType":"imports","source":4654,"target":1784},{"edgeType":"calls","source":1056,"target":269},{"edgeType":"calls","source":4201,"target":3195},{"edgeType":"contains","source":478,"target":500},{"edgeType":"calls","source":2459,"target":2232},{"edgeType":"calls","source":2349,"target":357},{"edgeType":"calls","source":3732,"target":819},{"edgeType":"imports","source":1988,"target":1994},{"edgeType":"calls","source":5116,"target":2311},{"edgeType":"calls","source":2180,"target":307},{"edgeType":"calls","source":3510,"target":302},{"edgeType":"calls","source":1511,"target":3080},{"edgeType":"calls","source":5725,"target":345},{"edgeType":"calls","source":5517,"target":451},{"edgeType":"calls","source":3599,"target":1771},{"edgeType":"contains","source":1164,"target":2492},{"edgeType":"calls","source":5517,"target":450},{"edgeType":"contains","source":476,"target":565},{"edgeType":"calls","source":5432,"target":971},{"edgeType":"calls","source":3291,"target":1805},{"edgeType":"calls","source":4013,"target":564},{"edgeType":"calls","source":2812,"target":799},{"edgeType":"calls","source":4267,"target":89},{"edgeType":"calls","source":2795,"target":269},{"edgeType":"calls","source":4800,"target":2594},{"edgeType":"contains","source":2247,"target":2741},{"edgeType":"calls","source":4362,"target":1372},{"edgeType":"calls","source":3883,"target":367},{"edgeType":"calls","source":3210,"target":89},{"edgeType":"contains","source":1335,"target":1417},{"edgeType":"contains","source":3057,"target":3001},{"edgeType":"calls","source":4034,"target":971},{"edgeType":"calls","source":5517,"target":449},{"edgeType":"contains","source":2585,"target":2834},{"edgeType":"calls","source":3254,"target":2953},{"edgeType":"calls","source":1748,"target":2074},{"edgeType":"calls","source":2066,"target":1729},{"edgeType":"contains","source":2532,"target":1306},{"edgeType":"calls","source":2349,"target":355},{"edgeType":"calls","source":2705,"target":946},{"edgeType":"contains","source":56,"target":1957},{"edgeType":"contains","source":2161,"target":2237},{"edgeType":"calls","source":2588,"target":345},{"edgeType":"contains","source":115,"target":131},{"edgeType":"calls","source":2448,"target":453},{"edgeType":"calls","source":3138,"target":1261},{"edgeType":"calls","source":3140,"target":142},{"edgeType":"calls","source":4361,"target":345},{"edgeType":"calls","source":2279,"target":407},{"edgeType":"calls","source":5249,"target":300},{"edgeType":"calls","source":1940,"target":345},{"edgeType":"contains","source":476,"target":567},{"edgeType":"contains","source":5260,"target":5535},{"edgeType":"contains","source":5265,"target":5380},{"edgeType":"calls","source":5517,"target":448},{"edgeType":"calls","source":4537,"target":2289},{"edgeType":"contains","source":4078,"target":4124},{"edgeType":"contains","source":3650,"target":3651},{"edgeType":"calls","source":2448,"target":454},{"edgeType":"calls","source":270,"target":319},{"edgeType":"calls","source":2917,"target":1771},{"edgeType":"calls","source":3138,"target":1262},{"edgeType":"calls","source":2187,"target":89},{"edgeType":"contains","source":2915,"target":3181},{"edgeType":"calls","source":3831,"target":920},{"edgeType":"contains","source":2829,"target":3733},{"edgeType":"contains","source":5265,"target":5379},{"edgeType":"contains","source":476,"target":566},{"edgeType":"calls","source":5517,"target":447},{"edgeType":"contains","source":5367,"target":5388},{"edgeType":"contains","source":5363,"target":5512},{"edgeType":"calls","source":4258,"target":367},{"edgeType":"contains","source":2247,"target":4862},{"edgeType":"calls","source":1152,"target":460},{"edgeType":"calls","source":4983,"target":89},{"edgeType":"calls","source":2453,"target":300},{"edgeType":"contains","source":1635,"target":1637},{"edgeType":"calls","source":4943,"target":272},{"edgeType":"calls","source":3138,"target":1259},{"edgeType":"calls","source":4428,"target":380},{"edgeType":"calls","source":5255,"target":1169},{"edgeType":"calls","source":2448,"target":451},{"edgeType":"calls","source":1817,"target":989},{"edgeType":"contains","source":1335,"target":1420},{"edgeType":"calls","source":1399,"target":206},{"edgeType":"calls","source":5658,"target":304},{"edgeType":"calls","source":5617,"target":1574},{"edgeType":"contains","source":5265,"target":5378},{"edgeType":"contains","source":476,"target":569},{"edgeType":"contains","source":330,"target":2981},{"edgeType":"contains","source":4019,"target":3837},{"edgeType":"calls","source":3138,"target":1260},{"edgeType":"calls","source":2279,"target":406},{"edgeType":"calls","source":2448,"target":1509},{"edgeType":"calls","source":2448,"target":452},{"edgeType":"contains","source":3642,"target":2838},{"edgeType":"calls","source":3987,"target":310},{"edgeType":"calls","source":5696,"target":1239},{"edgeType":"imports","source":96,"target":2505},{"edgeType":"contains","source":2758,"target":2761},{"edgeType":"contains","source":3121,"target":3135},{"edgeType":"calls","source":3383,"target":2121},{"edgeType":"calls","source":3412,"target":1222},{"edgeType":"contains","source":5367,"target":5386},{"edgeType":"contains","source":5399,"target":5451},{"edgeType":"calls","source":4301,"target":89},{"edgeType":"contains","source":476,"target":568},{"edgeType":"contains","source":4178,"target":4192},{"edgeType":"calls","source":5239,"target":1630},{"edgeType":"calls","source":2364,"target":1963},{"edgeType":"calls","source":5243,"target":449},{"edgeType":"calls","source":1791,"target":1756},{"edgeType":"calls","source":5368,"target":802},{"edgeType":"contains","source":4105,"target":4315},{"edgeType":"calls","source":4428,"target":345},{"edgeType":"calls","source":3728,"target":904},{"edgeType":"calls","source":5672,"target":3006},{"edgeType":"imports","source":3374,"target":296},{"edgeType":"calls","source":2023,"target":1963},{"edgeType":"calls","source":1463,"target":296},{"edgeType":"calls","source":1394,"target":321},{"edgeType":"calls","source":3424,"target":814},{"edgeType":"calls","source":5533,"target":972},{"edgeType":"contains","source":1164,"target":2465},{"edgeType":"contains","source":444,"target":473},{"edgeType":"calls","source":5650,"target":1573},{"edgeType":"calls","source":3611,"target":302},{"edgeType":"calls","source":5401,"target":836},{"edgeType":"calls","source":3338,"target":309},{"edgeType":"calls","source":5082,"target":2269},{"edgeType":"calls","source":1086,"target":356},{"edgeType":"contains","source":1733,"target":1740},{"edgeType":"calls","source":1086,"target":355},{"edgeType":"calls","source":369,"target":384},{"edgeType":"calls","source":4601,"target":266},{"edgeType":"calls","source":5239,"target":1629},{"edgeType":"contains","source":72,"target":2491},{"edgeType":"contains","source":4105,"target":4314},{"edgeType":"calls","source":4736,"target":309},{"edgeType":"calls","source":1895,"target":1702},{"edgeType":"contains","source":2932,"target":3682},{"edgeType":"calls","source":4355,"target":1550},{"edgeType":"imports","source":3374,"target":295},{"edgeType":"calls","source":2034,"target":564},{"edgeType":"calls","source":3993,"target":89},{"edgeType":"contains","source":1733,"target":1741},{"edgeType":"calls","source":4293,"target":302},{"edgeType":"contains","source":1164,"target":2464},{"edgeType":"calls","source":5533,"target":971},{"edgeType":"calls","source":3652,"target":89},{"edgeType":"contains","source":444,"target":472},{"edgeType":"calls","source":5650,"target":1572},{"edgeType":"calls","source":4674,"target":2232},{"edgeType":"contains","source":278,"target":333},{"edgeType":"calls","source":4662,"target":4718},{"edgeType":"calls","source":5401,"target":835},{"edgeType":"calls","source":5243,"target":448},{"edgeType":"calls","source":5207,"target":1564},{"edgeType":"calls","source":998,"target":972},{"edgeType":"contains","source":3476,"target":3728},{"edgeType":"calls","source":5322,"target":1169},{"edgeType":"contains","source":4105,"target":4313},{"edgeType":"imports","source":3374,"target":294},{"edgeType":"contains","source":478,"target":479},{"edgeType":"imports","source":3642,"target":1504},{"edgeType":"calls","source":1779,"target":1073},{"edgeType":"calls","source":4368,"target":89},{"edgeType":"calls","source":1791,"target":1758},{"edgeType":"contains","source":2932,"target":3679},{"edgeType":"calls","source":5650,"target":1571},{"edgeType":"calls","source":2914,"target":767},{"edgeType":"contains","source":444,"target":475},{"edgeType":"contains","source":5265,"target":5349},{"edgeType":"contains","source":1164,"target":2467},{"edgeType":"calls","source":3351,"target":961},{"edgeType":"imports","source":2886,"target":2737},{"edgeType":"calls","source":2953,"target":615},{"edgeType":"calls","source":5243,"target":447},{"edgeType":"calls","source":3073,"target":2180},{"edgeType":"calls","source":1086,"target":358},{"edgeType":"calls","source":369,"target":386},{"edgeType":"calls","source":3917,"target":329},{"edgeType":"contains","source":2096,"target":2113},{"edgeType":"contains","source":4274,"target":4358},{"edgeType":"calls","source":4067,"target":964},{"edgeType":"calls","source":1895,"target":1704},{"edgeType":"calls","source":3639,"target":3662},{"edgeType":"imports","source":3374,"target":293},{"edgeType":"calls","source":2331,"target":1928},{"edgeType":"contains","source":519,"target":264},{"edgeType":"calls","source":1791,"target":1757},{"edgeType":"calls","source":4361,"target":305},{"edgeType":"calls","source":5650,"target":1570},{"edgeType":"calls","source":5686,"target":454},{"edgeType":"calls","source":2842,"target":886},{"edgeType":"calls","source":4943,"target":2347},{"edgeType":"calls","source":2895,"target":300},{"edgeType":"contains","source":444,"target":474},{"edgeType":"contains","source":1164,"target":2466},{"edgeType":"calls","source":5462,"target":1056},{"edgeType":"contains","source":4037,"target":5363},{"edgeType":"contains","source":4105,"target":4312},{"edgeType":"calls","source":5401,"target":833},{"edgeType":"calls","source":5081,"target":1240},{"edgeType":"calls","source":1063,"target":1070},{"edgeType":"calls","source":1086,"target":357},{"edgeType":"calls","source":998,"target":971},{"edgeType":"imports","source":3374,"target":292},{"edgeType":"contains","source":58,"target":816},{"edgeType":"contains","source":4890,"target":5353},{"edgeType":"calls","source":4822,"target":811},{"edgeType":"calls","source":3789,"target":2180},{"edgeType":"contains","source":478,"target":481},{"edgeType":"calls","source":4421,"target":3729},{"edgeType":"calls","source":4367,"target":2232},{"edgeType":"calls","source":5752,"target":521},{"edgeType":"calls","source":131,"target":360},{"edgeType":"calls","source":5650,"target":1569},{"edgeType":"calls","source":5686,"target":453},{"edgeType":"contains","source":1733,"target":1744},{"edgeType":"contains","source":1164,"target":2469},{"edgeType":"calls","source":5473,"target":1771},{"edgeType":"calls","source":3093,"target":501},{"edgeType":"calls","source":1239,"target":894},{"edgeType":"calls","source":5387,"target":2323},{"edgeType":"calls","source":5401,"target":832},{"edgeType":"contains","source":4078,"target":4098},{"edgeType":"contains","source":4103,"target":4380},{"edgeType":"contains","source":1265,"target":397},{"edgeType":"contains","source":4890,"target":5352},{"edgeType":"contains","source":478,"target":480},{"edgeType":"calls","source":4050,"target":1489},{"edgeType":"calls","source":2281,"target":305},{"edgeType":"calls","source":2914,"target":766},{"edgeType":"calls","source":3606,"target":1511},{"edgeType":"calls","source":131,"target":359},{"edgeType":"calls","source":5650,"target":1568},{"edgeType":"calls","source":5672,"target":886},{"edgeType":"calls","source":5686,"target":452},{"edgeType":"calls","source":5046,"target":2323},{"edgeType":"contains","source":1733,"target":1745},{"edgeType":"contains","source":3814,"target":3826},{"edgeType":"calls","source":3440,"target":315},{"edgeType":"calls","source":5456,"target":1240},{"edgeType":"calls","source":5411,"target":1578},{"edgeType":"calls","source":3273,"target":1261},{"edgeType":"calls","source":3998,"target":984},{"edgeType":"calls","source":4736,"target":304},{"edgeType":"contains","source":4890,"target":5351},{"edgeType":"calls","source":4054,"target":305},{"edgeType":"contains","source":2115,"target":2584},{"edgeType":"contains","source":2493,"target":2494},{"edgeType":"contains","source":478,"target":483},{"edgeType":"contains","source":1733,"target":1742},{"edgeType":"contains","source":1164,"target":2471},{"edgeType":"calls","source":5686,"target":451},{"edgeType":"calls","source":1239,"target":896},{"edgeType":"calls","source":5459,"target":89},{"edgeType":"calls","source":5411,"target":1577},{"edgeType":"calls","source":5411,"target":1576},{"edgeType":"calls","source":3273,"target":1262},{"edgeType":"calls","source":369,"target":382},{"edgeType":"contains","source":478,"target":482},{"edgeType":"contains","source":3781,"target":3790},{"edgeType":"imports","source":73,"target":89},{"edgeType":"contains","source":1733,"target":1743},{"edgeType":"contains","source":278,"target":339},{"edgeType":"contains","source":2932,"target":3684},{"edgeType":"calls","source":2963,"target":302},{"edgeType":"calls","source":920,"target":1271},{"edgeType":"contains","source":1164,"target":2470},{"edgeType":"calls","source":5686,"target":450},{"edgeType":"calls","source":1239,"target":895},{"edgeType":"calls","source":3338,"target":304},{"edgeType":"calls","source":3440,"target":313},{"edgeType":"calls","source":3273,"target":1259},{"edgeType":"contains","source":5363,"target":5493},{"edgeType":"calls","source":1856,"target":790},{"edgeType":"calls","source":3998,"target":982},{"edgeType":"contains","source":478,"target":485},{"edgeType":"imports","source":3926,"target":89},{"edgeType":"calls","source":2281,"target":300},{"edgeType":"imports","source":3642,"target":437},{"edgeType":"calls","source":4361,"target":300},{"edgeType":"contains","source":792,"target":264},{"edgeType":"calls","source":131,"target":356},{"edgeType":"contains","source":3247,"target":266},{"edgeType":"calls","source":3843,"target":501},{"edgeType":"calls","source":5299,"target":2933},{"edgeType":"contains","source":1164,"target":2473},{"edgeType":"calls","source":5503,"target":837},{"edgeType":"calls","source":5686,"target":449},{"edgeType":"calls","source":5582,"target":3673},{"edgeType":"contains","source":5367,"target":5368},{"edgeType":"calls","source":5503,"target":836},{"edgeType":"calls","source":501,"target":512},{"edgeType":"contains","source":5399,"target":5433},{"edgeType":"calls","source":3273,"target":1260},{"edgeType":"calls","source":3998,"target":983},{"edgeType":"calls","source":2443,"target":564},{"edgeType":"contains","source":478,"target":484},{"edgeType":"imports","source":960,"target":89},{"edgeType":"contains","source":2932,"target":3690},{"edgeType":"contains","source":5062,"target":2138},{"edgeType":"calls","source":5239,"target":564},{"edgeType":"calls","source":5184,"target":2269},{"edgeType":"calls","source":131,"target":355},{"edgeType":"contains","source":4890,"target":5356},{"edgeType":"calls","source":1766,"target":407},{"edgeType":"calls","source":3473,"target":345},{"edgeType":"calls","source":5686,"target":448},{"edgeType":"contains","source":1164,"target":2476},{"edgeType":"calls","source":4811,"target":89},{"edgeType":"calls","source":5503,"target":835},{"edgeType":"contains","source":5399,"target":5432},{"edgeType":"contains","source":478,"target":487},{"edgeType":"calls","source":1204,"target":920},{"edgeType":"calls","source":5411,"target":1573},{"edgeType":"calls","source":3273,"target":1257},{"edgeType":"calls","source":3998,"target":980},{"edgeType":"calls","source":2075,"target":345},{"edgeType":"calls","source":4479,"target":2982},{"edgeType":"calls","source":4716,"target":920},{"edgeType":"calls","source":131,"target":358},{"edgeType":"calls","source":779,"target":354},{"edgeType":"calls","source":5686,"target":447},{"edgeType":"contains","source":4890,"target":5355},{"edgeType":"calls","source":3998,"target":979},{"edgeType":"calls","source":5574,"target":1805},{"edgeType":"contains","source":1164,"target":2475},{"edgeType":"calls","source":5716,"target":1631},{"edgeType":"contains","source":478,"target":486},{"edgeType":"calls","source":5555,"target":279},{"edgeType":"calls","source":3440,"target":309},{"edgeType":"calls","source":5411,"target":1572},{"edgeType":"calls","source":3273,"target":1258},{"edgeType":"calls","source":3998,"target":981},{"edgeType":"contains","source":2517,"target":1755},{"edgeType":"calls","source":4470,"target":89},{"edgeType":"calls","source":131,"target":357},{"edgeType":"calls","source":2349,"target":305},{"edgeType":"contains","source":2888,"target":2938},{"edgeType":"calls","source":5315,"target":320},{"edgeType":"calls","source":1393,"target":345},{"edgeType":"contains","source":3252,"target":110},{"edgeType":"calls","source":3509,"target":284},{"edgeType":"calls","source":3818,"target":1275},{"edgeType":"calls","source":5716,"target":1630},{"edgeType":"contains","source":478,"target":489},{"edgeType":"calls","source":2743,"target":772},{"edgeType":"contains","source":5235,"target":5237},{"edgeType":"contains","source":1164,"target":2478},{"edgeType":"calls","source":5503,"target":833},{"edgeType":"calls","source":5411,"target":1571},{"edgeType":"calls","source":3389,"target":830},{"edgeType":"contains","source":5363,"target":5497},{"edgeType":"imports","source":3641,"target":3643},{"edgeType":"imports","source":4037,"target":1937},{"edgeType":"calls","source":2852,"target":564},{"edgeType":"contains","source":126,"target":831},{"edgeType":"contains","source":3476,"target":4800},{"edgeType":"contains","source":1588,"target":2019},{"edgeType":"contains","source":4274,"target":4374},{"edgeType":"contains","source":1335,"target":1406},{"edgeType":"calls","source":5716,"target":1629},{"edgeType":"calls","source":3998,"target":977},{"edgeType":"calls","source":3882,"target":345},{"edgeType":"calls","source":4104,"target":864},{"edgeType":"calls","source":2003,"target":1513},{"edgeType":"contains","source":1164,"target":2477},{"edgeType":"contains","source":478,"target":488},{"edgeType":"contains","source":5235,"target":5236},{"edgeType":"calls","source":4054,"target":300},{"edgeType":"calls","source":5503,"target":832},{"edgeType":"calls","source":5411,"target":1570},{"edgeType":"calls","source":4256,"target":380},{"edgeType":"calls","source":5447,"target":454},{"edgeType":"contains","source":3781,"target":3800},{"edgeType":"imports","source":3641,"target":3644},{"edgeType":"calls","source":4536,"target":2269},{"edgeType":"contains","source":1335,"target":1407},{"edgeType":"calls","source":3592,"target":880},{"edgeType":"contains","source":1249,"target":1959},{"edgeType":"calls","source":3998,"target":978},{"edgeType":"contains","source":4890,"target":5360},{"edgeType":"calls","source":4252,"target":501},{"edgeType":"contains","source":5265,"target":5362},{"edgeType":"contains","source":1164,"target":2480},{"edgeType":"contains","source":5399,"target":5436},{"edgeType":"calls","source":3433,"target":521},{"edgeType":"contains","source":478,"target":491},{"edgeType":"calls","source":3440,"target":304},{"edgeType":"calls","source":1240,"target":857},{"edgeType":"calls","source":5411,"target":1569},{"edgeType":"calls","source":5447,"target":453},{"edgeType":"calls","source":2996,"target":1383},{"edgeType":"calls","source":779,"target":349},{"edgeType":"imports","source":3642,"target":443},{"edgeType":"calls","source":2349,"target":300},{"edgeType":"calls","source":4104,"target":860},{"edgeType":"contains","source":4890,"target":5359},{"edgeType":"calls","source":3820,"target":3322},{"edgeType":"calls","source":1766,"target":406},{"edgeType":"calls","source":3998,"target":975},{"edgeType":"calls","source":2765,"target":89},{"edgeType":"contains","source":1164,"target":2479},{"edgeType":"contains","source":5399,"target":5435},{"edgeType":"contains","source":2585,"target":2822},{"edgeType":"contains","source":4654,"target":5275},{"edgeType":"contains","source":478,"target":490},{"edgeType":"calls","source":5561,"target":89},{"edgeType":"calls","source":5411,"target":1568},{"edgeType":"calls","source":5447,"target":452},{"edgeType":"calls","source":1086,"target":345},{"edgeType":"imports","source":3385,"target":1013},{"edgeType":"calls","source":5220,"target":89},{"edgeType":"calls","source":3065,"target":302},{"edgeType":"contains","source":115,"target":116},{"edgeType":"contains","source":2829,"target":3714},{"edgeType":"calls","source":270,"target":272},{"edgeType":"calls","source":3998,"target":976},{"edgeType":"calls","source":3592,"target":878},{"edgeType":"contains","source":3120,"target":3122},{"edgeType":"contains","source":1164,"target":2449},{"edgeType":"calls","source":5555,"target":307},{"edgeType":"contains","source":3644,"target":3791},{"edgeType":"contains","source":3642,"target":3853},{"edgeType":"calls","source":4715,"target":978},{"edgeType":"calls","source":4698,"target":448},{"edgeType":"calls","source":3351,"target":980},{"edgeType":"calls","source":4839,"target":305},{"edgeType":"calls","source":5105,"target":1572},{"edgeType":"calls","source":3010,"target":980},{"edgeType":"contains","source":11,"target":1196},{"edgeType":"calls","source":1789,"target":777},{"edgeType":"contains","source":2001,"target":2929},{"edgeType":"contains","source":3385,"target":5478},{"edgeType":"contains","source":2569,"target":5404},{"edgeType":"contains","source":5114,"target":502},{"edgeType":"calls","source":3936,"target":814},{"edgeType":"calls","source":3965,"target":972},{"edgeType":"contains","source":960,"target":3487},{"edgeType":"contains","source":3120,"target":3123},{"edgeType":"calls","source":4226,"target":282},{"edgeType":"calls","source":3351,"target":981},{"edgeType":"calls","source":5689,"target":380},{"edgeType":"contains","source":5263,"target":5396},{"edgeType":"calls","source":4716,"target":2003},{"edgeType":"calls","source":4715,"target":977},{"edgeType":"calls","source":4832,"target":521},{"edgeType":"calls","source":986,"target":300},{"edgeType":"calls","source":997,"target":1016},{"edgeType":"calls","source":2845,"target":1868},{"edgeType":"calls","source":5105,"target":1571},{"edgeType":"calls","source":3010,"target":981},{"edgeType":"calls","source":1789,"target":776},{"edgeType":"contains","source":3385,"target":5477},{"edgeType":"calls","source":5193,"target":5186},{"edgeType":"calls","source":4698,"target":447},{"edgeType":"imports","source":3374,"target":278},{"edgeType":"calls","source":2259,"target":1008},{"edgeType":"contains","source":960,"target":3486},{"edgeType":"calls","source":3965,"target":973},{"edgeType":"contains","source":2569,"target":5405},{"edgeType":"calls","source":5747,"target":695},{"edgeType":"calls","source":3576,"target":1402},{"edgeType":"calls","source":5599,"target":1055},{"edgeType":"calls","source":5105,"target":1570},{"edgeType":"calls","source":3010,"target":978},{"edgeType":"imports","source":3994,"target":89},{"edgeType":"calls","source":3351,"target":978},{"edgeType":"calls","source":3256,"target":1809},{"edgeType":"contains","source":4274,"target":4343},{"edgeType":"calls","source":4491,"target":521},{"edgeType":"contains","source":3385,"target":5476},{"edgeType":"calls","source":4715,"target":976},{"edgeType":"calls","source":4548,"target":2982},{"edgeType":"contains","source":1273,"target":126},{"edgeType":"calls","source":4245,"target":1805},{"edgeType":"calls","source":3424,"target":830},{"edgeType":"calls","source":3356,"target":2938},{"edgeType":"calls","source":1394,"target":1396},{"edgeType":"calls","source":5772,"target":2033},{"edgeType":"calls","source":3498,"target":2764},{"edgeType":"calls","source":4800,"target":454},{"edgeType":"calls","source":5105,"target":1569},{"edgeType":"calls","source":3010,"target":979},{"edgeType":"calls","source":3351,"target":979},{"edgeType":"calls","source":5339,"target":2772},{"edgeType":"calls","source":3228,"target":564},{"edgeType":"calls","source":1748,"target":2049},{"edgeType":"contains","source":2096,"target":2097},{"edgeType":"calls","source":4715,"target":975},{"edgeType":"contains","source":2719,"target":753},{"edgeType":"imports","source":3437,"target":437},{"edgeType":"calls","source":3965,"target":971},{"edgeType":"calls","source":1428,"target":1394},{"edgeType":"contains","source":3886,"target":521},{"edgeType":"calls","source":3389,"target":1912},{"edgeType":"calls","source":961,"target":1072},{"edgeType":"calls","source":5215,"target":272},{"edgeType":"calls","source":997,"target":1013},{"edgeType":"calls","source":998,"target":982},{"edgeType":"calls","source":5105,"target":1568},{"edgeType":"calls","source":3010,"target":976},{"edgeType":"contains","source":3476,"target":4775},{"edgeType":"calls","source":3351,"target":976},{"edgeType":"contains","source":3385,"target":5482},{"edgeType":"contains","source":4078,"target":4083},{"edgeType":"calls","source":3907,"target":3823},{"edgeType":"calls","source":4715,"target":974},{"edgeType":"contains","source":4890,"target":5336},{"edgeType":"imports","source":337,"target":1402},{"edgeType":"calls","source":4800,"target":453},{"edgeType":"calls","source":4125,"target":1293},{"edgeType":"calls","source":4459,"target":454},{"edgeType":"contains","source":2585,"target":3855},{"edgeType":"contains","source":2569,"target":5408},{"edgeType":"calls","source":5020,"target":3145},{"edgeType":"calls","source":5533,"target":984},{"edgeType":"calls","source":998,"target":981},{"edgeType":"calls","source":3352,"target":946},{"edgeType":"calls","source":3351,"target":977},{"edgeType":"calls","source":5175,"target":454},{"edgeType":"calls","source":3010,"target":977},{"edgeType":"contains","source":3185,"target":3226},{"edgeType":"contains","source":1238,"target":5446},{"edgeType":"contains","source":3385,"target":5481},{"edgeType":"calls","source":3222,"target":1805},{"edgeType":"calls","source":5349,"target":345},{"edgeType":"contains","source":4078,"target":4082},{"edgeType":"calls","source":3930,"target":997},{"edgeType":"contains","source":2569,"target":5409},{"edgeType":"calls","source":2459,"target":89},{"edgeType":"calls","source":4715,"target":973},{"edgeType":"calls","source":4800,"target":452},{"edgeType":"calls","source":4839,"target":300},{"edgeType":"calls","source":4125,"target":1294},{"edgeType":"calls","source":4459,"target":453},{"edgeType":"contains","source":330,"target":3994},{"edgeType":"calls","source":2205,"target":564},{"edgeType":"calls","source":2160,"target":902},{"edgeType":"calls","source":4279,"target":1805},{"edgeType":"calls","source":5747,"target":691},{"edgeType":"calls","source":3010,"target":974},{"edgeType":"contains","source":3120,"target":3124},{"edgeType":"calls","source":2928,"target":345},{"edgeType":"calls","source":5533,"target":983},{"edgeType":"calls","source":3787,"target":142},{"edgeType":"calls","source":5201,"target":2818},{"edgeType":"calls","source":5175,"target":453},{"edgeType":"calls","source":998,"target":984},{"edgeType":"contains","source":5399,"target":5411},{"edgeType":"calls","source":3342,"target":1253},{"edgeType":"calls","source":3351,"target":974},{"edgeType":"calls","source":5331,"target":902},{"edgeType":"calls","source":3338,"target":320},{"edgeType":"calls","source":3439,"target":360},{"edgeType":"contains","source":2001,"target":2931},{"edgeType":"contains","source":3385,"target":5480},{"edgeType":"calls","source":1054,"target":305},{"edgeType":"imports","source":1232,"target":81},{"edgeType":"calls","source":4715,"target":972},{"edgeType":"calls","source":4800,"target":451},{"edgeType":"imports","source":435,"target":476},{"edgeType":"contains","source":4078,"target":4081},{"edgeType":"calls","source":4125,"target":1291},{"edgeType":"contains","source":2915,"target":3136},{"edgeType":"calls","source":2055,"target":985},{"edgeType":"imports","source":2115,"target":1249},{"edgeType":"calls","source":4459,"target":452},{"edgeType":"contains","source":2569,"target":5406},{"edgeType":"calls","source":2180,"target":279},{"edgeType":"calls","source":3610,"target":345},{"edgeType":"calls","source":5175,"target":452},{"edgeType":"calls","source":5120,"target":2157},{"edgeType":"calls","source":3010,"target":975},{"edgeType":"contains","source":3120,"target":3125},{"edgeType":"calls","source":4980,"target":2269},{"edgeType":"contains","source":1164,"target":2454},{"edgeType":"calls","source":997,"target":1014},{"edgeType":"calls","source":998,"target":983},{"edgeType":"imports","source":3969,"target":869},{"edgeType":"contains","source":3476,"target":4772},{"edgeType":"calls","source":5533,"target":982},{"edgeType":"calls","source":3351,"target":975},{"edgeType":"contains","source":3385,"target":5479},{"edgeType":"calls","source":4736,"target":320},{"edgeType":"calls","source":4715,"target":971},{"edgeType":"calls","source":4800,"target":450},{"edgeType":"imports","source":337,"target":344},{"edgeType":"calls","source":1682,"target":920},{"edgeType":"contains","source":4078,"target":4080},{"edgeType":"contains","source":1,"target":2568},{"edgeType":"calls","source":4232,"target":89},{"edgeType":"calls","source":4125,"target":1292},{"edgeType":"contains","source":2569,"target":5407},{"edgeType":"calls","source":4459,"target":451},{"edgeType":"calls","source":2934,"target":1214},{"edgeType":"calls","source":5175,"target":451},{"edgeType":"calls","source":998,"target":978},{"edgeType":"calls","source":3010,"target":972},{"edgeType":"contains","source":841,"target":843},{"edgeType":"calls","source":1414,"target":767},{"edgeType":"calls","source":3439,"target":358},{"edgeType":"calls","source":5550,"target":454},{"edgeType":"calls","source":5533,"target":981},{"edgeType":"calls","source":4800,"target":449},{"edgeType":"calls","source":3351,"target":971},{"edgeType":"calls","source":4125,"target":1289},{"edgeType":"calls","source":4167,"target":1044},{"edgeType":"calls","source":2112,"target":269},{"edgeType":"calls","source":369,"target":394},{"edgeType":"calls","source":4459,"target":450},{"edgeType":"calls","source":2363,"target":946},{"edgeType":"contains","source":278,"target":326},{"edgeType":"calls","source":4399,"target":1253},{"edgeType":"calls","source":4504,"target":1169},{"edgeType":"contains","source":3642,"target":3860},{"edgeType":"calls","source":4459,"target":448},{"edgeType":"calls","source":4361,"target":1372},{"edgeType":"calls","source":998,"target":977},{"edgeType":"calls","source":2930,"target":282},{"edgeType":"calls","source":5175,"target":450},{"edgeType":"calls","source":3010,"target":973},{"edgeType":"calls","source":1414,"target":766},{"edgeType":"calls","source":1771,"target":269},{"edgeType":"contains","source":3385,"target":5485},{"edgeType":"calls","source":5550,"target":453},{"edgeType":"calls","source":5533,"target":980},{"edgeType":"calls","source":5747,"target":688},{"edgeType":"calls","source":3351,"target":973},{"edgeType":"calls","source":3446,"target":142},{"edgeType":"calls","source":3439,"target":359},{"edgeType":"calls","source":5500,"target":946},{"edgeType":"contains","source":5265,"target":5342},{"edgeType":"contains","source":3334,"target":1782},{"edgeType":"contains","source":5399,"target":5416},{"edgeType":"calls","source":4800,"target":448},{"edgeType":"calls","source":3351,"target":972},{"edgeType":"calls","source":4125,"target":1290},{"edgeType":"contains","source":3847,"target":3848},{"edgeType":"calls","source":4459,"target":449},{"edgeType":"calls","source":4519,"target":1760},{"edgeType":"calls","source":4459,"target":447},{"edgeType":"calls","source":747,"target":305},{"edgeType":"calls","source":5185,"target":2253},{"edgeType":"calls","source":4360,"target":345},{"edgeType":"calls","source":4328,"target":1337},{"edgeType":"calls","source":2278,"target":407},{"edgeType":"calls","source":5175,"target":449},{"edgeType":"calls","source":5215,"target":266},{"edgeType":"calls","source":998,"target":980},{"edgeType":"contains","source":3385,"target":5484},{"edgeType":"calls","source":5550,"target":452},{"edgeType":"calls","source":5533,"target":979},{"edgeType":"calls","source":5664,"target":89},{"edgeType":"calls","source":4800,"target":447},{"edgeType":"calls","source":3439,"target":355},{"edgeType":"calls","source":5550,"target":451},{"edgeType":"calls","source":5533,"target":978},{"edgeType":"contains","source":2569,"target":5410},{"edgeType":"calls","source":3338,"target":315},{"edgeType":"calls","source":4136,"target":946},{"edgeType":"calls","source":4104,"target":4052},{"edgeType":"contains","source":4868,"target":4963},{"edgeType":"calls","source":4947,"target":2232},{"edgeType":"contains","source":444,"target":467},{"edgeType":"calls","source":5175,"target":448},{"edgeType":"calls","source":3010,"target":971},{"edgeType":"calls","source":2962,"target":345},{"edgeType":"calls","source":920,"target":1283},{"edgeType":"calls","source":5109,"target":380},{"edgeType":"calls","source":5016,"target":3263},{"edgeType":"calls","source":961,"target":1069},{"edgeType":"calls","source":998,"target":979},{"edgeType":"calls","source":5243,"target":454},{"edgeType":"imports","source":337,"target":1414},{"edgeType":"calls","source":3439,"target":357},{"edgeType":"contains","source":3385,"target":5483},{"edgeType":"calls","source":3426,"target":1817},{"edgeType":"calls","source":3330,"target":564},{"edgeType":"calls","source":3439,"target":356},{"edgeType":"calls","source":5550,"target":450},{"edgeType":"calls","source":5533,"target":977},{"edgeType":"calls","source":1974,"target":1377},{"edgeType":"calls","source":1054,"target":300},{"edgeType":"calls","source":1030,"target":1044},{"edgeType":"contains","source":4890,"target":5337},{"edgeType":"calls","source":4167,"target":4214},{"edgeType":"calls","source":4593,"target":521},{"edgeType":"contains","source":52,"target":2048},{"edgeType":"calls","source":369,"target":395},{"edgeType":"contains","source":444,"target":466},{"edgeType":"calls","source":4650,"target":2982},{"edgeType":"contains","source":1495,"target":1714},{"edgeType":"calls","source":5175,"target":447},{"edgeType":"calls","source":998,"target":974},{"edgeType":"calls","source":2962,"target":2456},{"edgeType":"calls","source":5254,"target":1169},{"edgeType":"calls","source":297,"target":507},{"edgeType":"contains","source":3476,"target":4783},{"edgeType":"calls","source":5243,"target":453},{"edgeType":"calls","source":369,"target":389},{"edgeType":"calls","source":5650,"target":1578},{"edgeType":"calls","source":3515,"target":1169},{"edgeType":"contains","source":2932,"target":3677},{"edgeType":"calls","source":4048,"target":501},{"edgeType":"calls","source":3680,"target":282},{"edgeType":"contains","source":2981,"target":3215},{"edgeType":"calls","source":5550,"target":449},{"edgeType":"calls","source":5533,"target":976},{"edgeType":"contains","source":444,"target":469},{"edgeType":"calls","source":3509,"target":297},{"edgeType":"calls","source":3283,"target":961},{"edgeType":"calls","source":3338,"target":313},{"edgeType":"calls","source":2895,"target":305},{"edgeType":"calls","source":1086,"target":360},{"edgeType":"calls","source":4736,"target":315},{"edgeType":"calls","source":2881,"target":2853},{"edgeType":"contains","source":3781,"target":3785},{"edgeType":"calls","source":2861,"target":302},{"edgeType":"imports","source":3374,"target":283},{"edgeType":"calls","source":998,"target":973},{"edgeType":"calls","source":5243,"target":452},{"edgeType":"calls","source":2991,"target":501},{"edgeType":"contains","source":1599,"target":1662},{"edgeType":"calls","source":5325,"target":2138},{"edgeType":"calls","source":2278,"target":406},{"edgeType":"calls","source":5695,"target":1239},{"edgeType":"calls","source":3987,"target":279},{"edgeType":"calls","source":5650,"target":1577},{"edgeType":"calls","source":5658,"target":272},{"edgeType":"calls","source":1779,"target":1074},{"edgeType":"calls","source":5550,"target":448},{"edgeType":"calls","source":5533,"target":975},{"edgeType":"contains","source":444,"target":468},{"edgeType":"calls","source":3291,"target":1771},{"edgeType":"contains","source":2585,"target":2807},{"edgeType":"contains","source":3641,"target":4953},{"edgeType":"calls","source":1086,"target":359},{"edgeType":"calls","source":2807,"target":920},{"edgeType":"imports","source":1238,"target":963},{"edgeType":"calls","source":5243,"target":451},{"edgeType":"calls","source":4571,"target":142},{"edgeType":"calls","source":998,"target":976},{"edgeType":"calls","source":4381,"target":747},{"edgeType":"calls","source":5650,"target":1576},{"edgeType":"contains","source":444,"target":471},{"edgeType":"contains","source":1164,"target":2463},{"edgeType":"calls","source":1352,"target":572},{"edgeType":"calls","source":3604,"target":521},{"edgeType":"calls","source":5550,"target":447},{"edgeType":"calls","source":5533,"target":974},{"edgeType":"calls","source":3440,"target":320},{"edgeType":"calls","source":369,"target":392},{"edgeType":"contains","source":3741,"target":3966},{"edgeType":"contains","source":1733,"target":1734},{"edgeType":"calls","source":4736,"target":313},{"edgeType":"contains","source":3781,"target":3783},{"edgeType":"calls","source":5016,"target":89},{"edgeType":"calls","source":4912,"target":142},{"edgeType":"calls","source":4921,"target":920},{"edgeType":"calls","source":5288,"target":1169},{"edgeType":"calls","source":5239,"target":1631},{"edgeType":"calls","source":998,"target":975},{"edgeType":"calls","source":5243,"target":450},{"edgeType":"calls","source":4368,"target":3263},{"edgeType":"imports","source":4037,"target":4038},{"edgeType":"contains","source":4805,"target":4806},{"edgeType":"contains","source":444,"target":470},{"edgeType":"calls","source":5533,"target":973},{"edgeType":"calls","source":5401,"target":837},{"edgeType":"imports","source":1238,"target":961},{"edgeType":"calls","source":747,"target":300},{"edgeType":"calls","source":5188,"target":2253},{"edgeType":"contains","source":111,"target":193},{"edgeType":"calls","source":4363,"target":345},{"edgeType":"calls","source":1858,"target":835},{"edgeType":"calls","source":4022,"target":345},{"edgeType":"calls","source":2176,"target":491},{"edgeType":"contains","source":1005,"target":1019},{"edgeType":"contains","source":4702,"target":4802},{"edgeType":"calls","source":1942,"target":345},{"edgeType":"calls","source":4104,"target":974},{"edgeType":"calls","source":5594,"target":1294},{"edgeType":"calls","source":4213,"target":766},{"edgeType":"calls","source":1239,"target":997},{"edgeType":"calls","source":5502,"target":975},{"edgeType":"calls","source":3382,"target":2215},{"edgeType":"calls","source":2933,"target":279},{"edgeType":"contains","source":1561,"target":1754},{"edgeType":"calls","source":4601,"target":367},{"edgeType":"calls","source":4937,"target":521},{"edgeType":"calls","source":886,"target":313},{"edgeType":"calls","source":4836,"target":481},{"edgeType":"calls","source":4536,"target":266},{"edgeType":"imports","source":3333,"target":278},{"edgeType":"calls","source":2284,"target":315},{"edgeType":"calls","source":4017,"target":501},{"edgeType":"calls","source":3665,"target":843},{"edgeType":"imports","source":3969,"target":1705},{"edgeType":"calls","source":3928,"target":89},{"edgeType":"contains","source":2569,"target":5389},{"edgeType":"calls","source":4816,"target":2157},{"edgeType":"calls","source":3483,"target":142},{"edgeType":"calls","source":5594,"target":1293},{"edgeType":"calls","source":4104,"target":975},{"edgeType":"calls","source":5502,"target":974},{"edgeType":"calls","source":4228,"target":302},{"edgeType":"calls","source":4213,"target":767},{"edgeType":"calls","source":2882,"target":1861},{"edgeType":"calls","source":5078,"target":1434},{"edgeType":"calls","source":1086,"target":454},{"edgeType":"calls","source":2895,"target":2515},{"edgeType":"contains","source":111,"target":195},{"edgeType":"calls","source":4571,"target":1294},{"edgeType":"imports","source":317,"target":753},{"edgeType":"calls","source":4271,"target":3195},{"edgeType":"calls","source":3608,"target":1550},{"edgeType":"calls","source":4327,"target":402},{"edgeType":"calls","source":4104,"target":972},{"edgeType":"calls","source":1858,"target":837},{"edgeType":"calls","source":5594,"target":1292},{"edgeType":"calls","source":570,"target":598},{"edgeType":"calls","source":5619,"target":1574},{"edgeType":"calls","source":2812,"target":857},{"edgeType":"contains","source":4636,"target":4731},{"edgeType":"calls","source":3573,"target":1577},{"edgeType":"calls","source":5698,"target":1239},{"edgeType":"calls","source":5502,"target":973},{"edgeType":"calls","source":5079,"target":345},{"edgeType":"calls","source":5402,"target":902},{"edgeType":"calls","source":4717,"target":997},{"edgeType":"calls","source":886,"target":315},{"edgeType":"calls","source":5115,"target":1343},{"edgeType":"calls","source":2854,"target":1669},{"edgeType":"calls","source":4847,"target":3309},{"edgeType":"calls","source":5254,"target":2318},{"edgeType":"calls","source":4571,"target":1293},{"edgeType":"calls","source":2284,"target":313},{"edgeType":"calls","source":3691,"target":1092},{"edgeType":"calls","source":4104,"target":973},{"edgeType":"calls","source":1849,"target":1115},{"edgeType":"calls","source":3874,"target":3875},{"edgeType":"calls","source":1858,"target":836},{"edgeType":"calls","source":2055,"target":1071},{"edgeType":"contains","source":4636,"target":4730},{"edgeType":"calls","source":3573,"target":521},{"edgeType":"calls","source":3573,"target":1578},{"edgeType":"calls","source":5502,"target":972},{"edgeType":"calls","source":5594,"target":1291},{"edgeType":"calls","source":3463,"target":1817},{"edgeType":"calls","source":3237,"target":367},{"edgeType":"contains","source":2001,"target":2911},{"edgeType":"calls","source":1086,"target":451},{"edgeType":"calls","source":4571,"target":1292},{"edgeType":"calls","source":5297,"target":984},{"edgeType":"calls","source":5280,"target":454},{"edgeType":"calls","source":2497,"target":2163},{"edgeType":"contains","source":2161,"target":2184},{"edgeType":"calls","source":4112,"target":1779},{"edgeType":"calls","source":4231,"target":1261},{"edgeType":"calls","source":4921,"target":1013},{"edgeType":"calls","source":1478,"target":983},{"edgeType":"calls","source":1403,"target":137},{"edgeType":"calls","source":2844,"target":920},{"edgeType":"calls","source":5594,"target":1290},{"edgeType":"calls","source":5502,"target":971},{"edgeType":"calls","source":886,"target":309},{"edgeType":"contains","source":5265,"target":5322},{"edgeType":"contains","source":3642,"target":3841},{"edgeType":"calls","source":3273,"target":305},{"edgeType":"calls","source":1193,"target":305},{"edgeType":"calls","source":1086,"target":450},{"edgeType":"calls","source":1789,"target":1912},{"edgeType":"calls","source":4571,"target":1291},{"edgeType":"calls","source":5297,"target":983},{"edgeType":"contains","source":11,"target":2239},{"edgeType":"contains","source":75,"target":255},{"edgeType":"calls","source":4414,"target":1930},{"edgeType":"calls","source":4371,"target":3263},{"edgeType":"contains","source":2585,"target":3840},{"edgeType":"calls","source":4337,"target":89},{"edgeType":"calls","source":4104,"target":971},{"edgeType":"calls","source":4231,"target":1262},{"edgeType":"contains","source":1005,"target":1022},{"edgeType":"calls","source":1478,"target":982},{"edgeType":"calls","source":1463,"target":1447},{"edgeType":"calls","source":1501,"target":269},{"edgeType":"calls","source":5607,"target":886},{"edgeType":"calls","source":5594,"target":1289},{"edgeType":"imports","source":4103,"target":1784},{"edgeType":"calls","source":3573,"target":1576},{"edgeType":"calls","source":3614,"target":305},{"edgeType":"calls","source":2588,"target":2515},{"edgeType":"calls","source":987,"target":348},{"edgeType":"calls","source":5280,"target":453},{"edgeType":"calls","source":5137,"target":2772},{"edgeType":"calls","source":4571,"target":1290},{"edgeType":"calls","source":1661,"target":598},{"edgeType":"contains","source":4237,"target":4420},{"edgeType":"contains","source":111,"target":199},{"edgeType":"calls","source":1858,"target":833},{"edgeType":"calls","source":4431,"target":345},{"edgeType":"calls","source":2439,"target":788},{"edgeType":"calls","source":4231,"target":1259},{"edgeType":"calls","source":3592,"target":984},{"edgeType":"calls","source":3573,"target":1573},{"edgeType":"calls","source":2870,"target":1169},{"edgeType":"imports","source":4286,"target":340},{"edgeType":"contains","source":5260,"target":5475},{"edgeType":"calls","source":5091,"target":1026},{"edgeType":"calls","source":1086,"target":453},{"edgeType":"calls","source":5297,"target":982},{"edgeType":"calls","source":5280,"target":452},{"edgeType":"calls","source":405,"target":422},{"edgeType":"calls","source":4571,"target":1289},{"edgeType":"calls","source":2692,"target":345},{"edgeType":"calls","source":1858,"target":832},{"edgeType":"calls","source":4413,"target":902},{"edgeType":"calls","source":2284,"target":309},{"edgeType":"contains","source":4702,"target":4803},{"edgeType":"calls","source":4231,"target":1260},{"edgeType":"contains","source":278,"target":306},{"edgeType":"calls","source":1478,"target":984},{"edgeType":"calls","source":3728,"target":997},{"edgeType":"imports","source":4286,"target":341},{"edgeType":"calls","source":5280,"target":451},{"edgeType":"calls","source":5304,"target":3935},{"edgeType":"calls","source":1086,"target":452},{"edgeType":"calls","source":5297,"target":981},{"edgeType":"calls","source":2591,"target":302},{"edgeType":"calls","source":4030,"target":89},{"edgeType":"calls","source":1961,"target":805},{"edgeType":"calls","source":1086,"target":447},{"edgeType":"contains","source":111,"target":201},{"edgeType":"calls","source":4231,"target":1257},{"edgeType":"calls","source":4371,"target":89},{"edgeType":"calls","source":4293,"target":2507},{"edgeType":"calls","source":5769,"target":89},{"edgeType":"calls","source":2190,"target":2163},{"edgeType":"calls","source":2187,"target":142},{"edgeType":"calls","source":3592,"target":982},{"edgeType":"calls","source":3573,"target":1571},{"edgeType":"calls","source":3614,"target":300},{"edgeType":"calls","source":2809,"target":944},{"edgeType":"calls","source":3067,"target":345},{"edgeType":"calls","source":5297,"target":980},{"edgeType":"calls","source":5280,"target":450},{"edgeType":"calls","source":1478,"target":979},{"edgeType":"calls","source":1193,"target":300},{"edgeType":"contains","source":5363,"target":5459},{"edgeType":"contains","source":5399,"target":5400},{"edgeType":"calls","source":1233,"target":117},{"edgeType":"calls","source":1961,"target":804},{"edgeType":"calls","source":3818,"target":320},{"edgeType":"calls","source":4231,"target":1258},{"edgeType":"calls","source":4419,"target":1771},{"edgeType":"calls","source":2875,"target":1013},{"edgeType":"calls","source":5084,"target":1240},{"edgeType":"calls","source":3592,"target":983},{"edgeType":"calls","source":3573,"target":1572},{"edgeType":"calls","source":5645,"target":2875},{"edgeType":"calls","source":5706,"target":984},{"edgeType":"calls","source":886,"target":304},{"edgeType":"calls","source":4984,"target":1169},{"edgeType":"calls","source":5280,"target":449},{"edgeType":"calls","source":5293,"target":2160},{"edgeType":"calls","source":5297,"target":979},{"edgeType":"calls","source":1537,"target":206},{"edgeType":"calls","source":1478,"target":978},{"edgeType":"calls","source":5465,"target":1056},{"edgeType":"calls","source":5421,"target":305},{"edgeType":"calls","source":1086,"target":449},{"edgeType":"calls","source":4039,"target":1922},{"edgeType":"contains","source":4868,"target":4947},{"edgeType":"contains","source":11,"target":2246},{"edgeType":"calls","source":4467,"target":282},{"edgeType":"contains","source":111,"target":203},{"edgeType":"calls","source":2571,"target":920},{"edgeType":"calls","source":1478,"target":981},{"edgeType":"calls","source":4302,"target":1169},{"edgeType":"calls","source":4327,"target":394},{"edgeType":"calls","source":2284,"target":304},{"edgeType":"calls","source":1662,"target":1619},{"edgeType":"calls","source":5297,"target":978},{"edgeType":"calls","source":1013,"target":598},{"edgeType":"calls","source":5280,"target":448},{"edgeType":"calls","source":3592,"target":980},{"edgeType":"calls","source":3573,"target":1569},{"edgeType":"calls","source":5348,"target":454},{"edgeType":"calls","source":5706,"target":983},{"edgeType":"calls","source":5370,"target":829},{"edgeType":"contains","source":1164,"target":2442},{"edgeType":"calls","source":3429,"target":1805},{"edgeType":"calls","source":3273,"target":300},{"edgeType":"calls","source":1086,"target":448},{"edgeType":"contains","source":2585,"target":2785},{"edgeType":"imports","source":2374,"target":416},{"edgeType":"calls","source":1956,"target":961},{"edgeType":"calls","source":4849,"target":2180},{"edgeType":"contains","source":4636,"target":4739},{"edgeType":"calls","source":1478,"target":980},{"edgeType":"calls","source":5280,"target":447},{"edgeType":"calls","source":5232,"target":1935},{"edgeType":"calls","source":5298,"target":2003},{"edgeType":"calls","source":5348,"target":453},{"edgeType":"calls","source":5297,"target":977},{"edgeType":"calls","source":3592,"target":981},{"edgeType":"calls","source":3573,"target":1570},{"edgeType":"calls","source":5706,"target":982},{"edgeType":"calls","source":5699,"target":142},{"edgeType":"contains","source":5265,"target":5331},{"edgeType":"contains","source":4636,"target":4746},{"edgeType":"calls","source":3383,"target":1115},{"edgeType":"calls","source":4126,"target":1337},{"edgeType":"calls","source":1030,"target":1122},{"edgeType":"calls","source":2586,"target":453},{"edgeType":"calls","source":4364,"target":302},{"edgeType":"contains","source":3644,"target":3787},{"edgeType":"calls","source":4327,"target":392},{"edgeType":"calls","source":5297,"target":976},{"edgeType":"calls","source":1478,"target":975},{"edgeType":"calls","source":5348,"target":452},{"edgeType":"calls","source":5740,"target":984},{"edgeType":"calls","source":1849,"target":1101},{"edgeType":"calls","source":3592,"target":978},{"edgeType":"calls","source":5706,"target":981},{"edgeType":"calls","source":5616,"target":1657},{"edgeType":"contains","source":4636,"target":4745},{"edgeType":"calls","source":2024,"target":961},{"edgeType":"imports","source":435,"target":273},{"edgeType":"calls","source":1030,"target":1121},{"edgeType":"calls","source":4877,"target":3424},{"edgeType":"imports","source":3926,"target":920},{"edgeType":"calls","source":2586,"target":454},{"edgeType":"calls","source":4413,"target":896},{"edgeType":"calls","source":2852,"target":2779},{"edgeType":"calls","source":3055,"target":1771},{"edgeType":"calls","source":5348,"target":451},{"edgeType":"calls","source":5297,"target":975},{"edgeType":"calls","source":1478,"target":974},{"edgeType":"calls","source":3723,"target":3260},{"edgeType":"calls","source":3818,"target":315},{"edgeType":"calls","source":5616,"target":1656},{"edgeType":"calls","source":3592,"target":979},{"edgeType":"calls","source":3573,"target":1568},{"edgeType":"calls","source":5706,"target":980},{"edgeType":"calls","source":5740,"target":983},{"edgeType":"contains","source":1164,"target":2447},{"edgeType":"calls","source":3411,"target":3416},{"edgeType":"calls","source":1990,"target":961},{"edgeType":"calls","source":3254,"target":2998},{"edgeType":"calls","source":5393,"target":1169},{"edgeType":"calls","source":1961,"target":803},{"edgeType":"calls","source":2586,"target":451},{"edgeType":"contains","source":2001,"target":2922},{"edgeType":"contains","source":2161,"target":2190},{"edgeType":"calls","source":4943,"target":320},{"edgeType":"calls","source":4413,"target":895},{"edgeType":"calls","source":4439,"target":89},{"edgeType":"calls","source":5215,"target":345},{"edgeType":"calls","source":5297,"target":974},{"edgeType":"calls","source":3592,"target":976},{"edgeType":"calls","source":5348,"target":450},{"edgeType":"calls","source":5706,"target":979},{"edgeType":"calls","source":1478,"target":977},{"edgeType":"calls","source":4057,"target":302},{"edgeType":"calls","source":5740,"target":982},{"edgeType":"contains","source":3252,"target":3253},{"edgeType":"contains","source":3318,"target":3321},{"edgeType":"calls","source":5421,"target":300},{"edgeType":"contains","source":2001,"target":2923},{"edgeType":"calls","source":4493,"target":4756},{"edgeType":"calls","source":2586,"target":452},{"edgeType":"calls","source":2693,"target":1363},{"edgeType":"contains","source":54,"target":1973},{"edgeType":"calls","source":920,"target":305},{"edgeType":"calls","source":4366,"target":1294},{"edgeType":"calls","source":4376,"target":984},{"edgeType":"calls","source":4334,"target":2286},{"edgeType":"calls","source":4413,"target":894},{"edgeType":"imports","source":2305,"target":437},{"edgeType":"calls","source":141,"target":142},{"edgeType":"calls","source":5300,"target":1937},{"edgeType":"calls","source":5348,"target":449},{"edgeType":"calls","source":5297,"target":973},{"edgeType":"calls","source":4327,"target":389},{"edgeType":"calls","source":3592,"target":977},{"edgeType":"calls","source":5706,"target":978},{"edgeType":"calls","source":5740,"target":981},{"edgeType":"calls","source":1816,"target":1068},{"edgeType":"contains","source":5265,"target":5327},{"edgeType":"calls","source":1478,"target":976},{"edgeType":"calls","source":3818,"target":313},{"edgeType":"calls","source":4188,"target":501},{"edgeType":"contains","source":3215,"target":3315},{"edgeType":"calls","source":1430,"target":1435},{"edgeType":"contains","source":5167,"target":5169},{"edgeType":"calls","source":3244,"target":2282},{"edgeType":"calls","source":2880,"target":1938},{"edgeType":"calls","source":2536,"target":975},{"edgeType":"calls","source":5059,"target":983},{"edgeType":"contains","source":12,"target":74},{"edgeType":"calls","source":2795,"target":345},{"edgeType":"contains","source":3741,"target":2865},{"edgeType":"contains","source":792,"target":1263},{"edgeType":"contains","source":11,"target":3277},{"edgeType":"contains","source":111,"target":177},{"edgeType":"calls","source":5264,"target":971},{"edgeType":"calls","source":2426,"target":1214},{"edgeType":"calls","source":4415,"target":864},{"edgeType":"calls","source":4365,"target":300},{"edgeType":"calls","source":5332,"target":977},{"edgeType":"calls","source":1505,"target":1224},{"edgeType":"calls","source":4002,"target":981},{"edgeType":"calls","source":1564,"target":452},{"edgeType":"contains","source":3057,"target":2927},{"edgeType":"calls","source":5690,"target":449},{"edgeType":"imports","source":3969,"target":1688},{"edgeType":"calls","source":1922,"target":981},{"edgeType":"calls","source":2055,"target":1086},{"edgeType":"imports","source":2948,"target":1626},{"edgeType":"calls","source":3342,"target":302},{"edgeType":"calls","source":3293,"target":1821},{"edgeType":"contains","source":5167,"target":5168},{"edgeType":"imports","source":3385,"target":2880},{"edgeType":"calls","source":5059,"target":982},{"edgeType":"calls","source":2536,"target":976},{"edgeType":"imports","source":4654,"target":3709},{"edgeType":"calls","source":892,"target":142},{"edgeType":"calls","source":1024,"target":279},{"edgeType":"contains","source":4176,"target":4178},{"edgeType":"calls","source":3042,"target":89},{"edgeType":"contains","source":2115,"target":3591},{"edgeType":"calls","source":5301,"target":1937},{"edgeType":"calls","source":5332,"target":976},{"edgeType":"calls","source":4367,"target":1294},{"edgeType":"calls","source":4399,"target":302},{"edgeType":"calls","source":1505,"target":1223},{"edgeType":"calls","source":1564,"target":451},{"edgeType":"contains","source":2569,"target":5372},{"edgeType":"calls","source":4004,"target":920},{"edgeType":"calls","source":4002,"target":982},{"edgeType":"calls","source":5690,"target":448},{"edgeType":"contains","source":903,"target":992},{"edgeType":"contains","source":2915,"target":3102},{"edgeType":"calls","source":1991,"target":2012},{"edgeType":"calls","source":1922,"target":980},{"edgeType":"calls","source":5591,"target":345},{"edgeType":"calls","source":1922,"target":984},{"edgeType":"contains","source":3185,"target":3186},{"edgeType":"calls","source":5690,"target":447},{"edgeType":"calls","source":5059,"target":981},{"edgeType":"contains","source":4103,"target":4325},{"edgeType":"calls","source":3742,"target":3754},{"edgeType":"calls","source":1632,"target":460},{"edgeType":"calls","source":3189,"target":814},{"edgeType":"contains","source":12,"target":77},{"edgeType":"calls","source":4619,"target":880},{"edgeType":"calls","source":5332,"target":975},{"edgeType":"calls","source":4367,"target":1293},{"edgeType":"calls","source":2536,"target":973},{"edgeType":"calls","source":1564,"target":454},{"edgeType":"calls","source":1922,"target":983},{"edgeType":"calls","source":4027,"target":1261},{"edgeType":"calls","source":4002,"target":979},{"edgeType":"contains","source":3972,"target":986},{"edgeType":"imports","source":1684,"target":1697},{"edgeType":"contains","source":4103,"target":4324},{"edgeType":"calls","source":2536,"target":974},{"edgeType":"calls","source":5187,"target":1240},{"edgeType":"calls","source":5142,"target":521},{"edgeType":"calls","source":5059,"target":980},{"edgeType":"contains","source":4237,"target":4399},{"edgeType":"calls","source":3806,"target":1771},{"edgeType":"contains","source":2161,"target":2163},{"edgeType":"calls","source":3163,"target":564},{"edgeType":"calls","source":5332,"target":974},{"edgeType":"contains","source":1517,"target":3100},{"edgeType":"contains","source":3385,"target":5442},{"edgeType":"calls","source":4002,"target":980},{"edgeType":"calls","source":4367,"target":1292},{"edgeType":"calls","source":1564,"target":453},{"edgeType":"contains","source":2569,"target":5370},{"edgeType":"calls","source":1922,"target":982},{"edgeType":"contains","source":792,"target":1264},{"edgeType":"calls","source":4027,"target":1262},{"edgeType":"calls","source":3839,"target":1805},{"edgeType":"calls","source":750,"target":313},{"edgeType":"calls","source":1564,"target":448},{"edgeType":"contains","source":3642,"target":1710},{"edgeType":"calls","source":4801,"target":521},{"edgeType":"calls","source":3352,"target":1044},{"edgeType":"contains","source":5265,"target":5306},{"edgeType":"calls","source":5059,"target":979},{"edgeType":"imports","source":3814,"target":3326},{"edgeType":"calls","source":2405,"target":1861},{"edgeType":"calls","source":5332,"target":973},{"edgeType":"calls","source":3873,"target":1805},{"edgeType":"calls","source":2536,"target":971},{"edgeType":"contains","source":54,"target":1948},{"edgeType":"contains","source":111,"target":181},{"edgeType":"calls","source":4619,"target":878},{"edgeType":"calls","source":4367,"target":1291},{"edgeType":"calls","source":4027,"target":1259},{"edgeType":"calls","source":1922,"target":977},{"edgeType":"imports","source":3811,"target":1305},{"edgeType":"calls","source":4002,"target":977},{"edgeType":"calls","source":4229,"target":282},{"edgeType":"contains","source":2585,"target":2765},{"edgeType":"contains","source":1005,"target":1006},{"edgeType":"calls","source":1564,"target":447},{"edgeType":"calls","source":5059,"target":978},{"edgeType":"calls","source":5332,"target":972},{"edgeType":"contains","source":11,"target":2223},{"edgeType":"calls","source":2536,"target":972},{"edgeType":"calls","source":4027,"target":1260},{"edgeType":"calls","source":1922,"target":976},{"edgeType":"calls","source":4367,"target":1290},{"edgeType":"contains","source":4702,"target":4788},{"edgeType":"calls","source":4002,"target":978},{"edgeType":"calls","source":4943,"target":345},{"edgeType":"calls","source":750,"target":315},{"edgeType":"calls","source":2882,"target":2927},{"edgeType":"calls","source":4841,"target":1393},{"edgeType":"contains","source":939,"target":941},{"edgeType":"calls","source":1397,"target":1399},{"edgeType":"contains","source":1517,"target":3103},{"edgeType":"calls","source":3096,"target":521},{"edgeType":"calls","source":5509,"target":1826},{"edgeType":"calls","source":5059,"target":977},{"edgeType":"contains","source":3642,"target":3822},{"edgeType":"calls","source":5332,"target":971},{"edgeType":"contains","source":3460,"target":2065},{"edgeType":"calls","source":4002,"target":975},{"edgeType":"calls","source":1609,"target":1169},{"edgeType":"contains","source":4103,"target":4330},{"edgeType":"contains","source":1189,"target":2701},{"edgeType":"calls","source":4104,"target":984},{"edgeType":"calls","source":1564,"target":450},{"edgeType":"calls","source":1922,"target":979},{"edgeType":"contains","source":54,"target":3007},{"edgeType":"contains","source":77,"target":2294},{"edgeType":"calls","source":4367,"target":1289},{"edgeType":"calls","source":4413,"target":920},{"edgeType":"calls","source":4027,"target":1257},{"edgeType":"contains","source":4636,"target":4719},{"edgeType":"calls","source":5059,"target":976},{"edgeType":"contains","source":5265,"target":5303},{"edgeType":"calls","source":1431,"target":1401},{"edgeType":"calls","source":1564,"target":449},{"edgeType":"contains","source":5167,"target":5170},{"edgeType":"calls","source":4835,"target":521},{"edgeType":"contains","source":1517,"target":3104},{"edgeType":"calls","source":3303,"target":1505},{"edgeType":"calls","source":5565,"target":89},{"edgeType":"calls","source":5120,"target":142},{"edgeType":"calls","source":5461,"target":142},{"edgeType":"contains","source":1599,"target":1619},{"edgeType":"calls","source":5196,"target":5186},{"edgeType":"contains","source":14,"target":18},{"edgeType":"calls","source":1922,"target":978},{"edgeType":"contains","source":77,"target":2293},{"edgeType":"calls","source":4027,"target":1258},{"edgeType":"contains","source":792,"target":1268},{"edgeType":"calls","source":4437,"target":2289},{"edgeType":"calls","source":4002,"target":976},{"edgeType":"calls","source":2186,"target":2307},{"edgeType":"imports","source":2048,"target":995},{"edgeType":"calls","source":5592,"target":5593},{"edgeType":"calls","source":5059,"target":975},{"edgeType":"calls","source":750,"target":309},{"edgeType":"contains","source":792,"target":1272},{"edgeType":"calls","source":5502,"target":984},{"edgeType":"calls","source":1301,"target":141},{"edgeType":"calls","source":4002,"target":973},{"edgeType":"imports","source":3969,"target":2737},{"edgeType":"calls","source":1922,"target":973},{"edgeType":"imports","source":1497,"target":1164},{"edgeType":"contains","source":2491,"target":2512},{"edgeType":"calls","source":4039,"target":2997},{"edgeType":"calls","source":4104,"target":982},{"edgeType":"calls","source":4106,"target":920},{"edgeType":"calls","source":2890,"target":1621},{"edgeType":"calls","source":5059,"target":974},{"edgeType":"calls","source":5713,"target":2898},{"edgeType":"contains","source":1517,"target":3110},{"edgeType":"calls","source":886,"target":320},{"edgeType":"imports","source":2048,"target":2051},{"edgeType":"calls","source":1706,"target":269},{"edgeType":"calls","source":5502,"target":983},{"edgeType":"calls","source":1399,"target":1330},{"edgeType":"calls","source":4002,"target":974},{"edgeType":"imports","source":3057,"target":369},{"edgeType":"calls","source":1086,"target":462},{"edgeType":"calls","source":1922,"target":972},{"edgeType":"contains","source":3879,"target":3880},{"edgeType":"contains","source":792,"target":1270},{"edgeType":"calls","source":4876,"target":305},{"edgeType":"contains","source":111,"target":184},{"edgeType":"contains","source":2491,"target":2513},{"edgeType":"contains","source":77,"target":2295},{"edgeType":"contains","source":2001,"target":2905},{"edgeType":"calls","source":4104,"target":983},{"edgeType":"calls","source":5059,"target":973},{"edgeType":"calls","source":2284,"target":320},{"edgeType":"calls","source":5590,"target":1425},{"edgeType":"calls","source":5599,"target":89},{"edgeType":"calls","source":5502,"target":982},{"edgeType":"contains","source":1599,"target":1622},{"edgeType":"calls","source":1233,"target":137},{"edgeType":"calls","source":3482,"target":1236},{"edgeType":"calls","source":4623,"target":1805},{"edgeType":"contains","source":2569,"target":5377},{"edgeType":"calls","source":4104,"target":980},{"edgeType":"calls","source":1922,"target":975},{"edgeType":"contains","source":2001,"target":2902},{"edgeType":"contains","source":4868,"target":4930},{"edgeType":"calls","source":4002,"target":971},{"edgeType":"calls","source":1969,"target":1632},{"edgeType":"contains","source":14,"target":23},{"edgeType":"contains","source":1005,"target":1012},{"edgeType":"imports","source":3642,"target":1249},{"edgeType":"calls","source":2812,"target":866},{"edgeType":"calls","source":5059,"target":972},{"edgeType":"calls","source":990,"target":269},{"edgeType":"calls","source":1363,"target":1391},{"edgeType":"contains","source":1517,"target":3108},{"edgeType":"calls","source":5502,"target":981},{"edgeType":"calls","source":4002,"target":972},{"edgeType":"contains","source":1238,"target":2244},{"edgeType":"calls","source":5360,"target":2211},{"edgeType":"calls","source":1922,"target":974},{"edgeType":"calls","source":4822,"target":920},{"edgeType":"contains","source":2001,"target":2903},{"edgeType":"calls","source":4104,"target":981},{"edgeType":"calls","source":4192,"target":367},{"edgeType":"calls","source":4295,"target":345},{"edgeType":"contains","source":56,"target":2948},{"edgeType":"calls","source":1511,"target":3140},{"edgeType":"calls","source":4362,"target":380},{"edgeType":"contains","source":3642,"target":3832},{"edgeType":"calls","source":4965,"target":1771},{"edgeType":"calls","source":5059,"target":971},{"edgeType":"calls","source":5289,"target":1240},{"edgeType":"calls","source":3786,"target":266},{"edgeType":"calls","source":5502,"target":980},{"edgeType":"contains","source":4636,"target":4729},{"edgeType":"calls","source":5502,"target":979},{"edgeType":"contains","source":5263,"target":5376},{"edgeType":"contains","source":5260,"target":5469},{"edgeType":"calls","source":1340,"target":1041},{"edgeType":"contains","source":2569,"target":5383},{"edgeType":"calls","source":4021,"target":380},{"edgeType":"calls","source":2037,"target":1632},{"edgeType":"calls","source":4104,"target":978},{"edgeType":"calls","source":2363,"target":1041},{"edgeType":"contains","source":2161,"target":2176},{"edgeType":"calls","source":2211,"target":2582},{"edgeType":"contains","source":2829,"target":3667},{"edgeType":"calls","source":3698,"target":1938},{"edgeType":"contains","source":3653,"target":1376},{"edgeType":"calls","source":5184,"target":266},{"edgeType":"calls","source":5301,"target":867},{"edgeType":"calls","source":3613,"target":345},{"edgeType":"calls","source":5679,"target":777},{"edgeType":"calls","source":5623,"target":1456},{"edgeType":"calls","source":5502,"target":978},{"edgeType":"calls","source":3226,"target":1771},{"edgeType":"calls","source":3935,"target":933},{"edgeType":"calls","source":4104,"target":979},{"edgeType":"calls","source":2448,"target":521},{"edgeType":"calls","source":750,"target":304},{"edgeType":"calls","source":4520,"target":767},{"edgeType":"contains","source":111,"target":188},{"edgeType":"contains","source":1561,"target":1747},{"edgeType":"contains","source":111,"target":191},{"edgeType":"imports","source":96,"target":1249},{"edgeType":"contains","source":2888,"target":2892},{"edgeType":"calls","source":5679,"target":776},{"edgeType":"calls","source":1770,"target":398},{"edgeType":"calls","source":4104,"target":976},{"edgeType":"calls","source":1922,"target":971},{"edgeType":"calls","source":5539,"target":887},{"edgeType":"calls","source":5502,"target":977},{"edgeType":"calls","source":1986,"target":1101},{"edgeType":"calls","source":4107,"target":2997},{"edgeType":"imports","source":3333,"target":264},{"edgeType":"contains","source":2001,"target":2906},{"edgeType":"contains","source":278,"target":299},{"edgeType":"calls","source":4520,"target":766},{"edgeType":"calls","source":2960,"target":501},{"edgeType":"calls","source":4876,"target":300},{"edgeType":"calls","source":3002,"target":257},{"edgeType":"calls","source":2958,"target":564},{"edgeType":"calls","source":2249,"target":345},{"edgeType":"contains","source":4890,"target":5309},{"edgeType":"contains","source":3057,"target":2939},{"edgeType":"calls","source":5754,"target":564},{"edgeType":"calls","source":5539,"target":886},{"edgeType":"calls","source":4104,"target":977},{"edgeType":"calls","source":5502,"target":976},{"edgeType":"calls","source":4125,"target":1383},{"edgeType":"contains","source":278,"target":298},{"edgeType":"calls","source":4510,"target":3189},{"edgeType":"calls","source":2758,"target":422},{"edgeType":"calls","source":2577,"target":1805},{"edgeType":"contains","source":28,"target":2763},{"edgeType":"contains","source":111,"target":190},{"edgeType":"contains","source":3476,"target":4721},{"edgeType":"calls","source":3138,"target":1290},{"edgeType":"calls","source":1777,"target":142},{"edgeType":"calls","source":3189,"target":766},{"edgeType":"contains","source":3642,"target":1689},{"edgeType":"calls","source":4602,"target":302},{"edgeType":"calls","source":5772,"target":1029},{"edgeType":"calls","source":2222,"target":89},{"edgeType":"calls","source":3961,"target":89},{"edgeType":"contains","source":3127,"target":4969},{"edgeType":"contains","source":3204,"target":3639},{"edgeType":"calls","source":5618,"target":1574},{"edgeType":"contains","source":4683,"target":2186},{"edgeType":"calls","source":4205,"target":981},{"edgeType":"contains","source":5263,"target":5347},{"edgeType":"calls","source":5537,"target":914},{"edgeType":"contains","source":5265,"target":5285},{"edgeType":"calls","source":5078,"target":345},{"edgeType":"calls","source":5065,"target":1805},{"edgeType":"contains","source":1517,"target":3085},{"edgeType":"contains","source":1599,"target":1600},{"edgeType":"calls","source":4540,"target":4339},{"edgeType":"contains","source":52,"target":4103},{"edgeType":"calls","source":1102,"target":983},{"edgeType":"calls","source":4785,"target":972},{"edgeType":"calls","source":4932,"target":2757},{"edgeType":"calls","source":4838,"target":386},{"edgeType":"contains","source":4890,"target":5282},{"edgeType":"calls","source":3138,"target":1291},{"edgeType":"calls","source":3189,"target":767},{"edgeType":"calls","source":4571,"target":1262},{"edgeType":"contains","source":1238,"target":5392},{"edgeType":"contains","source":2585,"target":3803},{"edgeType":"contains","source":2948,"target":3120},{"edgeType":"imports","source":2374,"target":443},{"edgeType":"contains","source":3057,"target":2912},{"edgeType":"calls","source":3858,"target":1169},{"edgeType":"calls","source":5620,"target":454},{"edgeType":"contains","source":3127,"target":4970},{"edgeType":"contains","source":5263,"target":5346},{"edgeType":"calls","source":4869,"target":481},{"edgeType":"calls","source":4184,"target":1633},{"edgeType":"calls","source":4205,"target":982},{"edgeType":"calls","source":747,"target":360},{"edgeType":"calls","source":4302,"target":89},{"edgeType":"calls","source":3412,"target":1253},{"edgeType":"calls","source":1086,"target":1478},{"edgeType":"calls","source":1102,"target":982},{"edgeType":"calls","source":4785,"target":971},{"edgeType":"calls","source":5279,"target":454},{"edgeType":"calls","source":2439,"target":759},{"edgeType":"calls","source":5332,"target":925},{"edgeType":"calls","source":5296,"target":984},{"edgeType":"calls","source":4493,"target":4736},{"edgeType":"calls","source":339,"target":326},{"edgeType":"calls","source":4571,"target":1261},{"edgeType":"calls","source":2572,"target":864},{"edgeType":"calls","source":2314,"target":406},{"edgeType":"calls","source":1941,"target":345},{"edgeType":"calls","source":1748,"target":2100},{"edgeType":"contains","source":330,"target":2886},{"edgeType":"calls","source":4205,"target":979},{"edgeType":"calls","source":2023,"target":2031},{"edgeType":"calls","source":2112,"target":329},{"edgeType":"calls","source":5620,"target":453},{"edgeType":"calls","source":1165,"target":89},{"edgeType":"calls","source":4838,"target":384},{"edgeType":"calls","source":3065,"target":380},{"edgeType":"calls","source":4571,"target":1260},{"edgeType":"calls","source":5296,"target":983},{"edgeType":"calls","source":3138,"target":1289},{"edgeType":"calls","source":5279,"target":453},{"edgeType":"imports","source":3437,"target":256},{"edgeType":"calls","source":2303,"target":1805},{"edgeType":"calls","source":4509,"target":1068},{"edgeType":"calls","source":1829,"target":1702},{"edgeType":"calls","source":2314,"target":407},{"edgeType":"contains","source":2585,"target":3801},{"edgeType":"calls","source":4205,"target":980},{"edgeType":"contains","source":3127,"target":4968},{"edgeType":"contains","source":5263,"target":5344},{"edgeType":"calls","source":5620,"target":452},{"edgeType":"contains","source":396,"target":839},{"edgeType":"calls","source":1102,"target":984},{"edgeType":"calls","source":4571,"target":1259},{"edgeType":"calls","source":1102,"target":979},{"edgeType":"calls","source":5296,"target":982},{"edgeType":"contains","source":111,"target":164},{"edgeType":"contains","source":4292,"target":3741},{"edgeType":"contains","source":4636,"target":4705},{"edgeType":"contains","source":792,"target":1251},{"edgeType":"calls","source":2100,"target":695},{"edgeType":"calls","source":4205,"target":977},{"edgeType":"calls","source":747,"target":357},{"edgeType":"calls","source":2875,"target":983},{"edgeType":"calls","source":1397,"target":1347},{"edgeType":"calls","source":5004,"target":521},{"edgeType":"calls","source":5620,"target":451},{"edgeType":"calls","source":2764,"target":1253},{"edgeType":"calls","source":4758,"target":1805},{"edgeType":"contains","source":5260,"target":5444},{"edgeType":"calls","source":4838,"target":382},{"edgeType":"calls","source":5192,"target":3149},{"edgeType":"calls","source":5289,"target":142},{"edgeType":"calls","source":5279,"target":452},{"edgeType":"calls","source":1102,"target":978},{"edgeType":"calls","source":5330,"target":984},{"edgeType":"calls","source":4593,"target":1633},{"edgeType":"calls","source":4571,"target":1258},{"edgeType":"contains","source":3460,"target":4163},{"edgeType":"calls","source":1976,"target":310},{"edgeType":"contains","source":2491,"target":2493},{"edgeType":"calls","source":4205,"target":978},{"edgeType":"calls","source":2875,"target":984},{"edgeType":"calls","source":4914,"target":2253},{"edgeType":"calls","source":5620,"target":450},{"edgeType":"contains","source":5265,"target":5288},{"edgeType":"calls","source":747,"target":356},{"edgeType":"calls","source":3400,"target":564},{"edgeType":"calls","source":5296,"target":981},{"edgeType":"calls","source":5279,"target":451},{"edgeType":"calls","source":4571,"target":1257},{"edgeType":"contains","source":3460,"target":4162},{"edgeType":"contains","source":111,"target":166},{"edgeType":"contains","source":14,"target":3173},{"edgeType":"calls","source":4196,"target":2311},{"edgeType":"calls","source":4205,"target":975},{"edgeType":"imports","source":337,"target":1219},{"edgeType":"contains","source":2569,"target":5357},{"edgeType":"calls","source":2875,"target":981},{"edgeType":"calls","source":4989,"target":984},{"edgeType":"calls","source":2892,"target":454},{"edgeType":"calls","source":2186,"target":1199},{"edgeType":"calls","source":747,"target":359},{"edgeType":"calls","source":5045,"target":305},{"edgeType":"calls","source":2914,"target":2943},{"edgeType":"imports","source":960,"target":1989},{"edgeType":"contains","source":3127,"target":4971},{"edgeType":"calls","source":5192,"target":1033},{"edgeType":"calls","source":5215,"target":320},{"edgeType":"calls","source":5146,"target":345},{"edgeType":"calls","source":5620,"target":449},{"edgeType":"calls","source":5279,"target":450},{"edgeType":"contains","source":3642,"target":1692},{"edgeType":"calls","source":1102,"target":981},{"edgeType":"calls","source":5330,"target":983},{"edgeType":"calls","source":5296,"target":980},{"edgeType":"contains","source":3460,"target":4161},{"edgeType":"contains","source":1400,"target":1429},{"edgeType":"calls","source":4593,"target":1631},{"edgeType":"contains","source":476,"target":478},{"edgeType":"calls","source":4205,"target":976},{"edgeType":"imports","source":2374,"target":437},{"edgeType":"calls","source":4363,"target":305},{"edgeType":"contains","source":4702,"target":4770},{"edgeType":"calls","source":2875,"target":982},{"edgeType":"calls","source":747,"target":358},{"edgeType":"calls","source":4989,"target":983},{"edgeType":"calls","source":5644,"target":2875},{"edgeType":"calls","source":5705,"target":984},{"edgeType":"calls","source":5083,"target":1240},{"edgeType":"contains","source":3127,"target":4972},{"edgeType":"contains","source":5263,"target":5348},{"edgeType":"contains","source":5265,"target":5286},{"edgeType":"calls","source":5620,"target":448},{"edgeType":"calls","source":2914,"target":2944},{"edgeType":"calls","source":5464,"target":1056},{"edgeType":"calls","source":5299,"target":886},{"edgeType":"calls","source":5296,"target":979},{"edgeType":"contains","source":3642,"target":1691},{"edgeType":"calls","source":5279,"target":449},{"edgeType":"calls","source":1102,"target":980},{"edgeType":"calls","source":5330,"target":982},{"edgeType":"imports","source":3999,"target":3970},{"edgeType":"contains","source":2585,"target":3810},{"edgeType":"calls","source":1102,"target":975},{"edgeType":"calls","source":4839,"target":346},{"edgeType":"contains","source":4636,"target":4709},{"edgeType":"calls","source":1976,"target":307},{"edgeType":"calls","source":2100,"target":691},{"edgeType":"contains","source":2522,"target":478},{"edgeType":"calls","source":271,"target":310},{"edgeType":"calls","source":4205,"target":973},{"edgeType":"calls","source":4593,"target":1630},{"edgeType":"calls","source":4369,"target":2232},{"edgeType":"calls","source":1525,"target":1603},{"edgeType":"calls","source":5675,"target":4027},{"edgeType":"calls","source":5705,"target":983},{"edgeType":"contains","source":2915,"target":3093},{"edgeType":"contains","source":2932,"target":3623},{"edgeType":"calls","source":886,"target":272},{"edgeType":"calls","source":2875,"target":979},{"edgeType":"contains","source":2948,"target":3127},{"edgeType":"calls","source":2895,"target":359},{"edgeType":"calls","source":4989,"target":982},{"edgeType":"calls","source":2892,"target":452},{"edgeType":"contains","source":3127,"target":4977},{"edgeType":"contains","source":4890,"target":5291},{"edgeType":"calls","source":5620,"target":447},{"edgeType":"calls","source":5279,"target":448},{"edgeType":"imports","source":96,"target":1305},{"edgeType":"calls","source":1463,"target":354},{"edgeType":"calls","source":5330,"target":981},{"edgeType":"calls","source":5332,"target":919},{"edgeType":"calls","source":5296,"target":978},{"edgeType":"calls","source":5537,"target":906},{"edgeType":"contains","source":1335,"target":1336},{"edgeType":"calls","source":3273,"target":269},{"edgeType":"calls","source":1102,"target":974},{"edgeType":"calls","source":1983,"target":89},{"edgeType":"contains","source":792,"target":1254},{"edgeType":"contains","source":107,"target":291},{"edgeType":"calls","source":4874,"target":2431},{"edgeType":"calls","source":4205,"target":974},{"edgeType":"calls","source":4826,"target":1805},{"edgeType":"calls","source":4593,"target":1629},{"edgeType":"calls","source":3647,"target":302},{"edgeType":"calls","source":2914,"target":2942},{"edgeType":"calls","source":2875,"target":980},{"edgeType":"calls","source":2895,"target":360},{"edgeType":"calls","source":4989,"target":981},{"edgeType":"calls","source":2892,"target":453},{"edgeType":"contains","source":4890,"target":5290},{"edgeType":"contains","source":3127,"target":4978},{"edgeType":"calls","source":5296,"target":977},{"edgeType":"calls","source":5279,"target":447},{"edgeType":"calls","source":5330,"target":980},{"edgeType":"calls","source":5705,"target":982},{"edgeType":"calls","source":3347,"target":89},{"edgeType":"calls","source":5458,"target":1240},{"edgeType":"contains","source":2569,"target":5361},{"edgeType":"calls","source":1102,"target":977},{"edgeType":"contains","source":1189,"target":2688},{"edgeType":"calls","source":4104,"target":4102},{"edgeType":"calls","source":4205,"target":971},{"edgeType":"calls","source":2875,"target":976},{"edgeType":"contains","source":11,"target":3270},{"edgeType":"calls","source":2895,"target":356},{"edgeType":"calls","source":2892,"target":449},{"edgeType":"imports","source":3403,"target":262},{"edgeType":"calls","source":2875,"target":977},{"edgeType":"calls","source":2895,"target":357},{"edgeType":"calls","source":4989,"target":980},{"edgeType":"calls","source":2892,"target":450},{"edgeType":"contains","source":3871,"target":1996},{"edgeType":"calls","source":747,"target":355},{"edgeType":"contains","source":3127,"target":4975},{"edgeType":"calls","source":5330,"target":979},{"edgeType":"calls","source":5296,"target":976},{"edgeType":"calls","source":5705,"target":981},{"edgeType":"contains","source":3477,"target":3640},{"edgeType":"calls","source":1102,"target":976},{"edgeType":"contains","source":2491,"target":2495},{"edgeType":"calls","source":4205,"target":972},{"edgeType":"calls","source":2043,"target":345},{"edgeType":"calls","source":4989,"target":978},{"edgeType":"contains","source":111,"target":169},{"edgeType":"imports","source":3403,"target":261},{"edgeType":"calls","source":4413,"target":1922},{"edgeType":"calls","source":2284,"target":272},{"edgeType":"calls","source":5045,"target":300},{"edgeType":"calls","source":4984,"target":2191},{"edgeType":"calls","source":5215,"target":315},{"edgeType":"calls","source":2875,"target":978},{"edgeType":"calls","source":2895,"target":358},{"edgeType":"calls","source":4989,"target":979},{"edgeType":"calls","source":2892,"target":451},{"edgeType":"imports","source":2048,"target":1042},{"edgeType":"calls","source":5296,"target":975},{"edgeType":"calls","source":5330,"target":978},{"edgeType":"contains","source":3127,"target":4976},{"edgeType":"contains","source":1368,"target":1369},{"edgeType":"calls","source":5705,"target":980},{"edgeType":"imports","source":4654,"target":3753},{"edgeType":"imports","source":3969,"target":1733},{"edgeType":"contains","source":5260,"target":5453},{"edgeType":"calls","source":1992,"target":864},{"edgeType":"calls","source":4023,"target":269},{"edgeType":"calls","source":2875,"target":974},{"edgeType":"calls","source":1102,"target":971},{"edgeType":"calls","source":2892,"target":447},{"edgeType":"calls","source":477,"target":262},{"edgeType":"calls","source":4989,"target":977},{"edgeType":"imports","source":3437,"target":263},{"edgeType":"calls","source":4716,"target":984},{"edgeType":"calls","source":5082,"target":2323},{"edgeType":"calls","source":2999,"target":302},{"edgeType":"calls","source":4363,"target":300},{"edgeType":"calls","source":4334,"target":142},{"edgeType":"calls","source":2148,"target":257},{"edgeType":"calls","source":5330,"target":977},{"edgeType":"calls","source":5296,"target":974},{"edgeType":"calls","source":5582,"target":564},{"edgeType":"calls","source":5705,"target":979},{"edgeType":"calls","source":1961,"target":767},{"edgeType":"contains","source":5265,"target":5297},{"edgeType":"calls","source":1099,"target":1063},{"edgeType":"calls","source":4989,"target":976},{"edgeType":"calls","source":2812,"target":814},{"edgeType":"calls","source":2875,"target":975},{"edgeType":"calls","source":477,"target":261},{"edgeType":"calls","source":2895,"target":355},{"edgeType":"calls","source":2892,"target":448},{"edgeType":"contains","source":2247,"target":3723},{"edgeType":"calls","source":866,"target":886},{"edgeType":"calls","source":4716,"target":983},{"edgeType":"contains","source":111,"target":171},{"edgeType":"contains","source":52,"target":3057},{"edgeType":"calls","source":4933,"target":598},{"edgeType":"calls","source":920,"target":269},{"edgeType":"calls","source":2255,"target":1169},{"edgeType":"calls","source":4375,"target":984},{"edgeType":"calls","source":5301,"target":818},{"edgeType":"calls","source":5215,"target":313},{"edgeType":"calls","source":5296,"target":973},{"edgeType":"calls","source":3106,"target":1214},{"edgeType":"calls","source":5132,"target":5000},{"edgeType":"calls","source":5330,"target":976},{"edgeType":"calls","source":5705,"target":978},{"edgeType":"contains","source":2734,"target":4481},{"edgeType":"contains","source":1280,"target":1989},{"edgeType":"calls","source":3382,"target":3228},{"edgeType":"calls","source":3598,"target":1817},{"edgeType":"calls","source":3429,"target":1771},{"edgeType":"calls","source":1961,"target":766},{"edgeType":"calls","source":5411,"target":4806},{"edgeType":"calls","source":5432,"target":984},{"edgeType":"calls","source":3509,"target":345},{"edgeType":"calls","source":1102,"target":973},{"edgeType":"contains","source":4636,"target":4711},{"edgeType":"calls","source":4989,"target":975},{"edgeType":"calls","source":4716,"target":982},{"edgeType":"contains","source":4274,"target":4305},{"edgeType":"contains","source":11,"target":3274},{"edgeType":"calls","source":2875,"target":972},{"edgeType":"contains","source":111,"target":174},{"edgeType":"calls","source":4504,"target":2269},{"edgeType":"calls","source":4375,"target":983},{"edgeType":"calls","source":5301,"target":817},{"edgeType":"calls","source":5330,"target":975},{"edgeType":"calls","source":5296,"target":972},{"edgeType":"calls","source":5644,"target":2868},{"edgeType":"calls","source":5705,"target":977},{"edgeType":"calls","source":5658,"target":320},{"edgeType":"calls","source":4034,"target":982},{"edgeType":"calls","source":3710,"target":1513},{"edgeType":"calls","source":1708,"target":1213},{"edgeType":"calls","source":1923,"target":1947},{"edgeType":"calls","source":4034,"target":984},{"edgeType":"calls","source":1102,"target":972},{"edgeType":"calls","source":2100,"target":688},{"edgeType":"calls","source":5432,"target":983},{"edgeType":"calls","source":4264,"target":1253},{"edgeType":"calls","source":2875,"target":973},{"edgeType":"calls","source":4641,"target":2249},{"edgeType":"calls","source":4716,"target":981},{"edgeType":"calls","source":4804,"target":367},{"edgeType":"calls","source":4989,"target":974},{"edgeType":"imports","source":3969,"target":1736},{"edgeType":"contains","source":3614,"target":3624},{"edgeType":"contains","source":2932,"target":1512},{"edgeType":"calls","source":901,"target":861},{"edgeType":"calls","source":5296,"target":971},{"edgeType":"calls","source":271,"target":307},{"edgeType":"calls","source":5330,"target":974},{"edgeType":"calls","source":4375,"target":982},{"edgeType":"contains","source":3460,"target":2056},{"edgeType":"calls","source":5705,"target":976},{"edgeType":"calls","source":4034,"target":983},{"edgeType":"calls","source":3715,"target":302},{"edgeType":"calls","source":1708,"target":1212},{"edgeType":"calls","source":5577,"target":1805},{"edgeType":"calls","source":1478,"target":971},{"edgeType":"calls","source":5433,"target":984},{"edgeType":"contains","source":337,"target":4765},{"edgeType":"calls","source":2586,"target":449},{"edgeType":"calls","source":4716,"target":1013},{"edgeType":"contains","source":3886,"target":451},{"edgeType":"calls","source":1071,"target":904},{"edgeType":"calls","source":964,"target":1049},{"edgeType":"calls","source":997,"target":1084},{"edgeType":"calls","source":3831,"target":964},{"edgeType":"calls","source":5297,"target":972},{"edgeType":"contains","source":4274,"target":4279},{"edgeType":"calls","source":5282,"target":380},{"edgeType":"imports","source":3374,"target":81},{"edgeType":"calls","source":5348,"target":448},{"edgeType":"imports","source":3393,"target":1606},{"edgeType":"calls","source":4366,"target":1293},{"edgeType":"contains","source":1400,"target":1410},{"edgeType":"calls","source":4376,"target":983},{"edgeType":"calls","source":5719,"target":1631},{"edgeType":"calls","source":5740,"target":980},{"edgeType":"calls","source":3592,"target":974},{"edgeType":"calls","source":5645,"target":2868},{"edgeType":"calls","source":5706,"target":977},{"edgeType":"calls","source":2052,"target":89},{"edgeType":"calls","source":3936,"target":880},{"edgeType":"contains","source":337,"target":4764},{"edgeType":"calls","source":4099,"target":3228},{"edgeType":"calls","source":4192,"target":345},{"edgeType":"calls","source":5433,"target":983},{"edgeType":"calls","source":2916,"target":790},{"edgeType":"calls","source":2586,"target":450},{"edgeType":"contains","source":3886,"target":450},{"edgeType":"calls","source":2980,"target":920},{"edgeType":"contains","source":11,"target":71},{"edgeType":"calls","source":4916,"target":2211},{"edgeType":"calls","source":5215,"target":2456},{"edgeType":"calls","source":1602,"target":1354},{"edgeType":"calls","source":5348,"target":447},{"edgeType":"calls","source":4601,"target":349},{"edgeType":"calls","source":5297,"target":971},{"edgeType":"calls","source":4366,"target":1292},{"edgeType":"calls","source":4376,"target":982},{"edgeType":"calls","source":3592,"target":975},{"edgeType":"calls","source":5706,"target":976},{"edgeType":"calls","source":5719,"target":1630},{"edgeType":"calls","source":5740,"target":979},{"edgeType":"contains","source":5163,"target":5258},{"edgeType":"calls","source":3805,"target":1771},{"edgeType":"calls","source":4816,"target":2139},{"edgeType":"calls","source":3592,"target":972},{"edgeType":"calls","source":5706,"target":975},{"edgeType":"contains","source":337,"target":4767},{"edgeType":"calls","source":3424,"target":895},{"edgeType":"calls","source":1288,"target":521},{"edgeType":"calls","source":5355,"target":3400},{"edgeType":"calls","source":5433,"target":982},{"edgeType":"calls","source":4964,"target":4950},{"edgeType":"contains","source":3886,"target":449},{"edgeType":"calls","source":1030,"target":1120},{"edgeType":"contains","source":4274,"target":4277},{"edgeType":"contains","source":4208,"target":4209},{"edgeType":"calls","source":2571,"target":912},{"edgeType":"calls","source":2586,"target":447},{"edgeType":"calls","source":1478,"target":973},{"edgeType":"contains","source":2698,"target":3451},{"edgeType":"calls","source":4366,"target":1291},{"edgeType":"calls","source":4376,"target":981},{"edgeType":"calls","source":5719,"target":1629},{"edgeType":"calls","source":5740,"target":978},{"edgeType":"calls","source":4327,"target":386},{"edgeType":"calls","source":3936,"target":878},{"edgeType":"calls","source":4943,"target":315},{"edgeType":"contains","source":5265,"target":5266},{"edgeType":"contains","source":3215,"target":3281},{"edgeType":"calls","source":3592,"target":973},{"edgeType":"calls","source":5706,"target":974},{"edgeType":"calls","source":5740,"target":977},{"edgeType":"contains","source":337,"target":4766},{"edgeType":"calls","source":3424,"target":896},{"edgeType":"calls","source":3446,"target":1271},{"edgeType":"calls","source":2586,"target":448},{"edgeType":"calls","source":5433,"target":981},{"edgeType":"contains","source":3886,"target":448},{"edgeType":"calls","source":4945,"target":3424},{"edgeType":"calls","source":920,"target":300},{"edgeType":"calls","source":4964,"target":4949},{"edgeType":"calls","source":970,"target":865},{"edgeType":"calls","source":3818,"target":309},{"edgeType":"contains","source":4274,"target":4276},{"edgeType":"calls","source":2459,"target":1214},{"edgeType":"calls","source":4366,"target":1290},{"edgeType":"calls","source":4376,"target":980},{"edgeType":"calls","source":1478,"target":972},{"edgeType":"calls","source":2289,"target":142},{"edgeType":"calls","source":4125,"target":305},{"edgeType":"calls","source":1771,"target":345},{"edgeType":"imports","source":2115,"target":2111},{"edgeType":"calls","source":2914,"target":847},{"edgeType":"calls","source":5740,"target":976},{"edgeType":"calls","source":5706,"target":973},{"edgeType":"calls","source":5120,"target":1169},{"edgeType":"calls","source":5461,"target":1169},{"edgeType":"calls","source":4785,"target":984},{"edgeType":"calls","source":5433,"target":980},{"edgeType":"calls","source":2935,"target":1253},{"edgeType":"calls","source":5220,"target":1240},{"edgeType":"contains","source":1782,"target":3313},{"edgeType":"calls","source":3852,"target":1366},{"edgeType":"contains","source":28,"target":2721},{"edgeType":"calls","source":4366,"target":1289},{"edgeType":"contains","source":337,"target":4769},{"edgeType":"calls","source":4376,"target":979},{"edgeType":"calls","source":4327,"target":384},{"edgeType":"calls","source":5691,"target":380},{"edgeType":"contains","source":3886,"target":454},{"edgeType":"calls","source":4943,"target":313},{"edgeType":"imports","source":1561,"target":256},{"edgeType":"calls","source":3424,"target":894},{"edgeType":"contains","source":337,"target":4768},{"edgeType":"contains","source":2932,"target":3604},{"edgeType":"calls","source":3592,"target":971},{"edgeType":"imports","source":4037,"target":2789},{"edgeType":"calls","source":5706,"target":972},{"edgeType":"calls","source":5740,"target":975},{"edgeType":"calls","source":4785,"target":983},{"edgeType":"calls","source":5109,"target":1509},{"edgeType":"contains","source":1782,"target":3314},{"edgeType":"calls","source":2882,"target":2897},{"edgeType":"calls","source":5564,"target":89},{"edgeType":"calls","source":5433,"target":979},{"edgeType":"calls","source":5269,"target":777},{"edgeType":"calls","source":4601,"target":345},{"edgeType":"calls","source":5255,"target":2269},{"edgeType":"contains","source":4890,"target":5269},{"edgeType":"calls","source":3813,"target":462},{"edgeType":"contains","source":2915,"target":3073},{"edgeType":"calls","source":4376,"target":978},{"edgeType":"contains","source":4636,"target":4687},{"edgeType":"contains","source":2584,"target":2764},{"edgeType":"calls","source":4166,"target":89},{"edgeType":"calls","source":1363,"target":1363},{"edgeType":"calls","source":5706,"target":971},{"edgeType":"calls","source":1396,"target":1397},{"edgeType":"calls","source":5658,"target":345},{"edgeType":"calls","source":5740,"target":974},{"edgeType":"calls","source":5269,"target":776},{"edgeType":"calls","source":5433,"target":978},{"edgeType":"calls","source":920,"target":1354},{"edgeType":"contains","source":3886,"target":453},{"edgeType":"contains","source":3476,"target":4707},{"edgeType":"contains","source":4890,"target":5268},{"edgeType":"calls","source":3818,"target":304},{"edgeType":"calls","source":4785,"target":982},{"edgeType":"imports","source":435,"target":278},{"edgeType":"contains","source":337,"target":4771},{"edgeType":"calls","source":4498,"target":366},{"edgeType":"calls","source":4125,"target":300},{"edgeType":"calls","source":4376,"target":977},{"edgeType":"calls","source":4327,"target":382},{"edgeType":"calls","source":5617,"target":3729},{"edgeType":"calls","source":5740,"target":973},{"edgeType":"contains","source":344,"target":1382},{"edgeType":"calls","source":2914,"target":846},{"edgeType":"contains","source":5363,"target":4346},{"edgeType":"calls","source":5712,"target":2898},{"edgeType":"calls","source":4855,"target":925},{"edgeType":"contains","source":5263,"target":5332},{"edgeType":"calls","source":3039,"target":142},{"edgeType":"calls","source":5433,"target":977},{"edgeType":"contains","source":3886,"target":452},{"edgeType":"contains","source":3476,"target":3649},{"edgeType":"calls","source":1030,"target":1114},{"edgeType":"contains","source":4890,"target":5267},{"edgeType":"calls","source":3873,"target":1771},{"edgeType":"imports","source":2048,"target":1013},{"edgeType":"calls","source":2508,"target":1805},{"edgeType":"calls","source":4562,"target":1552},{"edgeType":"calls","source":4785,"target":981},{"edgeType":"contains","source":54,"target":2973},{"edgeType":"calls","source":4423,"target":1633},{"edgeType":"calls","source":1865,"target":1655},{"edgeType":"calls","source":4376,"target":976},{"edgeType":"calls","source":4433,"target":266},{"edgeType":"calls","source":5740,"target":972},{"edgeType":"calls","source":3614,"target":284},{"edgeType":"imports","source":3641,"target":3424},{"edgeType":"calls","source":4925,"target":1925},{"edgeType":"contains","source":1782,"target":3317},{"edgeType":"contains","source":3585,"target":277},{"edgeType":"calls","source":5589,"target":1425},{"edgeType":"contains","source":5263,"target":5339},{"edgeType":"calls","source":5433,"target":976},{"edgeType":"calls","source":4120,"target":453},{"edgeType":"calls","source":4785,"target":980},{"edgeType":"calls","source":4838,"target":394},{"edgeType":"contains","source":1896,"target":841},{"edgeType":"contains","source":1896,"target":1898},{"edgeType":"calls","source":2733,"target":1169},{"edgeType":"calls","source":2279,"target":445},{"edgeType":"calls","source":339,"target":333},{"edgeType":"calls","source":4376,"target":975},{"edgeType":"calls","source":4253,"target":3729},{"edgeType":"calls","source":4376,"target":973},{"edgeType":"calls","source":5740,"target":971},{"edgeType":"calls","source":3755,"target":142},{"edgeType":"calls","source":4943,"target":309},{"edgeType":"calls","source":3356,"target":2998},{"edgeType":"calls","source":3074,"target":1169},{"edgeType":"calls","source":3785,"target":269},{"edgeType":"calls","source":5591,"target":305},{"edgeType":"calls","source":1334,"target":141},{"edgeType":"imports","source":3403,"target":3404},{"edgeType":"calls","source":5433,"target":975},{"edgeType":"calls","source":3354,"target":946},{"edgeType":"calls","source":3987,"target":349},{"edgeType":"calls","source":5433,"target":974},{"edgeType":"calls","source":3264,"target":564},{"edgeType":"calls","source":4785,"target":979},{"edgeType":"calls","source":3859,"target":89},{"edgeType":"contains","source":3871,"target":4095},{"edgeType":"calls","source":4120,"target":454},{"edgeType":"imports","source":3208,"target":3120},{"edgeType":"calls","source":4191,"target":367},{"edgeType":"calls","source":4201,"target":3228},{"edgeType":"calls","source":4376,"target":974},{"edgeType":"calls","source":4376,"target":972},{"edgeType":"calls","source":2917,"target":1805},{"edgeType":"calls","source":4361,"target":380},{"edgeType":"imports","source":2115,"target":2120},{"edgeType":"calls","source":2930,"target":345},{"edgeType":"calls","source":2860,"target":2515},{"edgeType":"contains","source":3972,"target":962},{"edgeType":"calls","source":5607,"target":1922},{"edgeType":"contains","source":3283,"target":3294},{"edgeType":"contains","source":3294,"target":2953},{"edgeType":"calls","source":5719,"target":564},{"edgeType":"calls","source":3614,"target":282},{"edgeType":"calls","source":3383,"target":1101},{"edgeType":"contains","source":1605,"target":2460},{"edgeType":"calls","source":5433,"target":973},{"edgeType":"calls","source":3379,"target":1224},{"edgeType":"calls","source":4785,"target":978},{"edgeType":"calls","source":4838,"target":392},{"edgeType":"contains","source":4890,"target":5272},{"edgeType":"calls","source":4193,"target":302},{"edgeType":"contains","source":3944,"target":3945},{"edgeType":"calls","source":4120,"target":451},{"edgeType":"contains","source":4636,"target":4690},{"edgeType":"calls","source":4413,"target":2997},{"edgeType":"imports","source":3717,"target":1071},{"edgeType":"calls","source":3621,"target":2180},{"edgeType":"calls","source":3599,"target":1805},{"edgeType":"calls","source":4376,"target":971},{"edgeType":"calls","source":4328,"target":345},{"edgeType":"contains","source":1782,"target":3316},{"edgeType":"calls","source":5291,"target":89},{"edgeType":"calls","source":3612,"target":345},{"edgeType":"contains","source":3642,"target":3792},{"edgeType":"calls","source":5433,"target":972},{"edgeType":"calls","source":4785,"target":977},{"edgeType":"calls","source":1068,"target":989},{"edgeType":"calls","source":4130,"target":142},{"edgeType":"calls","source":4120,"target":452},{"edgeType":"calls","source":3987,"target":3518},{"edgeType":"calls","source":2002,"target":1632},{"edgeType":"contains","source":54,"target":2977},{"edgeType":"calls","source":4623,"target":1771},{"edgeType":"contains","source":2568,"target":4319},{"edgeType":"contains","source":2948,"target":3115},{"edgeType":"contains","source":3476,"target":4717},{"edgeType":"calls","source":3138,"target":1294},{"edgeType":"contains","source":3644,"target":3737},{"edgeType":"calls","source":5357,"target":156},{"edgeType":"contains","source":1400,"target":1422},{"edgeType":"calls","source":5537,"target":919},{"edgeType":"contains","source":4636,"target":4696},{"edgeType":"calls","source":4120,"target":449},{"edgeType":"calls","source":4785,"target":976},{"edgeType":"calls","source":5538,"target":887},{"edgeType":"contains","source":5263,"target":5343},{"edgeType":"calls","source":5537,"target":918},{"edgeType":"contains","source":5265,"target":5281},{"edgeType":"calls","source":1959,"target":846},{"edgeType":"calls","source":5433,"target":971},{"edgeType":"imports","source":331,"target":341},{"edgeType":"contains","source":2569,"target":5350},{"edgeType":"calls","source":750,"target":272},{"edgeType":"calls","source":1075,"target":767},{"edgeType":"calls","source":2812,"target":830},{"edgeType":"imports","source":1561,"target":266},{"edgeType":"calls","source":2439,"target":766},{"edgeType":"calls","source":4850,"target":1075},{"edgeType":"calls","source":2535,"target":961},{"edgeType":"contains","source":107,"target":280},{"edgeType":"calls","source":5031,"target":1805},{"edgeType":"calls","source":3813,"target":1511},{"edgeType":"calls","source":1923,"target":904},{"edgeType":"calls","source":1829,"target":1704},{"edgeType":"calls","source":4785,"target":975},{"edgeType":"calls","source":4838,"target":389},{"edgeType":"calls","source":5531,"target":2160},{"edgeType":"calls","source":5591,"target":300},{"edgeType":"calls","source":3379,"target":1223},{"edgeType":"calls","source":5538,"target":886},{"edgeType":"calls","source":5537,"target":917},{"edgeType":"calls","source":5558,"target":266},{"edgeType":"calls","source":4104,"target":946},{"edgeType":"calls","source":4120,"target":450},{"edgeType":"calls","source":4112,"target":2812},{"edgeType":"calls","source":2439,"target":767},{"edgeType":"calls","source":4584,"target":864},{"edgeType":"calls","source":1075,"target":766},{"edgeType":"contains","source":4425,"target":3837},{"edgeType":"contains","source":259,"target":852},{"edgeType":"calls","source":2317,"target":2431},{"edgeType":"calls","source":3138,"target":1292},{"edgeType":"calls","source":4236,"target":4251},{"edgeType":"calls","source":4362,"target":345},{"edgeType":"calls","source":3945,"target":1644},{"edgeType":"contains","source":3460,"target":4154},{"edgeType":"calls","source":3723,"target":3241},{"edgeType":"contains","source":1335,"target":264},{"edgeType":"calls","source":5537,"target":916},{"edgeType":"contains","source":1896,"target":1900},{"edgeType":"calls","source":4120,"target":447},{"edgeType":"contains","source":1782,"target":3320},{"edgeType":"calls","source":1334,"target":139},{"edgeType":"calls","source":4205,"target":983},{"edgeType":"imports","source":3208,"target":3115},{"edgeType":"calls","source":4540,"target":4341},{"edgeType":"calls","source":2577,"target":1771},{"edgeType":"calls","source":4943,"target":304},{"edgeType":"contains","source":79,"target":93},{"edgeType":"calls","source":4785,"target":974},{"edgeType":"calls","source":3138,"target":1293},{"edgeType":"calls","source":3723,"target":3242},{"edgeType":"contains","source":3215,"target":3293},{"edgeType":"calls","source":1959,"target":847},{"edgeType":"calls","source":4120,"target":448},{"edgeType":"calls","source":5537,"target":915},{"edgeType":"calls","source":4205,"target":984},{"edgeType":"contains","source":4636,"target":4693},{"edgeType":"calls","source":4540,"target":4340},{"edgeType":"calls","source":4785,"target":973},{"edgeType":"contains","source":118,"target":967},{"edgeType":"contains","source":108,"target":1277},{"edgeType":"calls","source":4537,"target":302},{"edgeType":"calls","source":5022,"target":2180},{"edgeType":"calls","source":5197,"target":983},{"edgeType":"calls","source":3907,"target":805},{"edgeType":"calls","source":3595,"target":964},{"edgeType":"contains","source":851,"target":1499},{"edgeType":"calls","source":4788,"target":978},{"edgeType":"calls","source":4822,"target":981},{"edgeType":"calls","source":5507,"target":886},{"edgeType":"contains","source":344,"target":1360},{"edgeType":"contains","source":3282,"target":3302},{"edgeType":"calls","source":5436,"target":973},{"edgeType":"contains","source":5727,"target":5730},{"edgeType":"calls","source":5029,"target":906},{"edgeType":"contains","source":11,"target":2170},{"edgeType":"calls","source":3732,"target":946},{"edgeType":"calls","source":5197,"target":982},{"edgeType":"calls","source":5186,"target":266},{"edgeType":"calls","source":4285,"target":1771},{"edgeType":"imports","source":2374,"target":476},{"edgeType":"contains","source":4890,"target":5249},{"edgeType":"calls","source":4822,"target":980},{"edgeType":"calls","source":3319,"target":2121},{"edgeType":"calls","source":5436,"target":972},{"edgeType":"contains","source":344,"target":1359},{"edgeType":"calls","source":4571,"target":305},{"edgeType":"contains","source":12,"target":24},{"edgeType":"calls","source":4788,"target":977},{"edgeType":"contains","source":5727,"target":5731},{"edgeType":"calls","source":5197,"target":981},{"edgeType":"calls","source":4504,"target":266},{"edgeType":"calls","source":5729,"target":345},{"edgeType":"calls","source":3907,"target":803},{"edgeType":"calls","source":3431,"target":1817},{"edgeType":"calls","source":5566,"target":1169},{"edgeType":"contains","source":341,"target":398},{"edgeType":"calls","source":5436,"target":971},{"edgeType":"contains","source":2585,"target":2709},{"edgeType":"calls","source":5375,"target":1805},{"edgeType":"contains","source":5595,"target":5596},{"edgeType":"calls","source":4788,"target":976},{"edgeType":"contains","source":5727,"target":5732},{"edgeType":"calls","source":4822,"target":979},{"edgeType":"contains","source":11,"target":2171},{"edgeType":"contains","source":73,"target":2363},{"edgeType":"contains","source":108,"target":1278},{"edgeType":"calls","source":5197,"target":980},{"edgeType":"contains","source":4356,"target":4888},{"edgeType":"calls","source":3907,"target":804},{"edgeType":"contains","source":5263,"target":5311},{"edgeType":"contains","source":344,"target":1361},{"edgeType":"contains","source":1605,"target":2437},{"edgeType":"calls","source":1093,"target":305},{"edgeType":"calls","source":4788,"target":975},{"edgeType":"contains","source":5727,"target":5733},{"edgeType":"contains","source":42,"target":153},{"edgeType":"calls","source":4822,"target":978},{"edgeType":"calls","source":2770,"target":1169},{"edgeType":"calls","source":5197,"target":979},{"edgeType":"calls","source":5288,"target":272},{"edgeType":"contains","source":4636,"target":4672},{"edgeType":"calls","source":3678,"target":501},{"edgeType":"calls","source":4365,"target":345},{"edgeType":"calls","source":1944,"target":345},{"edgeType":"calls","source":3858,"target":2320},{"edgeType":"contains","source":3282,"target":3306},{"edgeType":"calls","source":4715,"target":2180},{"edgeType":"calls","source":4788,"target":974},{"edgeType":"calls","source":3248,"target":89},{"edgeType":"calls","source":4822,"target":977},{"edgeType":"calls","source":1093,"target":300},{"edgeType":"calls","source":3855,"target":300},{"edgeType":"calls","source":2319,"target":349},{"edgeType":"calls","source":4646,"target":89},{"edgeType":"calls","source":4571,"target":300},{"edgeType":"calls","source":3621,"target":2269},{"edgeType":"calls","source":3930,"target":89},{"edgeType":"calls","source":4220,"target":1669},{"edgeType":"imports","source":4037,"target":1782},{"edgeType":"contains","source":2305,"target":1883},{"edgeType":"calls","source":5765,"target":282},{"edgeType":"calls","source":866,"target":994},{"edgeType":"calls","source":5422,"target":345},{"edgeType":"calls","source":4688,"target":902},{"edgeType":"calls","source":5362,"target":2205},{"edgeType":"calls","source":3254,"target":961},{"edgeType":"calls","source":4788,"target":973},{"edgeType":"calls","source":4822,"target":976},{"edgeType":"contains","source":3476,"target":4692},{"edgeType":"calls","source":5197,"target":978},{"edgeType":"contains","source":3741,"target":3876},{"edgeType":"calls","source":2882,"target":1923},{"edgeType":"calls","source":348,"target":142},{"edgeType":"calls","source":1837,"target":1550},{"edgeType":"imports","source":96,"target":266},{"edgeType":"calls","source":4384,"target":811},{"edgeType":"calls","source":2186,"target":2355},{"edgeType":"contains","source":2829,"target":3606},{"edgeType":"contains","source":4636,"target":4670},{"edgeType":"calls","source":1922,"target":1029},{"edgeType":"calls","source":4264,"target":302},{"edgeType":"calls","source":4915,"target":206},{"edgeType":"contains","source":3282,"target":3304},{"edgeType":"calls","source":5700,"target":1239},{"edgeType":"calls","source":5621,"target":1574},{"edgeType":"calls","source":5703,"target":89},{"edgeType":"contains","source":1164,"target":2372},{"edgeType":"contains","source":3644,"target":3711},{"edgeType":"calls","source":4788,"target":972},{"edgeType":"contains","source":5727,"target":5728},{"edgeType":"contains","source":1540,"target":1284},{"edgeType":"calls","source":4822,"target":975},{"edgeType":"calls","source":5197,"target":977},{"edgeType":"calls","source":5198,"target":946},{"edgeType":"contains","source":3871,"target":4073},{"edgeType":"contains","source":3476,"target":4689},{"edgeType":"contains","source":4868,"target":4876},{"edgeType":"calls","source":4004,"target":964},{"edgeType":"calls","source":1977,"target":380},{"edgeType":"contains","source":2698,"target":3440},{"edgeType":"contains","source":344,"target":1365},{"edgeType":"imports","source":2981,"target":1736},{"edgeType":"calls","source":4707,"target":2425},{"edgeType":"calls","source":4788,"target":971},{"edgeType":"contains","source":5727,"target":5729},{"edgeType":"calls","source":4822,"target":974},{"edgeType":"calls","source":5266,"target":5179},{"edgeType":"calls","source":3096,"target":572},{"edgeType":"calls","source":5197,"target":976},{"edgeType":"contains","source":4636,"target":4676},{"edgeType":"calls","source":2290,"target":2300},{"edgeType":"calls","source":4085,"target":564},{"edgeType":"calls","source":5689,"target":521},{"edgeType":"contains","source":3476,"target":4697},{"edgeType":"calls","source":4822,"target":973},{"edgeType":"contains","source":3282,"target":3310},{"edgeType":"imports","source":2305,"target":510},{"edgeType":"calls","source":3376,"target":345},{"edgeType":"calls","source":5197,"target":975},{"edgeType":"calls","source":3330,"target":1771},{"edgeType":"calls","source":5188,"target":2311},{"edgeType":"contains","source":1,"target":373},{"edgeType":"calls","source":4822,"target":971},{"edgeType":"calls","source":4416,"target":1930},{"edgeType":"calls","source":4328,"target":2544},{"edgeType":"calls","source":5642,"target":920},{"edgeType":"imports","source":3642,"target":273},{"edgeType":"calls","source":4822,"target":972},{"edgeType":"contains","source":1164,"target":2373},{"edgeType":"calls","source":5197,"target":974},{"edgeType":"calls","source":5124,"target":2180},{"edgeType":"calls","source":5568,"target":2157},{"edgeType":"contains","source":1400,"target":1403},{"edgeType":"calls","source":4671,"target":366},{"edgeType":"calls","source":4756,"target":902},{"edgeType":"contains","source":4683,"target":2160},{"edgeType":"contains","source":3871,"target":1963},{"edgeType":"calls","source":5197,"target":973},{"edgeType":"calls","source":5099,"target":4011},{"edgeType":"contains","source":3282,"target":3308},{"edgeType":"calls","source":5657,"target":454},{"edgeType":"calls","source":5261,"target":2160},{"edgeType":"calls","source":5418,"target":1521},{"edgeType":"imports","source":3969,"target":3879},{"edgeType":"calls","source":3998,"target":89},{"edgeType":"calls","source":2703,"target":2180},{"edgeType":"calls","source":2018,"target":1219},{"edgeType":"calls","source":2694,"target":345},{"edgeType":"calls","source":2047,"target":1377},{"edgeType":"contains","source":3204,"target":3613},{"edgeType":"imports","source":74,"target":962},{"edgeType":"contains","source":3127,"target":4943},{"edgeType":"contains","source":5363,"target":5390},{"edgeType":"calls","source":5657,"target":453},{"edgeType":"calls","source":5197,"target":972},{"edgeType":"calls","source":5500,"target":1092},{"edgeType":"calls","source":3358,"target":1959},{"edgeType":"calls","source":5490,"target":345},{"edgeType":"contains","source":5260,"target":5420},{"edgeType":"calls","source":3260,"target":766},{"edgeType":"calls","source":1959,"target":1986},{"edgeType":"calls","source":4121,"target":501},{"edgeType":"contains","source":2737,"target":126},{"edgeType":"contains","source":3886,"target":447},{"edgeType":"contains","source":344,"target":1373},{"edgeType":"calls","source":2421,"target":349},{"edgeType":"contains","source":11,"target":68},{"edgeType":"calls","source":2290,"target":2296},{"edgeType":"contains","source":2048,"target":344},{"edgeType":"contains","source":4237,"target":4364},{"edgeType":"calls","source":2968,"target":305},{"edgeType":"contains","source":4274,"target":4275},{"edgeType":"imports","source":2769,"target":920},{"edgeType":"calls","source":4373,"target":89},{"edgeType":"contains","source":1515,"target":2069},{"edgeType":"calls","source":3737,"target":777},{"edgeType":"calls","source":5771,"target":89},{"edgeType":"contains","source":1605,"target":2450},{"edgeType":"calls","source":3023,"target":1771},{"edgeType":"calls","source":4921,"target":1071},{"edgeType":"contains","source":5163,"target":5255},{"edgeType":"calls","source":5657,"target":452},{"edgeType":"calls","source":5197,"target":971},{"edgeType":"contains","source":5727,"target":5734},{"edgeType":"calls","source":5327,"target":1169},{"edgeType":"calls","source":1537,"target":269},{"edgeType":"calls","source":5467,"target":1056},{"edgeType":"calls","source":3260,"target":767},{"edgeType":"calls","source":1171,"target":1044},{"edgeType":"calls","source":4020,"target":1519},{"edgeType":"contains","source":11,"target":67},{"edgeType":"calls","source":886,"target":366},{"edgeType":"calls","source":4366,"target":305},{"edgeType":"contains","source":5727,"target":5735},{"edgeType":"calls","source":2867,"target":266},{"edgeType":"calls","source":4986,"target":1169},{"edgeType":"calls","source":5041,"target":521},{"edgeType":"calls","source":5657,"target":451},{"edgeType":"calls","source":1531,"target":454},{"edgeType":"calls","source":5647,"target":2875},{"edgeType":"contains","source":5163,"target":5254},{"edgeType":"contains","source":2585,"target":3779},{"edgeType":"contains","source":337,"target":4763},{"edgeType":"contains","source":1781,"target":3334},{"edgeType":"contains","source":2833,"target":1376},{"edgeType":"contains","source":11,"target":70},{"edgeType":"contains","source":344,"target":1375},{"edgeType":"contains","source":57,"target":758},{"edgeType":"imports","source":3642,"target":278},{"edgeType":"calls","source":4372,"target":2232},{"edgeType":"calls","source":2281,"target":1516},{"edgeType":"calls","source":3009,"target":89},{"edgeType":"calls","source":2224,"target":1169},{"edgeType":"calls","source":997,"target":1156},{"edgeType":"calls","source":5350,"target":454},{"edgeType":"calls","source":5372,"target":829},{"edgeType":"calls","source":5533,"target":2180},{"edgeType":"contains","source":3282,"target":3312},{"edgeType":"calls","source":5657,"target":450},{"edgeType":"calls","source":4842,"target":345},{"edgeType":"calls","source":5416,"target":1578},{"edgeType":"calls","source":3181,"target":2157},{"edgeType":"imports","source":1588,"target":1589},{"edgeType":"contains","source":57,"target":757},{"edgeType":"calls","source":2504,"target":946},{"edgeType":"calls","source":3737,"target":776},{"edgeType":"calls","source":790,"target":1230},{"edgeType":"calls","source":5191,"target":2211},{"edgeType":"calls","source":4983,"target":2317},{"edgeType":"calls","source":5350,"target":453},{"edgeType":"calls","source":5657,"target":449},{"edgeType":"calls","source":5517,"target":593},{"edgeType":"calls","source":5525,"target":345},{"edgeType":"contains","source":1201,"target":1203},{"edgeType":"calls","source":3389,"target":3138},{"edgeType":"calls","source":4235,"target":1224},{"edgeType":"imports","source":2948,"target":1693},{"edgeType":"calls","source":4520,"target":846},{"edgeType":"calls","source":2572,"target":982},{"edgeType":"contains","source":3884,"target":2594},{"edgeType":"contains","source":4237,"target":4336},{"edgeType":"calls","source":2334,"target":961},{"edgeType":"contains","source":851,"target":1482},{"edgeType":"calls","source":4305,"target":1169},{"edgeType":"calls","source":5266,"target":975},{"edgeType":"calls","source":5692,"target":453},{"edgeType":"calls","source":1828,"target":790},{"edgeType":"calls","source":3907,"target":821},{"edgeType":"calls","source":5279,"target":1629},{"edgeType":"calls","source":5624,"target":447},{"edgeType":"calls","source":1865,"target":1757},{"edgeType":"calls","source":1787,"target":1004},{"edgeType":"calls","source":1777,"target":1314},{"edgeType":"calls","source":5471,"target":961},{"edgeType":"calls","source":3351,"target":89},{"edgeType":"calls","source":1436,"target":257},{"edgeType":"calls","source":3225,"target":2938},{"edgeType":"contains","source":341,"target":1436},{"edgeType":"calls","source":2572,"target":983},{"edgeType":"calls","source":4686,"target":984},{"edgeType":"contains","source":118,"target":949},{"edgeType":"calls","source":853,"target":360},{"edgeType":"contains","source":851,"target":1481},{"edgeType":"calls","source":2907,"target":1169},{"edgeType":"calls","source":5242,"target":1718},{"edgeType":"calls","source":5266,"target":974},{"edgeType":"calls","source":5708,"target":1013},{"edgeType":"calls","source":5711,"target":920},{"edgeType":"imports","source":2374,"target":459},{"edgeType":"calls","source":5692,"target":452},{"edgeType":"calls","source":5362,"target":1169},{"edgeType":"calls","source":1865,"target":1756},{"edgeType":"calls","source":3683,"target":367},{"edgeType":"calls","source":4161,"target":345},{"edgeType":"calls","source":1913,"target":272},{"edgeType":"contains","source":3282,"target":3284},{"edgeType":"calls","source":5445,"target":2823},{"edgeType":"calls","source":1300,"target":1305},{"edgeType":"calls","source":4686,"target":983},{"edgeType":"calls","source":2572,"target":980},{"edgeType":"calls","source":4855,"target":1029},{"edgeType":"calls","source":4419,"target":3975},{"edgeType":"calls","source":5266,"target":973},{"edgeType":"calls","source":3189,"target":880},{"edgeType":"calls","source":2422,"target":345},{"edgeType":"calls","source":2319,"target":367},{"edgeType":"calls","source":5296,"target":2157},{"edgeType":"calls","source":5291,"target":3369},{"edgeType":"calls","source":5692,"target":451},{"edgeType":"imports","source":3642,"target":266},{"edgeType":"calls","source":3907,"target":819},{"edgeType":"calls","source":4856,"target":997},{"edgeType":"calls","source":5559,"target":345},{"edgeType":"contains","source":3127,"target":4919},{"edgeType":"calls","source":5568,"target":2180},{"edgeType":"calls","source":1946,"target":305},{"edgeType":"calls","source":1352,"target":749},{"edgeType":"calls","source":2047,"target":345},{"edgeType":"calls","source":2034,"target":1805},{"edgeType":"calls","source":4235,"target":1223},{"edgeType":"contains","source":2001,"target":2828},{"edgeType":"calls","source":4686,"target":982},{"edgeType":"calls","source":5029,"target":919},{"edgeType":"calls","source":2572,"target":981},{"edgeType":"calls","source":802,"target":886},{"edgeType":"calls","source":2954,"target":2881},{"edgeType":"imports","source":3374,"target":111},{"edgeType":"contains","source":4356,"target":4872},{"edgeType":"calls","source":1013,"target":688},{"edgeType":"calls","source":5266,"target":972},{"edgeType":"calls","source":4026,"target":302},{"edgeType":"calls","source":5692,"target":450},{"edgeType":"calls","source":1865,"target":1758},{"edgeType":"calls","source":3723,"target":3353},{"edgeType":"calls","source":4831,"target":1771},{"edgeType":"calls","source":5505,"target":961},{"edgeType":"calls","source":5692,"target":449},{"edgeType":"calls","source":1440,"target":130},{"edgeType":"contains","source":3282,"target":3290},{"edgeType":"calls","source":853,"target":357},{"edgeType":"calls","source":2572,"target":978},{"edgeType":"contains","source":5363,"target":5373},{"edgeType":"calls","source":4686,"target":981},{"edgeType":"calls","source":1056,"target":407},{"edgeType":"calls","source":5029,"target":918},{"edgeType":"calls","source":3084,"target":961},{"edgeType":"calls","source":3710,"target":3753},{"edgeType":"calls","source":5266,"target":971},{"edgeType":"calls","source":3189,"target":878},{"edgeType":"calls","source":4367,"target":300},{"edgeType":"contains","source":4356,"target":4879},{"edgeType":"calls","source":5740,"target":1075},{"edgeType":"contains","source":851,"target":1486},{"edgeType":"calls","source":4021,"target":1511},{"edgeType":"calls","source":3479,"target":345},{"edgeType":"calls","source":2069,"target":1771},{"edgeType":"calls","source":4849,"target":2269},{"edgeType":"imports","source":3057,"target":423},{"edgeType":"calls","source":3528,"target":940},{"edgeType":"calls","source":5692,"target":448},{"edgeType":"calls","source":2572,"target":979},{"edgeType":"calls","source":4686,"target":980},{"edgeType":"calls","source":853,"target":356},{"edgeType":"calls","source":1068,"target":1091},{"edgeType":"calls","source":1056,"target":406},{"edgeType":"calls","source":5029,"target":917},{"edgeType":"calls","source":1600,"target":454},{"edgeType":"calls","source":4369,"target":1294},{"edgeType":"calls","source":2114,"target":1436},{"edgeType":"contains","source":851,"target":1485},{"edgeType":"calls","source":4222,"target":564},{"edgeType":"imports","source":3057,"target":422},{"edgeType":"imports","source":4037,"target":2823},{"edgeType":"calls","source":5692,"target":447},{"edgeType":"calls","source":5436,"target":984},{"edgeType":"calls","source":4717,"target":3189},{"edgeType":"calls","source":5419,"target":454},{"edgeType":"calls","source":5029,"target":916},{"edgeType":"contains","source":1733,"target":1626},{"edgeType":"calls","source":853,"target":359},{"edgeType":"calls","source":866,"target":1013},{"edgeType":"calls","source":5108,"target":581},{"edgeType":"calls","source":5286,"target":349},{"edgeType":"calls","source":3856,"target":282},{"edgeType":"calls","source":5239,"target":749},{"edgeType":"calls","source":1563,"target":1604},{"edgeType":"calls","source":4686,"target":979},{"edgeType":"calls","source":2572,"target":976},{"edgeType":"contains","source":851,"target":1488},{"edgeType":"calls","source":4369,"target":1293},{"edgeType":"calls","source":4219,"target":3829},{"edgeType":"contains","source":2786,"target":2808},{"edgeType":"calls","source":3492,"target":997},{"edgeType":"calls","source":2063,"target":902},{"edgeType":"calls","source":4149,"target":1771},{"edgeType":"calls","source":3428,"target":867},{"edgeType":"contains","source":5165,"target":5166},{"edgeType":"calls","source":5605,"target":1029},{"edgeType":"calls","source":5620,"target":564},{"edgeType":"contains","source":3282,"target":3289},{"edgeType":"calls","source":853,"target":358},{"edgeType":"calls","source":5436,"target":983},{"edgeType":"calls","source":5430,"target":1169},{"edgeType":"calls","source":5419,"target":453},{"edgeType":"calls","source":5029,"target":915},{"edgeType":"contains","source":4890,"target":5234},{"edgeType":"calls","source":2410,"target":1771},{"edgeType":"calls","source":5232,"target":4136},{"edgeType":"calls","source":5233,"target":5162},{"edgeType":"calls","source":4686,"target":978},{"edgeType":"calls","source":2572,"target":977},{"edgeType":"imports","source":2517,"target":1305},{"edgeType":"contains","source":851,"target":1487},{"edgeType":"calls","source":5744,"target":5176},{"edgeType":"calls","source":4369,"target":1292},{"edgeType":"calls","source":4376,"target":1075},{"edgeType":"contains","source":435,"target":1699},{"edgeType":"calls","source":1946,"target":300},{"edgeType":"calls","source":5029,"target":914},{"edgeType":"contains","source":2948,"target":3078},{"edgeType":"calls","source":3714,"target":1511},{"edgeType":"calls","source":5192,"target":89},{"edgeType":"calls","source":3413,"target":272},{"edgeType":"calls","source":1600,"target":451},{"edgeType":"calls","source":5436,"target":982},{"edgeType":"calls","source":5451,"target":1574},{"edgeType":"calls","source":5419,"target":452},{"edgeType":"calls","source":2444,"target":1771},{"edgeType":"calls","source":4498,"target":1520},{"edgeType":"calls","source":2574,"target":912},{"edgeType":"calls","source":2572,"target":974},{"edgeType":"contains","source":11,"target":48},{"edgeType":"contains","source":4890,"target":5241},{"edgeType":"calls","source":4686,"target":977},{"edgeType":"calls","source":1808,"target":345},{"edgeType":"calls","source":4369,"target":1291},{"edgeType":"calls","source":4435,"target":302},{"edgeType":"contains","source":5710,"target":4135},{"edgeType":"calls","source":3680,"target":1509},{"edgeType":"calls","source":1600,"target":450},{"edgeType":"calls","source":5436,"target":981},{"edgeType":"calls","source":5453,"target":454},{"edgeType":"contains","source":3282,"target":3295},{"edgeType":"calls","source":5419,"target":451},{"edgeType":"calls","source":3181,"target":2180},{"edgeType":"calls","source":1068,"target":1086},{"edgeType":"calls","source":2572,"target":975},{"edgeType":"calls","source":3711,"target":3719},{"edgeType":"calls","source":4686,"target":976},{"edgeType":"contains","source":73,"target":2353},{"edgeType":"calls","source":2015,"target":269},{"edgeType":"calls","source":3934,"target":3148},{"edgeType":"calls","source":4369,"target":1290},{"edgeType":"contains","source":4356,"target":4882},{"edgeType":"calls","source":4229,"target":345},{"edgeType":"calls","source":1405,"target":1213},{"edgeType":"calls","source":5744,"target":5173},{"edgeType":"calls","source":1600,"target":453},{"edgeType":"calls","source":3039,"target":1293},{"edgeType":"calls","source":853,"target":355},{"edgeType":"contains","source":5263,"target":5304},{"edgeType":"contains","source":5260,"target":5397},{"edgeType":"calls","source":5258,"target":2269},{"edgeType":"calls","source":5436,"target":980},{"edgeType":"calls","source":5453,"target":453},{"edgeType":"calls","source":5419,"target":450},{"edgeType":"calls","source":4686,"target":975},{"edgeType":"calls","source":4638,"target":349},{"edgeType":"calls","source":2572,"target":972},{"edgeType":"contains","source":11,"target":50},{"edgeType":"calls","source":3968,"target":3148},{"edgeType":"calls","source":4788,"target":984},{"edgeType":"imports","source":960,"target":961},{"edgeType":"contains","source":2293,"target":126},{"edgeType":"contains","source":11,"target":3221},{"edgeType":"calls","source":4369,"target":1289},{"edgeType":"calls","source":4350,"target":821},{"edgeType":"calls","source":4336,"target":1253},{"edgeType":"calls","source":3556,"target":2180},{"edgeType":"calls","source":4350,"target":819},{"edgeType":"contains","source":253,"target":2060},{"edgeType":"calls","source":1405,"target":1212},{"edgeType":"calls","source":5567,"target":89},{"edgeType":"calls","source":3412,"target":302},{"edgeType":"calls","source":1600,"target":452},{"edgeType":"calls","source":969,"target":986},{"edgeType":"calls","source":3039,"target":1294},{"edgeType":"calls","source":3206,"target":345},{"edgeType":"calls","source":5436,"target":979},{"edgeType":"calls","source":5453,"target":452},{"edgeType":"calls","source":5419,"target":449},{"edgeType":"calls","source":5419,"target":448},{"edgeType":"calls","source":4686,"target":974},{"edgeType":"calls","source":3193,"target":1805},{"edgeType":"calls","source":2572,"target":973},{"edgeType":"contains","source":2734,"target":4425},{"edgeType":"contains","source":1238,"target":2178},{"edgeType":"contains","source":11,"target":49},{"edgeType":"calls","source":4788,"target":983},{"edgeType":"calls","source":3744,"target":3751},{"edgeType":"contains","source":4356,"target":4880},{"edgeType":"calls","source":3039,"target":1291},{"edgeType":"contains","source":5260,"target":5403},{"edgeType":"calls","source":1600,"target":447},{"edgeType":"calls","source":1501,"target":345},{"edgeType":"calls","source":5436,"target":978},{"edgeType":"calls","source":5453,"target":451},{"edgeType":"contains","source":3282,"target":3298},{"edgeType":"calls","source":5436,"target":977},{"edgeType":"calls","source":5453,"target":450},{"edgeType":"calls","source":5419,"target":447},{"edgeType":"calls","source":4686,"target":973},{"edgeType":"calls","source":4788,"target":982},{"edgeType":"calls","source":4785,"target":1075},{"edgeType":"contains","source":344,"target":1356},{"edgeType":"contains","source":11,"target":2166},{"edgeType":"calls","source":5715,"target":2898},{"edgeType":"calls","source":3039,"target":1292},{"edgeType":"calls","source":5030,"target":1935},{"edgeType":"contains","source":1164,"target":2361},{"edgeType":"calls","source":2572,"target":971},{"edgeType":"calls","source":5436,"target":976},{"edgeType":"calls","source":5453,"target":449},{"edgeType":"calls","source":4686,"target":972},{"edgeType":"calls","source":4788,"target":981},{"edgeType":"calls","source":4822,"target":984},{"edgeType":"calls","source":4100,"target":1169},{"edgeType":"calls","source":3968,"target":1033},{"edgeType":"imports","source":3437,"target":278},{"edgeType":"contains","source":75,"target":1238},{"edgeType":"calls","source":4617,"target":997},{"edgeType":"calls","source":2421,"target":367},{"edgeType":"contains","source":2886,"target":2888},{"edgeType":"calls","source":3039,"target":1289},{"edgeType":"calls","source":5122,"target":2253},{"edgeType":"contains","source":4868,"target":4869},{"edgeType":"calls","source":3855,"target":305},{"edgeType":"calls","source":5519,"target":1574},{"edgeType":"calls","source":3426,"target":920},{"edgeType":"calls","source":1600,"target":449},{"edgeType":"contains","source":3282,"target":3296},{"edgeType":"calls","source":4770,"target":481},{"edgeType":"calls","source":4788,"target":980},{"edgeType":"calls","source":5436,"target":975},{"edgeType":"calls","source":5453,"target":448},{"edgeType":"calls","source":4822,"target":983},{"edgeType":"calls","source":4816,"target":1169},{"edgeType":"contains","source":3811,"target":4868},{"edgeType":"contains","source":11,"target":2168},{"edgeType":"calls","source":4686,"target":971},{"edgeType":"calls","source":4304,"target":4355},{"edgeType":"calls","source":4966,"target":4974},{"edgeType":"calls","source":3039,"target":1290},{"edgeType":"calls","source":5197,"target":984},{"edgeType":"contains","source":4890,"target":5243},{"edgeType":"calls","source":1600,"target":448},{"edgeType":"calls","source":5507,"target":887},{"edgeType":"calls","source":4788,"target":979},{"edgeType":"calls","source":4815,"target":142},{"edgeType":"calls","source":4822,"target":982},{"edgeType":"calls","source":5436,"target":974},{"edgeType":"calls","source":5453,"target":447},{"edgeType":"calls","source":3913,"target":2736},{"edgeType":"contains","source":344,"target":1357},{"edgeType":"calls","source":2764,"target":302},{"edgeType":"contains","source":11,"target":2167},{"edgeType":"calls","source":4493,"target":4839},{"edgeType":"contains","source":2829,"target":4628},{"edgeType":"calls","source":4536,"target":300},{"edgeType":"calls","source":4328,"target":406},{"edgeType":"calls","source":5327,"target":2205},{"edgeType":"contains","source":4702,"target":4703},{"edgeType":"calls","source":5540,"target":887},{"edgeType":"contains","source":5260,"target":5374},{"edgeType":"calls","source":4838,"target":452},{"edgeType":"calls","source":4125,"target":356},{"edgeType":"calls","source":5486,"target":447},{"edgeType":"calls","source":1377,"target":980},{"edgeType":"calls","source":395,"target":769},{"edgeType":"calls","source":2953,"target":749},{"edgeType":"imports","source":3926,"target":1023},{"edgeType":"contains","source":4237,"target":4318},{"edgeType":"calls","source":2428,"target":1169},{"edgeType":"calls","source":5131,"target":5109},{"edgeType":"calls","source":5279,"target":521},{"edgeType":"calls","source":5292,"target":2232},{"edgeType":"calls","source":395,"target":767},{"edgeType":"calls","source":5620,"target":1578},{"edgeType":"calls","source":3854,"target":302},{"edgeType":"contains","source":2829,"target":4629},{"edgeType":"calls","source":3723,"target":2249},{"edgeType":"calls","source":3721,"target":2311},{"edgeType":"calls","source":4125,"target":357},{"edgeType":"calls","source":5540,"target":886},{"edgeType":"imports","source":2048,"target":2159},{"edgeType":"calls","source":5620,"target":1577},{"edgeType":"calls","source":1377,"target":979},{"edgeType":"calls","source":4986,"target":2205},{"edgeType":"contains","source":3871,"target":1923},{"edgeType":"contains","source":1859,"target":1931},{"edgeType":"contains","source":3970,"target":4139},{"edgeType":"calls","source":4872,"target":454},{"edgeType":"calls","source":4838,"target":451},{"edgeType":"calls","source":5189,"target":2253},{"edgeType":"calls","source":5252,"target":300},{"edgeType":"calls","source":3189,"target":830},{"edgeType":"calls","source":2190,"target":2202},{"edgeType":"calls","source":1377,"target":983},{"edgeType":"calls","source":4872,"target":453},{"edgeType":"calls","source":4857,"target":918},{"edgeType":"calls","source":5620,"target":1576},{"edgeType":"calls","source":1377,"target":982},{"edgeType":"calls","source":1253,"target":598},{"edgeType":"contains","source":4581,"target":4223},{"edgeType":"calls","source":405,"target":461},{"edgeType":"contains","source":72,"target":3419},{"edgeType":"contains","source":3970,"target":4138},{"edgeType":"calls","source":4838,"target":450},{"edgeType":"calls","source":2933,"target":310},{"edgeType":"calls","source":4571,"target":269},{"edgeType":"contains","source":2829,"target":4627},{"edgeType":"calls","source":5264,"target":984},{"edgeType":"calls","source":5291,"target":2261},{"edgeType":"calls","source":4645,"target":89},{"edgeType":"imports","source":1781,"target":920},{"edgeType":"contains","source":5260,"target":5371},{"edgeType":"contains","source":1859,"target":1929},{"edgeType":"contains","source":3970,"target":4137},{"edgeType":"calls","source":4872,"target":452},{"edgeType":"calls","source":4857,"target":917},{"edgeType":"calls","source":4125,"target":355},{"edgeType":"calls","source":1377,"target":981},{"edgeType":"calls","source":4253,"target":615},{"edgeType":"contains","source":2569,"target":5287},{"edgeType":"contains","source":4038,"target":4143},{"edgeType":"calls","source":4838,"target":449},{"edgeType":"calls","source":5264,"target":983},{"edgeType":"calls","source":5258,"target":1169},{"edgeType":"calls","source":1673,"target":257},{"edgeType":"calls","source":5372,"target":806},{"edgeType":"calls","source":1858,"target":864},{"edgeType":"contains","source":2829,"target":4632},{"edgeType":"calls","source":4014,"target":2736},{"edgeType":"contains","source":4636,"target":4639},{"edgeType":"contains","source":2698,"target":3408},{"edgeType":"calls","source":3518,"target":1199},{"edgeType":"calls","source":4231,"target":1294},{"edgeType":"calls","source":4248,"target":767},{"edgeType":"calls","source":4872,"target":451},{"edgeType":"calls","source":4857,"target":916},{"edgeType":"calls","source":1377,"target":976},{"edgeType":"calls","source":1478,"target":1016},{"edgeType":"calls","source":5699,"target":1239},{"edgeType":"calls","source":5705,"target":2110},{"edgeType":"calls","source":920,"target":345},{"edgeType":"calls","source":4838,"target":448},{"edgeType":"calls","source":2898,"target":1393},{"edgeType":"contains","source":1859,"target":1934},{"edgeType":"calls","source":5078,"target":407},{"edgeType":"calls","source":5264,"target":982},{"edgeType":"contains","source":1970,"target":2722},{"edgeType":"contains","source":2585,"target":2684},{"edgeType":"imports","source":317,"target":851},{"edgeType":"contains","source":2829,"target":4633},{"edgeType":"calls","source":4398,"target":345},{"edgeType":"contains","source":2522,"target":2523},{"edgeType":"contains","source":2569,"target":5294},{"edgeType":"calls","source":1377,"target":975},{"edgeType":"calls","source":4872,"target":450},{"edgeType":"calls","source":4857,"target":915},{"edgeType":"calls","source":5620,"target":1573},{"edgeType":"calls","source":4838,"target":447},{"edgeType":"calls","source":1314,"target":814},{"edgeType":"calls","source":5078,"target":406},{"edgeType":"calls","source":1201,"target":89},{"edgeType":"calls","source":4493,"target":1627},{"edgeType":"calls","source":395,"target":766},{"edgeType":"contains","source":4636,"target":4637},{"edgeType":"calls","source":1943,"target":345},{"edgeType":"calls","source":4231,"target":1292},{"edgeType":"calls","source":1377,"target":978},{"edgeType":"calls","source":5020,"target":89},{"edgeType":"calls","source":2940,"target":89},{"edgeType":"calls","source":4872,"target":449},{"edgeType":"calls","source":4857,"target":914},{"edgeType":"calls","source":5620,"target":1572},{"edgeType":"calls","source":3696,"target":964},{"edgeType":"contains","source":4038,"target":4148},{"edgeType":"calls","source":1063,"target":142},{"edgeType":"calls","source":5264,"target":981},{"edgeType":"calls","source":2496,"target":1169},{"edgeType":"contains","source":3650,"target":1376},{"edgeType":"contains","source":107,"target":1280},{"edgeType":"calls","source":1602,"target":345},{"edgeType":"contains","source":2585,"target":3739},{"edgeType":"calls","source":4372,"target":3263},{"edgeType":"imports","source":2491,"target":2161},{"edgeType":"calls","source":2014,"target":257},{"edgeType":"calls","source":4231,"target":1293},{"edgeType":"calls","source":1377,"target":977},{"edgeType":"calls","source":4248,"target":766},{"edgeType":"calls","source":5527,"target":3397},{"edgeType":"calls","source":2699,"target":1219},{"edgeType":"calls","source":4872,"target":448},{"edgeType":"calls","source":5620,"target":1571},{"edgeType":"calls","source":5641,"target":920},{"edgeType":"calls","source":5704,"target":2138},{"edgeType":"contains","source":4038,"target":4147},{"edgeType":"calls","source":2933,"target":307},{"edgeType":"contains","source":3970,"target":4141},{"edgeType":"calls","source":5264,"target":980},{"edgeType":"calls","source":419,"target":1073},{"edgeType":"calls","source":2536,"target":983},{"edgeType":"calls","source":2530,"target":1169},{"edgeType":"calls","source":3917,"target":1511},{"edgeType":"calls","source":1166,"target":1171},{"edgeType":"calls","source":4020,"target":1489},{"edgeType":"contains","source":11,"target":31},{"edgeType":"contains","source":118,"target":942},{"edgeType":"contains","source":2522,"target":2526},{"edgeType":"calls","source":4419,"target":1805},{"edgeType":"calls","source":2269,"target":804},{"edgeType":"calls","source":4231,"target":1290},{"edgeType":"calls","source":4432,"target":345},{"edgeType":"imports","source":1238,"target":851},{"edgeType":"calls","source":1529,"target":1545},{"edgeType":"contains","source":337,"target":1552},{"edgeType":"calls","source":5620,"target":1570},{"edgeType":"calls","source":4872,"target":447},{"edgeType":"contains","source":5263,"target":5289},{"edgeType":"imports","source":3403,"target":2429},{"edgeType":"calls","source":1399,"target":1347},{"edgeType":"calls","source":5116,"target":282},{"edgeType":"calls","source":5264,"target":979},{"edgeType":"calls","source":1377,"target":972},{"edgeType":"contains","source":11,"target":30},{"edgeType":"contains","source":2698,"target":3413},{"edgeType":"calls","source":2536,"target":984},{"edgeType":"contains","source":2522,"target":2527},{"edgeType":"contains","source":4603,"target":4608},{"edgeType":"calls","source":4086,"target":501},{"edgeType":"calls","source":4231,"target":1291},{"edgeType":"calls","source":2269,"target":805},{"edgeType":"calls","source":4297,"target":302},{"edgeType":"calls","source":2933,"target":305},{"edgeType":"contains","source":341,"target":1427},{"edgeType":"calls","source":905,"target":805},{"edgeType":"calls","source":5620,"target":1569},{"edgeType":"calls","source":5429,"target":2205},{"edgeType":"calls","source":5264,"target":978},{"edgeType":"calls","source":1377,"target":971},{"edgeType":"calls","source":5332,"target":984},{"edgeType":"calls","source":5295,"target":5302},{"edgeType":"calls","source":5359,"target":2261},{"edgeType":"contains","source":2786,"target":2796},{"edgeType":"calls","source":4794,"target":1805},{"edgeType":"contains","source":4038,"target":4152},{"edgeType":"contains","source":2959,"target":1661},{"edgeType":"calls","source":4816,"target":2180},{"edgeType":"contains","source":2829,"target":4634},{"edgeType":"contains","source":2522,"target":2524},{"edgeType":"calls","source":2536,"target":981},{"edgeType":"calls","source":4355,"target":3787},{"edgeType":"calls","source":4372,"target":89},{"edgeType":"imports","source":1331,"target":81},{"edgeType":"calls","source":1478,"target":1014},{"edgeType":"calls","source":5770,"target":89},{"edgeType":"imports","source":2115,"target":89},{"edgeType":"calls","source":2894,"target":1511},{"edgeType":"calls","source":3055,"target":1805},{"edgeType":"calls","source":5264,"target":977},{"edgeType":"calls","source":5620,"target":1568},{"edgeType":"calls","source":5672,"target":1013},{"edgeType":"calls","source":1377,"target":974},{"edgeType":"calls","source":5332,"target":983},{"edgeType":"contains","source":3385,"target":5367},{"edgeType":"calls","source":419,"target":1074},{"edgeType":"calls","source":2536,"target":982},{"edgeType":"contains","source":11,"target":32},{"edgeType":"contains","source":2829,"target":4635},{"edgeType":"calls","source":4007,"target":4005},{"edgeType":"calls","source":4118,"target":564},{"edgeType":"calls","source":4231,"target":1289},{"edgeType":"calls","source":2269,"target":803},{"edgeType":"contains","source":2569,"target":5296},{"edgeType":"contains","source":2522,"target":2525},{"edgeType":"calls","source":4492,"target":596},{"edgeType":"contains","source":5163,"target":5215},{"edgeType":"calls","source":4365,"target":305},{"edgeType":"calls","source":5264,"target":976},{"edgeType":"calls","source":1377,"target":973},{"edgeType":"calls","source":5332,"target":982},{"edgeType":"calls","source":5690,"target":454},{"edgeType":"calls","source":5466,"target":1056},{"edgeType":"calls","source":1226,"target":364},{"edgeType":"calls","source":1165,"target":1198},{"edgeType":"calls","source":2536,"target":979},{"edgeType":"contains","source":276,"target":277},{"edgeType":"calls","source":4371,"target":2232},{"edgeType":"calls","source":2933,"target":300},{"edgeType":"calls","source":5264,"target":975},{"edgeType":"calls","source":5332,"target":981},{"edgeType":"calls","source":5690,"target":453},{"edgeType":"calls","source":5523,"target":345},{"edgeType":"calls","source":3621,"target":1169},{"edgeType":"contains","source":2585,"target":2692},{"edgeType":"contains","source":5363,"target":5364},{"edgeType":"calls","source":1986,"target":1115},{"edgeType":"contains","source":3970,"target":4151},{"edgeType":"calls","source":1858,"target":1912},{"edgeType":"calls","source":4125,"target":345},{"edgeType":"contains","source":4636,"target":4646},{"edgeType":"calls","source":750,"target":320},{"edgeType":"calls","source":477,"target":327},{"edgeType":"calls","source":4857,"target":906},{"edgeType":"calls","source":2536,"target":980},{"edgeType":"contains","source":96,"target":3741},{"edgeType":"calls","source":4306,"target":1075},{"edgeType":"calls","source":2812,"target":1938},{"edgeType":"calls","source":5190,"target":2211},{"edgeType":"calls","source":5264,"target":974},{"edgeType":"calls","source":5332,"target":980},{"edgeType":"contains","source":5263,"target":5292},{"edgeType":"calls","source":5690,"target":452},{"edgeType":"contains","source":1164,"target":2348},{"edgeType":"contains","source":3970,"target":4150},{"edgeType":"calls","source":5463,"target":89},{"edgeType":"calls","source":4002,"target":984},{"edgeType":"contains","source":11,"target":37},{"edgeType":"contains","source":2522,"target":2528},{"edgeType":"calls","source":2536,"target":977},{"edgeType":"calls","source":4986,"target":2191},{"edgeType":"contains","source":851,"target":1480},{"edgeType":"calls","source":5119,"target":1240},{"edgeType":"calls","source":4355,"target":3783},{"edgeType":"calls","source":905,"target":804},{"edgeType":"calls","source":2420,"target":345},{"edgeType":"imports","source":1988,"target":851},{"edgeType":"calls","source":5264,"target":973},{"edgeType":"calls","source":5690,"target":451},{"edgeType":"calls","source":5359,"target":142},{"edgeType":"calls","source":5332,"target":979},{"edgeType":"calls","source":4002,"target":983},{"edgeType":"calls","source":3805,"target":1805},{"edgeType":"contains","source":1515,"target":2034},{"edgeType":"calls","source":3613,"target":3529},{"edgeType":"calls","source":1506,"target":142},{"edgeType":"calls","source":3965,"target":3189},{"edgeType":"contains","source":4873,"target":2582},{"edgeType":"calls","source":1965,"target":1768},{"edgeType":"calls","source":3273,"target":329},{"edgeType":"calls","source":4192,"target":380},{"edgeType":"contains","source":11,"target":36},{"edgeType":"contains","source":2522,"target":2529},{"edgeType":"calls","source":5059,"target":984},{"edgeType":"contains","source":118,"target":947},{"edgeType":"calls","source":4881,"target":2274},{"edgeType":"calls","source":2536,"target":978},{"edgeType":"calls","source":4756,"target":864},{"edgeType":"imports","source":2048,"target":2161},{"edgeType":"contains","source":851,"target":1479},{"edgeType":"calls","source":905,"target":803},{"edgeType":"calls","source":5264,"target":972},{"edgeType":"calls","source":5332,"target":978},{"edgeType":"calls","source":5690,"target":450},{"edgeType":"calls","source":5566,"target":2180},{"edgeType":"calls","source":1583,"target":925},{"edgeType":"calls","source":4039,"target":3039},{"edgeType":"contains","source":3215,"target":3216},{"edgeType":"calls","source":5473,"target":867},{"edgeType":"calls","source":2034,"target":1771},{"edgeType":"contains","source":1784,"target":1067},{"edgeType":"calls","source":5416,"target":1577},{"edgeType":"calls","source":2939,"target":142},{"edgeType":"contains","source":374,"target":381},{"edgeType":"calls","source":2968,"target":300},{"edgeType":"contains","source":11,"target":3177},{"edgeType":"imports","source":2734,"target":961},{"edgeType":"contains","source":54,"target":2901},{"edgeType":"calls","source":4344,"target":984},{"edgeType":"calls","source":5350,"target":452},{"edgeType":"calls","source":5329,"target":2160},{"edgeType":"calls","source":1531,"target":451},{"edgeType":"contains","source":5163,"target":5193},{"edgeType":"calls","source":5657,"target":448},{"edgeType":"calls","source":1777,"target":1281},{"edgeType":"calls","source":3806,"target":1805},{"edgeType":"calls","source":3390,"target":961},{"edgeType":"calls","source":5558,"target":345},{"edgeType":"contains","source":5263,"target":5264},{"edgeType":"calls","source":5418,"target":1514},{"edgeType":"calls","source":5416,"target":1576},{"edgeType":"contains","source":2120,"target":1222},{"edgeType":"calls","source":750,"target":349},{"edgeType":"calls","source":956,"target":305},{"edgeType":"contains","source":3970,"target":4122},{"edgeType":"contains","source":4037,"target":4159},{"edgeType":"calls","source":2968,"target":302},{"edgeType":"calls","source":2253,"target":269},{"edgeType":"contains","source":3641,"target":4808},{"edgeType":"calls","source":4344,"target":983},{"edgeType":"calls","source":5350,"target":451},{"edgeType":"calls","source":1531,"target":450},{"edgeType":"calls","source":1501,"target":1380},{"edgeType":"calls","source":3556,"target":2157},{"edgeType":"calls","source":1563,"target":515},{"edgeType":"calls","source":3463,"target":2926},{"edgeType":"calls","source":5657,"target":447},{"edgeType":"imports","source":3642,"target":2412},{"edgeType":"contains","source":438,"target":513},{"edgeType":"calls","source":4876,"target":345},{"edgeType":"calls","source":5395,"target":1169},{"edgeType":"contains","source":280,"target":1183},{"edgeType":"calls","source":5217,"target":345},{"edgeType":"contains","source":4997,"target":5052},{"edgeType":"contains","source":4237,"target":4301},{"edgeType":"calls","source":5350,"target":450},{"edgeType":"calls","source":4366,"target":300},{"edgeType":"calls","source":4344,"target":982},{"edgeType":"calls","source":1531,"target":453},{"edgeType":"imports","source":3403,"target":2423},{"edgeType":"contains","source":1164,"target":2318},{"edgeType":"calls","source":3971,"target":4089},{"edgeType":"calls","source":5445,"target":2789},{"edgeType":"calls","source":5498,"target":89},{"edgeType":"calls","source":5416,"target":1574},{"edgeType":"contains","source":2001,"target":2795},{"edgeType":"contains","source":107,"target":3374},{"edgeType":"contains","source":4997,"target":5051},{"edgeType":"calls","source":5350,"target":449},{"edgeType":"calls","source":4368,"target":1294},{"edgeType":"calls","source":4344,"target":981},{"edgeType":"calls","source":2211,"target":512},{"edgeType":"contains","source":4890,"target":5197},{"edgeType":"calls","source":1531,"target":452},{"edgeType":"calls","source":4073,"target":4095},{"edgeType":"contains","source":280,"target":1185},{"edgeType":"calls","source":3614,"target":354},{"edgeType":"calls","source":1531,"target":447},{"edgeType":"contains","source":341,"target":351},{"edgeType":"contains","source":5163,"target":5198},{"edgeType":"calls","source":5416,"target":1573},{"edgeType":"calls","source":5418,"target":454},{"edgeType":"contains","source":4000,"target":4254},{"edgeType":"calls","source":1771,"target":406},{"edgeType":"calls","source":5350,"target":448},{"edgeType":"contains","source":4038,"target":4134},{"edgeType":"calls","source":4368,"target":1293},{"edgeType":"calls","source":4344,"target":980},{"edgeType":"contains","source":5114,"target":1431},{"edgeType":"calls","source":2054,"target":89},{"edgeType":"imports","source":2048,"target":1082},{"edgeType":"calls","source":4918,"target":2211},{"edgeType":"contains","source":1164,"target":2320},{"edgeType":"contains","source":280,"target":1184},{"edgeType":"contains","source":317,"target":4265},{"edgeType":"calls","source":1239,"target":1042},{"edgeType":"calls","source":5416,"target":1572},{"edgeType":"calls","source":5429,"target":1169},{"edgeType":"calls","source":3246,"target":1193},{"edgeType":"calls","source":5418,"target":453},{"edgeType":"calls","source":4807,"target":367},{"edgeType":"calls","source":920,"target":360},{"edgeType":"calls","source":1024,"target":307},{"edgeType":"calls","source":2852,"target":2836},{"edgeType":"calls","source":1200,"target":137},{"edgeType":"calls","source":1821,"target":969},{"edgeType":"calls","source":5350,"target":447},{"edgeType":"calls","source":4583,"target":969},{"edgeType":"calls","source":4368,"target":1292},{"edgeType":"calls","source":4344,"target":979},{"edgeType":"calls","source":5743,"target":5176},{"edgeType":"calls","source":2047,"target":305},{"edgeType":"contains","source":317,"target":4268},{"edgeType":"contains","source":438,"target":517},{"edgeType":"calls","source":5512,"target":2823},{"edgeType":"calls","source":5686,"target":2714},{"edgeType":"calls","source":4846,"target":1271},{"edgeType":"contains","source":5163,"target":5196},{"edgeType":"contains","source":1164,"target":2323},{"edgeType":"calls","source":1439,"target":130},{"edgeType":"calls","source":5416,"target":1571},{"edgeType":"calls","source":5397,"target":2160},{"edgeType":"calls","source":5418,"target":452},{"edgeType":"contains","source":1905,"target":1546},{"edgeType":"calls","source":4966,"target":4950},{"edgeType":"contains","source":3476,"target":4641},{"edgeType":"calls","source":3784,"target":367},{"edgeType":"calls","source":1531,"target":449},{"edgeType":"calls","source":1501,"target":1379},{"edgeType":"calls","source":4368,"target":1291},{"edgeType":"calls","source":4344,"target":978},{"edgeType":"calls","source":2114,"target":345},{"edgeType":"calls","source":2727,"target":367},{"edgeType":"calls","source":1531,"target":448},{"edgeType":"calls","source":5416,"target":1570},{"edgeType":"calls","source":5418,"target":451},{"edgeType":"calls","source":1128,"target":257},{"edgeType":"calls","source":4966,"target":4949},{"edgeType":"calls","source":1024,"target":310},{"edgeType":"calls","source":4518,"target":2982},{"edgeType":"calls","source":1771,"target":407},{"edgeType":"calls","source":3870,"target":1930},{"edgeType":"calls","source":4093,"target":302},{"edgeType":"calls","source":4368,"target":1290},{"edgeType":"calls","source":4344,"target":977},{"edgeType":"calls","source":4301,"target":1253},{"edgeType":"calls","source":4107,"target":3039},{"edgeType":"contains","source":2305,"target":1837},{"edgeType":"calls","source":920,"target":357},{"edgeType":"calls","source":3039,"target":1262},{"edgeType":"calls","source":5416,"target":1569},{"edgeType":"calls","source":5418,"target":450},{"edgeType":"calls","source":1316,"target":766},{"edgeType":"calls","source":4590,"target":749},{"edgeType":"calls","source":1922,"target":2063},{"edgeType":"calls","source":5743,"target":5173},{"edgeType":"calls","source":4368,"target":1289},{"edgeType":"calls","source":4344,"target":976},{"edgeType":"calls","source":920,"target":356},{"edgeType":"calls","source":5416,"target":1568},{"edgeType":"calls","source":5418,"target":449},{"edgeType":"calls","source":4709,"target":4458},{"edgeType":"contains","source":438,"target":518},{"edgeType":"contains","source":317,"target":4269},{"edgeType":"calls","source":4429,"target":454},{"edgeType":"calls","source":4344,"target":975},{"edgeType":"calls","source":5740,"target":1036},{"edgeType":"calls","source":4344,"target":973},{"edgeType":"imports","source":2048,"target":1092},{"edgeType":"calls","source":3606,"target":596},{"edgeType":"calls","source":3039,"target":1260},{"edgeType":"contains","source":903,"target":905},{"edgeType":"calls","source":920,"target":359},{"edgeType":"contains","source":1518,"target":1920},{"edgeType":"calls","source":3813,"target":521},{"edgeType":"calls","source":956,"target":300},{"edgeType":"contains","source":1164,"target":2327},{"edgeType":"calls","source":5486,"target":454},{"edgeType":"calls","source":1314,"target":830},{"edgeType":"calls","source":5306,"target":1805},{"edgeType":"calls","source":1136,"target":1063},{"edgeType":"calls","source":5418,"target":448},{"edgeType":"calls","source":1767,"target":1585},{"edgeType":"calls","source":5418,"target":447},{"edgeType":"calls","source":5343,"target":2772},{"edgeType":"calls","source":2535,"target":1029},{"edgeType":"calls","source":3226,"target":1805},{"edgeType":"contains","source":11,"target":17},{"edgeType":"calls","source":4033,"target":2157},{"edgeType":"contains","source":1232,"target":1273},{"edgeType":"contains","source":4997,"target":5060},{"edgeType":"calls","source":2709,"target":920},{"edgeType":"calls","source":4429,"target":453},{"edgeType":"calls","source":4336,"target":1222},{"edgeType":"calls","source":4344,"target":974},{"edgeType":"calls","source":5714,"target":2898},{"edgeType":"calls","source":4344,"target":972},{"edgeType":"calls","source":5619,"target":3729},{"edgeType":"calls","source":1529,"target":1563},{"edgeType":"contains","source":72,"target":3410},{"edgeType":"calls","source":4965,"target":1805},{"edgeType":"contains","source":1518,"target":1921},{"edgeType":"calls","source":920,"target":358},{"edgeType":"contains","source":1497,"target":1515},{"edgeType":"calls","source":3039,"target":1261},{"edgeType":"calls","source":1316,"target":767},{"edgeType":"calls","source":5486,"target":453},{"edgeType":"contains","source":11,"target":16},{"edgeType":"contains","source":4683,"target":4223},{"edgeType":"calls","source":4429,"target":452},{"edgeType":"calls","source":4429,"target":450},{"edgeType":"calls","source":4344,"target":971},{"edgeType":"calls","source":995,"target":142},{"edgeType":"calls","source":3039,"target":1258},{"edgeType":"contains","source":5263,"target":5277},{"edgeType":"calls","source":3319,"target":3149},{"edgeType":"calls","source":5486,"target":452},{"edgeType":"calls","source":5444,"target":4925},{"edgeType":"calls","source":5518,"target":1574},{"edgeType":"contains","source":1280,"target":1905},{"edgeType":"calls","source":5486,"target":451},{"edgeType":"calls","source":4687,"target":4080},{"edgeType":"calls","source":4125,"target":360},{"edgeType":"contains","source":11,"target":19},{"edgeType":"calls","source":2812,"target":896},{"edgeType":"contains","source":4038,"target":4142},{"edgeType":"calls","source":4429,"target":451},{"edgeType":"calls","source":4536,"target":305},{"edgeType":"contains","source":1510,"target":3232},{"edgeType":"calls","source":4429,"target":449},{"edgeType":"calls","source":4355,"target":3800},{"edgeType":"calls","source":3039,"target":1259},{"edgeType":"calls","source":5201,"target":829},{"edgeType":"calls","source":2898,"target":345},{"edgeType":"calls","source":5252,"target":305},{"edgeType":"contains","source":2786,"target":2787},{"edgeType":"calls","source":3131,"target":521},{"edgeType":"calls","source":1377,"target":984},{"edgeType":"contains","source":5260,"target":5369},{"edgeType":"calls","source":5486,"target":450},{"edgeType":"contains","source":1859,"target":1927},{"edgeType":"calls","source":3266,"target":564},{"edgeType":"imports","source":3811,"target":340},{"edgeType":"contains","source":14,"target":2039},{"edgeType":"calls","source":4296,"target":345},{"edgeType":"contains","source":438,"target":522},{"edgeType":"calls","source":4429,"target":448},{"edgeType":"calls","source":920,"target":355},{"edgeType":"calls","source":4363,"target":380},{"edgeType":"calls","source":5020,"target":2211},{"edgeType":"contains","source":3378,"target":3459},{"edgeType":"calls","source":5721,"target":564},{"edgeType":"contains","source":1164,"target":2331},{"edgeType":"calls","source":4125,"target":358},{"edgeType":"calls","source":3945,"target":3824},{"edgeType":"calls","source":4838,"target":454},{"edgeType":"contains","source":4038,"target":4140},{"edgeType":"calls","source":5486,"target":449},{"edgeType":"calls","source":2047,"target":300},{"edgeType":"contains","source":11,"target":21},{"edgeType":"calls","source":2812,"target":894},{"edgeType":"contains","source":341,"target":361},{"edgeType":"contains","source":54,"target":1859},{"edgeType":"calls","source":4459,"target":1633},{"edgeType":"calls","source":5124,"target":2157},{"edgeType":"calls","source":4429,"target":447},{"edgeType":"calls","source":3039,"target":1257},{"edgeType":"imports","source":3403,"target":2419},{"edgeType":"calls","source":4328,"target":407},{"edgeType":"calls","source":1276,"target":946},{"edgeType":"calls","source":5624,"target":1456},{"edgeType":"imports","source":2734,"target":962},{"edgeType":"calls","source":3606,"target":593},{"edgeType":"calls","source":3614,"target":345},{"edgeType":"calls","source":4838,"target":453},{"edgeType":"calls","source":5486,"target":448},{"edgeType":"calls","source":3319,"target":1033},{"edgeType":"contains","source":3969,"target":4164},{"edgeType":"calls","source":3273,"target":345},{"edgeType":"calls","source":4125,"target":359},{"edgeType":"calls","source":2812,"target":895},{"edgeType":"contains","source":1,"target":330},{"edgeType":"calls","source":4849,"target":1169}],"nodes":[{"groupName":"","id":1,"nodeType":"Repo","repoName":"mwaskom#seaborn#4a9e54962a29c12a8b103d75f838e0e795a6974d"},{"id":11,"name":"doc/_docstrings","nodeType":"Package"},{"id":12,"name":"seaborn/_stats","nodeType":"Package"},{"id":14,"name":"doc/_tutorial","nodeType":"Package"},{"id":16,"name":"objects.Dots.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"2923956c-f141-4ecb-ab08-e819099f0fa9\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn.objects as so\\n\",\n \"from seaborn import load_dataset\\n\",\n \"mpg = load_dataset(\\\"mpg\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"f8e7b343-0301-49b3-8d42-862266d322bb\",\n \"metadata\": {},\n \"source\": [\n \"This mark draws relatively small, partially-transparent dots:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"d668d7f6-555b-4b5d-876e-35e259076d2a\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p1 = so.Plot(mpg, \\\"horsepower\\\", \\\"mpg\\\")\\n\",\n \"p1.add(so.Dots())\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"a2cf4669-9c91-4adc-9e3a-3b0660e7898e\",\n \"metadata\": {},\n \"source\": [\n \"Fixing or mapping the `color` property changes both the stroke (edge) and fill:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"bba2b1c5-22fd-4f44-af8d-defb31dfbe9d\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p1.add(so.Dots(), color=\\\"origin\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"bf967d57-22cf-4bce-b718-aae6936719e6\",\n \"metadata\": {},\n \"source\": [\n \"These properties can be independently parametrized (although the resulting plot may not always be clear):\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"c45261a9-fb88-4eb5-b633-060debda261b\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" p1.add(so.Dots(fillalpha=.5), color=\\\"origin\\\", fillcolor=\\\"weight\\\")\\n\",\n \" .scale(fillcolor=\\\"binary\\\")\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"b20dcaee-8e09-4a76-8eff-5289ef43ea8c\",\n \"metadata\": {},\n \"source\": [\n \"Filled and unfilled markers will happily mix:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"a1a9bdda-abb7-4850-a936-ceed518b9b17\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p1.add(so.Dots(stroke=1), marker=\\\"origin\\\").scale(marker=[\\\"o\\\", \\\"x\\\", (6, 2, 1)])\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"1d932f10-e8f8-4114-9362-3da82c7b5ac0\",\n \"metadata\": {},\n \"source\": [\n \"The partial opacity also helps to see local density when using jitter:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"692e1611-4804-4979-b616-041e9fa9cdd9\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(mpg, \\\"horsepower\\\", \\\"origin\\\")\\n\",\n \" .add(so.Dots(), so.Jitter(.25))\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"acd5788f-e62b-497c-a109-f0bc02b8cae9\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":17,"name":"set_context.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"thorough-equipment\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"canadian-protection\",\n \"metadata\": {},\n \"source\": [\n \"Call the function with the name of a context to set the default for all plots:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"freelance-leonard\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.set_context(\\\"notebook\\\")\\n\",\n \"sns.lineplot(x=[0, 1, 2], y=[1, 3, 2])\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"studied-adventure\",\n \"metadata\": {},\n \"source\": [\n \"You can independently scale the font elements relative to the current context:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"irish-digest\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.set_context(\\\"notebook\\\", font_scale=1.25)\\n\",\n \"sns.lineplot(x=[0, 1, 2], y=[1, 3, 2])\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"fourth-technical\",\n \"metadata\": {},\n \"source\": [\n \"It is also possible to override some of the parameters with specific values:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"advance-request\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.set_context(\\\"notebook\\\", rc={\\\"lines.linewidth\\\": 3})\\n\",\n \"sns.lineplot(x=[0, 1, 2], y=[1, 3, 2])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"compatible-string\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":18,"name":"axis_grids.ipynb","nodeType":"TextFile","path":"doc/_tutorial","text":"{\n \"cells\": [\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \".. _grid_tutorial:\\n\",\n \"\\n\",\n \".. currentmodule:: seaborn\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Building structured multi-plot grids\\n\",\n \"====================================\\n\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"When exploring multi-dimensional data, a useful approach is to draw multiple instances of the same plot on different subsets of your dataset. This technique is sometimes called either \\\"lattice\\\" or \\\"trellis\\\" plotting, and it is related to the idea of `\\\"small multiples\\\" `_. It allows a viewer to quickly extract a large amount of information about a complex dataset. Matplotlib offers good support for making figures with multiple axes; seaborn builds on top of this to directly link the structure of the plot to the structure of your dataset.\\n\",\n \"\\n\",\n \"The :doc:`figure-level ` functions are built on top of the objects discussed in this chapter of the tutorial. In most cases, you will want to work with those functions. They take care of some important bookkeeping that synchronizes the multiple plots in each grid. This chapter explains how the underlying objects work, which may be useful for advanced applications.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\\n\",\n \"import matplotlib.pyplot as plt\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"sns.set_theme(style=\\\"ticks\\\")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"%matplotlib inline\\n\",\n \"import numpy as np\\n\",\n \"np.random.seed(sum(map(ord, \\\"axis_grids\\\")))\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \".. _facet_grid:\\n\",\n \"\\n\",\n \"Conditional small multiples\\n\",\n \"---------------------------\\n\",\n \"\\n\",\n \"The :class:`FacetGrid` class is useful when you want to visualize the distribution of a variable or the relationship between multiple variables separately within subsets of your dataset. A :class:`FacetGrid` can be drawn with up to three dimensions: ``row``, ``col``, and ``hue``. The first two have obvious correspondence with the resulting array of axes; think of the hue variable as a third dimension along a depth axis, where different levels are plotted with different colors.\\n\",\n \"\\n\",\n \"Each of :func:`relplot`, :func:`displot`, :func:`catplot`, and :func:`lmplot` use this object internally, and they return the object when they are finished so that it can be used for further tweaking.\\n\",\n \"\\n\",\n \"The class is used by initializing a :class:`FacetGrid` object with a dataframe and the names of the variables that will form the row, column, or hue dimensions of the grid. These variables should be categorical or discrete, and then the data at each level of the variable will be used for a facet along that axis. For example, say we wanted to examine differences between lunch and dinner in the ``tips`` dataset:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"tips = sns.load_dataset(\\\"tips\\\")\\n\",\n \"g = sns.FacetGrid(tips, col=\\\"time\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Initializing the grid like this sets up the matplotlib figure and axes, but doesn't draw anything on them.\\n\",\n \"\\n\",\n \"The main approach for visualizing data on this grid is with the :meth:`FacetGrid.map` method. Provide it with a plotting function and the name(s) of variable(s) in the dataframe to plot. Let's look at the distribution of tips in each of these subsets, using a histogram:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.FacetGrid(tips, col=\\\"time\\\")\\n\",\n \"g.map(sns.histplot, \\\"tip\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"This function will draw the figure and annotate the axes, hopefully producing a finished plot in one step. To make a relational plot, just pass multiple variable names. You can also provide keyword arguments, which will be passed to the plotting function:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.FacetGrid(tips, col=\\\"sex\\\", hue=\\\"smoker\\\")\\n\",\n \"g.map(sns.scatterplot, \\\"total_bill\\\", \\\"tip\\\", alpha=.7)\\n\",\n \"g.add_legend()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"There are several options for controlling the look of the grid that can be passed to the class constructor.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.FacetGrid(tips, row=\\\"smoker\\\", col=\\\"time\\\", margin_titles=True)\\n\",\n \"g.map(sns.regplot, \\\"size\\\", \\\"total_bill\\\", color=\\\".3\\\", fit_reg=False, x_jitter=.1)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Note that ``margin_titles`` isn't formally supported by the matplotlib API, and may not work well in all cases. In particular, it currently can't be used with a legend that lies outside of the plot.\\n\",\n \"\\n\",\n \"The size of the figure is set by providing the height of *each* facet, along with the aspect ratio:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.FacetGrid(tips, col=\\\"day\\\", height=4, aspect=.5)\\n\",\n \"g.map(sns.barplot, \\\"sex\\\", \\\"total_bill\\\", order=[\\\"Male\\\", \\\"Female\\\"])\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The default ordering of the facets is derived from the information in the DataFrame. If the variable used to define facets has a categorical type, then the order of the categories is used. Otherwise, the facets will be in the order of appearance of the category levels. It is possible, however, to specify an ordering of any facet dimension with the appropriate ``*_order`` parameter:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"ordered_days = tips.day.value_counts().index\\n\",\n \"g = sns.FacetGrid(tips, row=\\\"day\\\", row_order=ordered_days,\\n\",\n \" height=1.7, aspect=4,)\\n\",\n \"g.map(sns.kdeplot, \\\"total_bill\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Any seaborn color palette (i.e., something that can be passed to :func:`color_palette()`) can be provided. You can also use a dictionary that maps the names of values in the ``hue`` variable to valid matplotlib colors:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"pal = dict(Lunch=\\\"seagreen\\\", Dinner=\\\".7\\\")\\n\",\n \"g = sns.FacetGrid(tips, hue=\\\"time\\\", palette=pal, height=5)\\n\",\n \"g.map(sns.scatterplot, \\\"total_bill\\\", \\\"tip\\\", s=100, alpha=.5)\\n\",\n \"g.add_legend()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"If you have many levels of one variable, you can plot it along the columns but \\\"wrap\\\" them so that they span multiple rows. When doing this, you cannot use a ``row`` variable.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"attend = sns.load_dataset(\\\"attention\\\").query(\\\"subject <= 12\\\")\\n\",\n \"g = sns.FacetGrid(attend, col=\\\"subject\\\", col_wrap=4, height=2, ylim=(0, 10))\\n\",\n \"g.map(sns.pointplot, \\\"solutions\\\", \\\"score\\\", order=[1, 2, 3], color=\\\".3\\\", errorbar=None)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Once you've drawn a plot using :meth:`FacetGrid.map` (which can be called multiple times), you may want to adjust some aspects of the plot. There are also a number of methods on the :class:`FacetGrid` object for manipulating the figure at a higher level of abstraction. The most general is :meth:`FacetGrid.set`, and there are other more specialized methods like :meth:`FacetGrid.set_axis_labels`, which respects the fact that interior facets do not have axis labels. For example:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"with sns.axes_style(\\\"white\\\"):\\n\",\n \" g = sns.FacetGrid(tips, row=\\\"sex\\\", col=\\\"smoker\\\", margin_titles=True, height=2.5)\\n\",\n \"g.map(sns.scatterplot, \\\"total_bill\\\", \\\"tip\\\", color=\\\"#334488\\\")\\n\",\n \"g.set_axis_labels(\\\"Total bill (US Dollars)\\\", \\\"Tip\\\")\\n\",\n \"g.set(xticks=[10, 30, 50], yticks=[2, 6, 10])\\n\",\n \"g.figure.subplots_adjust(wspace=.02, hspace=.02)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"For even more customization, you can work directly with the underling matplotlib ``Figure`` and ``Axes`` objects, which are stored as member attributes at ``figure`` and ``axes_dict``, respectively. When making a figure without row or column faceting, you can also use the ``ax`` attribute to directly access the single axes.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.FacetGrid(tips, col=\\\"smoker\\\", margin_titles=True, height=4)\\n\",\n \"g.map(plt.scatter, \\\"total_bill\\\", \\\"tip\\\", color=\\\"#338844\\\", edgecolor=\\\"white\\\", s=50, lw=1)\\n\",\n \"for ax in g.axes_dict.values():\\n\",\n \" ax.axline((0, 0), slope=.2, c=\\\".2\\\", ls=\\\"--\\\", zorder=0)\\n\",\n \"g.set(xlim=(0, 60), ylim=(0, 14))\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \".. _custom_map_func:\\n\",\n \"\\n\",\n \"Using custom functions\\n\",\n \"----------------------\\n\",\n \"\\n\",\n \"You're not limited to existing matplotlib and seaborn functions when using :class:`FacetGrid`. However, to work properly, any function you use must follow a few rules:\\n\",\n \"\\n\",\n \"1. It must plot onto the \\\"currently active\\\" matplotlib ``Axes``. This will be true of functions in the ``matplotlib.pyplot`` namespace, and you can call :func:`matplotlib.pyplot.gca` to get a reference to the current ``Axes`` if you want to work directly with its methods.\\n\",\n \"2. It must accept the data that it plots in positional arguments. Internally, :class:`FacetGrid` will pass a ``Series`` of data for each of the named positional arguments passed to :meth:`FacetGrid.map`.\\n\",\n \"3. It must be able to accept ``color`` and ``label`` keyword arguments, and, ideally, it will do something useful with them. In most cases, it's easiest to catch a generic dictionary of ``**kwargs`` and pass it along to the underlying plotting function.\\n\",\n \"\\n\",\n \"Let's look at minimal example of a function you can plot with. This function will just take a single vector of data for each facet:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"from scipy import stats\\n\",\n \"def quantile_plot(x, **kwargs):\\n\",\n \" quantiles, xr = stats.probplot(x, fit=False)\\n\",\n \" plt.scatter(xr, quantiles, **kwargs)\\n\",\n \" \\n\",\n \"g = sns.FacetGrid(tips, col=\\\"sex\\\", height=4)\\n\",\n \"g.map(quantile_plot, \\\"total_bill\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"If we want to make a bivariate plot, you should write the function so that it accepts the x-axis variable first and the y-axis variable second:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"def qqplot(x, y, **kwargs):\\n\",\n \" _, xr = stats.probplot(x, fit=False)\\n\",\n \" _, yr = stats.probplot(y, fit=False)\\n\",\n \" plt.scatter(xr, yr, **kwargs)\\n\",\n \" \\n\",\n \"g = sns.FacetGrid(tips, col=\\\"smoker\\\", height=4)\\n\",\n \"g.map(qqplot, \\\"total_bill\\\", \\\"tip\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Because :func:`matplotlib.pyplot.scatter` accepts ``color`` and ``label`` keyword arguments and does the right thing with them, we can add a hue facet without any difficulty:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.FacetGrid(tips, hue=\\\"time\\\", col=\\\"sex\\\", height=4)\\n\",\n \"g.map(qqplot, \\\"total_bill\\\", \\\"tip\\\")\\n\",\n \"g.add_legend()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Sometimes, though, you'll want to map a function that doesn't work the way you expect with the ``color`` and ``label`` keyword arguments. In this case, you'll want to explicitly catch them and handle them in the logic of your custom function. For example, this approach will allow use to map :func:`matplotlib.pyplot.hexbin`, which otherwise does not play well with the :class:`FacetGrid` API:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"def hexbin(x, y, color, **kwargs):\\n\",\n \" cmap = sns.light_palette(color, as_cmap=True)\\n\",\n \" plt.hexbin(x, y, gridsize=15, cmap=cmap, **kwargs)\\n\",\n \"\\n\",\n \"with sns.axes_style(\\\"dark\\\"):\\n\",\n \" g = sns.FacetGrid(tips, hue=\\\"time\\\", col=\\\"time\\\", height=4)\\n\",\n \"g.map(hexbin, \\\"total_bill\\\", \\\"tip\\\", extent=[0, 50, 0, 10]);\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \".. _pair_grid:\\n\",\n \"\\n\",\n \"Plotting pairwise data relationships\\n\",\n \"------------------------------------\\n\",\n \"\\n\",\n \":class:`PairGrid` also allows you to quickly draw a grid of small subplots using the same plot type to visualize data in each. In a :class:`PairGrid`, each row and column is assigned to a different variable, so the resulting plot shows each pairwise relationship in the dataset. This style of plot is sometimes called a \\\"scatterplot matrix\\\", as this is the most common way to show each relationship, but :class:`PairGrid` is not limited to scatterplots.\\n\",\n \"\\n\",\n \"It's important to understand the differences between a :class:`FacetGrid` and a :class:`PairGrid`. In the former, each facet shows the same relationship conditioned on different levels of other variables. In the latter, each plot shows a different relationship (although the upper and lower triangles will have mirrored plots). Using :class:`PairGrid` can give you a very quick, very high-level summary of interesting relationships in your dataset.\\n\",\n \"\\n\",\n \"The basic usage of the class is very similar to :class:`FacetGrid`. First you initialize the grid, then you pass plotting function to a ``map`` method and it will be called on each subplot. There is also a companion function, :func:`pairplot` that trades off some flexibility for faster plotting.\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"iris = sns.load_dataset(\\\"iris\\\")\\n\",\n \"g = sns.PairGrid(iris)\\n\",\n \"g.map(sns.scatterplot)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"It's possible to plot a different function on the diagonal to show the univariate distribution of the variable in each column. Note that the axis ticks won't correspond to the count or density axis of this plot, though.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.PairGrid(iris)\\n\",\n \"g.map_diag(sns.histplot)\\n\",\n \"g.map_offdiag(sns.scatterplot)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"A very common way to use this plot colors the observations by a separate categorical variable. For example, the iris dataset has four measurements for each of three different species of iris flowers so you can see how they differ.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.PairGrid(iris, hue=\\\"species\\\")\\n\",\n \"g.map_diag(sns.histplot)\\n\",\n \"g.map_offdiag(sns.scatterplot)\\n\",\n \"g.add_legend()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"By default every numeric column in the dataset is used, but you can focus on particular relationships if you want.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.PairGrid(iris, vars=[\\\"sepal_length\\\", \\\"sepal_width\\\"], hue=\\\"species\\\")\\n\",\n \"g.map(sns.scatterplot)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"It's also possible to use a different function in the upper and lower triangles to emphasize different aspects of the relationship.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.PairGrid(iris)\\n\",\n \"g.map_upper(sns.scatterplot)\\n\",\n \"g.map_lower(sns.kdeplot)\\n\",\n \"g.map_diag(sns.kdeplot, lw=3, legend=False)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The square grid with identity relationships on the diagonal is actually just a special case, and you can plot with different variables in the rows and columns.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.PairGrid(tips, y_vars=[\\\"tip\\\"], x_vars=[\\\"total_bill\\\", \\\"size\\\"], height=4)\\n\",\n \"g.map(sns.regplot, color=\\\".3\\\")\\n\",\n \"g.set(ylim=(-1, 11), yticks=[0, 5, 10])\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Of course, the aesthetic attributes are configurable. For instance, you can use a different palette (say, to show an ordering of the ``hue`` variable) and pass keyword arguments into the plotting functions.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.PairGrid(tips, hue=\\\"size\\\", palette=\\\"GnBu_d\\\")\\n\",\n \"g.map(plt.scatter, s=50, edgecolor=\\\"white\\\")\\n\",\n \"g.add_legend()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \":class:`PairGrid` is flexible, but to take a quick look at a dataset, it can be easier to use :func:`pairplot`. This function uses scatterplots and histograms by default, although a few other kinds will be added (currently, you can also plot regression plots on the off-diagonals and KDEs on the diagonal).\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.pairplot(iris, hue=\\\"species\\\", height=2.5)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"You can also control the aesthetics of the plot with keyword arguments, and it returns the :class:`PairGrid` instance for further tweaking.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.pairplot(iris, hue=\\\"species\\\", palette=\\\"Set2\\\", diag_kind=\\\"kde\\\", height=2.5)\"\n ]\n }\n ],\n \"metadata\": {\n \"celltoolbar\": \"Tags\",\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"id":19,"name":"heatmap.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"987b9549-532e-4091-a6cf-007d1b23e825\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\\n\",\n \"sns.set_theme()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"2c78ca60-e232-44f6-956b-b86b472b1c28\",\n \"metadata\": {},\n \"source\": [\n \"Pass a :class:`DataFrame` to plot with indices as row/column labels:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"fad17798-c2e3-4334-abf0-0d46153971fa\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"glue = sns.load_dataset(\\\"glue\\\").pivot(\\\"Model\\\", \\\"Task\\\", \\\"Score\\\")\\n\",\n \"sns.heatmap(glue)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"f3255c5f-2477-4d13-b4c2-7e56380e9cc2\",\n \"metadata\": {},\n \"source\": [\n \"Use `annot` to represent the cell values with text:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"3c9f3c73-c8bc-426e-bc67-dec8f807082e\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.heatmap(glue, annot=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"bc412da8-866a-49b7-8496-01fbf06dd908\",\n \"metadata\": {},\n \"source\": [\n \"Control the annotations with a formatting string:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"ac952d0d-9187-4dff-a560-88430076851a\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.heatmap(glue, annot=True, fmt=\\\".1f\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"5eb12725-e9ee-4df0-9708-243d7e0a77b5\",\n \"metadata\": {},\n \"source\": [\n \"Use a separate dataframe for the annotations:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"1189a37f-9f74-455a-a09a-c22e056d8ba7\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.heatmap(glue, annot=glue.rank(axis=\\\"columns\\\"))\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"253dfb7f-aa12-4716-adc2-3a38b003b2c3\",\n \"metadata\": {},\n \"source\": [\n \"Add lines between cells:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"5cac673e-9b86-490b-9e67-ec0cf865bede\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.heatmap(glue, annot=True, linewidth=.5)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"b7d3659c-f996-4af3-a612-430d97799c72\",\n \"metadata\": {},\n \"source\": [\n \"Select a different colormap by name:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"86806d72-e784-430e-8320-48f2c91115bb\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.heatmap(glue, cmap=\\\"crest\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"8336fd53-3841-458f-b26c-411efff54d45\",\n \"metadata\": {},\n \"source\": [\n \"Or pass a colormap object:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"9944ff33-991f-4138-a951-e3015c0326f1\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.heatmap(glue, cmap=sns.cubehelix_palette(as_cmap=True))\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"52cc4dba-b86a-4da8-9cbd-3f8aa06b43b4\",\n \"metadata\": {},\n \"source\": [\n \"Set the colormap norm (data values corresponding to minimum and maximum points):\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"b4ddb41e-c075-41a5-8afe-422ad6d105bf\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.heatmap(glue, vmin=50, vmax=100)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"6e828517-a532-49b1-be11-eda47c50cc37\",\n \"metadata\": {},\n \"source\": [\n \"Use methods on the :class:`matplotlib.axes.Axes` object to tweak the plot:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"1aab26fc-2de4-4d4f-ad08-487809573deb\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"ax = sns.heatmap(glue, annot=True)\\n\",\n \"ax.set(xlabel=\\\"\\\", ylabel=\\\"\\\")\\n\",\n \"ax.xaxis.tick_top()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"1d8e738c-388a-453a-b9c7-4c71a674b69c\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":21,"name":"plotting_context.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"perceived-worry\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"seventh-volleyball\",\n \"metadata\": {},\n \"source\": [\n \"Calling with no arguments will return the current defaults for the parameters that get scaled:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"roman-villa\",\n \"metadata\": {\n \"tags\": [\n \"show-output\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"sns.plotting_context()\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"handled-texas\",\n \"metadata\": {},\n \"source\": [\n \"Calling with the name of a predefined style will show those values:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"distant-caribbean\",\n \"metadata\": {\n \"tags\": [\n \"show-output\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"sns.plotting_context(\\\"talk\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"lightweight-anime\",\n \"metadata\": {},\n \"source\": [\n \"Use the function as a context manager to temporarily change the parameter values:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"contemporary-hampshire\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"with sns.plotting_context(\\\"talk\\\"):\\n\",\n \" sns.lineplot(x=[\\\"A\\\", \\\"B\\\", \\\"C\\\"], y=[1, 3, 2])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"accompanied-brisbane\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":23,"name":"categorical.ipynb","nodeType":"TextFile","path":"doc/_tutorial","text":"{\n \"cells\": [\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \".. _categorical_tutorial:\\n\",\n \"\\n\",\n \".. currentmodule:: seaborn\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Visualizing categorical data\\n\",\n \"============================\\n\",\n \" \\n\",\n \"In the :ref:`relational plot tutorial ` we saw how to use different visual representations to show the relationship between multiple variables in a dataset. In the examples, we focused on cases where the main relationship was between two numerical variables. If one of the main variables is \\\"categorical\\\" (divided into discrete groups) it may be helpful to use a more specialized approach to visualization.\\n\",\n \"\\n\",\n \"In seaborn, there are several different ways to visualize a relationship involving categorical data. Similar to the relationship between :func:`relplot` and either :func:`scatterplot` or :func:`lineplot`, there are two ways to make these plots. There are a number of axes-level functions for plotting categorical data in different ways and a figure-level interface, :func:`catplot`, that gives unified higher-level access to them.\\n\",\n \"\\n\",\n \"It's helpful to think of the different categorical plot kinds as belonging to three different families, which we'll discuss in detail below. They are:\\n\",\n \"\\n\",\n \"Categorical scatterplots:\\n\",\n \"\\n\",\n \"- :func:`stripplot` (with ``kind=\\\"strip\\\"``; the default)\\n\",\n \"- :func:`swarmplot` (with ``kind=\\\"swarm\\\"``)\\n\",\n \"\\n\",\n \"Categorical distribution plots:\\n\",\n \"\\n\",\n \"- :func:`boxplot` (with ``kind=\\\"box\\\"``)\\n\",\n \"- :func:`violinplot` (with ``kind=\\\"violin\\\"``)\\n\",\n \"- :func:`boxenplot` (with ``kind=\\\"boxen\\\"``)\\n\",\n \"\\n\",\n \"Categorical estimate plots:\\n\",\n \"\\n\",\n \"- :func:`pointplot` (with ``kind=\\\"point\\\"``)\\n\",\n \"- :func:`barplot` (with ``kind=\\\"bar\\\"``)\\n\",\n \"- :func:`countplot` (with ``kind=\\\"count\\\"``)\\n\",\n \"\\n\",\n \"These families represent the data using different levels of granularity. When deciding which to use, you'll have to think about the question that you want to answer. The unified API makes it easy to switch between different kinds and see your data from several perspectives.\\n\",\n \"\\n\",\n \"In this tutorial, we'll mostly focus on the figure-level interface, :func:`catplot`. Remember that this function is a higher-level interface each of the functions above, so we'll reference them when we show each kind of plot, keeping the more verbose kind-specific API documentation at hand.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import numpy as np\\n\",\n \"import seaborn as sns\\n\",\n \"import matplotlib.pyplot as plt\\n\",\n \"sns.set_theme(style=\\\"ticks\\\", color_codes=True)\\n\",\n \"np.random.seed(sum(map(ord, \\\"categorical\\\")))\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Categorical scatterplots\\n\",\n \"------------------------\\n\",\n \"\\n\",\n \"The default representation of the data in :func:`catplot` uses a scatterplot. There are actually two different categorical scatter plots in seaborn. They take different approaches to resolving the main challenge in representing categorical data with a scatter plot, which is that all of the points belonging to one category would fall on the same position along the axis corresponding to the categorical variable. The approach used by :func:`stripplot`, which is the default \\\"kind\\\" in :func:`catplot` is to adjust the positions of points on the categorical axis with a small amount of random \\\"jitter\\\":\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"tips = sns.load_dataset(\\\"tips\\\")\\n\",\n \"sns.catplot(data=tips, x=\\\"day\\\", y=\\\"total_bill\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The ``jitter`` parameter controls the magnitude of jitter or disables it altogether:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", jitter=False)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The second approach adjusts the points along the categorical axis using an algorithm that prevents them from overlapping. It can give a better representation of the distribution of observations, although it only works well for relatively small datasets. This kind of plot is sometimes called a \\\"beeswarm\\\" and is drawn in seaborn by :func:`swarmplot`, which is activated by setting ``kind=\\\"swarm\\\"`` in :func:`catplot`:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", kind=\\\"swarm\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Similar to the relational plots, it's possible to add another dimension to a categorical plot by using a ``hue`` semantic. (The categorical plots do not currently support ``size`` or ``style`` semantics). Each different categorical plotting function handles the ``hue`` semantic differently. For the scatter plots, it is only necessary to change the color of the points:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", hue=\\\"sex\\\", kind=\\\"swarm\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Unlike with numerical data, it is not always obvious how to order the levels of the categorical variable along its axis. In general, the seaborn categorical plotting functions try to infer the order of categories from the data. If your data have a pandas ``Categorical`` datatype, then the default order of the categories can be set there. If the variable passed to the categorical axis looks numerical, the levels will be sorted. But the data are still treated as categorical and drawn at ordinal positions on the categorical axes (specifically, at 0, 1, ...) even when numbers are used to label them:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=tips.query(\\\"size != 3\\\"), x=\\\"size\\\", y=\\\"total_bill\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The other option for choosing a default ordering is to take the levels of the category as they appear in the dataset. The ordering can also be controlled on a plot-specific basis using the ``order`` parameter. This can be important when drawing multiple categorical plots in the same figure, which we'll see more of below:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=tips, x=\\\"smoker\\\", y=\\\"tip\\\", order=[\\\"No\\\", \\\"Yes\\\"])\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"We've referred to the idea of \\\"categorical axis\\\". In these examples, that's always corresponded to the horizontal axis. But it's often helpful to put the categorical variable on the vertical axis (particularly when the category names are relatively long or there are many categories). To do this, swap the assignment of variables to axes:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"time\\\", kind=\\\"swarm\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Comparing distributions\\n\",\n \"-----------------------\\n\",\n \"\\n\",\n \"As the size of the dataset grows, categorical scatter plots become limited in the information they can provide about the distribution of values within each category. When this happens, there are several approaches for summarizing the distributional information in ways that facilitate easy comparisons across the category levels.\\n\",\n \"\\n\",\n \"Boxplots\\n\",\n \"^^^^^^^^\\n\",\n \"\\n\",\n \"The first is the familiar :func:`boxplot`. This kind of plot shows the three quartile values of the distribution along with extreme values. The \\\"whiskers\\\" extend to points that lie within 1.5 IQRs of the lower and upper quartile, and then observations that fall outside this range are displayed independently. This means that each value in the boxplot corresponds to an actual observation in the data.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", kind=\\\"box\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"When adding a ``hue`` semantic, the box for each level of the semantic variable is moved along the categorical axis so they don't overlap:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", hue=\\\"smoker\\\", kind=\\\"box\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"This behavior is called \\\"dodging\\\" and is turned on by default because it is assumed that the semantic variable is nested within the main categorical variable. If that's not the case, you can disable the dodging:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"tips[\\\"weekend\\\"] = tips[\\\"day\\\"].isin([\\\"Sat\\\", \\\"Sun\\\"])\\n\",\n \"sns.catplot(\\n\",\n \" data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", hue=\\\"weekend\\\",\\n\",\n \" kind=\\\"box\\\", dodge=False,\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"A related function, :func:`boxenplot`, draws a plot that is similar to a box plot but optimized for showing more information about the shape of the distribution. It is best suited for larger datasets:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"diamonds = sns.load_dataset(\\\"diamonds\\\")\\n\",\n \"sns.catplot(\\n\",\n \" data=diamonds.sort_values(\\\"color\\\"),\\n\",\n \" x=\\\"color\\\", y=\\\"price\\\", kind=\\\"boxen\\\",\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Violinplots\\n\",\n \"^^^^^^^^^^^\\n\",\n \"\\n\",\n \"A different approach is a :func:`violinplot`, which combines a boxplot with the kernel density estimation procedure described in the :ref:`distributions ` tutorial:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(\\n\",\n \" data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"sex\\\", kind=\\\"violin\\\",\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"This approach uses the kernel density estimate to provide a richer description of the distribution of values. Additionally, the quartile and whisker values from the boxplot are shown inside the violin. The downside is that, because the violinplot uses a KDE, there are some other parameters that may need tweaking, adding some complexity relative to the straightforward boxplot:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(\\n\",\n \" data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"sex\\\",\\n\",\n \" kind=\\\"violin\\\", bw=.15, cut=0,\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"It's also possible to \\\"split\\\" the violins when the hue parameter has only two levels, which can allow for a more efficient use of space:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(\\n\",\n \" data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", hue=\\\"sex\\\",\\n\",\n \" kind=\\\"violin\\\", split=True,\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Finally, there are several options for the plot that is drawn on the interior of the violins, including ways to show each individual observation instead of the summary boxplot values:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(\\n\",\n \" data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", hue=\\\"sex\\\",\\n\",\n \" kind=\\\"violin\\\", inner=\\\"stick\\\", split=True, palette=\\\"pastel\\\",\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"It can also be useful to combine :func:`swarmplot` or :func:`stripplot` with a box plot or violin plot to show each observation along with a summary of the distribution:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.catplot(data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", kind=\\\"violin\\\", inner=None)\\n\",\n \"sns.swarmplot(data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", color=\\\"k\\\", size=3, ax=g.ax)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Estimating central tendency\\n\",\n \"---------------------------\\n\",\n \"\\n\",\n \"For other applications, rather than showing the distribution within each category, you might want to show an estimate of the central tendency of the values. Seaborn has two main ways to show this information. Importantly, the basic API for these functions is identical to that for the ones discussed above.\\n\",\n \"\\n\",\n \"Bar plots\\n\",\n \"^^^^^^^^^\\n\",\n \"\\n\",\n \"A familiar style of plot that accomplishes this goal is a bar plot. In seaborn, the :func:`barplot` function operates on a full dataset and applies a function to obtain the estimate (taking the mean by default). When there are multiple observations in each category, it also uses bootstrapping to compute a confidence interval around the estimate, which is plotted using error bars:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"titanic = sns.load_dataset(\\\"titanic\\\")\\n\",\n \"sns.catplot(data=titanic, x=\\\"sex\\\", y=\\\"survived\\\", hue=\\\"class\\\", kind=\\\"bar\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"The default error bars show 95% confidence intervals, but (starting in v0.12), it is possible to select from a number of other representations:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=titanic, x=\\\"age\\\", y=\\\"deck\\\", errorbar=(\\\"pi\\\", 95), kind=\\\"bar\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"A special case for the bar plot is when you want to show the number of observations in each category rather than computing a statistic for a second variable. This is similar to a histogram over a categorical, rather than quantitative, variable. In seaborn, it's easy to do so with the :func:`countplot` function:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=titanic, x=\\\"deck\\\", kind=\\\"count\\\", palette=\\\"ch:.25\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Both :func:`barplot` and :func:`countplot` can be invoked with all of the options discussed above, along with others that are demonstrated in the detailed documentation for each function:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(\\n\",\n \" data=titanic, y=\\\"deck\\\", hue=\\\"class\\\", kind=\\\"count\\\",\\n\",\n \" palette=\\\"pastel\\\", edgecolor=\\\".6\\\",\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Point plots\\n\",\n \"^^^^^^^^^^^\\n\",\n \"\\n\",\n \"An alternative style for visualizing the same information is offered by the :func:`pointplot` function. This function also encodes the value of the estimate with height on the other axis, but rather than showing a full bar, it plots the point estimate and confidence interval. Additionally, :func:`pointplot` connects points from the same ``hue`` category. This makes it easy to see how the main relationship is changing as a function of the hue semantic, because your eyes are quite good at picking up on differences of slopes:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=titanic, x=\\\"sex\\\", y=\\\"survived\\\", hue=\\\"class\\\", kind=\\\"point\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"While the categorical functions lack the ``style`` semantic of the relational functions, it can still be a good idea to vary the marker and/or linestyle along with the hue to make figures that are maximally accessible and reproduce well in black and white:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(\\n\",\n \" data=titanic, x=\\\"class\\\", y=\\\"survived\\\", hue=\\\"sex\\\",\\n\",\n \" palette={\\\"male\\\": \\\"g\\\", \\\"female\\\": \\\"m\\\"},\\n\",\n \" markers=[\\\"^\\\", \\\"o\\\"], linestyles=[\\\"-\\\", \\\"--\\\"],\\n\",\n \" kind=\\\"point\\\"\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Showing additional dimensions\\n\",\n \"-----------------------------\\n\",\n \"\\n\",\n \"Just like :func:`relplot`, the fact that :func:`catplot` is built on a :class:`FacetGrid` means that it is easy to add faceting variables to visualize higher-dimensional relationships:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(\\n\",\n \" data=tips, x=\\\"day\\\", y=\\\"total_bill\\\", hue=\\\"smoker\\\",\\n\",\n \" kind=\\\"swarm\\\", col=\\\"time\\\", aspect=.7,\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"For further customization of the plot, you can use the methods on the :class:`FacetGrid` object that it returns:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.catplot(\\n\",\n \" data=titanic,\\n\",\n \" x=\\\"fare\\\", y=\\\"embark_town\\\", row=\\\"class\\\",\\n\",\n \" kind=\\\"box\\\", orient=\\\"h\\\",\\n\",\n \" sharex=False, margin_titles=True,\\n\",\n \" height=1.5, aspect=4,\\n\",\n \")\\n\",\n \"g.set(xlabel=\\\"Fare\\\", ylabel=\\\"\\\")\\n\",\n \"g.set_titles(row_template=\\\"{row_name} class\\\")\\n\",\n \"for ax in g.axes.flat:\\n\",\n \" ax.xaxis.set_major_formatter('${x:.0f}')\"\n ]\n }\n ],\n \"metadata\": {\n \"celltoolbar\": \"Tags\",\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"fileName":"__init__.py","filePath":"seaborn/_stats","id":24,"nodeType":"File","text":""},{"id":25,"name":"doc/_templates/autosummary","nodeType":"Package"},{"id":26,"name":"base.rst","nodeType":"TextFile","path":"doc/_templates/autosummary","text":"{{ fullname | escape | underline}}\n\n.. currentmodule:: {{ module }}\n\n.. auto{{ objtype }}:: {{ objname }}\n"},{"id":27,"name":"object.rst","nodeType":"TextFile","path":"doc/_templates/autosummary","text":"{{ fullname | escape | underline}}\n\n.. currentmodule:: {{ module }}\n\n.. autoclass:: {{ objname }}\n"},{"id":28,"name":"doc","nodeType":"Package"},{"id":29,"name":"citing.rst","nodeType":"TextFile","path":"doc","text":".. _citing:\n\nCiting and logo\n===============\n\nCiting seaborn\n--------------\n\nIf seaborn is integral to a scientific publication, please cite it.\nA paper describing seaborn has been published in the `Journal of Open Source Software `_.\nHere is a ready-made BibTeX entry:\n\n.. highlight:: none\n\n::\n\n @article{Waskom2021,\n doi = {10.21105/joss.03021},\n url = {https://doi.org/10.21105/joss.03021},\n year = {2021},\n publisher = {The Open Journal},\n volume = {6},\n number = {60},\n pages = {3021},\n author = {Michael L. Waskom},\n title = {seaborn: statistical data visualization},\n journal = {Journal of Open Source Software}\n }\n\nIn most situations where seaborn is cited, a citation to `matplotlib `_ would also be appropriate.\n\nLogo files\n----------\n\nAdditional logo files, including hi-res PNGs and images suitable for use over a dark background, are available\n`on GitHub `_.\n\nWide logo\n~~~~~~~~~\n\n.. image:: _static/logo-wide-lightbg.svg\n :width: 400px\n\nTall logo\n~~~~~~~~~\n\n.. image:: _static/logo-tall-lightbg.svg\n :width: 150px\n\nLogo mark\n~~~~~~~~~\n\n.. image:: _static/logo-mark-lightbg.svg\n :width: 150px\n\nCredit to `Matthias Bussonnier `_ for the initial design\nand implementation of the logo.\n"},{"id":30,"name":"objects.Norm.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"0bfee8b6-1e3e-499d-96ae-735a5c230b32\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn.objects as so\\n\",\n \"from seaborn import load_dataset\\n\",\n \"healthexp = load_dataset(\\\"healthexp\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"43adf565-2843-48fe-a12a-1a65bc9fce9f\",\n \"metadata\": {},\n \"source\": [\n \"By default, this transform scales each group relative to its maximum value:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"6262c89d-56cd-41b4-8276-0bf737b02f29\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(healthexp, x=\\\"Year\\\", y=\\\"Spending_USD\\\", color=\\\"Country\\\")\\n\",\n \" .add(so.Lines(), so.Norm())\\n\",\n \" .label(y=\\\"Spending relative to maximum amount\\\")\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"5941b47a-7f2f-4540-9944-c6a16e7eec75\",\n \"metadata\": {},\n \"source\": [\n \"Use `where` to constrain the values used to define a baseline, and `percent` to scale the output:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"8142d0b4-1b91-4ba9-bc60-3df148130ff9\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(healthexp, x=\\\"Year\\\", y=\\\"Spending_USD\\\", color=\\\"Country\\\")\\n\",\n \" .add(so.Lines(), so.Norm(where=\\\"x == x.min()\\\", percent=True))\\n\",\n \" .label(y=\\\"Percent change in spending from 1970 baseline\\\")\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"2f2d2d33-8a92-44fb-b37a-24dee23a7d75\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":31,"name":"boxenplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"882d215b-88d8-4b5e-ae7a-0e3f6bb53bad\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\\n\",\n \"sns.set_theme(style=\\\"whitegrid\\\")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"6809326c-14a9-4314-994d-b4e8e7414172\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"df = sns.load_dataset(\\\"diamonds\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"9ccbc2d5-5a44-4e80-8b07-e12629729f4a\",\n \"metadata\": {},\n \"source\": [\n \"Draw a single horizontal plot, assigning the data directly to the coordinate variable:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"391e1162-b438-4486-9a08-60686ee8e96a\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.boxenplot(x=df[\\\"price\\\"])\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"a3b0e9b8-1673-494c-a27a-aa9c60457ba1\",\n \"metadata\": {},\n \"source\": [\n \"Group by a categorical variable, referencing columns in a datafame\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"e30fec18-f127-40a3-bfaf-f71324dd60ec\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.boxenplot(data=df, x=\\\"price\\\", y=\\\"clarity\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"4f01a821-74d1-452d-a1f7-cf5b806169e8\",\n \"metadata\": {},\n \"source\": [\n \"Use a different scaling rule to control the width of each box:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"d0c1aa43-5e8a-486c-bd6d-3c29d6d23138\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.boxenplot(data=df, x=\\\"carat\\\", y=\\\"cut\\\", scale=\\\"linear\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"fd5d197c-8cbb-4be3-a14d-76447f06d3f1\",\n \"metadata\": {},\n \"source\": [\n \"Use a different method to determine the number of boxes:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"1aead6a3-6f12-47d3-b472-a39c61867963\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.boxenplot(data=df, x=\\\"carat\\\", y=\\\"cut\\\", k_depth=\\\"trustworthy\\\")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"719fd61f-9795-47d6-96bd-4929d8647038\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":32,"name":"light_palette.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"5cd1cbb8-ba1a-460b-8e3a-bc285867f1d1\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\\n\",\n \"sns.set_theme()\\n\",\n \"sns.palettes._patch_colormap_display()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"b157eb25-015f-4dd6-9785-83ba19cf4f94\",\n \"metadata\": {},\n \"source\": [\n \"Define a sequential ramp from a light gray to a specified color:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"851a4742-6276-4383-b17e-480beb896877\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.light_palette(\\\"seagreen\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"50053b26-112a-4378-8ef0-9be0fb565ec7\",\n \"metadata\": {},\n \"source\": [\n \"Specify the color with a hex code:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"74ae0d17-f65b-4bcf-ae66-d97d46964d5c\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.light_palette(\\\"#79C\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"eea376a2-fdf5-40e4-a187-3a28af529072\",\n \"metadata\": {},\n \"source\": [\n \"Specify the color from the husl system:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"66e451ee-869a-41ea-8dc5-4240b11e7be5\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.light_palette((20, 60, 50), input=\\\"husl\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"e4f44dcd-cf49-4920-ac05-b4db67870363\",\n \"metadata\": {},\n \"source\": [\n \"Increase the number of colors:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"75985f07-de92-4d8b-89d5-caf445b9375e\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.light_palette(\\\"xkcd:copper\\\", 8)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"34687ae8-fd6d-427a-a639-208f19e61122\",\n \"metadata\": {},\n \"source\": [\n \"Return a continuous colormap rather than a discrete palette:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"2c342db4-7f97-40f5-934e-9a82201890d1\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.light_palette(\\\"#a275ac\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"e7ebe64b-25fa-4c52-9ebe-fdcbba0ee51e\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":33,"name":"ci","nodeType":"Package"},{"id":34,"name":"deps_pinned.txt","nodeType":"TextFile","path":"ci","text":"numpy~=1.17.0\npandas~=0.25.0\nmatplotlib~=3.1.0\nscipy~=1.3.0\nstatsmodels~=0.10.0\n# Pillow added in install_requires for later matplotlibs\npillow>=6.2.0\ntyping_extensions\n"},{"id":35,"name":"api.rst","nodeType":"TextFile","path":"doc","text":".. _api_ref:\n\nAPI reference\n=============\n\n.. currentmodule:: seaborn.objects\n\n.. _objects_api:\n\nObjects interface\n-----------------\n\nPlot object\n~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :template: plot\n :nosignatures:\n\n Plot\n\nMark objects\n~~~~~~~~~~~~\n\n.. rubric:: Dot marks\n\n.. autosummary::\n :toctree: generated/\n :template: object\n :nosignatures:\n\n Dot\n Dots\n\n.. rubric:: Line marks\n\n.. autosummary::\n :toctree: generated/\n :template: object\n :nosignatures:\n\n Line\n Lines\n Path\n Paths\n Dash\n Range\n\n.. rubric:: Bar marks\n\n.. autosummary::\n :toctree: generated/\n :template: object\n :nosignatures:\n\n Bar\n Bars\n\n.. rubric:: Fill marks\n\n.. autosummary::\n :toctree: generated/\n :template: object\n :nosignatures:\n\n Area\n Band\n\n.. rubric:: Text marks\n\n.. autosummary::\n :toctree: generated/\n :template: object\n :nosignatures:\n\n Text\n\nStat objects\n~~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :template: object\n :nosignatures:\n\n Agg\n Est\n Count\n Hist\n KDE\n Perc\n PolyFit\n\nMove objects\n~~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :template: object\n :nosignatures:\n\n Dodge\n Jitter\n Norm\n Stack\n Shift\n\nScale objects\n~~~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :template: scale\n :nosignatures:\n\n Continuous\n Nominal\n Temporal\n\nBase classes\n~~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :template: object\n :nosignatures:\n\n Mark\n Stat\n Move\n Scale\n\n.. currentmodule:: seaborn\n\nFunction interface\n------------------\n\n.. _relational_api:\n\nRelational plots\n~~~~~~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n relplot\n scatterplot\n lineplot\n\n.. _distribution_api:\n\nDistribution plots\n~~~~~~~~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n displot\n histplot\n kdeplot\n ecdfplot\n rugplot\n distplot\n\n.. _categorical_api:\n\nCategorical plots\n~~~~~~~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n catplot\n stripplot\n swarmplot\n boxplot\n violinplot\n boxenplot\n pointplot\n barplot\n countplot\n\n.. _regression_api:\n\nRegression plots\n~~~~~~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n lmplot\n regplot\n residplot\n\n.. _matrix_api:\n\nMatrix plots\n~~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n heatmap\n clustermap\n\n.. _grid_api:\n\nMulti-plot grids\n----------------\n\nFacet grids\n~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n FacetGrid\n\nPair grids\n~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n pairplot\n PairGrid\n\nJoint grids\n~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n jointplot\n JointGrid\n\n.. _style_api:\n\nThemeing\n--------\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n set_theme\n axes_style\n set_style\n plotting_context\n set_context\n set_color_codes\n reset_defaults\n reset_orig\n set\n\n.. _palette_api:\n\nColor palettes\n--------------\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n set_palette\n color_palette\n husl_palette\n hls_palette\n cubehelix_palette\n dark_palette\n light_palette\n diverging_palette\n blend_palette\n xkcd_palette\n crayon_palette\n mpl_palette\n\nPalette widgets\n~~~~~~~~~~~~~~~\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n choose_colorbrewer_palette\n choose_cubehelix_palette\n choose_light_palette\n choose_dark_palette\n choose_diverging_palette\n\n\nUtility functions\n-----------------\n\n.. autosummary::\n :toctree: generated/\n :nosignatures:\n\n despine\n move_legend\n saturate\n desaturate\n set_hls_values\n load_dataset\n get_dataset_names\n get_data_home\n"},{"id":36,"name":"jointplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\\n\",\n \"sns.set_theme(style=\\\"white\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"In the simplest invocation, assign ``x`` and ``y`` to create a scatterplot (using :func:`scatterplot`) with marginal histograms (using :func:`histplot`):\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"penguins = sns.load_dataset(\\\"penguins\\\")\\n\",\n \"sns.jointplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Assigning a ``hue`` variable will add conditional colors to the scatterplot and draw separate density curves (using :func:`kdeplot`) on the marginal axes:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.jointplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", hue=\\\"species\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Several different approaches to plotting are available through the ``kind`` parameter. Setting ``kind=\\\"kde\\\"`` will draw both bivariate and univariate KDEs:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.jointplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", hue=\\\"species\\\", kind=\\\"kde\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Set ``kind=\\\"reg\\\"`` to add a linear regression fit (using :func:`regplot`) and univariate KDE curves:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.jointplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", kind=\\\"reg\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"There are also two options for bin-based visualization of the joint distribution. The first, with ``kind=\\\"hist\\\"``, uses :func:`histplot` on all of the axes:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.jointplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", kind=\\\"hist\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Alternatively, setting ``kind=\\\"hex\\\"`` will use :meth:`matplotlib.axes.Axes.hexbin` to compute a bivariate histogram using hexagonal bins:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.jointplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", kind=\\\"hex\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Additional keyword arguments can be passed down to the underlying plots:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.jointplot(\\n\",\n \" data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\",\\n\",\n \" marker=\\\"+\\\", s=100, marginal_kws=dict(bins=25, fill=False),\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Use :class:`JointGrid` parameters to control the size and layout of the figure:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.jointplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", height=5, ratio=2, marginal_ticks=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"To add more layers onto the plot, use the methods on the :class:`JointGrid` object that :func:`jointplot` returns:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.jointplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\")\\n\",\n \"g.plot_joint(sns.kdeplot, color=\\\"r\\\", zorder=0, levels=6)\\n\",\n \"g.plot_marginals(sns.rugplot, color=\\\"r\\\", height=-.15, clip_on=False)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"id":37,"name":"objects.Band.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"2923956c-f141-4ecb-ab08-e819099f0fa9\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn.objects as so\\n\",\n \"from seaborn import load_dataset\\n\",\n \"fmri = load_dataset(\\\"fmri\\\").query(\\\"region == 'parietal'\\\")\\n\",\n \"seaice = (\\n\",\n \" load_dataset(\\\"seaice\\\")\\n\",\n \" .assign(\\n\",\n \" Day=lambda x: x[\\\"Date\\\"].dt.day_of_year,\\n\",\n \" Year=lambda x: x[\\\"Date\\\"].dt.year,\\n\",\n \" )\\n\",\n \" .query(\\\"Year >= 1980\\\")\\n\",\n \" .astype({\\\"Year\\\": str})\\n\",\n \" .pivot(index=\\\"Day\\\", columns=\\\"Year\\\", values=\\\"Extent\\\")\\n\",\n \" .filter([\\\"1980\\\", \\\"2019\\\"])\\n\",\n \" .dropna()\\n\",\n \" .reset_index()\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"e840e876-fbd6-4bfd-868c-a9d7af7913fa\",\n \"metadata\": {},\n \"source\": [\n \"The mark fills between pairs of data points to show an interval on the value axis:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"518cf20d-bb0b-433a-9b25-f1ed8d432149\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p = so.Plot(seaice, x=\\\"Day\\\", ymin=\\\"1980\\\", ymax=\\\"2019\\\")\\n\",\n \"p.add(so.Band())\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"fa50b778-13f9-4368-a967-68365fd51117\",\n \"metadata\": {},\n \"source\": [\n \"By default it draws a faint ribbon with no edges, but edges can be added:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"a05176c4-0615-49ca-a2df-48ced8b5a8a8\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p.add(so.Band(alpha=.5, edgewidth=2))\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"776d192a-f35f-4253-be7f-01e4b2466dad\",\n \"metadata\": {},\n \"source\": [\n \"The defaults are optimized for the main expected usecase, where the mark is combined with a line to show an errorbar interval:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"69f4e423-94f4-4003-b337-12162d1040c2\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(fmri, x=\\\"timepoint\\\", y=\\\"signal\\\", color=\\\"event\\\")\\n\",\n \" .add(so.Band(), so.Est())\\n\",\n \" .add(so.Line(), so.Agg())\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"9f0c82bf-3457-4ac5-ba48-8930bac03d75\",\n \"metadata\": {},\n \"source\": [\n \"When min/max values are not explicitly assigned or added in a transform, the band will cover the full extent of the data:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"309f578e-da3d-4dc5-b6ac-a354321334c8\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(fmri, x=\\\"timepoint\\\", y=\\\"signal\\\", color=\\\"event\\\")\\n\",\n \" .add(so.Line(linewidth=.5), group=\\\"subject\\\")\\n\",\n \" .add(so.Band())\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"4330a3cd-63fe-470a-8e83-09e9606643b5\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":38,"name":"licences","nodeType":"Package"},{"id":39,"name":"HUSL_LICENSE","nodeType":"TextFile","path":"licences","text":"Copyright (C) 2012 Alexei Boronine\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"},{"id":40,"name":"doc/whatsnew","nodeType":"Package"},{"id":41,"name":"index.rst","nodeType":"TextFile","path":"doc/whatsnew","text":".. _whatsnew:\n\nWhat's new in each version\n==========================\n\nv0.12\n-----\n.. toctree::\n :maxdepth: 2\n\n v0.12.1\n v0.12.0\n\nv0.11\n-----\n.. toctree::\n :maxdepth: 2\n\n v0.11.2\n v0.11.1\n v0.11.0\n\nv0.10\n-----\n.. toctree::\n :maxdepth: 2\n\n v0.10.1\n v0.10.0\n\nv0.9\n----\n.. toctree::\n :maxdepth: 2\n\n v0.9.1\n v0.9.0\n\nv0.8\n----\n.. toctree::\n :maxdepth: 2\n\n v0.8.1\n v0.8.0\n\nv0.7\n----\n.. toctree::\n :maxdepth: 2\n\n v0.7.1\n v0.7.0\n\nv0.6\n----\n.. toctree::\n :maxdepth: 2\n\n v0.6.0\n\nv0.5\n----\n.. toctree::\n :maxdepth: 2\n\n v0.5.1\n v0.5.0\n\nv0.4\n----\n.. toctree::\n :maxdepth: 2\n\n v0.4.0\n\nv0.3\n----\n.. toctree::\n :maxdepth: 2\n\n v0.3.1\n v0.3.0\n\nv0.2\n----\n.. toctree::\n :maxdepth: 2\n\n v0.2.1\n v0.2.0\n"},{"id":42,"name":"","nodeType":"Package"},{"id":43,"name":"LICENSE.md","nodeType":"TextFile","path":"","text":"Copyright (c) 2012-2021, Michael L. Waskom\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the name of the project nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"},{"id":44,"name":"PACKAGING_LICENSE","nodeType":"TextFile","path":"licences","text":"Copyright (c) Donald Stufft and individual contributors.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"},{"id":45,"name":"faq.rst","nodeType":"TextFile","path":"doc","text":".. currentmodule:: seaborn\n\nFrequently asked questions\n==========================\n\nThis is a collection of answers to questions that are commonly raised about seaborn.\n\nGetting started\n---------------\n\n.. _faq_cant_import:\n\nI've installed seaborn, why can't I import it?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*It looks like you successfully installed seaborn by doing* `pip install seaborn` *but it cannot be imported. You get an error like \"ModuleNotFoundError: No module named 'seaborn'\" when you try.*\n\nThis is probably not a `seaborn` problem, *per se*. If you have multiple Python environments on your computer, it is possible that you did `pip install` in one environment and tried to import the library in another. On a unix system, you could check whether the terminal commands `which pip`, `which python`, and (if applicable) `which jupyter` point to the same `bin/` directory. If not, you'll need to sort out the definition of your `$PATH` variable.\n\nTwo alternate patterns for installing with `pip` may also be more robust to this problem:\n\n- Invoke `pip` on the command line with `python -m pip install ` rather than `pip install `\n- Use `%pip install ` in a Jupyter notebook to install it in the same place as the kernel\n\n.. _faq_import_fails:\n\nI can't import seaborn, even though it's definitely installed!\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*You've definitely installed seaborn in the right place, but importing it produces a long traceback and a confusing error message, perhaps something like* `ImportError: DLL load failed: The specified module could not be found`.\n\nSuch errors usually indicate a problem with the way Python libraries are using compiled resources. Because seaborn is pure Python, it won't directly encounter these problems, but its dependencies (numpy, scipy, matplotlib, and pandas) might. To fix the issue, you'll first need to read through the traceback and figure out which dependency was being imported at the time of the error. Then consult the installation documentation for the relevant package, which might have advice for getting an installation working on your specific system.\n\nThe most common culprit of these issues is scipy, which has many compiled components. Starting in seaborn version 0.12, scipy is an optional dependency, which should help to reduce the frequency of these issues.\n\n.. _faq_no_plots:\n\nWhy aren't my plots showing up?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*You're calling seaborn functions — maybe in a terminal or IDE with an integrated IPython console — but not seeing any plots.)*\n\nIn matplotlib, there is a distinction between *creating* a figure and *showing* it, and in some cases it's necessary to explicitly call :func:`matplotlib.pyplot.show` at the point when you want to see the plot. Because that command blocks by default and is not always desired (for instance, you may be executing a script that saves files to disk) seaborn does not deviate from standard matplotlib practice here.\n\nYet most of the examples in the seaborn docs do not have this line, because there are multiple ways to avoid needing it. In a Jupyter notebook with the `\"inline\" `_ (default) or `\"widget\" `_ backends, :func:`matplotlib.pyplot.show` is automatically called after executing a cell, so any figures will appear in the cell's outputs. You can also activate a more interactive experience by executing `%matplotlib` in any Jupyter or IPython interface or by calling :func:`matplotlib.pyplot.ion` anywhere in Python. Both methods will configure matplotlib to show or update the figure after every plotting command.\n\n.. _faq_repl_output:\n\nWhy is something printed after every notebook cell?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*You're using seaborn in a Jupyter notebook, and every cell prints something like or before showing the plot.*\n\nJupyter notebooks will show the result of the final statement in the cell as part of its output, and each of seaborn's plotting functions return a reference to the matplotlib or seaborn object that contain the plot. If this is bothersome, you can suppress this output in a few ways:\n\n- Always assign the result of the final statement to a variable (e.g. `ax = sns.histplot(...)`)\n- Add a semicolon to the end of the final statement (e.g. `sns.histplot(...);`)\n- End every cell with a function that has no return value (e.g. `plt.show()`, which isn't needed but also causes no problems)\n- Add `cell metadata tags `_, if you're converting the notebook to a different representation\n\n.. _faq_inline_dpi:\n\nWhy do the plots look fuzzy in a Jupyter notebook?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe default \"inline\" backend (defined by `IPython `_) uses an unusually low dpi (`\"dots per inch\" `_) for figure output. This is a space-saving measure: lower dpi figures take up less disk space. (Also, lower dpi inline graphics appear *physically* smaller because they are represented as `PNGs `_, which do not exactly have a concept of resolution.) So one faces an economy/quality tradeoff.\n\nYou can increase the DPI by resetting the rc parameters through the matplotlib API, using\n\n::\n\n plt.rcParams.update({\"figure.dpi\": 96})\n\nOr do it as you activate the seaborn theme::\n\n sns.set_theme(rc={\"figure.dpi\": 96})\n\nIf you have a high pixel-density monitor, you can make your plots sharper using \"retina mode\"::\n\n %config InlineBackend.figure_format = \"retina\"\n\nThis won't change the apparent size of your plots in a Jupyter interface, but they might appear very large in other contexts (i.e. on GitHub). And they will take up 4x the disk space. Alternatively, you can make SVG plots::\n\n %config InlineBackend.figure_format = \"svg\"\n\nThis will configure matplotlib to emit `vector graphics `_ with \"infinite resolution\". The downside is that file size will now scale with the number and complexity of the artists in your plot, and in some cases (e.g., a large scatterplot matrix) the load will impact browser responsiveness.\n\nTricky concepts\n---------------\n\n.. _faq_function_levels:\n\nWhat do \"figure-level\" and \"axes-level\" mean?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*You've encountered the term \"figure-level\" or \"axes-level\", maybe in the seaborn docs, StackOverflow answer, or GitHub thread, but you don't understand what it means.*\n\nIn brief, all plotting functions in seaborn fall into one of two categories:\n\n- \"axes-level\" functions, which plot onto a single subplot that may or may not exist at the time the function is called\n- \"figure-level\" functions, which internally create a matplotlib figure, potentially including multiple subplots\n\nThis design is intended to satisfy two objectives:\n\n- seaborn should offer functions that are \"drop-in\" replacements for matplotlib methods\n- seaborn should be able to produce figures that show \"facets\" or marginal distributions on distinct subplots\n\nThe figure-level functions always combine one or more axes-level functions with an object that manages the layout. So, for example, :func:`relplot` is a figure-level function that combines either :func:`scatterplot` or :func:`lineplot` with a :class:`FacetGrid`. In contrast, :func:`jointplot` is a figure-level function that can combine multiple different axes-level functions — :func:`scatterplot` and :func:`histplot` by default — with a :class:`JointGrid`.\n\nIf all you're doing is creating a plot with a single seaborn function call, this is not something you need to worry too much about. But it becomes relevant when you want to customize at a level beyond what the API of each function offers. It is also the source of various other points of confusion, so it is an important distinction understand (at least broadly) and keep in mind.\n\nThis is explained in more detail in the :doc:`tutorial ` and in `this blog post `_.\n\n.. _faq_categorical_plots:\n\nWhat is a \"categorical plot\" or \"categorical function\"?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nNext to the figure-level/axes-level distinction, this concept is probably the second biggest source of confusing behavior.\n\nSeveral :ref:`seaborn functions ` are referred to as \"categorical\" because they are designed to support a use-case where either the x or y variable in a plot is categorical (that is, the variable takes a finite number of potentially non-numeric values).\n\nAt the time these functions were written, matplotlib did not have any direct support for non-numeric data types. So seaborn internally builds a mapping from unique values in the data to 0-based integer indexes, which is what it passes to matplotlib. If your data are strings, that's great, and it more-or-less matches how `matplotlib now handles `_ string-typed data.\n\nBut a potential gotcha is that these functions *always do this*, even if both the x and y variables are numeric. This gives rise to a number of confusing behaviors, especially when mixing categorical and non-categorical plots (e.g., a combo bar-and-line plot).\n\nThe v0.12 release added a `native_scale` parameter to :func:`stripplot` and :func:`swarmplot`, which provides control over this behavior. It will be rolled out to other categorical functions in future releases. But the current behavior will almost certainly remain the default, so this is an important API wrinkle to understand.\n\nSpecifying data\n---------------\n\n.. _faq_data_format:\n\nHow does my data need to be organized?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo get the most out of seaborn, your data should have a \"long-form\" or \"tidy\" representation. In a dataframe, `this means that `_ each variable has its own column, each observation has its own row, and each value has its own cell. With long-form data, you can succinctly and exactly specify a visualization by assigning variables in the dataset (columns) to roles in the plot.\n\nData organization is a common stumbling block for beginners, in part because data are often not collected or stored in a long-form representation. Therefore, it is often necessary to `reshape `_ the data using pandas before plotting. Data reshaping can be a complex undertaking, requiring both a solid grasp of dataframe structure and knowledge of the pandas API. Investing some time in developing this skill can pay large dividends.\n\nBut while seaborn is *most* powerful when provided with long-form data, nearly every seaborn function will accept and plot \"wide-form\" data too. You can trigger this by passing an object to seaborn's `data=` parameter without specifying other plot variables (`x`, `y`, ...). You'll be limited when using wide-form data: each function can make only one kind of wide-form plot. In most cases, seaborn tries to match what matplotlib or pandas would do with a dataset of the same structure. Reshaping your data into long-form will give you substantially more flexibility, but it can be helpful to take a quick look at your data very early in the process, and seaborn tries to make this possible.\n\nUnderstanding how your data should be represented — and how to get it that way if it starts out messy — is very important for making efficient and complete use of seaborn, and it is elaborated on at length in the :doc:`user-guide `.\n\n.. _faq_pandas_requirement:\n\nDoes seaborn only work with pandas?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nGenerally speaking, no: seaborn is `quite flexible `_ about how your dataset needs to be represented.\n\nIn most cases, :ref:`long-form data ` represented by multiple vector-like types can be passed directly to `x`, `y`, or other plotting parameters. Or you can pass a dictionary of vector types to `data` rather than a DataFrame. And when plotting with wide-form data, you can use a 2D numpy array or even nested lists to plot in wide-form mode.\n\nThere are a couple older functions (namely, :func:`catplot` and :func:`lmplot`) that do require you to pass a :class:`pandas.DataFrame`. But at this point, they are the exception, and they will gain more flexibility over the next few release cycles.\n\nLayout problems\n---------------\n\n.. _faq_figure_size:\n\nHow do I change the figure size?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis is going to be more complicated than you might hope, in part because there are multiple ways to change the figure size in matplotlib, and in part because of the :ref:`figure-level/axes-level ` distinction in seaborn.\n\nIn matplotlib, you can usually set the default size for all figures through the `rc parameters `_, specifically `figure.figsize`. And you can set the size of an individual figure when you create it (e.g. `plt.subplots(figsize=(w, h))`). If you're using an axes-level seaborn function, both of these will work as expected.\n\nFigure-level functions both ignore the default figure size and :ref:`parameterize the figure size differently `. When calling a figure-level function, you can pass values to `height=` and `aspect=` to set (roughly) the size of each *subplot*. The advantage here is that the size of the figure automatically adapts when you add faceting variables. But it can be confusing.\n\nFortunately, there's a consistent way to set the exact figure size in a function-independent manner. Instead of setting the figure size when the figure is created, modify it after you plot by calling `obj.figure.set_size_inches(...)`, where `obj` is either a matplotlib axes (usually assigned to `ax`) or a seaborn `FacetGrid` (usually assigned to `g`).\n\nNote that :attr:`FacetGrid.figure` exists only on seaborn >= 0.11.2; before that you'll have to access :attr:`FacetGrid.fig`.\n\nAlso, if you're making pngs (or in a Jupyter notebook), you can — perhaps surprisingly — scale all your plots up or down by :ref:`changing the dpi `.\n\n.. _faq_plot_misplaced:\n\nWhy isn't seaborn drawing the plot where I tell it to?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*You've explicitly created a matplotlib figure with one or more subplots and tried to draw a seaborn plot on it, but you end up with an extra figure and a blank subplot. Perhaps your code looks something like*\n\n::\n\n f, ax = plt.subplots()\n sns.catplot(..., ax=ax)\n\nThis is a :ref:`figure-level/axes-level ` gotcha. Figure-level functions always create their own figure, so you can't direct them towards an existing axes the way you can with axes-level functions. Most functions will warn you when this happens, suggest the appropriate axes-level function, and ignore the `ax=` parameter. A few older functions might put the plot where you want it (because they internally pass `ax` to their axes-level function) while still creating an extra figure. This latter behavior should be considered a bug, and it is not to be relied on.\n\nThe way things currently work, you can either set up the matplotlib figure yourself, or you can use a figure-level function, but you can't do both at the same time.\n\n.. _faq_categorical_line:\n\nWhy can't I draw a line over a bar/box/strip/violin plot?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*You're trying to create a single plot using multiple seaborn functions, perhaps by drawing a lineplot or regplot over a barplot or violinplot. You expect the line to go through the mean value for each box (etc.), but it looks to be misalgined, or maybe it's all the way off to the side.*\n\nYou are trying to combine a :ref:`\"categorical plot\" ` with another plot type. If your `x` variable has numeric values, it seems like this should work. But recall: seaborn's categorical plots map unique values on the categorical axis to integer indexes. So if your data have unique `x` values of 1, 6, 20, 94, the corresponding plot elements will get drawn at 0, 1, 2, 3 (and the tick labels will be changed to represent the actual value).\n\nThe line or regression plot doesn't know that this has happened, so it will use the actual numeric values, and the plots won't line up at all.\n\nAs of now, there are two ways to work around this. In situations where you want to draw a line, you could use the (somewhat misleadingly named) :func:`pointplot` function, which is also a \"categorical\" function and will use the same rules for drawing the plot. If this doesn't solve the problem (for one, it's not as visually flexible as :func:`lineplot`, you could implement the mapping from actual values to integer indexes yourself and draw the plot that way::\n\n unique_xs = sorted(df[\"x\"].unique())\n sns.violinplot(data=df, x=\"x\", y=\"y\")\n sns.lineplot(data=df, x=df[\"x\"].map(unique_xs.index), y=\"y\")\n\nThis is something that will be easier in a planned future release, as it will become possible to make the categorical functions treat numeric data as numeric. (As of v0.12, it's possible only in :func:`stripplot` and :func:`swarmplot`, using `native_scale=True`).\n\nHow do I move the legend?\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*When applying a semantic mapping to a plot, seaborn will automatically create a legend and add it to the figure. But the automatic choice of legend position is not always ideal.*\n\nWith seaborn v0.11.2 or later, use the :func:`move_legend` function.\n\nOn older versions, a common pattern was to call `ax.legend(loc=...)` after plotting. While this appears to move the legend, it actually *replaces* it with a new one, using any labeled artists that happen to be attached to the axes. This does `not consistently work `_ across plot types. And it does not propagate the legend title or positioning tweaks that are used to format a multi-variable legend.\n\nThe :func:`move_legend` function is actually more powerful than its name suggests, and it can also be used to modify other `legend parameters `_ (font size, handle length, etc.) after plotting.\n\nOther customizations\n--------------------\n\n.. _faq_figure_customization:\n\nHow can I can I change something about the figure?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*You want to make a very specific plot, and seaborn's defaults aren't doing it for you.*\n\nThere's basically a four-layer hierarchy to customizing a seaborn figure:\n\n1. Explicit seaborn function parameters\n2. Passed-through matplotlib keyword arguments\n3. Matplotlib axes methods\n4. Matplotlib artist methods\n\nFirst, read through the API docs for the relevant seaborn function. Each has a lot of parameters (probably too many), and you may be able to accomplish your desired customization using seaborn's own API.\n\nBut seaborn does delegate a lot of customization to matplotlib. Most functions have `**kwargs` in their signature, which will catch extra keyword arguments and pass them through to the underlying matplotlib function. For example, :func:`scatterplot` has a number of parameters, but you can also use any valid keyword argument for :meth:`matplotlib.axes.Axes.scatter`, which it calls internally.\n\nPassing through keyword arguments lets you customize the artists that represent data, but often you will want to customize other aspects of the figure, such as labels, ticks, and titles. You can do this by calling methods on the object that seaborn's plotting functions return. Depending on whether you're calling an :ref:`axes-level or figure-level function `, this may be a :class:`matplotlib.axes.Axes` object or a seaborn wrapper (such as :class:`seaborn.FacetGrid`). Both kinds of objects have numerous methods that you can call to customize nearly anything about the figure. The easiest thing is usually to call :meth:`matplotlib.axes.Axes.set` or :meth:`seaborn.FacetGrid.set`, which let you modify multiple attributes at once, e.g.::\n\n ax = sns.scatterplot(...)\n ax.set(\n xlabel=\"The x label\",\n ylabel=\"The y label\",\n title=\"The title\"\n xlim=(xmin, xmax),\n xticks=[...],\n xticklabels=[...],\n )\n\nFinally, the deepest customization may require you to reach \"into\" the matplotlib axes and tweak the artists that are stored on it. These will be in artist lists, such as `ax.lines`, `ax.collections`, `ax.patches`, etc.\n\n*Warning:* Neither matplotlib nor seaborn consider the specific artists produced by their plotting functions to be part of stable API. Because it's not possible to gracefully warn about upcoming changes to the artist types or the order in which they are stored, code that interacts with these attributes could break unexpectedly. With that said, seaborn does try hard to avoid making this kind of change.\n\n.. _faq_matplotlib_requirement:\n\nWait, I need to learn how to use matplotlib too?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIt really depends on how much customization you need. You can certainly perform a lot of exploratory data analysis while primarily or exclusively interacting with the seaborn API. But, if you're polishing a figure for a presentation or publication, you'll likely find yourself needing to understand at least a little bit about how matplotlib works. Matplotlib is extremely flexible, and it lets you control literally everything about a figure if you drill down far enough.\n\nSeaborn was originally designed with the idea that it would handle a specific set of well-defined operations through a very high-level API, while letting users \"drop down\" to matplotlib when they desired additional customization. This can be a pretty powerful combination, and it works reasonably well if you already know how to use matplotlib. But as seaborn as gained more features, it has become more feasible to learn seaborn *first*. In that situation, the need to switch APIs tends to be a bit more confusing / frustrating. This has motivated the development of seaborn's new :doc:`objects interface `, which aims to provide a more cohesive API for both high-level and low-level figure specification. Hopefully, it will alleviate the \"two-library problem\" as it matures.\n\nWith that said, the level of deep control that matplotlib affords really can't be beat, so if you care about doing very specific things, it really is worth learning.\n\n.. _faq_object_oriented:\n\nHow do I use seaborn with matplotlib's object-oriented interface?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*You prefer to use matplotlib's explicit or* `\"object-oriented\" `_ *interface, because it makes your code easier to reason about and maintain. But the object-orient interface consists of methods on matplotlib objects, whereas seaborn offers you independent functions.*\n\nThis is another case where it will be helpful to keep the :ref:`figure-level/axes-level ` distinction in mind.\n\nAxes-level functions can be used like any matplotlib axes method, but instead of calling `ax.func(...)`, you call `func(..., ax=ax)`. They also return the axes object (which they may have created, if no figure was currently active in matplotlib's global state). You can use the methods on that object to further customize the plot even if you didn't start with :func:`matplotlib.pyplot.figure` or :func:`matplotlib.pyplot.subplots`::\n\n ax = sns.histplot(...)\n ax.set(...)\n\nFigure-level functions :ref:`can't be directed towards an existing figure `, but they do store the matplotlib objects on the :class:`FacetGrid` object that they return (which seaborn docs always assign to a variable named `g`).\n\nIf your figure-level function created only one subplot, you can access it directly::\n\n g = sns.displot(...)\n g.ax.set(...)\n\nFor multiple subplots, you can either use :attr:`FacetGrid.axes` (which is always a 2D array of axes) or :attr:`FacetGrid.axes_dict` (which maps the row/col keys to the corresponding matplotlib object)::\n\n g = sns.displot(..., col=...)\n for col, ax in g.axes_dict.items():\n ax.set(...)\n\nBut if you're batch-setting attributes on all subplots, use the :meth:`FacetGrid.set` method rather than iterating over the individual axes::\n\n g = sns.displot(...)\n g.set(...)\n\nTo access the underlying matplotlib *figure*, use :attr:`FacetGrid.figure` on seaborn >= 0.11.2 (or :attr:`FacetGrid.fig` on any other version).\n\n.. _faq_bar_annotations:\n\nCan I annotate bar plots with the bar values?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nNothing like this is built into seaborn, but matplotlib v3.4.0 added a convenience function (:meth:`matplotlib.axes.Axes.bar_label`) that makes it relatively easy. Here are a couple of recipes; note that you'll need to use a different approach depending on whether your bars come from a :ref:`figure-level or axes-level function `::\n\n # Axes-level\n ax = sns.histplot(df, x=\"x_var\")\n for bars in ax.containers:\n ax.bar_label(bars)\n\n # Figure-level, one subplot\n g = sns.displot(df, x=\"x_var\")\n for bars in g.ax.containers:\n g.ax.bar_label(bars)\n\n # Figure-level, multiple subplots\n g = sns.displot(df, x=\"x_var\", col=\"col_var)\n for ax in g.axes.flat:\n for bars in ax.containers:\n ax.bar_label(bars)\n\n.. _faq_dar_mode:\n\nCan I use seaborn in dark mode?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere's no direct support for this in seaborn, but matplotlib has a `\"dark_background\" `_ style-sheet that you could use, e.g.::\n\n sns.set_theme(style=\"ticks\", rc=plt.style.library[\"dark_background\"])\n\nNote that \"dark_background\" changes the default color palette to \"Set2\", and that will override any palette you define in :func:`set_theme`. If you'd rather use a different color palette, you'll have to call :func:`sns.set_palette` separately. The default :doc:`seaborn palette ` (\"deep\") has poor contrast against a dark background, so you'd be better off using \"muted\", \"bright\", or \"pastel\".\n\nStatistical inquiries\n---------------------\n\n.. _faq_stat_results:\n\nCan I access the results of seaborn's statistical transformations?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nBecause seaborn performs some statistical operations as it builds plots (aggregating, bootstrapping, fitting regression models), some users would like access to the statistics that it computes. This is not possible: it's explicitly considered out of scope for seaborn (a visualization library) to offer an API for interrogating statistical models.\n\nIf you simply want to be diligent and verify that seaborn is doing things correctly (or that it matches your own code), it's open-source, so feel free to read the code. Or, because it's Python, you can call into the private methods that calculate the stats (just don't do this in production code). But don't expect seaborn to offer features that are more at home in `scipy `_ or `statsmodels `_.\n\n.. _faq_standard_error:\n\nCan I show standard error instead of a confidence interval?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAs of v0.12, this is possible in most places, using the new `errorbar` API (see the :doc:`tutorial ` for more details).\n\n.. _faq_kde_value:\n\nWhy does the y axis for a KDE plot go above 1?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n*You've estimated a probability distribution for your data using* :func:`kdeplot`, *but the y axis goes above 1. Aren't probabilities bounded by 1? Is this a bug?*\n\nThis is not a bug, but it is a common confusion (about kernel density plots and probability distributions more broadly). A continuous probability distribution is defined by a `probability density function `_, which :func:`kdeplot` estimates. The probability density function does **not** output *a probability*: a continuous random variable can take an infinite number of values, so the probability of observing any *specific* value is infinitely small. You can only talk meaningfully about the probability of observing a value that falls within some *range*. The probability of observing a value that falls within the complete range of possible values is 1. Likewise, the probability density function is normalized so that the area under it (that is, the integral of the function across its domain) equals 1. If the range of likely values is small, the curve will have to go above 1 to make this possible.\n\nCommon curiosities\n------------------\n\n.. _faq_import_convention:\n\nWhy is seaborn imported as `sns`?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis is an obscure reference to the `namesake `_ of the library, but you can also think of it as \"seaborn name space\".\n\n.. _faq_seaborn_sucks:\n\nWhy is ggplot so much better than seaborn?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nGood question. Probably because you get to use the word \"geom\" a lot, and it's fun to say. \"Geom\". \"Geeeeeooom\".\n"},{"id":46,"name":"getmsfonts.sh","nodeType":"TextFile","path":"ci","text":"echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections\napt-get install msttcorefonts -qq\n"},{"id":47,"name":"APPDIRS_LICENSE","nodeType":"TextFile","path":"licences","text":"Copyright (c) 2005-2010 ActiveState Software Inc.\nCopyright (c) 2013 Eddy Petrișor\n\nThis file is directly from\nhttps://github.com/ActiveState/appdirs/blob/3fe6a83776843a46f20c2e5587afcffe05e03b39/appdirs.py\n\nThe license of https://github.com/ActiveState/appdirs copied below:\n\n\n# This is the MIT license\n\nCopyright (c) 2010 ActiveState Software Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"},{"id":48,"name":"stripplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\\n\",\n \"sns.set_theme(style=\\\"whitegrid\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Assigning a single numeric variable shows its univariate distribution with points randomly \\\"jittered\\\" on the other axis:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"tips = sns.load_dataset(\\\"tips\\\")\\n\",\n \"sns.stripplot(data=tips, x=\\\"total_bill\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Assigning a second variable splits the strips of points to compare categorical levels of that variable:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Show vertically-oriented strips by swapping the assignment of the categorical and numerical variables:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips, x=\\\"day\\\", y=\\\"total_bill\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Prior to version 0.12, the levels of the categorical variable had different colors by default. To get the same effect, assign the `hue` variable explicitly:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"day\\\", legend=False)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Or you can assign a distinct variable to `hue` to show a multidimensional relationship:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"sex\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"If the `hue` variable is numeric, it will be mapped with a quantitative palette by default (note that this was not the case prior to version 0.12):\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"size\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Use `palette` to control the color mapping, including forcing a categorical mapping by passing the name of a qualitative palette:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"size\\\", palette=\\\"deep\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"By default, the different levels of the `hue` variable are intermingled in each strip, but setting `dodge=True` will split them:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"sex\\\", dodge=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The random jitter can be disabled by setting `jitter=False`:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"sex\\\", dodge=True, jitter=False)\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"If plotting in wide-form mode, each numeric column of the dataframe will be mapped to both `x` and `hue`:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"To change the orientation while in wide-form mode, pass `orient` explicitly:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips, orient=\\\"h\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The `orient` parameter is also useful when both axis variables are numeric, as it will resolve ambiguity about which dimension to group (and jitter) along:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(data=tips, x=\\\"total_bill\\\", y=\\\"size\\\", orient=\\\"h\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"By default, the categorical variable will be mapped to discrete indices with a fixed scale (0, 1, ...), even when it is numeric:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(\\n\",\n \" data=tips.query(\\\"size in [2, 3, 5]\\\"),\\n\",\n \" x=\\\"total_bill\\\", y=\\\"size\\\", orient=\\\"h\\\",\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"To disable this behavior and use the original scale of the variable, set `native_scale=True`:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(\\n\",\n \" data=tips.query(\\\"size in [2, 3, 5]\\\"),\\n\",\n \" x=\\\"total_bill\\\", y=\\\"size\\\", orient=\\\"h\\\",\\n\",\n \" native_scale=True,\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Further visual customization can be achieved by passing keyword arguments for :func:`matplotlib.axes.Axes.scatter`:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.stripplot(\\n\",\n \" data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"time\\\",\\n\",\n \" jitter=False, s=20, marker=\\\"D\\\", linewidth=1, alpha=.1,\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"To make a plot with multiple facets, it is safer to use :func:`catplot` than to work with :class:`FacetGrid` directly, because :func:`catplot` will ensure that the categorical and hue variables are properly synchronized in each facet:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.catplot(data=tips, x=\\\"time\\\", y=\\\"total_bill\\\", hue=\\\"sex\\\", col=\\\"day\\\", aspect=.5)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"id":49,"name":"dark_palette.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"5cd1cbb8-ba1a-460b-8e3a-bc285867f1d1\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\\n\",\n \"sns.set_theme()\\n\",\n \"sns.palettes._patch_colormap_display()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"b157eb25-015f-4dd6-9785-83ba19cf4f94\",\n \"metadata\": {},\n \"source\": [\n \"Define a sequential ramp from a dark gray to a specified color:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"5b655d28-9855-4528-8b8e-a6c50288fd1b\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.dark_palette(\\\"seagreen\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"50053b26-112a-4378-8ef0-9be0fb565ec7\",\n \"metadata\": {},\n \"source\": [\n \"Specify the color with a hex code:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"74ae0d17-f65b-4bcf-ae66-d97d46964d5c\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.dark_palette(\\\"#79C\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"eea376a2-fdf5-40e4-a187-3a28af529072\",\n \"metadata\": {},\n \"source\": [\n \"Specify the color from the husl system:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"66e451ee-869a-41ea-8dc5-4240b11e7be5\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.dark_palette((20, 60, 50), input=\\\"husl\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"e4f44dcd-cf49-4920-ac05-b4db67870363\",\n \"metadata\": {},\n \"source\": [\n \"Increase the number of colors:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"75985f07-de92-4d8b-89d5-caf445b9375e\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.dark_palette(\\\"xkcd:golden\\\", 8)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"34687ae8-fd6d-427a-a639-208f19e61122\",\n \"metadata\": {},\n \"source\": [\n \"Return a continuous colormap rather than a discrete palette:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"2c342db4-7f97-40f5-934e-9a82201890d1\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.dark_palette(\\\"#b285bc\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"e7ebe64b-25fa-4c52-9ebe-fdcbba0ee51e\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":50,"name":"violinplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"cc19031c-bc2f-4294-95ce-3a2d9b86f44d\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\\n\",\n \"sns.set_theme(style=\\\"whitegrid\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"863c03b1-63e2-4d60-a3a4-4693afab4b5b\",\n \"metadata\": {},\n \"source\": [\n \"Draw a single horizontal boxplot, assigning the data directly to the coordinate variable:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"27d578fb-1c20-4d31-b93d-b1b4a053992b\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"df = sns.load_dataset(\\\"titanic\\\")\\n\",\n \"sns.violinplot(x=df[\\\"age\\\"])\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"aeea380b-405e-4762-8ede-db57f5549ca5\",\n \"metadata\": {},\n \"source\": [\n \"Group by a categorical variable, referencing columns in a dataframe:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"2b851b2c-0011-4cff-8719-11f6138c44e7\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.violinplot(data=df, x=\\\"age\\\", y=\\\"class\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"c9a99aa4-2da0-42fa-879a-0c3b264803f4\",\n \"metadata\": {},\n \"source\": [\n \"Draw vertical violins, grouped by two variables:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"4810c8e7-0864-496f-8e86-a6527369b9e1\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.violinplot(data=df, x=\\\"class\\\", y=\\\"age\\\", hue=\\\"alive\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"973e6617-5720-428d-a0ac-447e76aa9fde\",\n \"metadata\": {},\n \"source\": [\n \"Draw split violins to take up less space:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"2ae35376-5272-496c-afec-c60a3426f1bf\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.violinplot(data=df, x=\\\"deck\\\", y=\\\"age\\\", hue=\\\"alive\\\", split=True)\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"f291d4a2-41bc-4eb0-813d-7a1ceacc0cb0\",\n \"metadata\": {},\n \"source\": [\n \"Prevent the density from smoothing beyond the limits of the data:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"82556de0-3756-426c-a591-9af6ed6c45d4\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.violinplot(data=df, x=\\\"age\\\", y=\\\"alive\\\", cut=0)\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"6f351f71-1db3-4c5a-948c-9e1dbc550234\",\n \"metadata\": {},\n \"source\": [\n \"Use a narrower bandwidth to reduce the amount of smoothing:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"8d17e1e3-e0f4-4d2c-ac6e-aec42ed75390\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.violinplot(data=df, x=\\\"age\\\", y=\\\"alive\\\", bw=.15)\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"c4aaeb60-6c1b-4337-91ce-d6b744a3dd90\",\n \"metadata\": {},\n \"source\": [\n \"Represent every observation inside the distribution\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"00b5f00e-a515-4e53-9d73-d13b045cd4c8\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.violinplot(data=df, x=\\\"age\\\", y=\\\"embark_town\\\", inner=\\\"stick\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"01622556-9df8-4af1-b36c-9bc5f6b6099e\",\n \"metadata\": {},\n \"source\": [\n \"Use a different scaling rule for normalizing the density:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"be59f17e-824e-4a8c-a0e1-a27874a05df6\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.violinplot(data=df, x=\\\"age\\\", y=\\\"embark_town\\\", scale=\\\"count\\\")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"fdda9a33-37f3-43fd-b02d-1ff414657a37\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":51,"name":"v0.11.0.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.11.0 (September 2020)\n------------------------\n\nThis is a major release with several important new features, enhancements to existing functions, and changes to the library. Highlights include an overhaul and modernization of the distributions plotting functions, more flexible data specification, new colormaps, and better narrative documentation.\n\nFor an overview of the new features and a guide to updating, see `this Medium post `_.\n\nRequired keyword arguments\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n|API|\n\nMost plotting functions now require all of their parameters to be specified using keyword arguments. To ease adaptation, code without keyword arguments will trigger a ``FutureWarning`` in v0.11. In a future release (v0.12 or v0.13, depending on release cadence), this will become an error. Once keyword arguments are fully enforced, the signature of the plotting functions will be reorganized to accept ``data`` as the first and only positional argument (:pr:`2052,2081`).\n\nModernization of distribution functions\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe distribution module has been completely overhauled, modernizing the API and introducing several new functions and features within existing functions. Some new features are explained here; the :doc:`tutorial documentation ` has also been rewritten and serves as a good introduction to the functions.\n\nNew plotting functions\n^^^^^^^^^^^^^^^^^^^^^^\n\n|Feature| |Enhancement|\n\nFirst, three new functions, :func:`displot`, :func:`histplot` and :func:`ecdfplot` have been added (:pr:`2157`, :pr:`2125`, :pr:`2141`).\n\nThe figure-level :func:`displot` function is an interface to the various distribution plots (analogous to :func:`relplot` or :func:`catplot`). It can draw univariate or bivariate histograms, density curves, ECDFs, and rug plots on a :class:`FacetGrid`.\n\nThe axes-level :func:`histplot` function draws univariate or bivariate histograms with a number of features, including:\n\n- mapping multiple distributions with a ``hue`` semantic\n- normalization to show density, probability, or frequency statistics\n- flexible parameterization of bin size, including proper bins for discrete variables\n- adding a KDE fit to show a smoothed distribution over all bin statistics\n- experimental support for histograms over categorical and datetime variables.\n\nThe axes-level :func:`ecdfplot` function draws univariate empirical cumulative distribution functions, using a similar interface.\n\nChanges to existing functions\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n|API| |Feature| |Enhancement| |Defaults|\n\nSecond, the existing functions :func:`kdeplot` and :func:`rugplot` have been completely overhauled (:pr:`2060,2104`).\n\nThe overhauled functions now share a common API with the rest of seaborn, they can show conditional distributions by mapping a third variable with a ``hue`` semantic, and they have been improved in numerous other ways. The github pull request (:pr:`2104`) has a longer explanation of the changes and the motivation behind them.\n\nThis is a necessarily API-breaking change. The parameter names for the positional variables are now ``x`` and ``y``, and the old names have been deprecated. Efforts were made to handle and warn when using the deprecated API, but it is strongly suggested to check your plots carefully.\n\nAdditionally, the statsmodels-based computation of the KDE has been removed. Because there were some inconsistencies between the way different parameters (specifically, ``bw``, ``clip``, and ``cut``) were implemented by each backend, this may cause plots to look different with non-default parameters. Support for using non-Gaussian kernels, which was available only in the statsmodels backend, has been removed.\n\nOther new features include:\n\n- several options for representing multiple densities (using the ``multiple`` and ``common_norm`` parameters)\n- weighted density estimation (using the new ``weights`` parameter)\n- better control over the smoothing bandwidth (using the new ``bw_adjust`` parameter)\n- more meaningful parameterization of the contours that represent a bivariate density (using the ``thresh`` and ``levels`` parameters)\n- log-space density estimation (using the new ``log_scale`` parameter, or by scaling the data axis before plotting)\n- \"bivariate\" rug plots with a single function call (by assigning both ``x`` and ``y``)\n\nDeprecations\n^^^^^^^^^^^^\n\n|API|\n\nFinally, the :func:`distplot` function is now formally deprecated. Its features have been subsumed by :func:`displot` and :func:`histplot`. Some effort was made to gradually transition :func:`distplot` by adding the features in :func:`displot` and handling backwards compatibility, but this proved to be too difficult. The similarity in the names will likely cause some confusion during the transition, which is regrettable.\n\nRelated enhancements and changes\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n|API| |Feature| |Enhancement| |Defaults|\n\nThese additions facilitated new features (and forced changes) in :func:`jointplot` and :class:`JointGrid` (:pr:`2210`) and in :func:`pairplot` and :class:`PairGrid` (:pr:`2234`).\n\n- Added support for the ``hue`` semantic in :func:`jointplot`/:class:`JointGrid`. This support is lightweight and simply delegates the mapping to the underlying axes-level functions.\n\n- Delegated the handling of ``hue`` in :class:`PairGrid`/:func:`pairplot` to the plotting function when it understands ``hue``, meaning that (1) the zorder of scatterplot points will be determined by row in dataframe, (2) additional options for resolving hue (e.g. the ``multiple`` parameter) can be used, and (3) numeric hue variables can be naturally mapped when using :func:`scatterplot`.\n\n- Added ``kind=\"hist\"`` to :func:`jointplot`, which draws a bivariate histogram on the joint axes and univariate histograms on the marginal axes, as well as both ``kind=\"hist\"`` and ``kind=\"kde\"`` to :func:`pairplot`, which behaves likewise.\n\n- The various modes of :func:`jointplot` that plot marginal histograms now use :func:`histplot` rather than :func:`distplot`. This slightly changes the default appearance and affects the valid keyword arguments that can be passed to customize the plot. Likewise, the marginal histogram plots in :func:`pairplot` now use :func:`histplot`.\n\nStandardization and enhancements of data ingest\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n|Feature| |Enhancement| |Docs|\n\nThe code that processes input data has been refactored and enhanced. In v0.11, this new code takes effect for the relational and distribution modules; other modules will be refactored to use it in future releases (:pr:`2071`).\n\nThese changes should be transparent for most use-cases, although they allow a few new features:\n\n- Named variables for long-form data can refer to the named index of a :class:`pandas.DataFrame` or to levels in the case of a multi-index. Previously, it was necessary to call :meth:`pandas.DataFrame.reset_index` before using index variables (e.g., after a groupby operation).\n- :func:`relplot` now has the same flexibility as the axes-level functions to accept data in long- or wide-format and to accept data vectors (rather than named variables) in long-form mode.\n- The data parameter can now be a Python ``dict`` or an object that implements that interface. This is a new feature for wide-form data. For long-form data, it was previously supported but not documented.\n- A wide-form data object can have a mixture of types; the non-numeric types will be removed before plotting. Previously, this caused an error.\n- There are better error messages for other instances of data mis-specification.\n\nSee the new user guide chapter on :doc:`data formats ` for more information about what is supported.\n\nOther changes\n~~~~~~~~~~~~~\n\nDocumentation improvements\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- |Docs| Added two new chapters to the user guide, one giving an overview of the :doc:`types of functions in seaborn `, and one discussing the different :doc:`data formats ` that seaborn understands.\n\n- |Docs| Expanded the :doc:`color palette tutorial ` to give more background on color theory and better motivate the use of color in statistical graphics.\n\n- |Docs| Added more information to the :doc:`installation guidelines ` and streamlined the :doc:`introduction ` page.\n\n- |Docs| Improved cross-linking within the seaborn docs and between the seaborn and matplotlib docs.\n\nTheming\n^^^^^^^\n\n- |API| The :func:`set` function has been renamed to :func:`set_theme` for more clarity about what it does. For the foreseeable future, :func:`set` will remain as an alias, but it is recommended to update your code.\n\nRelational plots\n^^^^^^^^^^^^^^^^\n\n- |Enhancement| |Defaults| Reduced some of the surprising behavior of relational plot legends when using a numeric hue or size mapping (:pr:`2229`):\n\n - Added an \"auto\" mode (the new default) that chooses between \"brief\" and \"full\" legends based on the number of unique levels of each variable.\n - Modified the ticking algorithm for a \"brief\" legend to show up to 6 values and not to show values outside the limits of the data.\n - Changed the approach to the legend title: the normal matplotlib legend title is used when only one variable is assigned a semantic mapping, whereas the old approach of adding an invisible legend artist with a subtitle label is used only when multiple semantic variables are defined.\n - Modified legend subtitles to be left-aligned and to be drawn in the default legend title font size.\n\n- |Enhancement| |Defaults| Changed how functions that use different representations for numeric and categorical data handle vectors with an ``object`` data type. Previously, data was considered numeric if it could be coerced to a float representation without error. Now, object-typed vectors are considered numeric only when their contents are themselves numeric. As a consequence, numbers that are encoded as strings will now be treated as categorical data (:pr:`2084`).\n\n- |Enhancement| |Defaults| Plots with a ``style`` semantic can now generate an infinite number of unique dashes and/or markers by default. Previously, an error would be raised if the ``style`` variable had more levels than could be mapped using the default lists. The existing defaults were slightly modified as part of this change; if you need to exactly reproduce plots from earlier versions, refer to the `old defaults `_ (:pr:`2075`).\n\n- |Defaults| Changed how :func:`scatterplot` sets the default linewidth for the edges of the scatter points. New behavior is to scale with the point sizes themselves (on a plot-wise, not point-wise basis). This change also slightly reduces the default width when point sizes are not varied. Set ``linewidth=0.75`` to reproduce the previous behavior. (:pr:`2708`).\n\n- |Enhancement| Improved support for datetime variables in :func:`scatterplot` and :func:`lineplot` (:pr:`2138`).\n\n- |Fix| Fixed a bug where :func:`lineplot` did not pass the ``linestyle`` parameter down to matplotlib (:pr:`2095`).\n\n- |Fix| Adapted to a change in matplotlib that prevented passing vectors of literal values to ``c`` and ``s`` in :func:`scatterplot` (:pr:`2079`).\n\nCategorical plots\n^^^^^^^^^^^^^^^^^\n\n- |Enhancement| |Defaults| |Fix| Fixed a few computational issues in :func:`boxenplot` and improved its visual appearance (:pr:`2086`):\n\n - Changed the default method for computing the number of boxes to``k_depth=\"tukey\"``, as the previous default (``k_depth=\"proportion\"``) is based on a heuristic that produces too many boxes for small datasets.\n - Added the option to specify the specific number of boxes (e.g. ``k_depth=6``) or to plot boxes that will cover most of the data points (``k_depth=\"full\"``).\n - Added a new parameter, ``trust_alpha``, to control the number of boxes when ``k_depth=\"trustworthy\"``.\n - Changed the visual appearance of :func:`boxenplot` to more closely resemble :func:`boxplot`. Notably, thin boxes will remain visible when the edges are white.\n\n- |Enhancement| Allowed :func:`catplot` to use different values on the categorical axis of each facet when axis sharing is turned off (e.g. by specifying ``sharex=False``) (:pr:`2196`).\n\n- |Enhancement| Improved the error messages produced when categorical plots process the orientation parameter.\n\n- |Enhancement| Added an explicit warning in :func:`swarmplot` when more than 5% of the points overlap in the \"gutters\" of the swarm (:pr:`2045`).\n\nMulti-plot grids\n^^^^^^^^^^^^^^^^\n\n- |Feature| |Enhancement| |Defaults| A few small changes to make life easier when using :class:`PairGrid` (:pr:`2234`):\n\n - Added public access to the legend object through the ``legend`` attribute (also affects :class:`FacetGrid`).\n - The ``color`` and ``label`` parameters are no longer passed to the plotting functions when ``hue`` is not used.\n - The data is no longer converted to a numpy object before plotting on the marginal axes.\n - It is possible to specify only one of ``x_vars`` or ``y_vars``, using all variables for the unspecified dimension.\n - The ``layout_pad`` parameter is stored and used every time you call the :meth:`PairGrid.tight_layout` method.\n\n- |Feature| Added a ``tight_layout`` method to :class:`FacetGrid` and :class:`PairGrid`, which runs the :func:`matplotlib.pyplot.tight_layout` algorithm without interference from the external legend (:pr:`2073`).\n\n- |Feature| Added the ``axes_dict`` attribute to :class:`FacetGrid` for named access to the component axes (:pr:`2046`).\n\n- |Enhancement| Made :meth:`FacetGrid.set_axis_labels` clear labels from \"interior\" axes (:pr:`2046`).\n\n- |Feature| Added the ``marginal_ticks`` parameter to :class:`JointGrid` which, if set to ``True``, will show ticks on the count/density axis of the marginal plots (:pr:`2210`).\n\n- |Enhancement| Improved :meth:`FacetGrid.set_titles` with ``margin_titles=True``, such that texts representing the original row titles are removed before adding new ones (:pr:`2083`).\n\n- |Defaults| Changed the default value for ``dropna`` to ``False`` in :class:`FacetGrid`, :class:`PairGrid`, :class:`JointGrid`, and corresponding functions. As all or nearly all seaborn and matplotlib plotting functions handle missing data well, this option is no longer useful, but it causes problems in some edge cases. It may be deprecated in the future. (:pr:`2204`).\n\n- |Fix| Fixed a bug in :class:`PairGrid` that appeared when setting ``corner=True`` and ``despine=False`` (:pr:`2203`).\n\nColor palettes\n~~~~~~~~~~~~~~\n\n- |Docs| Improved and modernized the :doc:`color palettes chapter ` of the seaborn tutorial.\n\n- |Feature| Added two new perceptually-uniform colormaps: \"flare\" and \"crest\". The new colormaps are similar to \"rocket\" and \"mako\", but their luminance range is reduced. This makes them well suited to numeric mappings of line or scatter plots, which need contrast with the axes background at the extremes (:pr:`2237`).\n\n- |Enhancement| |Defaults| Enhanced numeric colormap functionality in several ways (:pr:`2237`):\n\n - Added string-based access within the :func:`color_palette` interface to :func:`dark_palette`, :func:`light_palette`, and :func:`blend_palette`. This means that anywhere you specify a palette in seaborn, a name like ``\"dark:blue\"`` will use :func:`dark_palette` with the input ``\"blue\"``.\n - Added the ``as_cmap`` parameter to :func:`color_palette` and changed internal code that uses a continuous colormap to take this route.\n - Tweaked the :func:`light_palette` and :func:`dark_palette` functions to use an endpoint that is a very desaturated version of the input color, rather than a pure gray. This produces smoother ramps. To exactly reproduce previous plots, use :func:`blend_palette` with ``\".13\"`` for dark or ``\".95\"`` for light.\n - Changed :func:`diverging_palette` to have a default value of ``sep=1``, which gives better results.\n\n- |Enhancement| Added a rich HTML representation to the object returned by :func:`color_palette` (:pr:`2225`).\n\n- |Fix| Fixed the ``\"{palette}_d\"`` logic to modify reversed colormaps and to use the correct direction of the luminance ramp in both cases.\n\nDeprecations and removals\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- |Enhancement| Removed an optional (and undocumented) dependency on BeautifulSoup (:pr:`2190`) in :func:`get_dataset_names`.\n\n- |API| Deprecated the ``axlabel`` function; use ``ax.set(xlabel=, ylabel=)`` instead.\n\n- |API| Deprecated the ``iqr`` function; use :func:`scipy.stats.iqr` instead.\n\n- |API| Final removal of the previously-deprecated ``annotate`` method on :class:`JointGrid`, along with related parameters.\n\n- |API| Final removal of the ``lvplot`` function (the previously-deprecated name for :func:`boxenplot`).\n"},{"id":52,"name":"seaborn","nodeType":"Package"},{"fileName":"__init__.py","filePath":"seaborn","id":53,"nodeType":"File","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.2.dev0\"\n"},{"id":54,"name":"examples","nodeType":"Package"},{"fileName":"palette_generation.py","filePath":"examples","id":55,"nodeType":"File","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)\n"},{"id":56,"name":"seaborn/_core","nodeType":"Package"},{"fileName":"groupby.py","filePath":"seaborn/_core","id":57,"nodeType":"File","text":"\"\"\"Simplified split-apply-combine paradigm on dataframes for internal use.\"\"\"\nfrom __future__ import annotations\n\nfrom typing import cast, Iterable\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\n\n def _get_groups(\n self, data: DataFrame\n ) -> tuple[str | list[str], Index | 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\n if not levels:\n grouper = []\n groups = pd.Index([])\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))\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\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 # Implies that we had a MultiIndex so key is iterable\n group_ids = dict(zip(grouper, cast(Iterable, 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)\n"},{"fileName":"check_gallery.py","filePath":"ci","id":58,"nodeType":"File","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\")\n"},{"fileName":"joint_kde.py","filePath":"examples","id":59,"nodeType":"File","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)\n"},{"fileName":"multiple_regression.py","filePath":"examples","id":60,"nodeType":"File","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)\")\n"},{"id":61,"name":"seaborn/external","nodeType":"Package"},{"fileName":"husl.py","filePath":"seaborn/external","id":62,"nodeType":"File","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])))\n\n\ndef 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\n\n\ndef _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\n\n\ndef 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)\n\n\ndef 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\n\n\ndef 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))\n\n\ndef 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]\n\n\ndef 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]\n\n\ndef 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]\n"},{"fileName":"grouped_boxplot.py","filePath":"examples","id":63,"nodeType":"File","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)\n"},{"fileName":"joint_histogram.py","filePath":"examples","id":64,"nodeType":"File","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\")\n"},{"id":65,"name":"doc/_templates","nodeType":"Package"},{"id":66,"name":"version.html","nodeType":"TextFile","path":"doc/_templates","text":"
\n{{ version }}\n
\n"},{"id":67,"name":"objects.Count.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"89113d6b-70b9-4ebe-9910-10a80eab246e\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn.objects as so\\n\",\n \"from seaborn import load_dataset\\n\",\n \"tips = load_dataset(\\\"tips\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"daf6ff78-df24-4541-ba72-73fb9eddb50d\",\n \"metadata\": {},\n \"source\": [\n \"The transform counts distinct observations of the orientation variable defines a new variable on the opposite axis:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"390f2fd3-0596-40e3-b262-163b3a90d055\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"so.Plot(tips, x=\\\"day\\\").add(so.Bar(), so.Count())\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"813fb4a5-db68-4b51-b236-5b5628ebba47\",\n \"metadata\": {},\n \"source\": [\n \"When additional mapping variables are defined, they are also used to define groups:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"76a4ae70-e914-4f54-b979-ce1b79374fc3\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"so.Plot(tips, x=\\\"day\\\", color=\\\"sex\\\").add(so.Bar(), so.Count(), so.Dodge())\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"2973dee1-5aee-4768-846d-22d220faf170\",\n \"metadata\": {},\n \"source\": [\n \"Unlike :class:`Hist`, numeric data are not binned before counting:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"6f94c5f0-680e-4d8a-a1c9-70876980dd1c\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"so.Plot(tips, x=\\\"size\\\").add(so.Bar(), so.Count())\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"11acd5e6-f477-4eb1-b1d7-72f4582bca45\",\n \"metadata\": {},\n \"source\": [\n \"When the `y` variable is defined, the counts are assigned to the `x` variable:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"924e0e35-210f-4f65-83b4-4aebe41ad264\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"so.Plot(tips, y=\\\"size\\\").add(so.Bar(), so.Count())\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"0229fa39-b6dc-48da-9a25-31e25ed34ebc\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":68,"name":"objects.Paths.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"2923956c-f141-4ecb-ab08-e819099f0fa9\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn.objects as so\\n\",\n \"from seaborn import load_dataset\\n\",\n \"networks = (\\n\",\n \" load_dataset(\\\"brain_networks\\\", header=[0, 1, 2], index_col=0)\\n\",\n \" .rename_axis(\\\"timepoint\\\")\\n\",\n \" .stack([0, 1, 2])\\n\",\n \" .groupby([\\\"timepoint\\\", \\\"network\\\", \\\"hemi\\\"])\\n\",\n \" .mean()\\n\",\n \" .unstack(\\\"network\\\")\\n\",\n \" .reset_index()\\n\",\n \" .query(\\\"timepoint < 100\\\")\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"50646936-5236-413f-b79b-6c3b640ade04\",\n \"metadata\": {},\n \"source\": [\n \"Unlike :class:`Lines`, this mark does not sort observations before plotting, making it suitable for plotting trajectories through a variable space:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"4a3ed115-cc47-4ea8-be46-2c99f7453941\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p = (\\n\",\n \" so.Plot(networks)\\n\",\n \" .pair(\\n\",\n \" x=[\\\"5\\\", \\\"8\\\", \\\"12\\\", \\\"15\\\"],\\n\",\n \" y=[\\\"6\\\", \\\"13\\\", \\\"16\\\"],\\n\",\n \" )\\n\",\n \" .layout(size=(8, 5))\\n\",\n \" .share(x=True, y=True)\\n\",\n \")\\n\",\n \"p.add(so.Paths())\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"5bf502eb-feb3-4b2e-882b-3e915bf5d041\",\n \"metadata\": {},\n \"source\": [\n \"The mark has the same set of properties as :class:`Lines`:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"326a765b-59f0-46ef-91c2-6705c6893740\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p.add(so.Paths(linewidth=1, alpha=.8), color=\\\"hemi\\\")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"175b836d-d328-4b6c-ad36-dde18c19e3bf\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"fileName":"heat_scatter.py","filePath":"examples","id":69,"nodeType":"File","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\")\n"},{"id":70,"name":"objects.Plot.layout.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"9252d5a5-8af1-4f99-b799-ee044329fb23\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn.objects as so\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"406f8f8d-b590-46f4-a230-626e32e52c71\",\n \"metadata\": {},\n \"source\": [\n \"Control the overall dimensions of the figure with `size`:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"fefc2b45-3510-4cd7-9de9-4806d71fc4c1\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p = so.Plot().layout(size=(4, 4))\\n\",\n \"p\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"909a47bb-82f5-455a-99c3-7049d548561b\",\n \"metadata\": {},\n \"source\": [\n \"Subplots created by using :meth:`Plot.facet` or :meth:`Plot.pair` will shrink to fit in the available space:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"3163687c-8d48-4e88-8dc2-35e16341e30e\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p.facet([\\\"A\\\", \\\"B\\\"], [\\\"X\\\", \\\"Y\\\"])\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"feda7c3a-3862-48d4-bb18-419cd03fc081\",\n \"metadata\": {},\n \"source\": [\n \"You may find that different automatic layout engines give better or worse results with specific plots:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"c2107939-c6a9-414c-b3a2-6f5d0dd60daf\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p.facet([\\\"A\\\", \\\"B\\\"], [\\\"X\\\", \\\"Y\\\"]).layout(engine=\\\"constrained\\\")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"781ff58c-b805-4e93-8cae-be0442e273ea\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":71,"name":"set_style.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"practical-announcement\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"suffering-emerald\",\n \"metadata\": {},\n \"source\": [\n \"Call the function with the name of a seaborn style to set the default for all plots:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"collaborative-struggle\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.set_style(\\\"whitegrid\\\")\\n\",\n \"sns.barplot(x=[\\\"A\\\", \\\"B\\\", \\\"C\\\"], y=[1, 3, 2])\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"defensive-surgery\",\n \"metadata\": {},\n \"source\": [\n \"You can also selectively override seaborn's default parameter values:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"coastal-sydney\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.set_style(\\\"darkgrid\\\", {\\\"grid.color\\\": \\\".6\\\", \\\"grid.linestyle\\\": \\\":\\\"})\\n\",\n \"sns.lineplot(x=[\\\"A\\\", \\\"B\\\", \\\"C\\\"], y=[1, 3, 2])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"bright-october\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":72,"name":"tests","nodeType":"Package"},{"fileName":"test_algorithms.py","filePath":"tests","id":73,"nodeType":"File","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()\n\n\ndef 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)\n\n\ndef 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)\n\n\ndef 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()\n\n\ndef 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))\n\n\ndef 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\")\n\n\ndef 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)\n\n\n@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\n\n\n@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\n\n\n@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()\n"},{"fileName":"aggregation.py","filePath":"seaborn/_stats","id":74,"nodeType":"File","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\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 See Also\n --------\n objects.Est : Aggregation with error bars.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Agg.rst\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(subset=[var])\n .reset_index(drop=True)\n )\n return res\n\n\n@dataclass\nclass Est(Stat):\n \"\"\"\n Calculate a point estimate and error bar interval.\n\n For additional information about the various `errorbar` choices, see\n the :doc:`errorbar tutorial `.\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 Examples\n --------\n .. include:: ../docstrings/objects.Est.rst\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])\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\"}[orient]\n res = (\n groupby\n .apply(data, self._process, var, engine)\n .dropna(subset=[var])\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 ...\n"},{"id":75,"name":"tests/_core","nodeType":"Package"},{"fileName":"test_rules.py","filePath":"tests/_core","id":76,"nodeType":"File","text":"\nimport 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\"\n\n\ndef 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\"]\n"},{"fileName":"regression.py","filePath":"seaborn/_stats","id":77,"nodeType":"File","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 (\n groupby\n .apply(data.dropna(subset=[\"x\", \"y\"]), self._fit_predict)\n )\n\n\n@dataclass\nclass OLSFit(Stat):\n\n ...\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":1,"id":78,"name":"xkcd_rgb","nodeType":"Attribute","startLoc":1,"text":"xkcd_rgb"},{"className":"VarType","col":0,"comment":"\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 ","endLoc":35,"id":79,"nodeType":"Class","startLoc":17,"text":"class 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"},{"attributeType":"_Feature","col":0,"comment":"null","endLoc":20,"id":81,"name":"annotations","nodeType":"Attribute","startLoc":20,"text":"annotations"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":83,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"attributeType":"null","col":18,"comment":"null","endLoc":8,"id":84,"name":"sns","nodeType":"Attribute","startLoc":8,"text":"sns"},{"attributeType":"null","col":18,"comment":"null","endLoc":8,"id":85,"name":"sns","nodeType":"Attribute","startLoc":8,"text":"sns"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":86,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"attributeType":"null","col":18,"comment":"null","endLoc":8,"id":87,"name":"sns","nodeType":"Attribute","startLoc":8,"text":"sns"},{"col":4,"comment":"null","endLoc":19,"header":"def glob(\n pathname: AnyStr,\n *,\n root_dir: StrOrBytesPath | None = None,\n dir_fd: int | None = None,\n recursive: bool = False,\n include_hidden: bool = False,\n ) -> list[AnyStr]","id":88,"name":"glob","nodeType":"Function","startLoc":12,"text":"def glob(\n pathname: AnyStr,\n *,\n root_dir: StrOrBytesPath | None = None,\n dir_fd: int | None = None,\n recursive: bool = False,\n include_hidden: bool = False,\n ) -> list[AnyStr]: ..."},{"col":0,"comment":"\n Raises an AssertionError if two array_like objects are not equal.\n\n Given two array_like objects, check that the shape is equal and all\n elements of these objects are equal. An exception is raised at\n shape mismatch or conflicting values. In contrast to the standard usage\n in numpy, NaNs are compared like numbers, no assertion is raised if\n both objects have NaNs in the same positions.\n\n The usual caution for verifying equality with floating point numbers is\n advised.\n\n Parameters\n ----------\n x : array_like\n The actual object to check.\n y : array_like\n The desired, expected object.\n err_msg : str, optional\n The error message to be printed in case of failure.\n verbose : bool, optional\n If True, the conflicting values are appended to the error message.\n\n Raises\n ------\n AssertionError\n If actual and desired objects are not equal.\n\n See Also\n --------\n assert_allclose: Compare two array_like objects for equality with desired\n relative and/or absolute precision.\n assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal\n\n Examples\n --------\n The first assert does not raise an exception:\n\n >>> np.testing.assert_array_equal([1.0,2.33333,np.nan],\n ... [np.exp(0),2.33333, np.nan])\n\n Assert fails with numerical inprecision with floats:\n\n >>> np.testing.assert_array_equal([1.0,np.pi,np.nan],\n ... [1, np.sqrt(np.pi)**2, np.nan])\n ...\n :\n AssertionError:\n Arrays are not equal\n \n (mismatch 50.0%)\n x: array([ 1. , 3.14159265, NaN])\n y: array([ 1. , 3.14159265, NaN])\n\n Use `assert_allclose` or one of the nulp (number of floating point values)\n functions for these cases instead:\n\n >>> np.testing.assert_allclose([1.0,np.pi,np.nan],\n ... [1, np.sqrt(np.pi)**2, np.nan],\n ... rtol=1e-10, atol=0)\n\n ","endLoc":871,"header":"def assert_array_equal(x, y, err_msg='', verbose=True)","id":89,"name":"assert_array_equal","nodeType":"Function","startLoc":807,"text":"def assert_array_equal(x, y, err_msg='', verbose=True):\n \"\"\"\n Raises an AssertionError if two array_like objects are not equal.\n\n Given two array_like objects, check that the shape is equal and all\n elements of these objects are equal. An exception is raised at\n shape mismatch or conflicting values. In contrast to the standard usage\n in numpy, NaNs are compared like numbers, no assertion is raised if\n both objects have NaNs in the same positions.\n\n The usual caution for verifying equality with floating point numbers is\n advised.\n\n Parameters\n ----------\n x : array_like\n The actual object to check.\n y : array_like\n The desired, expected object.\n err_msg : str, optional\n The error message to be printed in case of failure.\n verbose : bool, optional\n If True, the conflicting values are appended to the error message.\n\n Raises\n ------\n AssertionError\n If actual and desired objects are not equal.\n\n See Also\n --------\n assert_allclose: Compare two array_like objects for equality with desired\n relative and/or absolute precision.\n assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal\n\n Examples\n --------\n The first assert does not raise an exception:\n\n >>> np.testing.assert_array_equal([1.0,2.33333,np.nan],\n ... [np.exp(0),2.33333, np.nan])\n\n Assert fails with numerical inprecision with floats:\n\n >>> np.testing.assert_array_equal([1.0,np.pi,np.nan],\n ... [1, np.sqrt(np.pi)**2, np.nan])\n ...\n :\n AssertionError:\n Arrays are not equal\n \n (mismatch 50.0%)\n x: array([ 1. , 3.14159265, NaN])\n y: array([ 1. , 3.14159265, NaN])\n\n Use `assert_allclose` or one of the nulp (number of floating point values)\n functions for these cases instead:\n\n >>> np.testing.assert_allclose([1.0,np.pi,np.nan],\n ... [1, np.sqrt(np.pi)**2, np.nan],\n ... rtol=1e-10, atol=0)\n\n \"\"\"\n assert_array_compare(operator.__eq__, x, y, err_msg=err_msg,\n verbose=verbose, header='Arrays are not equal')"},{"col":4,"comment":"null","endLoc":32,"header":"def glob(\n pathname: AnyStr, *, root_dir: StrOrBytesPath | None = None, dir_fd: int | None = None, recursive: bool = False\n ) -> list[AnyStr]","id":90,"name":"glob","nodeType":"Function","startLoc":30,"text":"def glob(\n pathname: AnyStr, *, root_dir: StrOrBytesPath | None = None, dir_fd: int | None = None, recursive: bool = False\n ) -> list[AnyStr]: ..."},{"col":4,"comment":"null","endLoc":38,"header":"def glob(pathname: AnyStr, *, recursive: bool = False) -> list[AnyStr]","id":91,"name":"glob","nodeType":"Function","startLoc":38,"text":"def glob(pathname: AnyStr, *, recursive: bool = False) -> list[AnyStr]: ..."},{"col":0,"comment":"null","endLoc":32,"header":"def husl_to_rgb(h, s, l)","id":92,"name":"husl_to_rgb","nodeType":"Function","startLoc":31,"text":"def husl_to_rgb(h, s, l):\n return lch_to_rgb(*husl_to_lch([h, s, l]))"},{"className":"UserString","col":0,"comment":"null","endLoc":229,"id":93,"nodeType":"Class","startLoc":149,"text":"class UserString(Sequence[UserString]):\n data: str\n def __init__(self, seq: object) -> None: ...\n def __int__(self) -> int: ...\n def __float__(self) -> float: ...\n def __complex__(self) -> complex: ...\n def __getnewargs__(self) -> tuple[str]: ...\n def __lt__(self, string: str | UserString) -> bool: ...\n def __le__(self, string: str | UserString) -> bool: ...\n def __gt__(self, string: str | UserString) -> bool: ...\n def __ge__(self, string: str | UserString) -> bool: ...\n def __eq__(self, string: object) -> bool: ...\n def __hash__(self) -> int: ...\n def __contains__(self, char: object) -> bool: ...\n def __len__(self) -> int: ...\n def __getitem__(self, index: SupportsIndex | slice) -> Self: ...\n def __iter__(self) -> Iterator[Self]: ...\n def __reversed__(self) -> Iterator[Self]: ...\n def __add__(self, other: object) -> Self: ...\n def __radd__(self, other: object) -> Self: ...\n def __mul__(self, n: int) -> Self: ...\n def __rmul__(self, n: int) -> Self: ...\n def __mod__(self, args: Any) -> Self: ...\n if sys.version_info >= (3, 8):\n def __rmod__(self, template: object) -> Self: ...\n else:\n def __rmod__(self, format: Any) -> Self: ...\n\n def capitalize(self) -> Self: ...\n def casefold(self) -> Self: ...\n def center(self, width: int, *args: Any) -> Self: ...\n def count(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ...\n if sys.version_info >= (3, 8):\n def encode(self: UserString, encoding: str | None = \"utf-8\", errors: str | None = \"strict\") -> bytes: ...\n else:\n def encode(self, encoding: str | None = None, errors: str | None = None) -> Self: ...\n\n def endswith(self, suffix: str | tuple[str, ...], start: int | None = 0, end: int | None = sys.maxsize) -> bool: ...\n def expandtabs(self, tabsize: int = 8) -> Self: ...\n def find(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ...\n def format(self, *args: Any, **kwds: Any) -> str: ...\n def format_map(self, mapping: Mapping[str, Any]) -> str: ...\n def index(self, sub: str, start: int = 0, end: int = sys.maxsize) -> int: ...\n def isalpha(self) -> bool: ...\n def isalnum(self) -> bool: ...\n def isdecimal(self) -> bool: ...\n def isdigit(self) -> bool: ...\n def isidentifier(self) -> bool: ...\n def islower(self) -> bool: ...\n def isnumeric(self) -> bool: ...\n def isprintable(self) -> bool: ...\n def isspace(self) -> bool: ...\n def istitle(self) -> bool: ...\n def isupper(self) -> bool: ...\n def isascii(self) -> bool: ...\n def join(self, seq: Iterable[str]) -> str: ...\n def ljust(self, width: int, *args: Any) -> Self: ...\n def lower(self) -> Self: ...\n def lstrip(self, chars: str | None = None) -> Self: ...\n maketrans = str.maketrans\n def partition(self, sep: str) -> tuple[str, str, str]: ...\n if sys.version_info >= (3, 9):\n def removeprefix(self, __prefix: str | UserString) -> Self: ...\n def removesuffix(self, __suffix: str | UserString) -> Self: ...\n\n def replace(self, old: str | UserString, new: str | UserString, maxsplit: int = -1) -> Self: ...\n def rfind(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ...\n def rindex(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ...\n def rjust(self, width: int, *args: Any) -> Self: ...\n def rpartition(self, sep: str) -> tuple[str, str, str]: ...\n def rstrip(self, chars: str | None = None) -> Self: ...\n def split(self, sep: str | None = None, maxsplit: int = -1) -> list[str]: ...\n def rsplit(self, sep: str | None = None, maxsplit: int = -1) -> list[str]: ...\n def splitlines(self, keepends: bool = False) -> list[str]: ...\n def startswith(self, prefix: str | tuple[str, ...], start: int | None = 0, end: int | None = sys.maxsize) -> bool: ...\n def strip(self, chars: str | None = None) -> Self: ...\n def swapcase(self) -> Self: ...\n def title(self) -> Self: ...\n def translate(self, *args: Any) -> Self: ...\n def upper(self) -> Self: ...\n def zfill(self, width: int) -> Self: ..."},{"attributeType":"null","col":16,"comment":"null","endLoc":7,"id":94,"name":"np","nodeType":"Attribute","startLoc":7,"text":"np"},{"attributeType":"null","col":28,"comment":"null","endLoc":3,"id":95,"name":"plt","nodeType":"Attribute","startLoc":3,"text":"plt"},{"fileName":"test_properties.py","filePath":"tests/_core","id":96,"nodeType":"File","text":"\nimport 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\n\n\nclass 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}\n\n\nclass 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)\n\n\nclass 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))\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\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\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\")\n\n\nclass 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)\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)\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)\n\n\nclass 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\"))\n\n\nclass 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)\n\n\nclass 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\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)\n\n\nclass 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])\n"},{"fileName":"test_rcmod.py","filePath":"tests","id":97,"nodeType":"File","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\n\n\nclass RCParamFixtures:\n\n @pytest.fixture(autouse=True)\n def reset_params(self):\n yield\n rcmod.reset_orig()\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\n\n\nclass TestAxesStyle(RCParamFixtures):\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()\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()\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()\n\n\nclass TestPlottingContext(RCParamFixtures):\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]\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)\n\n\nclass TestPalette(RCParamFixtures):\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 )\n\n\nclass TestFonts(RCParamFixtures):\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()\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":8,"id":98,"name":"sns","nodeType":"Attribute","startLoc":8,"text":"sns"},{"attributeType":"null","col":28,"comment":"null","endLoc":9,"id":99,"name":"plt","nodeType":"Attribute","startLoc":9,"text":"plt"},{"attributeType":"RandomState","col":0,"comment":"null","endLoc":12,"id":100,"name":"rs","nodeType":"Attribute","startLoc":12,"text":"rs"},{"attributeType":"null","col":0,"comment":"null","endLoc":11,"id":101,"name":"penguins","nodeType":"Attribute","startLoc":11,"text":"penguins"},{"attributeType":"list","col":4,"comment":"null","endLoc":7,"id":103,"name":"fnames","nodeType":"Attribute","startLoc":7,"text":"fnames"},{"attributeType":"null","col":0,"comment":"null","endLoc":12,"id":104,"name":"planets","nodeType":"Attribute","startLoc":12,"text":"planets"},{"attributeType":"null","col":0,"comment":"null","endLoc":12,"id":105,"name":"tips","nodeType":"Attribute","startLoc":12,"text":"tips"},{"attributeType":"null","col":0,"comment":"null","endLoc":12,"id":106,"name":"df","nodeType":"Attribute","startLoc":12,"text":"df"},{"id":107,"name":"seaborn/_marks","nodeType":"Package"},{"fileName":"text.py","filePath":"seaborn/_marks","id":108,"nodeType":"File","text":"from __future__ import annotations\nfrom collections import defaultdict\nfrom dataclasses import dataclass\n\nimport numpy as np\nimport matplotlib as mpl\nfrom matplotlib.transforms import ScaledTranslation\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)\n\n\n@document_properties\n@dataclass\nclass Text(Mark):\n \"\"\"\n A textual mark to annotate or represent data values.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Text.rst\n\n \"\"\"\n text: MappableString = Mappable(\"\")\n color: MappableColor = Mappable(\"k\")\n alpha: MappableFloat = Mappable(1)\n fontsize: MappableFloat = Mappable(rc=\"font.size\")\n halign: MappableString = Mappable(\"center\")\n valign: MappableString = Mappable(\"center_baseline\")\n offset: MappableFloat = Mappable(4)\n\n def _plot(self, split_gen, scales, orient):\n\n ax_data = defaultdict(list)\n\n for keys, data, ax in split_gen():\n\n vals = resolve_properties(self, keys, scales)\n color = resolve_color(self, keys, \"\", scales)\n\n halign = vals[\"halign\"]\n valign = vals[\"valign\"]\n fontsize = vals[\"fontsize\"]\n offset = vals[\"offset\"] / 72\n\n offset_trans = ScaledTranslation(\n {\"right\": -offset, \"left\": +offset}.get(halign, 0),\n {\"top\": -offset, \"bottom\": +offset, \"baseline\": +offset}.get(valign, 0),\n ax.figure.dpi_scale_trans,\n )\n\n for row in data.to_dict(\"records\"):\n artist = mpl.text.Text(\n x=row[\"x\"],\n y=row[\"y\"],\n text=str(row.get(\"text\", vals[\"text\"])),\n color=color,\n fontsize=fontsize,\n horizontalalignment=halign,\n verticalalignment=valign,\n transform=ax.transData + offset_trans,\n **self.artist_kws,\n )\n ax.add_artist(artist)\n ax_data[ax].append([row[\"x\"], row[\"y\"]])\n\n for ax, ax_vals in ax_data.items():\n ax.update_datalim(np.array(ax_vals))\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":11,"id":109,"name":"penguins","nodeType":"Attribute","startLoc":11,"text":"penguins"},{"attributeType":"null","col":0,"comment":"null","endLoc":1,"id":110,"name":"crayons","nodeType":"Attribute","startLoc":1,"text":"crayons"},{"className":"defaultdict","col":0,"comment":"null","endLoc":416,"id":111,"nodeType":"Class","startLoc":377,"text":"class defaultdict(dict[_KT, _VT], Generic[_KT, _VT]):\n default_factory: Callable[[], _VT] | None\n @overload\n def __init__(self) -> None: ...\n @overload\n def __init__(self: defaultdict[str, _VT], **kwargs: _VT) -> None: ...\n @overload\n def __init__(self, __default_factory: Callable[[], _VT] | None) -> None: ...\n @overload\n def __init__(self: defaultdict[str, _VT], __default_factory: Callable[[], _VT] | None, **kwargs: _VT) -> None: ...\n @overload\n def __init__(self, __default_factory: Callable[[], _VT] | None, __map: SupportsKeysAndGetItem[_KT, _VT]) -> None: ...\n @overload\n def __init__(\n self: defaultdict[str, _VT],\n __default_factory: Callable[[], _VT] | None,\n __map: SupportsKeysAndGetItem[str, _VT],\n **kwargs: _VT,\n ) -> None: ...\n @overload\n def __init__(self, __default_factory: Callable[[], _VT] | None, __iterable: Iterable[tuple[_KT, _VT]]) -> None: ...\n @overload\n def __init__(\n self: defaultdict[str, _VT],\n __default_factory: Callable[[], _VT] | None,\n __iterable: Iterable[tuple[str, _VT]],\n **kwargs: _VT,\n ) -> None: ...\n def __missing__(self, __key: _KT) -> _VT: ...\n def __copy__(self) -> Self: ...\n def copy(self) -> Self: ...\n if sys.version_info >= (3, 9):\n @overload\n def __or__(self, __value: dict[_KT, _VT]) -> Self: ...\n @overload\n def __or__(self, __value: dict[_T1, _T2]) -> defaultdict[_KT | _T1, _VT | _T2]: ...\n @overload\n def __ror__(self, __value: dict[_KT, _VT]) -> Self: ...\n @overload\n def __ror__(self, __value: dict[_T1, _T2]) -> defaultdict[_KT | _T1, _VT | _T2]: ... # type: ignore[misc]"},{"col":0,"comment":"null","endLoc":271,"header":"def husl_to_lch(triple)","id":112,"name":"husl_to_lch","nodeType":"Function","startLoc":260,"text":"def 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]"},{"col":0,"comment":"null","endLoc":91,"header":"def max_chroma(L, H)","id":113,"name":"max_chroma","nodeType":"Function","startLoc":71,"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"},{"className":"RCParamFixtures","col":0,"comment":"null","endLoc":70,"id":115,"nodeType":"Class","startLoc":33,"text":"class RCParamFixtures:\n\n @pytest.fixture(autouse=True)\n def reset_params(self):\n yield\n rcmod.reset_orig()\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"},{"col":4,"comment":"null","endLoc":38,"header":"@pytest.fixture(autouse=True)\n def reset_params(self)","id":116,"name":"reset_params","nodeType":"Function","startLoc":35,"text":"@pytest.fixture(autouse=True)\n def reset_params(self):\n yield\n rcmod.reset_orig()"},{"col":0,"comment":"Restore all RC params to original settings (respects custom rc).","endLoc":143,"header":"def reset_orig()","id":117,"name":"reset_orig","nodeType":"Function","startLoc":140,"text":"def 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)"},{"fileName":"cache_datasets.py","filePath":"ci","id":118,"nodeType":"File","text":"\"\"\"\nCache test datasets before running tests / building docs.\n\nAvoids race conditions that would arise from parallelization.\n\"\"\"\nimport pathlib\nimport re\n\nfrom seaborn import load_dataset\n\npath = pathlib.Path(\".\")\npy_files = path.rglob(\"*.py\")\nipynb_files = path.rglob(\"*.ipynb\")\n\ndatasets = []\n\nfor fname in py_files:\n with open(fname) as fid:\n datasets += re.findall(r\"load_dataset\\(['\\\"](\\w+)['\\\"]\", fid.read())\n\nfor p in ipynb_files:\n with p.open() as fid:\n datasets += re.findall(r\"load_dataset\\(\\\\['\\\"](\\w+)\\\\['\\\"]\", fid.read())\n\nfor name in sorted(set(datasets)):\n print(f\"Caching {name}\")\n load_dataset(name)\n"},{"col":0,"comment":"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 ","endLoc":643,"header":"def load_dataset(name, cache=True, data_home=None, **kws)","id":119,"name":"load_dataset","nodeType":"Function","startLoc":538,"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\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"},{"col":0,"comment":"null","endLoc":818,"header":"@overload\ndef cast(typ: Type[_T], val: Any) -> _T","id":120,"name":"cast","nodeType":"Function","startLoc":817,"text":"@overload\ndef cast(typ: Type[_T], val: Any) -> _T: ..."},{"attributeType":"null","col":21,"comment":"null","endLoc":17,"id":121,"name":"mpl","nodeType":"Attribute","startLoc":17,"text":"mpl"},{"attributeType":"null","col":0,"comment":"null","endLoc":18,"id":122,"name":"_orig_rc_params","nodeType":"Attribute","startLoc":18,"text":"_orig_rc_params"},{"attributeType":"str","col":0,"comment":"null","endLoc":21,"id":123,"name":"__version__","nodeType":"Attribute","startLoc":21,"text":"__version__"},{"attributeType":"_SpecialForm","col":0,"comment":"null","endLoc":198,"id":124,"name":"ClassVar","nodeType":"Attribute","startLoc":198,"text":"ClassVar"},{"col":0,"comment":"","endLoc":2,"header":"__init__.py#","id":125,"name":"","nodeType":"Function","startLoc":2,"text":"_orig_rc_params = mpl.rcParams.copy()\n\n__version__ = \"0.12.2.dev0\""},{"className":"Stat","col":0,"comment":"Base class for objects that apply statistical transformations.","endLoc":65,"id":126,"nodeType":"Class","startLoc":15,"text":"@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 _check_param_one_of(self, param: str, options: Iterable[Any]) -> None:\n \"\"\"Raise when parameter value is not one of a specified set.\"\"\"\n value = getattr(self, param)\n if value not in options:\n *most, last = options\n option_str = \", \".join(f\"{x!r}\" for x in most[:-1]) + f\" or {last!r}\"\n err = \" \".join([\n f\"The `{param}` parameter for `{self.__class__.__name__}` must be\",\n f\"one of {option_str}; not {value!r}.\",\n ])\n raise ValueError(err)\n\n def _check_grouping_vars(\n self, param: str, data_vars: list[str], stacklevel: int = 2,\n ) -> None:\n \"\"\"Warn if vars are named in parameter without being present in the data.\"\"\"\n param_vars = getattr(self, param)\n undefined = set(param_vars) - set(data_vars)\n if undefined:\n param = f\"{self.__class__.__name__}.{param}\"\n names = \", \".join(f\"{x!r}\" for x in undefined)\n msg = f\"Undefined variable(s) passed for {param}: {names}.\"\n warnings.warn(msg, stacklevel=stacklevel)\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"},{"col":4,"comment":"Raise when parameter value is not one of a specified set.","endLoc":43,"header":"def _check_param_one_of(self, param: str, options: Iterable[Any]) -> None","id":129,"name":"_check_param_one_of","nodeType":"Function","startLoc":33,"text":"def _check_param_one_of(self, param: str, options: Iterable[Any]) -> None:\n \"\"\"Raise when parameter value is not one of a specified set.\"\"\"\n value = getattr(self, param)\n if value not in options:\n *most, last = options\n option_str = \", \".join(f\"{x!r}\" for x in most[:-1]) + f\" or {last!r}\"\n err = \" \".join([\n f\"The `{param}` parameter for `{self.__class__.__name__}` must be\",\n f\"one of {option_str}; not {value!r}.\",\n ])\n raise ValueError(err)"},{"col":4,"comment":"null","endLoc":44,"header":"def flatten_list(self, orig_list)","id":131,"name":"flatten_list","nodeType":"Function","startLoc":40,"text":"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"},{"attributeType":"JointGrid","col":0,"comment":"null","endLoc":13,"id":133,"name":"g","nodeType":"Attribute","startLoc":13,"text":"g"},{"attributeType":"null","col":0,"comment":"null","endLoc":14,"id":134,"name":"g","nodeType":"Attribute","startLoc":14,"text":"g"},{"col":0,"comment":"","endLoc":7,"header":"grouped_boxplot.py#","id":135,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nGrouped boxplots\n================\n\n_thumb: .66, .45\n\n\"\"\"\n\nsns.set_theme(style=\"ticks\", palette=\"pastel\")\n\ntips = sns.load_dataset(\"tips\")\n\nsns.boxplot(x=\"day\", y=\"total_bill\",\n hue=\"smoker\", palette=[\"m\", \"g\"],\n data=tips)\n\nsns.despine(offset=10, trim=True)"},{"attributeType":"null","col":0,"comment":"null","endLoc":14,"id":136,"name":"g","nodeType":"Attribute","startLoc":14,"text":"g"},{"col":0,"comment":"\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 ","endLoc":123,"header":"def set_theme(context=\"notebook\", style=\"darkgrid\", palette=\"deep\",\n font=\"sans-serif\", font_scale=1, color_codes=True, rc=None)","id":137,"name":"set_theme","nodeType":"Function","startLoc":82,"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)"},{"attributeType":"list","col":0,"comment":"null","endLoc":14,"id":138,"name":"used_networks","nodeType":"Attribute","startLoc":14,"text":"used_networks"},{"col":0,"comment":"\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 ","endLoc":470,"header":"def set_context(context=None, font_scale=1, rc=None)","id":139,"name":"set_context","nodeType":"Function","startLoc":436,"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)"},{"attributeType":"null","col":0,"comment":"null","endLoc":15,"id":140,"name":"used_columns","nodeType":"Attribute","startLoc":15,"text":"used_columns"},{"col":0,"comment":"\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 ","endLoc":433,"header":"def plotting_context(context=None, font_scale=1, rc=None)","id":141,"name":"plotting_context","nodeType":"Function","startLoc":335,"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":19,"id":143,"name":"df","nodeType":"Attribute","startLoc":19,"text":"df"},{"attributeType":"null","col":0,"comment":"null","endLoc":21,"id":144,"name":"columns","nodeType":"Attribute","startLoc":21,"text":"df.columns"},{"attributeType":"null","col":0,"comment":"null","endLoc":24,"id":145,"name":"corr_mat","nodeType":"Attribute","startLoc":24,"text":"corr_mat"},{"col":0,"comment":"","endLoc":6,"header":"joint_kde.py#","id":146,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nJoint kernel density estimate\n=============================\n\n_thumb: .6, .4\n\"\"\"\n\nsns.set_theme(style=\"ticks\")\n\npenguins = sns.load_dataset(\"penguins\")\n\ng = sns.jointplot(\n data=penguins,\n x=\"bill_length_mm\", y=\"bill_depth_mm\", hue=\"species\",\n kind=\"kde\",\n)"},{"col":0,"comment":"","endLoc":6,"header":"multiple_regression.py#","id":148,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nMultiple linear regression\n==========================\n\n_thumb: .45, .45\n\"\"\"\n\nsns.set_theme()\n\npenguins = sns.load_dataset(\"penguins\")\n\ng = sns.lmplot(\n data=penguins,\n x=\"bill_length_mm\", y=\"bill_depth_mm\", hue=\"species\",\n height=5\n)\n\ng.set_axis_labels(\"Snoot length (mm)\", \"Snoot depth (mm)\")"},{"attributeType":"null","col":0,"comment":"null","endLoc":27,"id":150,"name":"g","nodeType":"Attribute","startLoc":27,"text":"g"},{"attributeType":"null","col":0,"comment":"null","endLoc":19,"id":151,"name":"cax","nodeType":"Attribute","startLoc":19,"text":"cax"},{"attributeType":"null","col":4,"comment":"null","endLoc":38,"id":152,"name":"label","nodeType":"Attribute","startLoc":38,"text":"label"},{"id":153,"name":"pyproject.toml","nodeType":"TextFile","path":"","text":"[build-system]\nrequires = [\"flit_core >=3.2,<4\"]\nbuild-backend = \"flit_core.buildapi\"\n\n[project]\nname = \"seaborn\"\ndescription = \"Statistical data visualization\"\nauthors = [{name = \"Michael Waskom\", email = \"mwaskom@gmail.com\"}]\nreadme = \"README.md\"\nlicense = {file = \"LICENSE.md\"}\ndynamic = [\"version\"]\nclassifiers = [\n \"Intended Audience :: Science/Research\",\n \"Programming Language :: Python :: 3.7\",\n \"Programming Language :: Python :: 3.8\",\n \"Programming Language :: Python :: 3.9\",\n \"Programming Language :: Python :: 3.10\",\n \"License :: OSI Approved :: BSD License\",\n \"Topic :: Scientific/Engineering :: Visualization\",\n \"Topic :: Multimedia :: Graphics\",\n \"Operating System :: OS Independent\",\n \"Framework :: Matplotlib\",\n]\nrequires-python = \">=3.7\"\ndependencies = [\n \"numpy>=1.17,!=1.24.0\",\n \"pandas>=0.25\",\n \"matplotlib>=3.1,!=3.6.1\",\n \"typing_extensions; python_version < '3.8'\",\n]\n\n[project.optional-dependencies]\nstats = [\n \"scipy>=1.3\",\n \"statsmodels>=0.10\",\n]\ndev = [\n \"pytest\",\n \"pytest-cov\",\n \"pytest-xdist\",\n \"flake8\",\n \"mypy\",\n \"pandas-stubs\",\n \"pre-commit\",\n \"flit\",\n]\ndocs = [\n \"numpydoc\",\n \"nbconvert\",\n \"ipykernel\",\n \"sphinx-copybutton\",\n \"sphinx-issues\",\n \"sphinx-design\",\n \"pyyaml\",\n \"pydata_sphinx_theme==0.10.0rc2\",\n]\n\n[project.urls]\nSource = \"https://github.com/mwaskom/seaborn\"\nDocs = \"http://seaborn.pydata.org\"\n\n[tool.flit.sdist]\nexclude = [\"doc/_static/*.svg\"]\n"},{"id":154,"name":"NUMPYDOC_LICENSE","nodeType":"TextFile","path":"licences","text":"Copyright (C) 2008 Stefan van der Walt , Pauli Virtanen \n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in\n the documentation and/or other materials provided with the\n distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\nIMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,\nINDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\nHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\nSTRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\nIN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n"},{"col":0,"comment":"","endLoc":7,"header":"joint_histogram.py#","id":155,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nJoint and marginal histograms\n=============================\n\n_thumb: .52, .505\n\n\"\"\"\n\nsns.set_theme(style=\"ticks\")\n\nplanets = sns.load_dataset(\"planets\")\n\ng = sns.JointGrid(data=planets, x=\"year\", y=\"distance\", marginal_ticks=True)\n\ng.ax_joint.set(yscale=\"log\")\n\ncax = g.figure.add_axes([.15, .55, .02, .2])\n\ng.plot_joint(\n sns.histplot, discrete=(True, False),\n cmap=\"light:#03012d\", pmax=.8, cbar=True, cbar_ax=cax\n)\n\ng.plot_marginals(sns.histplot, element=\"step\", color=\"#03012d\")"},{"attributeType":"null","col":4,"comment":"null","endLoc":40,"id":157,"name":"artist","nodeType":"Attribute","startLoc":40,"text":"artist"},{"col":0,"comment":"","endLoc":7,"header":"heat_scatter.py#","id":158,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nScatterplot heatmap\n-------------------\n\n_thumb: .5, .5\n\n\"\"\"\n\nsns.set_theme(style=\"whitegrid\")\n\ndf = sns.load_dataset(\"brain_networks\", header=[0, 1, 2], index_col=0)\n\nused_networks = [1, 5, 6, 7, 8, 12, 13, 17]\n\nused_columns = (df.columns\n .get_level_values(\"network\")\n .astype(int)\n .isin(used_networks))\n\ndf = df.loc[:, used_columns]\n\ndf.columns = df.columns.map(\"-\".join)\n\ncorr_mat = df.corr().stack().reset_index(name=\"correlation\")\n\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\ng.set(xlabel=\"\", ylabel=\"\", aspect=\"equal\")\n\ng.despine(left=True, bottom=True)\n\ng.ax.margins(.02)\n\nfor label in g.ax.get_xticklabels():\n label.set_rotation(90)\n\nfor artist in g.legend.legendHandles:\n artist.set_edgecolor(\".7\")"},{"col":4,"comment":"null","endLoc":151,"header":"def __init__(self, seq: object) -> None","id":160,"name":"__init__","nodeType":"Function","startLoc":151,"text":"def __init__(self, seq: object) -> None: ..."},{"col":4,"comment":"null","endLoc":152,"header":"def __int__(self) -> int","id":161,"name":"__int__","nodeType":"Function","startLoc":152,"text":"def __int__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":153,"header":"def __float__(self) -> float","id":162,"name":"__float__","nodeType":"Function","startLoc":153,"text":"def __float__(self) -> float: ..."},{"col":4,"comment":"null","endLoc":154,"header":"def __complex__(self) -> complex","id":163,"name":"__complex__","nodeType":"Function","startLoc":154,"text":"def __complex__(self) -> complex: ..."},{"col":4,"comment":"null","endLoc":380,"header":"@overload\n def __init__(self) -> None","id":164,"name":"__init__","nodeType":"Function","startLoc":379,"text":"@overload\n def __init__(self) -> None: ..."},{"col":4,"comment":"null","endLoc":155,"header":"def __getnewargs__(self) -> tuple[str]","id":165,"name":"__getnewargs__","nodeType":"Function","startLoc":155,"text":"def __getnewargs__(self) -> tuple[str]: ..."},{"col":4,"comment":"null","endLoc":382,"header":"@overload\n def __init__(self: defaultdict[str, _VT], **kwargs: _VT) -> None","id":166,"name":"__init__","nodeType":"Function","startLoc":381,"text":"@overload\n def __init__(self: defaultdict[str, _VT], **kwargs: _VT) -> None: ..."},{"col":4,"comment":"null","endLoc":156,"header":"def __lt__(self, string: str | UserString) -> bool","id":167,"name":"__lt__","nodeType":"Function","startLoc":156,"text":"def __lt__(self, string: str | UserString) -> bool: ..."},{"col":4,"comment":"null","endLoc":157,"header":"def __le__(self, string: str | UserString) -> bool","id":168,"name":"__le__","nodeType":"Function","startLoc":157,"text":"def __le__(self, string: str | UserString) -> bool: ..."},{"col":4,"comment":"null","endLoc":384,"header":"@overload\n def __init__(self, __default_factory: Callable[[], _VT] | None) -> None","id":169,"name":"__init__","nodeType":"Function","startLoc":383,"text":"@overload\n def __init__(self, __default_factory: Callable[[], _VT] | None) -> None: ..."},{"col":4,"comment":"null","endLoc":158,"header":"def __gt__(self, string: str | UserString) -> bool","id":170,"name":"__gt__","nodeType":"Function","startLoc":158,"text":"def __gt__(self, string: str | UserString) -> bool: ..."},{"col":4,"comment":"null","endLoc":386,"header":"@overload\n def __init__(self: defaultdict[str, _VT], __default_factory: Callable[[], _VT] | None, **kwargs: _VT) -> None","id":171,"name":"__init__","nodeType":"Function","startLoc":385,"text":"@overload\n def __init__(self: defaultdict[str, _VT], __default_factory: Callable[[], _VT] | None, **kwargs: _VT) -> None: ..."},{"col":4,"comment":"null","endLoc":159,"header":"def __ge__(self, string: str | UserString) -> bool","id":172,"name":"__ge__","nodeType":"Function","startLoc":159,"text":"def __ge__(self, string: str | UserString) -> bool: ..."},{"col":4,"comment":"null","endLoc":160,"header":"def __eq__(self, string: object) -> bool","id":173,"name":"__eq__","nodeType":"Function","startLoc":160,"text":"def __eq__(self, string: object) -> bool: ..."},{"col":4,"comment":"null","endLoc":388,"header":"@overload\n def __init__(self, __default_factory: Callable[[], _VT] | None, __map: SupportsKeysAndGetItem[_KT, _VT]) -> None","id":174,"name":"__init__","nodeType":"Function","startLoc":387,"text":"@overload\n def __init__(self, __default_factory: Callable[[], _VT] | None, __map: SupportsKeysAndGetItem[_KT, _VT]) -> None: ..."},{"col":4,"comment":"null","endLoc":161,"header":"def __hash__(self) -> int","id":175,"name":"__hash__","nodeType":"Function","startLoc":161,"text":"def __hash__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":162,"header":"def __contains__(self, char: object) -> bool","id":176,"name":"__contains__","nodeType":"Function","startLoc":162,"text":"def __contains__(self, char: object) -> bool: ..."},{"col":4,"comment":"null","endLoc":395,"header":"@overload\n def __init__(\n self: defaultdict[str, _VT],\n __default_factory: Callable[[], _VT] | None,\n __map: SupportsKeysAndGetItem[str, _VT],\n **kwargs: _VT,\n ) -> None","id":177,"name":"__init__","nodeType":"Function","startLoc":389,"text":"@overload\n def __init__(\n self: defaultdict[str, _VT],\n __default_factory: Callable[[], _VT] | None,\n __map: SupportsKeysAndGetItem[str, _VT],\n **kwargs: _VT,\n ) -> None: ..."},{"col":4,"comment":"null","endLoc":163,"header":"def __len__(self) -> int","id":178,"name":"__len__","nodeType":"Function","startLoc":163,"text":"def __len__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":164,"header":"def __getitem__(self, index: SupportsIndex | slice) -> Self","id":179,"name":"__getitem__","nodeType":"Function","startLoc":164,"text":"def __getitem__(self, index: SupportsIndex | slice) -> Self: ..."},{"col":4,"comment":"null","endLoc":165,"header":"def __iter__(self) -> Iterator[Self]","id":180,"name":"__iter__","nodeType":"Function","startLoc":165,"text":"def __iter__(self) -> Iterator[Self]: ..."},{"col":4,"comment":"null","endLoc":397,"header":"@overload\n def __init__(self, __default_factory: Callable[[], _VT] | None, __iterable: Iterable[tuple[_KT, _VT]]) -> None","id":181,"name":"__init__","nodeType":"Function","startLoc":396,"text":"@overload\n def __init__(self, __default_factory: Callable[[], _VT] | None, __iterable: Iterable[tuple[_KT, _VT]]) -> None: ..."},{"col":4,"comment":"null","endLoc":166,"header":"def __reversed__(self) -> Iterator[Self]","id":182,"name":"__reversed__","nodeType":"Function","startLoc":166,"text":"def __reversed__(self) -> Iterator[Self]: ..."},{"col":4,"comment":"null","endLoc":167,"header":"def __add__(self, other: object) -> Self","id":183,"name":"__add__","nodeType":"Function","startLoc":167,"text":"def __add__(self, other: object) -> Self: ..."},{"col":4,"comment":"null","endLoc":404,"header":"@overload\n def __init__(\n self: defaultdict[str, _VT],\n __default_factory: Callable[[], _VT] | None,\n __iterable: Iterable[tuple[str, _VT]],\n **kwargs: _VT,\n ) -> None","id":184,"name":"__init__","nodeType":"Function","startLoc":398,"text":"@overload\n def __init__(\n self: defaultdict[str, _VT],\n __default_factory: Callable[[], _VT] | None,\n __iterable: Iterable[tuple[str, _VT]],\n **kwargs: _VT,\n ) -> None: ..."},{"col":4,"comment":"null","endLoc":168,"header":"def __radd__(self, other: object) -> Self","id":185,"name":"__radd__","nodeType":"Function","startLoc":168,"text":"def __radd__(self, other: object) -> Self: ..."},{"col":4,"comment":"null","endLoc":169,"header":"def __mul__(self, n: int) -> Self","id":186,"name":"__mul__","nodeType":"Function","startLoc":169,"text":"def __mul__(self, n: int) -> Self: ..."},{"col":4,"comment":"null","endLoc":170,"header":"def __rmul__(self, n: int) -> Self","id":187,"name":"__rmul__","nodeType":"Function","startLoc":170,"text":"def __rmul__(self, n: int) -> Self: ..."},{"col":4,"comment":"null","endLoc":405,"header":"def __missing__(self, __key: _KT) -> _VT","id":188,"name":"__missing__","nodeType":"Function","startLoc":405,"text":"def __missing__(self, __key: _KT) -> _VT: ..."},{"col":4,"comment":"null","endLoc":171,"header":"def __mod__(self, args: Any) -> Self","id":189,"name":"__mod__","nodeType":"Function","startLoc":171,"text":"def __mod__(self, args: Any) -> Self: ..."},{"col":4,"comment":"null","endLoc":406,"header":"def __copy__(self) -> Self","id":190,"name":"__copy__","nodeType":"Function","startLoc":406,"text":"def __copy__(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":407,"header":"def copy(self) -> Self","id":191,"name":"copy","nodeType":"Function","startLoc":407,"text":"def copy(self) -> Self: ..."},{"col":8,"comment":"null","endLoc":173,"header":"def __rmod__(self, template: object) -> Self","id":192,"name":"__rmod__","nodeType":"Function","startLoc":173,"text":"def __rmod__(self, template: object) -> Self: ..."},{"col":8,"comment":"null","endLoc":410,"header":"@overload\n def __or__(self, __value: dict[_KT, _VT]) -> Self","id":193,"name":"__or__","nodeType":"Function","startLoc":409,"text":"@overload\n def __or__(self, __value: dict[_KT, _VT]) -> Self: ..."},{"col":8,"comment":"null","endLoc":175,"header":"def __rmod__(self, format: Any) -> Self","id":194,"name":"__rmod__","nodeType":"Function","startLoc":175,"text":"def __rmod__(self, format: Any) -> Self: ..."},{"col":8,"comment":"null","endLoc":412,"header":"@overload\n def __or__(self, __value: dict[_T1, _T2]) -> defaultdict[_KT | _T1, _VT | _T2]","id":195,"name":"__or__","nodeType":"Function","startLoc":411,"text":"@overload\n def __or__(self, __value: dict[_T1, _T2]) -> defaultdict[_KT | _T1, _VT | _T2]: ..."},{"col":4,"comment":"null","endLoc":177,"header":"def capitalize(self) -> Self","id":196,"name":"capitalize","nodeType":"Function","startLoc":177,"text":"def capitalize(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":178,"header":"def casefold(self) -> Self","id":197,"name":"casefold","nodeType":"Function","startLoc":178,"text":"def casefold(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":179,"header":"def center(self, width: int, *args: Any) -> Self","id":198,"name":"center","nodeType":"Function","startLoc":179,"text":"def center(self, width: int, *args: Any) -> Self: ..."},{"col":8,"comment":"null","endLoc":414,"header":"@overload\n def __ror__(self, __value: dict[_KT, _VT]) -> Self","id":199,"name":"__ror__","nodeType":"Function","startLoc":413,"text":"@overload\n def __ror__(self, __value: dict[_KT, _VT]) -> Self: ..."},{"col":4,"comment":"null","endLoc":180,"header":"def count(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int","id":200,"name":"count","nodeType":"Function","startLoc":180,"text":"def count(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ..."},{"col":8,"comment":"null","endLoc":416,"header":"@overload\n def __ror__(self, __value: dict[_T1, _T2]) -> defaultdict[_KT | _T1, _VT | _T2]","id":201,"name":"__ror__","nodeType":"Function","startLoc":415,"text":"@overload\n def __ror__(self, __value: dict[_T1, _T2]) -> defaultdict[_KT | _T1, _VT | _T2]: ... # type: ignore[misc]"},{"col":8,"comment":"null","endLoc":182,"header":"def encode(self: UserString, encoding: str | None = \"utf-8\", errors: str | None = \"strict\") -> bytes","id":202,"name":"encode","nodeType":"Function","startLoc":182,"text":"def encode(self: UserString, encoding: str | None = \"utf-8\", errors: str | None = \"strict\") -> bytes: ..."},{"attributeType":"() -> _VT | None","col":4,"comment":"null","endLoc":378,"id":203,"name":"default_factory","nodeType":"Attribute","startLoc":378,"text":"default_factory"},{"col":8,"comment":"null","endLoc":184,"header":"def encode(self, encoding: str | None = None, errors: str | None = None) -> Self","id":204,"name":"encode","nodeType":"Function","startLoc":184,"text":"def encode(self, encoding: str | None = None, errors: str | None = None) -> Self: ..."},{"col":4,"comment":"null","endLoc":186,"header":"def endswith(self, suffix: str | tuple[str, ...], start: int | None = 0, end: int | None = sys.maxsize) -> bool","id":205,"name":"endswith","nodeType":"Function","startLoc":186,"text":"def endswith(self, suffix: str | tuple[str, ...], start: int | None = 0, end: int | None = sys.maxsize) -> bool: ..."},{"col":4,"comment":"null","endLoc":330,"header":"def __new__(cls, __x: ConvertibleToFloat = ...) -> Self","id":206,"name":"__new__","nodeType":"Function","startLoc":330,"text":"def __new__(cls, __x: ConvertibleToFloat = ...) -> Self: ..."},{"col":4,"comment":"null","endLoc":187,"header":"def expandtabs(self, tabsize: int = 8) -> Self","id":207,"name":"expandtabs","nodeType":"Function","startLoc":187,"text":"def expandtabs(self, tabsize: int = 8) -> Self: ..."},{"col":4,"comment":"null","endLoc":188,"header":"def find(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int","id":208,"name":"find","nodeType":"Function","startLoc":188,"text":"def find(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ..."},{"col":4,"comment":"null","endLoc":189,"header":"def format(self, *args: Any, **kwds: Any) -> str","id":209,"name":"format","nodeType":"Function","startLoc":189,"text":"def format(self, *args: Any, **kwds: Any) -> str: ..."},{"col":4,"comment":"null","endLoc":190,"header":"def format_map(self, mapping: Mapping[str, Any]) -> str","id":210,"name":"format_map","nodeType":"Function","startLoc":190,"text":"def format_map(self, mapping: Mapping[str, Any]) -> str: ..."},{"col":4,"comment":"null","endLoc":191,"header":"def index(self, sub: str, start: int = 0, end: int = sys.maxsize) -> int","id":211,"name":"index","nodeType":"Function","startLoc":191,"text":"def index(self, sub: str, start: int = 0, end: int = sys.maxsize) -> int: ..."},{"col":4,"comment":"null","endLoc":192,"header":"def isalpha(self) -> bool","id":212,"name":"isalpha","nodeType":"Function","startLoc":192,"text":"def isalpha(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":193,"header":"def isalnum(self) -> bool","id":213,"name":"isalnum","nodeType":"Function","startLoc":193,"text":"def isalnum(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":194,"header":"def isdecimal(self) -> bool","id":214,"name":"isdecimal","nodeType":"Function","startLoc":194,"text":"def isdecimal(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":195,"header":"def isdigit(self) -> bool","id":215,"name":"isdigit","nodeType":"Function","startLoc":195,"text":"def isdigit(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":196,"header":"def isidentifier(self) -> bool","id":216,"name":"isidentifier","nodeType":"Function","startLoc":196,"text":"def isidentifier(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":197,"header":"def islower(self) -> bool","id":217,"name":"islower","nodeType":"Function","startLoc":197,"text":"def islower(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":198,"header":"def isnumeric(self) -> bool","id":218,"name":"isnumeric","nodeType":"Function","startLoc":198,"text":"def isnumeric(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":199,"header":"def isprintable(self) -> bool","id":219,"name":"isprintable","nodeType":"Function","startLoc":199,"text":"def isprintable(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":200,"header":"def isspace(self) -> bool","id":220,"name":"isspace","nodeType":"Function","startLoc":200,"text":"def isspace(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":201,"header":"def istitle(self) -> bool","id":221,"name":"istitle","nodeType":"Function","startLoc":201,"text":"def istitle(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":202,"header":"def isupper(self) -> bool","id":222,"name":"isupper","nodeType":"Function","startLoc":202,"text":"def isupper(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":203,"header":"def isascii(self) -> bool","id":223,"name":"isascii","nodeType":"Function","startLoc":203,"text":"def isascii(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":204,"header":"def join(self, seq: Iterable[str]) -> str","id":224,"name":"join","nodeType":"Function","startLoc":204,"text":"def join(self, seq: Iterable[str]) -> str: ..."},{"col":4,"comment":"null","endLoc":205,"header":"def ljust(self, width: int, *args: Any) -> Self","id":225,"name":"ljust","nodeType":"Function","startLoc":205,"text":"def ljust(self, width: int, *args: Any) -> Self: ..."},{"col":4,"comment":"null","endLoc":206,"header":"def lower(self) -> Self","id":226,"name":"lower","nodeType":"Function","startLoc":206,"text":"def lower(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":207,"header":"def lstrip(self, chars: str | None = None) -> Self","id":227,"name":"lstrip","nodeType":"Function","startLoc":207,"text":"def lstrip(self, chars: str | None = None) -> Self: ..."},{"col":4,"comment":"null","endLoc":209,"header":"def partition(self, sep: str) -> tuple[str, str, str]","id":228,"name":"partition","nodeType":"Function","startLoc":209,"text":"def partition(self, sep: str) -> tuple[str, str, str]: ..."},{"col":8,"comment":"null","endLoc":211,"header":"def removeprefix(self, __prefix: str | UserString) -> Self","id":229,"name":"removeprefix","nodeType":"Function","startLoc":211,"text":"def removeprefix(self, __prefix: str | UserString) -> Self: ..."},{"col":8,"comment":"null","endLoc":212,"header":"def removesuffix(self, __suffix: str | UserString) -> Self","id":230,"name":"removesuffix","nodeType":"Function","startLoc":212,"text":"def removesuffix(self, __suffix: str | UserString) -> Self: ..."},{"col":4,"comment":"null","endLoc":214,"header":"def replace(self, old: str | UserString, new: str | UserString, maxsplit: int = -1) -> Self","id":231,"name":"replace","nodeType":"Function","startLoc":214,"text":"def replace(self, old: str | UserString, new: str | UserString, maxsplit: int = -1) -> Self: ..."},{"col":4,"comment":"null","endLoc":215,"header":"def rfind(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int","id":232,"name":"rfind","nodeType":"Function","startLoc":215,"text":"def rfind(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ..."},{"col":4,"comment":"null","endLoc":216,"header":"def rindex(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int","id":233,"name":"rindex","nodeType":"Function","startLoc":216,"text":"def rindex(self, sub: str | UserString, start: int = 0, end: int = sys.maxsize) -> int: ..."},{"col":4,"comment":"null","endLoc":217,"header":"def rjust(self, width: int, *args: Any) -> Self","id":234,"name":"rjust","nodeType":"Function","startLoc":217,"text":"def rjust(self, width: int, *args: Any) -> Self: ..."},{"col":4,"comment":"null","endLoc":218,"header":"def rpartition(self, sep: str) -> tuple[str, str, str]","id":235,"name":"rpartition","nodeType":"Function","startLoc":218,"text":"def rpartition(self, sep: str) -> tuple[str, str, str]: ..."},{"col":4,"comment":"null","endLoc":219,"header":"def rstrip(self, chars: str | None = None) -> Self","id":236,"name":"rstrip","nodeType":"Function","startLoc":219,"text":"def rstrip(self, chars: str | None = None) -> Self: ..."},{"col":4,"comment":"null","endLoc":220,"header":"def split(self, sep: str | None = None, maxsplit: int = -1) -> list[str]","id":237,"name":"split","nodeType":"Function","startLoc":220,"text":"def split(self, sep: str | None = None, maxsplit: int = -1) -> list[str]: ..."},{"col":4,"comment":"null","endLoc":221,"header":"def rsplit(self, sep: str | None = None, maxsplit: int = -1) -> list[str]","id":238,"name":"rsplit","nodeType":"Function","startLoc":221,"text":"def rsplit(self, sep: str | None = None, maxsplit: int = -1) -> list[str]: ..."},{"col":4,"comment":"null","endLoc":222,"header":"def splitlines(self, keepends: bool = False) -> list[str]","id":239,"name":"splitlines","nodeType":"Function","startLoc":222,"text":"def splitlines(self, keepends: bool = False) -> list[str]: ..."},{"col":4,"comment":"null","endLoc":223,"header":"def startswith(self, prefix: str | tuple[str, ...], start: int | None = 0, end: int | None = sys.maxsize) -> bool","id":240,"name":"startswith","nodeType":"Function","startLoc":223,"text":"def startswith(self, prefix: str | tuple[str, ...], start: int | None = 0, end: int | None = sys.maxsize) -> bool: ..."},{"col":4,"comment":"null","endLoc":224,"header":"def strip(self, chars: str | None = None) -> Self","id":241,"name":"strip","nodeType":"Function","startLoc":224,"text":"def strip(self, chars: str | None = None) -> Self: ..."},{"col":4,"comment":"null","endLoc":225,"header":"def swapcase(self) -> Self","id":242,"name":"swapcase","nodeType":"Function","startLoc":225,"text":"def swapcase(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":226,"header":"def title(self) -> Self","id":243,"name":"title","nodeType":"Function","startLoc":226,"text":"def title(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":227,"header":"def translate(self, *args: Any) -> Self","id":244,"name":"translate","nodeType":"Function","startLoc":227,"text":"def translate(self, *args: Any) -> Self: ..."},{"col":4,"comment":"null","endLoc":228,"header":"def upper(self) -> Self","id":245,"name":"upper","nodeType":"Function","startLoc":228,"text":"def upper(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":229,"header":"def zfill(self, width: int) -> Self","id":246,"name":"zfill","nodeType":"Function","startLoc":229,"text":"def zfill(self, width: int) -> Self: ..."},{"attributeType":"str","col":4,"comment":"null","endLoc":150,"id":247,"name":"data","nodeType":"Attribute","startLoc":150,"text":"data"},{"id":253,"name":"doc/_static","nodeType":"Package"},{"id":254,"name":"logo-tall-lightbg.svg","nodeType":"TextFile","path":"doc/_static","text":"\n\n\n\n \n \n \n \n 2020-09-07T14:13:59.334522\n image/svg+xml\n \n \n Matplotlib v3.3.1, https://matplotlib.org/\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"},{"fileName":"test_groupby.py","filePath":"tests/_core","id":255,"nodeType":"File","text":"\nimport 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])\n\n\ndef 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])\n\n\ndef 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])\n\n\ndef 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])\n\n\ndef 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))\n\n\ndef 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])\n"},{"className":"GroupBy","col":0,"comment":"\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 ","endLoc":129,"id":256,"nodeType":"Class","startLoc":16,"text":"class 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\n\n def _get_groups(\n self, data: DataFrame\n ) -> tuple[str | list[str], Index | 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\n if not levels:\n grouper = []\n groups = pd.Index([])\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))\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\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 # Implies that we had a MultiIndex so key is iterable\n group_ids = dict(zip(grouper, cast(Iterable, 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)"},{"col":4,"comment":"\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 ","endLoc":47,"header":"def __init__(self, order: list[str] | dict[str, list | None])","id":257,"name":"__init__","nodeType":"Function","startLoc":29,"text":"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"},{"id":258,"name":"doc/tools","nodeType":"Package"},{"fileName":"nb_to_doc.py","filePath":"doc/tools","id":259,"nodeType":"File","text":"#! /usr/bin/env python\n\"\"\"Execute a .ipynb file, write out a processed .rst and clean .ipynb.\n\nSome functions in this script were copied from the nbstripout tool:\n\nCopyright (c) 2015 Min RK, Florian Rathgeber, Michael McNeil Forbes\n2019 Casper da Costa-Luis\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\"\"\"\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)\n\n\ndef 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\n\n\nif __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)\n"},{"attributeType":"function | function | function","col":4,"comment":"null","endLoc":208,"id":260,"name":"maketrans","nodeType":"Attribute","startLoc":208,"text":"maketrans"},{"col":0,"comment":"null","endLoc":820,"header":"@overload\ndef cast(typ: str, val: Any) -> Any","id":261,"name":"cast","nodeType":"Function","startLoc":819,"text":"@overload\ndef cast(typ: str, val: Any) -> Any: ..."},{"col":0,"comment":"null","endLoc":822,"header":"@overload\ndef cast(typ: object, val: Any) -> Any","id":262,"name":"cast","nodeType":"Function","startLoc":821,"text":"@overload\ndef cast(typ: object, val: Any) -> Any: ..."},{"className":"Iterable","col":0,"comment":"null","endLoc":386,"id":263,"nodeType":"Class","startLoc":383,"text":"@runtime_checkable\nclass Iterable(Protocol[_T_co]):\n @abstractmethod\n def __iter__(self) -> Iterator[_T_co]: ..."},{"className":"Mark","col":0,"comment":"Base class for objects that visually represent data.","endLoc":228,"id":264,"nodeType":"Class","startLoc":103,"text":"@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?\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 scale = scales[name]\n value = data[name]\n try:\n feature = scale(value)\n except Exception as err:\n raise PlotSpecError._during(\"Scaling operation\", name) from err\n\n if return_array:\n feature = np.asarray(feature)\n return feature\n\n if feature.depend is not None:\n # TODO add source_func or similar to transform the source value?\n # e.g. set linewidth as a proportion of pointsize?\n return self._resolve(data, feature.depend, scales)\n\n default = prop.standardize(feature.default)\n if return_multiple:\n default = [default] * len(data)\n if return_array:\n default = np.array(default)\n return default\n\n def _infer_orient(self, scales: dict) -> str: # TODO type scales\n\n # 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\n return None"},{"col":4,"comment":"null","endLoc":386,"header":"@abstractmethod\n def __iter__(self) -> Iterator[_T_co]","id":265,"name":"__iter__","nodeType":"Function","startLoc":385,"text":"@abstractmethod\n def __iter__(self) -> Iterator[_T_co]: ..."},{"col":0,"comment":"\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 ","endLoc":153,"header":"def categorical_order(vector: Series, order: list | None = None) -> list","id":266,"name":"categorical_order","nodeType":"Function","startLoc":125,"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(pd.Series(order)) == \"numeric\":\n order.sort()\n\n return order"},{"col":4,"comment":"null","endLoc":1933,"header":"def __init__(self, *args: object) -> None","id":269,"name":"__init__","nodeType":"Function","startLoc":1933,"text":"def __init__(self, *args: object) -> None: ..."},{"col":4,"comment":"null","endLoc":114,"header":"@property\n def _mappable_props(self)","id":270,"name":"_mappable_props","nodeType":"Function","startLoc":109,"text":"@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 }"},{"col":4,"comment":"null","endLoc":31,"header":"def __init__(self, data)","id":271,"name":"__init__","nodeType":"Function","startLoc":29,"text":"def __init__(self, data):\n assert data in self.allowed, data\n super().__init__(data)"},{"attributeType":"Callable","col":0,"comment":"null","endLoc":195,"id":273,"name":"Callable","nodeType":"Attribute","startLoc":195,"text":"Callable"},{"id":274,"name":"logo-wide-darkbg.svg","nodeType":"TextFile","path":"doc/_static","text":"\n\n\n\n \n \n \n \n 2020-09-07T14:14:00.795540\n image/svg+xml\n \n \n Matplotlib v3.3.1, https://matplotlib.org/\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"},{"id":275,"name":"objects.Jitter.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"f2e5a85d-c710-492b-a4fc-09b45ae26471\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn.objects as so\\n\",\n \"from seaborn import load_dataset\\n\",\n \"penguins = load_dataset(\\\"penguins\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"14b5927c-42f1-4934-adee-3d380b8b3228\",\n \"metadata\": {},\n \"source\": [\n \"When used without any arguments, a small amount of jitter will be applied along the orientation axis:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"bc1b4941-bbe6-4afc-b51a-0ac67cbe417d\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(penguins, \\\"species\\\", \\\"body_mass_g\\\")\\n\",\n \" .add(so.Dots(), so.Jitter())\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"1101690e-6c19-4219-aa4e-180798454df1\",\n \"metadata\": {},\n \"source\": [\n \"The `width` parameter controls the amount of jitter relative to the spacing between the marks:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"c4251b9d-8b11-4c2c-905c-2f3b523dee70\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(penguins, \\\"species\\\", \\\"body_mass_g\\\")\\n\",\n \" .add(so.Dots(), so.Jitter(.5))\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"38aa639a-356e-4674-970b-53d55379b2b7\",\n \"metadata\": {},\n \"source\": [\n \"The `width` parameter always applies to the orientation axis, so the direction of jitter will adapt along with the orientation:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"1cfe1c07-7e81-45a0-a989-240503046133\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(penguins, \\\"body_mass_g\\\", \\\"species\\\")\\n\",\n \" .add(so.Dots(), so.Jitter(.5))\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"0f5de4cc-3383-4503-8b59-9c48230a12a5\",\n \"metadata\": {},\n \"source\": [\n \"Because the `width` jitter is relative, it can be used when the orientation axis is numeric without further tweaking:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"c94c41e8-29c4-4439-a5d1-0b8ffb244890\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(penguins[\\\"body_mass_g\\\"].round(-3), penguins[\\\"flipper_length_mm\\\"])\\n\",\n \" .add(so.Dots(), so.Jitter())\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"dd982dfa-fd9f-4edc-8190-18f0e101ae1a\",\n \"metadata\": {},\n \"source\": [\n \"In contrast to `width`, the `x` and `y` parameters always refer to specific axes and control the jitter in data units:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"b0f2e5ca-68ad-4439-a4ee-f32f65682e95\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(penguins[\\\"body_mass_g\\\"].round(-3), penguins[\\\"flipper_length_mm\\\"])\\n\",\n \" .add(so.Dots(), so.Jitter(x=100))\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"a90ba526-8043-42ed-8f57-36445c163c0d\",\n \"metadata\": {},\n \"source\": [\n \"Both `x` and `y` can be used in a single transform:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"6c07ed1d-ac77-4b30-90a8-e1b8760f9fad\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(\\n\",\n \" penguins[\\\"body_mass_g\\\"].round(-3),\\n\",\n \" penguins[\\\"flipper_length_mm\\\"].round(-1),\\n\",\n \" )\\n\",\n \" .add(so.Dots(), so.Jitter(x=200, y=5))\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"bb04c7a2-93f0-44cf-aacf-0eb436d0f14b\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"className":"MetadataError","col":0,"comment":"null","endLoc":42,"id":276,"nodeType":"Class","startLoc":41,"text":"class MetadataError(Exception):\n pass"},{"className":"Exception","col":0,"comment":"null","endLoc":1947,"id":277,"nodeType":"Class","startLoc":1947,"text":"class Exception(BaseException): ..."},{"className":"Scale","col":0,"comment":"Base class for objects that map data values to visual properties.","endLoc":140,"id":278,"nodeType":"Class","startLoc":54,"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()\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))\n\n def _spacing(self, x: Series) -> float:\n space = self._spacer(x)\n if np.isnan(space):\n # This happens when there is no variance in the orient coordinate data\n # Not exactly clear what the right default is, but 1 seems reasonable?\n return 1\n return space\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 trans_data: Series | NDArray | list\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 trans_data = np.array([data])\n else:\n trans_data = data\n\n for func in self._pipeline:\n if func is not None:\n trans_data = func(trans_data)\n\n if scalar_data:\n return trans_data[0]\n else:\n return trans_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()"},{"fileName":"dot.py","filePath":"seaborn/_marks","id":280,"nodeType":"File","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\n\n\nclass 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\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)\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 )\n\n\n@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)\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\n\n\n@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)\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\n"},{"col":0,"comment":"\n array(object, dtype=None, copy=True, order='K', subok=False, ndmin=0)\n \n Create an array.\n \n Parameters\n ----------\n object : array_like\n An array, any object exposing the array interface, an object whose\n __array__ method returns an array, or any (nested) sequence.\n dtype : data-type, optional\n The desired data-type for the array. If not given, then the type will\n be determined as the minimum type required to hold the objects in the\n sequence. This argument can only be used to 'upcast' the array. For\n downcasting, use the .astype(t) method.\n copy : bool, optional\n If true (default), then the object is copied. Otherwise, a copy will\n only be made if __array__ returns a copy, if obj is a nested sequence,\n or if a copy is needed to satisfy any of the other requirements\n (`dtype`, `order`, etc.).\n order : {'K', 'A', 'C', 'F'}, optional\n Specify the memory layout of the array. If object is not an array, the\n newly created array will be in C order (row major) unless 'F' is\n specified, in which case it will be in Fortran order (column major).\n If object is an array the following holds.\n \n ===== ========= ===================================================\n order no copy copy=True\n ===== ========= ===================================================\n 'K' unchanged F & C order preserved, otherwise most similar order\n 'A' unchanged F order if input is F and not C, otherwise C order\n 'C' C order C order\n 'F' F order F order\n ===== ========= ===================================================\n \n When ``copy=False`` and a copy is made for other reasons, the result is\n the same as if ``copy=True``, with some exceptions for `A`, see the\n Notes section. The default order is 'K'.\n subok : bool, optional\n If True, then sub-classes will be passed-through, otherwise\n the returned array will be forced to be a base-class array (default).\n ndmin : int, optional\n Specifies the minimum number of dimensions that the resulting\n array should have. Ones will be pre-pended to the shape as\n needed to meet this requirement.\n \n Returns\n -------\n out : ndarray\n An array object satisfying the specified requirements.\n \n See Also\n --------\n empty, empty_like, zeros, zeros_like, ones, ones_like, full, full_like\n \n Notes\n -----\n When order is 'A' and `object` is an array in neither 'C' nor 'F' order,\n and a copy is forced by a change in dtype, then the order of the result is\n not necessarily 'C' as expected. This is likely a bug.\n \n Examples\n --------\n >>> np.array([1, 2, 3])\n array([1, 2, 3])\n \n Upcasting:\n \n >>> np.array([1, 2, 3.0])\n array([ 1., 2., 3.])\n \n More than one dimension:\n \n >>> np.array([[1, 2], [3, 4]])\n array([[1, 2],\n [3, 4]])\n \n Minimum dimensions 2:\n \n >>> np.array([1, 2, 3], ndmin=2)\n array([[1, 2, 3]])\n \n Type provided:\n \n >>> np.array([1, 2, 3], dtype=complex)\n array([ 1.+0.j, 2.+0.j, 3.+0.j])\n \n Data-type consisting of more than one element:\n \n >>> x = np.array([(1,2),(3,4)],dtype=[('a','>> x['a']\n array([1, 3])\n \n Creating an array from sub-classes:\n \n >>> np.array(np.mat('1 2; 3 4'))\n array([[1, 2],\n [3, 4]])\n \n >>> np.array(np.mat('1 2; 3 4'), subok=True)\n matrix([[1, 2],\n [3, 4]])\n ","endLoc":217,"header":"def array(p_object, dtype=None, copy=True, order='K', subok=False, ndmin=0)","id":282,"name":"array","nodeType":"Function","startLoc":113,"text":"def array(p_object, dtype=None, copy=True, order='K', subok=False, ndmin=0): # real signature unknown; restored from __doc__\n \"\"\"\n array(object, dtype=None, copy=True, order='K', subok=False, ndmin=0)\n \n Create an array.\n \n Parameters\n ----------\n object : array_like\n An array, any object exposing the array interface, an object whose\n __array__ method returns an array, or any (nested) sequence.\n dtype : data-type, optional\n The desired data-type for the array. If not given, then the type will\n be determined as the minimum type required to hold the objects in the\n sequence. This argument can only be used to 'upcast' the array. For\n downcasting, use the .astype(t) method.\n copy : bool, optional\n If true (default), then the object is copied. Otherwise, a copy will\n only be made if __array__ returns a copy, if obj is a nested sequence,\n or if a copy is needed to satisfy any of the other requirements\n (`dtype`, `order`, etc.).\n order : {'K', 'A', 'C', 'F'}, optional\n Specify the memory layout of the array. If object is not an array, the\n newly created array will be in C order (row major) unless 'F' is\n specified, in which case it will be in Fortran order (column major).\n If object is an array the following holds.\n \n ===== ========= ===================================================\n order no copy copy=True\n ===== ========= ===================================================\n 'K' unchanged F & C order preserved, otherwise most similar order\n 'A' unchanged F order if input is F and not C, otherwise C order\n 'C' C order C order\n 'F' F order F order\n ===== ========= ===================================================\n \n When ``copy=False`` and a copy is made for other reasons, the result is\n the same as if ``copy=True``, with some exceptions for `A`, see the\n Notes section. The default order is 'K'.\n subok : bool, optional\n If True, then sub-classes will be passed-through, otherwise\n the returned array will be forced to be a base-class array (default).\n ndmin : int, optional\n Specifies the minimum number of dimensions that the resulting\n array should have. Ones will be pre-pended to the shape as\n needed to meet this requirement.\n \n Returns\n -------\n out : ndarray\n An array object satisfying the specified requirements.\n \n See Also\n --------\n empty, empty_like, zeros, zeros_like, ones, ones_like, full, full_like\n \n Notes\n -----\n When order is 'A' and `object` is an array in neither 'C' nor 'F' order,\n and a copy is forced by a change in dtype, then the order of the result is\n not necessarily 'C' as expected. This is likely a bug.\n \n Examples\n --------\n >>> np.array([1, 2, 3])\n array([1, 2, 3])\n \n Upcasting:\n \n >>> np.array([1, 2, 3.0])\n array([ 1., 2., 3.])\n \n More than one dimension:\n \n >>> np.array([[1, 2], [3, 4]])\n array([[1, 2],\n [3, 4]])\n \n Minimum dimensions 2:\n \n >>> np.array([1, 2, 3], ndmin=2)\n array([[1, 2, 3]])\n \n Type provided:\n \n >>> np.array([1, 2, 3], dtype=complex)\n array([ 1.+0.j, 2.+0.j, 3.+0.j])\n \n Data-type consisting of more than one element:\n \n >>> x = np.array([(1,2),(3,4)],dtype=[('a','>> x['a']\n array([1, 3])\n \n Creating an array from sub-classes:\n \n >>> np.array(np.mat('1 2; 3 4'))\n array([[1, 2],\n [3, 4]])\n \n >>> np.array(np.mat('1 2; 3 4'), subok=True)\n matrix([[1, 2],\n [3, 4]])\n \"\"\"\n pass"},{"className":"Mappable","col":0,"comment":"null","endLoc":91,"id":283,"nodeType":"Class","startLoc":26,"text":"class 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)"},{"col":4,"comment":"\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 ","endLoc":61,"header":"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 )","id":284,"name":"__init__","nodeType":"Function","startLoc":27,"text":"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"},{"col":4,"comment":"Nice formatting for when object appears in Mark init signature.","endLoc":75,"header":"def __repr__(self)","id":285,"name":"__repr__","nodeType":"Function","startLoc":63,"text":"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"},{"id":287,"name":"logo-tall-darkbg.svg","nodeType":"TextFile","path":"doc/_static","text":"\n\n\n\n \n \n \n \n 2020-09-07T14:14:01.511527\n image/svg+xml\n \n \n Matplotlib v3.3.1, https://matplotlib.org/\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":15,"id":288,"name":"f","nodeType":"Attribute","startLoc":15,"text":"f"},{"attributeType":"null","col":3,"comment":"null","endLoc":15,"id":289,"name":"axes","nodeType":"Attribute","startLoc":15,"text":"axes"},{"attributeType":"null","col":4,"comment":"null","endLoc":18,"id":290,"name":"ax","nodeType":"Attribute","startLoc":18,"text":"ax"},{"fileName":"area.py","filePath":"seaborn/_marks","id":291,"nodeType":"File","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)\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, kind=\"mergesort\")\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\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 )\n\n\n@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\"})\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)\n\n\n@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 # TODO what if only one exist?\n other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n if not set(data.columns) & {f\"{other}min\", f\"{other}max\"}:\n agg = {f\"{other}min\": (other, \"min\"), f\"{other}max\": (other, \"max\")}\n data = data.groupby(orient).agg(**agg).reset_index()\n return data\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":96,"id":292,"name":"MappableBool","nodeType":"Attribute","startLoc":96,"text":"MappableBool"},{"attributeType":"null","col":0,"comment":"null","endLoc":98,"id":293,"name":"MappableFloat","nodeType":"Attribute","startLoc":98,"text":"MappableFloat"},{"attributeType":"null","col":0,"comment":"null","endLoc":99,"id":294,"name":"MappableColor","nodeType":"Attribute","startLoc":99,"text":"MappableColor"},{"attributeType":"null","col":0,"comment":"null","endLoc":100,"id":295,"name":"MappableStyle","nodeType":"Attribute","startLoc":100,"text":"MappableStyle"},{"col":0,"comment":"null","endLoc":238,"header":"def resolve_properties(\n mark: Mark, data: DataFrame, scales: dict[str, Scale]\n) -> dict[str, Any]","id":296,"name":"resolve_properties","nodeType":"Function","startLoc":231,"text":"def 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"},{"col":4,"comment":"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 ","endLoc":197,"header":"def _resolve(\n self,\n data: DataFrame | dict[str, Any],\n name: str,\n scales: dict[str, Scale] | None = None,\n ) -> Any","id":297,"name":"_resolve","nodeType":"Function","startLoc":126,"text":"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 scale = scales[name]\n value = data[name]\n try:\n feature = scale(value)\n except Exception as err:\n raise PlotSpecError._during(\"Scaling operation\", name) from err\n\n if return_array:\n feature = np.asarray(feature)\n return feature\n\n if feature.depend is not None:\n # TODO add source_func or similar to transform the source value?\n # e.g. set linewidth as a proportion of pointsize?\n return self._resolve(data, feature.depend, scales)\n\n default = prop.standardize(feature.default)\n if return_multiple:\n default = [default] * len(data)\n if return_array:\n default = np.array(default)\n return default"},{"col":4,"comment":"null","endLoc":69,"header":"def __post_init__(self)","id":298,"name":"__post_init__","nodeType":"Function","startLoc":65,"text":"def __post_init__(self):\n\n self._tick_params = None\n self._label_params = None\n self._legend = None"},{"col":4,"comment":"null","endLoc":72,"header":"def tick(self)","id":299,"name":"tick","nodeType":"Function","startLoc":71,"text":"def tick(self):\n raise NotImplementedError()"},{"col":4,"comment":"null","endLoc":1010,"header":"@overload\n def __init__(self) -> None","id":300,"name":"__init__","nodeType":"Function","startLoc":1009,"text":"@overload\n def __init__(self) -> None: ..."},{"attributeType":"str","col":8,"comment":"null","endLoc":9,"id":301,"name":"fname","nodeType":"Attribute","startLoc":9,"text":"fname"},{"col":4,"comment":"Initialize the property with the name of the corresponding plot variable.","endLoc":60,"header":"def __init__(self, variable: str | None = None)","id":302,"name":"__init__","nodeType":"Function","startLoc":56,"text":"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"},{"col":4,"comment":"null","endLoc":1012,"header":"@overload\n def __init__(self, __iterable: Iterable[_T]) -> None","id":305,"name":"__init__","nodeType":"Function","startLoc":1011,"text":"@overload\n def __init__(self, __iterable: Iterable[_T]) -> None: ..."},{"col":4,"comment":"null","endLoc":75,"header":"def label(self)","id":306,"name":"label","nodeType":"Function","startLoc":74,"text":"def label(self):\n raise NotImplementedError()"},{"col":4,"comment":"Return the name of the feature to source a default value from.","endLoc":80,"header":"@property\n def depend(self) -> Any","id":311,"name":"depend","nodeType":"Function","startLoc":77,"text":"@property\n def depend(self) -> Any:\n \"\"\"Return the name of the feature to source a default value from.\"\"\"\n return self._depend"},{"col":4,"comment":"null","endLoc":84,"header":"@property\n def grouping(self) -> bool","id":316,"name":"grouping","nodeType":"Function","startLoc":82,"text":"@property\n def grouping(self) -> bool:\n return self._grouping"},{"fileName":"_oldcore.py","filePath":"seaborn","id":317,"nodeType":"File","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)\n\n\nclass 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\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)\n\n\n@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\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\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\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\n\n\n@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\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\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\n\n\n@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\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\n\n\n# =========================================================================== #\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))\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\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\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\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\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\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\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()\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_na', 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\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\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 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\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)\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)\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\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\n\n\nclass 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\n\n\ndef variable_type(vector, boolean_type=\"numeric\"):\n \"\"\"\n Determine whether a vector contains numeric, categorical, or datetime data.\n\n This function differs from the pandas typing API in two ways:\n\n - Python sequences or object-typed PyData objects are considered numeric if\n all of their entries are numeric.\n - String or mixed-type data are considered categorical even if not\n explicitly represented as a :class:`pandas.api.types.CategoricalDtype`.\n\n Parameters\n ----------\n vector : :func:`pandas.Series`, :func:`numpy.ndarray`, or Python sequence\n Input data to test.\n boolean_type : 'numeric' or 'categorical'\n Type to use for vectors containing only 0s and 1s (and NAs).\n\n Returns\n -------\n var_type : 'numeric', 'categorical', or 'datetime'\n Name identifying the type of data in the vector.\n \"\"\"\n\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\")\n\n\ndef infer_orient(x=None, y=None, orient=None, require_numeric=True):\n \"\"\"Determine how the plot should be oriented based on the data.\n\n For historical reasons, the convention is to call a plot \"horizontally\"\n or \"vertically\" oriented based on the axis representing its dependent\n variable. Practically, this is used when determining the axis for\n numerical aggregation.\n\n Parameters\n ----------\n x, y : Vector data or None\n Positional data vectors for the plot.\n orient : string or None\n Specified orientation, 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\"\n\n\ndef unique_dashes(n):\n \"\"\"Build an arbitrarily long list of unique dash styles for lines.\n\n Parameters\n ----------\n n : int\n Number of unique dash specs to generate.\n\n Returns\n -------\n dashes : list of strings or tuples\n Valid arguments for the ``dashes`` parameter on\n :class:`matplotlib.lines.Line2D`. The first spec is a solid\n line (``\"\"``), the remainder are sequences of long and short\n dashes.\n\n \"\"\"\n # Start with dash specs that are well distinguishable\n dashes = [\n \"\",\n (4, 1.5),\n (1, 1),\n (3, 1.25, 1.5, 1.25),\n (5, 1, 1, 1),\n ]\n\n # Now programmatically build as many as we need\n p = 3\n while len(dashes) < n:\n\n # Take combinations of long and short dashes\n a = itertools.combinations_with_replacement([3, 1.25], p)\n b = itertools.combinations_with_replacement([4, 1], p)\n\n # Interleave the combinations, reversing one of the streams\n segment_list = itertools.chain(*zip(\n list(a)[1:-1][::-1],\n list(b)[1:-1]\n ))\n\n # Now insert the gaps\n for segments in segment_list:\n gap = min(segments)\n spec = tuple(itertools.chain(*((seg, gap) for seg in segments)))\n dashes.append(spec)\n\n p += 1\n\n return dashes[:n]\n\n\ndef unique_markers(n):\n \"\"\"Build an arbitrarily long list of unique marker styles for points.\n\n Parameters\n ----------\n n : int\n Number of unique marker specs to generate.\n\n Returns\n -------\n markers : list of string or tuples\n Values for defining :class:`matplotlib.markers.MarkerStyle` objects.\n All markers will be filled.\n\n \"\"\"\n # Start with marker specs that are well distinguishable\n markers = [\n \"o\",\n \"X\",\n (4, 0, 45),\n \"P\",\n (4, 0, 0),\n (4, 1, 0),\n \"^\",\n (4, 1, 45),\n \"v\",\n ]\n\n # Now generate more from regular polygons of increasing order\n s = 5\n while len(markers) < n:\n a = 360 / (s + 1) / 2\n markers.extend([\n (s + 1, 1, a),\n (s + 1, 0, a),\n (s, 1, 0),\n (s, 0, 0),\n ])\n s += 1\n\n # Convert to MarkerStyle object, using only exactly what we need\n # markers = [mpl.markers.MarkerStyle(m) for m in markers[:n]]\n\n return markers[:n]\n\n\ndef categorical_order(vector, order=None):\n \"\"\"Return a list of unique data values.\n\n Determine an ordered list of levels in ``values``.\n\n Parameters\n ----------\n vector : list, array, Categorical, or Series\n Vector of \"categorical\" values\n order : list-like, optional\n Desired order of category levels to override the order determined\n from the ``values`` object.\n\n Returns\n -------\n order : list\n Ordered list of category levels not including null values.\n\n \"\"\"\n 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)\n"},{"col":4,"comment":"Get the default value for this feature, or access the relevant rcParam.","endLoc":91,"header":"@property\n def default(self) -> Any","id":318,"name":"default","nodeType":"Function","startLoc":86,"text":"@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)"},{"col":0,"comment":"null","endLoc":64,"header":"def lch_to_rgb(l, c, h)","id":321,"name":"lch_to_rgb","nodeType":"Function","startLoc":63,"text":"def lch_to_rgb(l, c, h):\n return xyz_to_rgb(luv_to_xyz(lch_to_luv([l, c, h])))"},{"col":0,"comment":"null","endLoc":257,"header":"def lch_to_luv(triple)","id":323,"name":"lch_to_luv","nodeType":"Function","startLoc":250,"text":"def 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]"},{"attributeType":"str | None","col":8,"comment":"null","endLoc":58,"id":324,"name":"_rc","nodeType":"Attribute","startLoc":58,"text":"self._rc"},{"attributeType":"TextIO","col":28,"comment":"null","endLoc":12,"id":325,"name":"fid","nodeType":"Attribute","startLoc":12,"text":"fid"},{"col":4,"comment":"null","endLoc":78,"header":"def _get_locators(self)","id":326,"name":"_get_locators","nodeType":"Function","startLoc":77,"text":"def _get_locators(self):\n raise NotImplementedError()"},{"col":4,"comment":"Return index with Cartesian product of ordered grouping variable levels.","endLoc":71,"header":"def _get_groups(\n self, data: DataFrame\n ) -> tuple[str | list[str], Index | MultiIndex]","id":327,"name":"_get_groups","nodeType":"Function","startLoc":49,"text":"def _get_groups(\n self, data: DataFrame\n ) -> tuple[str | list[str], Index | 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\n if not levels:\n grouper = []\n groups = pd.Index([])\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"},{"col":4,"comment":"null","endLoc":123,"header":"@property\n def _grouping_props(self)","id":328,"name":"_grouping_props","nodeType":"Function","startLoc":116,"text":"@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 ]"},{"col":0,"comment":"null","endLoc":12,"header":"def copy(x: _T) -> _T","id":329,"name":"copy","nodeType":"Function","startLoc":12,"text":"def copy(x: _T) -> _T: ..."},{"id":330,"name":"tests/_stats","nodeType":"Package"},{"fileName":"test_counting.py","filePath":"tests/_stats","id":331,"nodeType":"File","text":"\nimport 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.counting import Hist, Count\n\n\nclass TestCount:\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)\n\n def test_single_grouper(self, df):\n\n ori = \"x\"\n df = df[[\"x\"]]\n gb = self.get_groupby(df, ori)\n res = Count()(df, gb, ori, {})\n expected = df.groupby(\"x\").size()\n assert_array_equal(res.sort_values(\"x\")[\"y\"], expected)\n\n def test_multiple_groupers(self, df):\n\n ori = \"x\"\n df = df[[\"x\", \"group\"]].sort_values(\"group\")\n gb = self.get_groupby(df, ori)\n res = Count()(df, gb, ori, {})\n expected = df.groupby([\"x\", \"group\"]).size()\n assert_array_equal(res.sort_values([\"x\", \"group\"])[\"y\"], expected)\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\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_invalid_stat(self):\n\n with pytest.raises(ValueError, match=\"The `stat` parameter for `Hist`\"):\n Hist(stat=\"invalid\")\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_norm_warning(self, long_df, triple_args):\n\n h = Hist(common_norm=[\"b\"])\n with pytest.warns(UserWarning, match=r\"Undefined variable\\(s\\)\"):\n h(long_df, *triple_args)\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_common_bins_warning(self, long_df, triple_args):\n\n h = Hist(common_bins=[\"b\"])\n with pytest.warns(UserWarning, match=r\"Undefined variable\\(s\\)\"):\n h(long_df, *triple_args)\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))\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))\n"},{"col":0,"comment":"null","endLoc":235,"header":"def luv_to_xyz(triple)","id":332,"name":"luv_to_xyz","nodeType":"Function","startLoc":222,"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]"},{"col":4,"comment":"null","endLoc":81,"header":"def _get_formatter(self, locator: Locator | None = None)","id":333,"name":"_get_formatter","nodeType":"Function","startLoc":80,"text":"def _get_formatter(self, locator: Locator | None = None):\n raise NotImplementedError()"},{"col":4,"comment":"null","endLoc":213,"header":"def _infer_orient(self, scales: dict) -> str","id":334,"name":"_infer_orient","nodeType":"Function","startLoc":199,"text":"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\""},{"col":4,"comment":"Main interface for creating a plot.","endLoc":222,"header":"def _plot(\n self,\n split_generator: Callable[[], Generator],\n scales: dict[str, Scale],\n orient: str,\n ) -> None","id":335,"name":"_plot","nodeType":"Function","startLoc":215,"text":"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()"},{"col":0,"comment":"null","endLoc":137,"header":"def f_inv(t)","id":336,"name":"f_inv","nodeType":"Function","startLoc":133,"text":"def 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"},{"fileName":"matrix.py","filePath":"seaborn","id":337,"nodeType":"File","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]\n\n\ndef _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\n\n\nclass _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()\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)\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)\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\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\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 \"\"\"Plot rectangular data as a color-encoded matrix.\n\n This is an Axes-level function and will draw the heatmap into the\n currently-active Axes if none is provided to the ``ax`` argument. Part of\n this Axes space will be taken and used to plot a colormap, unless ``cbar``\n is False or a separate Axes is provided to ``cbar_ax``.\n\n Parameters\n ----------\n data : rectangular dataset\n 2D dataset that can be coerced into an ndarray. If a Pandas DataFrame\n is provided, the index/column information will be used to label the\n columns and rows.\n vmin, vmax : floats, optional\n Values to anchor the colormap, otherwise they are inferred from the\n data and other keyword arguments.\n cmap : matplotlib colormap name or object, or list of colors, optional\n The mapping from data values to color space. If not provided, the\n default will depend on whether ``center`` is set.\n center : float, optional\n The value at which to center the colormap when plotting divergent data.\n Using this parameter will change the default ``cmap`` if none is\n specified.\n robust : bool, optional\n If True and ``vmin`` or ``vmax`` are absent, the colormap range is\n computed with robust quantiles instead of the extreme values.\n annot : bool or rectangular dataset, optional\n If True, write the data value in each cell. If an array-like with the\n same shape as ``data``, then use this to annotate the heatmap instead\n of the data. Note that DataFrames will match on position, not index.\n fmt : str, optional\n String formatting code to use when adding annotations.\n annot_kws : dict of key, value mappings, optional\n Keyword arguments for :meth:`matplotlib.axes.Axes.text` when ``annot``\n is True.\n linewidths : float, optional\n Width of the lines that will divide each cell.\n linecolor : color, optional\n Color of the lines that will divide each cell.\n cbar : bool, optional\n Whether to draw a colorbar.\n cbar_kws : dict of key, value mappings, optional\n Keyword arguments for :meth:`matplotlib.figure.Figure.colorbar`.\n cbar_ax : matplotlib Axes, optional\n Axes in which to draw the colorbar, otherwise take space from the\n main Axes.\n square : bool, optional\n If True, set the Axes aspect to \"equal\" so each cell will be\n square-shaped.\n xticklabels, yticklabels : \"auto\", bool, list-like, or int, optional\n If True, plot the column names of the dataframe. If False, don't plot\n the column names. If list-like, plot these alternate labels as the\n xticklabels. If an integer, use the column names but plot only every\n n label. If \"auto\", try to densely plot non-overlapping labels.\n mask : bool array or DataFrame, optional\n If passed, data will not be shown in cells where ``mask`` is True.\n Cells with missing values are automatically masked.\n ax : matplotlib Axes, optional\n Axes in which to draw the plot, otherwise use the currently-active\n Axes.\n kwargs : other keyword arguments\n All other keyword arguments are passed to\n :meth:`matplotlib.axes.Axes.pcolormesh`.\n\n Returns\n -------\n ax : matplotlib Axes\n Axes object with the heatmap.\n\n See Also\n --------\n clustermap : Plot a matrix using hierarchical clustering to arrange the\n rows and columns.\n\n Examples\n --------\n\n .. include:: ../docstrings/heatmap.rst\n\n \"\"\"\n # Initialize the plotter object\n plotter = _HeatMapper(data, vmin, vmax, cmap, center, robust, annot, fmt,\n annot_kws, cbar, cbar_kws, xticklabels,\n yticklabels, mask)\n\n # Add the pcolormesh kwargs here\n kwargs[\"linewidths\"] = linewidths\n kwargs[\"edgecolor\"] = linecolor\n\n # Draw the plot and return the Axes\n if ax is None:\n ax = plt.gca()\n if square:\n ax.set_aspect(\"equal\")\n plotter.plot(ax, cbar_ax, kwargs)\n return ax\n\n\nclass _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\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\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']\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\n\n\ndef dendrogram(\n data, *,\n linkage=None, axis=1, label=True, metric='euclidean',\n method='average', rotate=False, tree_kws=None, ax=None\n):\n \"\"\"Draw a tree diagram of relationships within a matrix\n\n Parameters\n ----------\n data : pandas.DataFrame\n Rectangular data\n linkage : numpy.array, optional\n Linkage matrix\n axis : int, optional\n Which axis to use to calculate linkage. 0 is rows, 1 is columns.\n label : bool, optional\n If True, label the dendrogram at leaves with column or row names\n metric : str, optional\n Distance metric. Anything valid for scipy.spatial.distance.pdist\n method : str, optional\n Linkage method to use. Anything valid for\n scipy.cluster.hierarchy.linkage\n rotate : bool, optional\n When plotting the matrix, whether to rotate it 90 degrees\n counter-clockwise, so the leaves face right\n tree_kws : dict, optional\n Keyword arguments for the ``matplotlib.collections.LineCollection``\n that is used for plotting the lines of the dendrogram tree.\n ax : matplotlib axis, optional\n Axis to plot on, otherwise uses current axis\n\n Returns\n -------\n dendrogramplotter : _DendrogramPlotter\n A Dendrogram plotter object.\n\n Notes\n -----\n Access the reordered dendrogram indices with\n dendrogramplotter.reordered_ind\n\n \"\"\"\n if _no_scipy:\n raise RuntimeError(\"dendrogram requires scipy to be installed\")\n\n plotter = _DendrogramPlotter(data, linkage=linkage, axis=axis,\n metric=metric, method=method,\n label=label, rotate=rotate)\n if ax is None:\n ax = plt.gca()\n\n return plotter.plot(ax=ax, tree_kws=tree_kws)\n\n\nclass 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\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\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\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\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\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\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\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)\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)\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)\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\n\n\ndef clustermap(\n data, *,\n pivot_kws=None, method='average', metric='euclidean',\n z_score=None, standard_scale=None, figsize=(10, 10),\n cbar_kws=None, row_cluster=True, col_cluster=True,\n row_linkage=None, col_linkage=None,\n row_colors=None, col_colors=None, mask=None,\n dendrogram_ratio=.2, colors_ratio=0.03,\n cbar_pos=(.02, .8, .05, .18), tree_kws=None,\n **kwargs\n):\n \"\"\"\n Plot a matrix dataset as a hierarchically-clustered heatmap.\n\n This function requires scipy to be available.\n\n Parameters\n ----------\n data : 2D array-like\n Rectangular data for clustering. Cannot contain NAs.\n pivot_kws : dict, optional\n If `data` is a tidy dataframe, can provide keyword arguments for\n pivot to create a rectangular dataframe.\n method : str, optional\n Linkage method to use for calculating clusters. See\n :func:`scipy.cluster.hierarchy.linkage` documentation for more\n information.\n metric : str, optional\n Distance metric to use for the data. See\n :func:`scipy.spatial.distance.pdist` documentation for more options.\n To use different metrics (or methods) for rows and columns, you may\n construct each linkage matrix yourself and provide them as\n `{row,col}_linkage`.\n z_score : int or None, optional\n Either 0 (rows) or 1 (columns). Whether or not to calculate z-scores\n for the rows or the columns. Z scores are: z = (x - mean)/std, so\n values in each row (column) will get the mean of the row (column)\n subtracted, then divided by the standard deviation of the row (column).\n This ensures that each row (column) has mean of 0 and variance of 1.\n standard_scale : int or None, optional\n Either 0 (rows) or 1 (columns). Whether or not to standardize that\n dimension, meaning for each row or column, subtract the minimum and\n divide each by its maximum.\n figsize : tuple of (width, height), optional\n Overall size of the figure.\n cbar_kws : dict, optional\n Keyword arguments to pass to `cbar_kws` in :func:`heatmap`, e.g. to\n add a label to the colorbar.\n {row,col}_cluster : bool, optional\n If ``True``, cluster the {rows, columns}.\n {row,col}_linkage : :class:`numpy.ndarray`, optional\n Precomputed linkage matrix for the rows or columns. See\n :func:`scipy.cluster.hierarchy.linkage` for specific formats.\n {row,col}_colors : list-like or pandas DataFrame/Series, optional\n List of colors to label for either the rows or columns. Useful to evaluate\n whether samples within a group are clustered together. Can use nested lists or\n DataFrame for multiple color levels of labeling. If given as a\n :class:`pandas.DataFrame` or :class:`pandas.Series`, labels for the colors are\n extracted from the DataFrames column names or from the name of the Series.\n DataFrame/Series colors are also matched to the data by their index, ensuring\n colors are drawn in the correct order.\n mask : bool array or DataFrame, optional\n If passed, data will not be shown in cells where `mask` is True.\n Cells with missing values are automatically masked. Only used for\n visualizing, not for calculating.\n {dendrogram,colors}_ratio : float, or pair of floats, optional\n Proportion of the figure size devoted to the two marginal elements. If\n a pair is given, they correspond to (row, col) ratios.\n cbar_pos : tuple of (left, bottom, width, height), optional\n Position of the colorbar axes in the figure. Setting to ``None`` will\n disable the colorbar.\n tree_kws : dict, optional\n Parameters for the :class:`matplotlib.collections.LineCollection`\n that is used to plot the lines of the dendrogram tree.\n kwargs : other keyword arguments\n All other keyword arguments are passed to :func:`heatmap`.\n\n Returns\n -------\n :class:`ClusterGrid`\n A :class:`ClusterGrid` instance.\n\n See Also\n --------\n heatmap : Plot rectangular data as a color-encoded matrix.\n\n Notes\n -----\n The returned object has a ``savefig`` method that should be used if you\n want to save the figure object without clipping the dendrograms.\n\n To access the reordered row indices, use:\n ``clustergrid.dendrogram_row.reordered_ind``\n\n Column indices, use:\n ``clustergrid.dendrogram_col.reordered_ind``\n\n Examples\n --------\n\n .. include:: ../docstrings/clustermap.rst\n\n \"\"\"\n if _no_scipy:\n raise RuntimeError(\"clustermap requires scipy to be available\")\n\n plotter = ClusterGrid(data, pivot_kws=pivot_kws, figsize=figsize,\n row_colors=row_colors, col_colors=col_colors,\n z_score=z_score, standard_scale=standard_scale,\n mask=mask, dendrogram_ratio=dendrogram_ratio,\n colors_ratio=colors_ratio, cbar_pos=cbar_pos)\n\n return plotter.plot(metric=metric, method=method,\n colorbar_kws=cbar_kws,\n row_cluster=row_cluster, col_cluster=col_cluster,\n row_linkage=row_linkage, col_linkage=col_linkage,\n tree_kws=tree_kws, **kwargs)\n"},{"col":4,"comment":"null","endLoc":95,"header":"def _get_scale(self, name: str, forward: Callable, inverse: Callable)","id":339,"name":"_get_scale","nodeType":"Function","startLoc":83,"text":"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))"},{"className":"partial","col":0,"comment":"null","endLoc":139,"id":340,"nodeType":"Class","startLoc":129,"text":"class partial(Generic[_T]):\n @property\n def func(self) -> Callable[..., _T]: ...\n @property\n def args(self) -> tuple[Any, ...]: ...\n @property\n def keywords(self) -> dict[str, Any]: ...\n def __new__(cls, __func: Callable[..., _T], *args: Any, **kwargs: Any) -> Self: ...\n def __call__(__self, *args: Any, **kwargs: Any) -> _T: ...\n if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ..."},{"className":"Hist","col":0,"comment":"\n Bin observations, count them, and optionally normalize or cumulate.\n\n Parameters\n ----------\n stat : str\n Aggregate statistic to compute in each bin:\n\n - `count`: the number of observations\n - `density`: normalize so that the total area of the histogram equals 1\n - `percent`: normalize so that bar heights sum to 100\n - `probability` or `proportion`: normalize so that bar heights sum to 1\n - `frequency`: divide the number of observations by the bin width\n\n bins : str, int, or ArrayLike\n Generic parameter that can be the name of a reference rule, the number\n of bins, or the bin breaks. Passed to :func:`numpy.histogram_bin_edges`.\n binwidth : float\n Width of each bin; overrides `bins` but can be used with `binrange`.\n binrange : (min, max)\n Lowest and highest value for bin edges; can be used with either\n `bins` (when a number) or `binwidth`. Defaults to data extremes.\n common_norm : bool or list of variables\n When not `False`, the normalization is applied across groups. Use\n `True` to normalize across all groups, or pass variable name(s) that\n define normalization groups.\n common_bins : bool or list of variables\n When not `False`, the same bins are used for all groups. Use `True` to\n share bins across all groups, or pass variable name(s) to share within.\n cumulative : bool\n If True, cumulate the bin values.\n discrete : bool\n If True, set `binwidth` and `binrange` so that bins have unit width and\n are centered on integer values\n\n Notes\n -----\n The choice of bins for computing and plotting a histogram can exert\n substantial influence on the insights that one is able to draw from the\n visualization. If the bins are too large, they may erase important features.\n On the other hand, bins that are too small may be dominated by random\n variability, obscuring the shape of the true underlying distribution. The\n default bin size is determined using a reference rule that depends on the\n sample 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\n different bin sizes to be sure that you are not missing something important.\n This function allows you to specify bins in several different ways, such as\n by setting the total number of bins to use, the width of each bin, or the\n specific locations where the bins should break.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Hist.rst\n\n ","endLoc":232,"id":341,"nodeType":"Class","startLoc":49,"text":"@dataclass\nclass Hist(Stat):\n \"\"\"\n Bin observations, count them, and optionally normalize or cumulate.\n\n Parameters\n ----------\n stat : str\n Aggregate statistic to compute in each bin:\n\n - `count`: the number of observations\n - `density`: normalize so that the total area of the histogram equals 1\n - `percent`: normalize so that bar heights sum to 100\n - `probability` or `proportion`: normalize so that bar heights sum to 1\n - `frequency`: divide the number of observations by the bin width\n\n bins : str, int, or ArrayLike\n Generic parameter that can be the name of a reference rule, the number\n of bins, or the bin breaks. Passed to :func:`numpy.histogram_bin_edges`.\n binwidth : float\n Width of each bin; overrides `bins` but can be used with `binrange`.\n binrange : (min, max)\n Lowest and highest value for bin edges; can be used with either\n `bins` (when a number) or `binwidth`. Defaults to data extremes.\n common_norm : bool or list of variables\n When not `False`, the normalization is applied across groups. Use\n `True` to normalize across all groups, or pass variable name(s) that\n define normalization groups.\n common_bins : bool or list of variables\n When not `False`, the same bins are used for all groups. Use `True` to\n share bins across all groups, or pass variable name(s) to share within.\n cumulative : bool\n If True, cumulate the bin values.\n discrete : bool\n If True, set `binwidth` and `binrange` so that bins have unit width and\n are centered on integer values\n\n Notes\n -----\n The choice of bins for computing and plotting a histogram can exert\n substantial influence on the insights that one is able to draw from the\n visualization. If the bins are too large, they may erase important features.\n On the other hand, bins that are too small may be dominated by random\n variability, obscuring the shape of the true underlying distribution. The\n default bin size is determined using a reference rule that depends on the\n sample 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\n different bin sizes to be sure that you are not missing something important.\n This function allows you to specify bins in several different ways, such as\n by setting the total number of bins to use, the width of each bin, or the\n specific locations where the bins should break.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Hist.rst\n\n \"\"\"\n stat: str = \"count\"\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 discrete: bool = False\n\n def __post_init__(self):\n\n stat_options = [\n \"count\", \"density\", \"percent\", \"probability\", \"proportion\", \"frequency\"\n ]\n self._check_param_one_of(\"stat\", stat_options)\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\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 weights = 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, weights, 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\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 weights = data.get(\"weight\", None)\n\n density = self.stat == \"density\"\n hist, edges = np.histogram(vals, **bin_kws, weights=weights, density=density)\n\n width = np.diff(edges)\n center = edges[:-1] + width / 2\n\n return pd.DataFrame({orient: center, \"count\": hist, \"space\": width})\n\n def _normalize(self, data):\n\n hist = data[\"count\"]\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(**{self.stat: hist})\n\n def __call__(\n self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n ) -> DataFrame:\n\n scale_type = scales[orient].__class__.__name__.lower()\n grouping_vars = [str(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 self._check_grouping_vars(\"common_bins\", grouping_vars)\n\n data = bin_groupby.apply(\n data, self._get_bins_and_eval, orient, groupby, scale_type,\n )\n\n if not grouping_vars or self.common_norm is True:\n data = self._normalize(data)\n else:\n if self.common_norm is False:\n norm_groupby = GroupBy(grouping_vars)\n else:\n norm_groupby = GroupBy(self.common_norm)\n self._check_grouping_vars(\"common_norm\", grouping_vars)\n data = norm_groupby.apply(data, self._normalize)\n\n other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n return data.assign(**{other: data[self.stat]})"},{"col":4,"comment":"null","endLoc":35,"header":"def __eq__(self, other)","id":342,"name":"__eq__","nodeType":"Function","startLoc":33,"text":"def __eq__(self, other):\n assert other in self.allowed, other\n return self.data == other"},{"attributeType":"null","col":4,"comment":"null","endLoc":27,"id":343,"name":"allowed","nodeType":"Attribute","startLoc":27,"text":"allowed"},{"className":"Grid","col":0,"comment":"A grid that can have multiple subplots and an external legend.","endLoc":301,"id":344,"nodeType":"Class","startLoc":98,"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\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\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\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\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"},{"col":0,"comment":"null","endLoc":1470,"header":"def len(__obj: Sized) -> int","id":345,"name":"len","nodeType":"Function","startLoc":1470,"text":"def len(__obj: Sized) -> int: ..."},{"col":4,"comment":"null","endLoc":228,"header":"def _legend_artist(\n self, variables: list[str], value: Any, scales: dict[str, Scale],\n ) -> Artist","id":346,"name":"_legend_artist","nodeType":"Function","startLoc":224,"text":"def _legend_artist(\n self, variables: list[str], value: Any, scales: dict[str, Scale],\n ) -> Artist:\n\n return None"},{"attributeType":"dict","col":4,"comment":"null","endLoc":107,"id":347,"name":"artist_kws","nodeType":"Attribute","startLoc":107,"text":"artist_kws"},{"col":0,"comment":"\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 ","endLoc":122,"header":"def variable_type(\n vector: Series,\n boolean_type: Literal[\"numeric\", \"categorical\"] = \"numeric\",\n) -> VarType","id":348,"name":"variable_type","nodeType":"Function","startLoc":38,"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\")"},{"col":4,"comment":"null","endLoc":1088,"header":"def items(self) -> dict_items[_KT, _VT]","id":349,"name":"items","nodeType":"Function","startLoc":1088,"text":"def items(self) -> dict_items[_KT, _VT]: ..."},{"col":0,"comment":"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 ","endLoc":535,"header":"def get_data_home(data_home=None)","id":350,"name":"get_data_home","nodeType":"Function","startLoc":520,"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"},{"col":4,"comment":"null","endLoc":120,"header":"def __post_init__(self)","id":351,"name":"__post_init__","nodeType":"Function","startLoc":115,"text":"def __post_init__(self):\n\n stat_options = [\n \"count\", \"density\", \"percent\", \"probability\", \"proportion\", \"frequency\"\n ]\n self._check_param_one_of(\"stat\", stat_options)"},{"attributeType":"null","col":0,"comment":"null","endLoc":97,"id":352,"name":"MappableString","nodeType":"Attribute","startLoc":97,"text":"MappableString"},{"col":4,"comment":"null","endLoc":103,"header":"def _spacing(self, x: Series) -> float","id":353,"name":"_spacing","nodeType":"Function","startLoc":97,"text":"def _spacing(self, x: Series) -> float:\n space = self._spacer(x)\n if np.isnan(space):\n # This happens when there is no variance in the orient coordinate data\n # Not exactly clear what the right default is, but 1 seems reasonable?\n return 1\n return space"},{"col":0,"comment":"\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 ","endLoc":294,"header":"def resolve_color(\n mark: Mark,\n data: DataFrame | dict,\n prefix: str = \"\",\n scales: dict[str, Scale] | None = None,\n) -> RGBATuple | ndarray","id":354,"name":"resolve_color","nodeType":"Function","startLoc":241,"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)"},{"col":4,"comment":"Inner function that takes bin parameters as arguments.","endLoc":141,"header":"def _define_bin_edges(self, vals, weight, bins, binwidth, binrange, discrete)","id":361,"name":"_define_bin_edges","nodeType":"Function","startLoc":122,"text":"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"},{"col":4,"comment":"null","endLoc":131,"header":"@property\n def func(self) -> Callable[..., _T]","id":362,"name":"func","nodeType":"Function","startLoc":130,"text":"@property\n def func(self) -> Callable[..., _T]: ..."},{"col":4,"comment":"null","endLoc":133,"header":"@property\n def args(self) -> tuple[Any, ...]","id":363,"name":"args","nodeType":"Function","startLoc":132,"text":"@property\n def args(self) -> tuple[Any, ...]: ..."},{"col":4,"comment":"null","endLoc":56,"header":"def assert_rc_params(self, params)","id":364,"name":"assert_rc_params","nodeType":"Function","startLoc":46,"text":"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"},{"col":4,"comment":"null","endLoc":135,"header":"@property\n def keywords(self) -> dict[str, Any]","id":365,"name":"keywords","nodeType":"Function","startLoc":134,"text":"@property\n def keywords(self) -> dict[str, Any]: ..."},{"col":4,"comment":"null","endLoc":136,"header":"def __new__(cls, __func: Callable[..., _T], *args: Any, **kwargs: Any) -> Self","id":366,"name":"__new__","nodeType":"Function","startLoc":136,"text":"def __new__(cls, __func: Callable[..., _T], *args: Any, **kwargs: Any) -> Self: ..."},{"col":4,"comment":"null","endLoc":137,"header":"def __call__(__self, *args: Any, **kwargs: Any) -> _T","id":367,"name":"__call__","nodeType":"Function","startLoc":137,"text":"def __call__(__self, *args: Any, **kwargs: Any) -> _T: ..."},{"col":8,"comment":"null","endLoc":139,"header":"def __class_getitem__(cls, item: Any) -> GenericAlias","id":368,"name":"__class_getitem__","nodeType":"Function","startLoc":139,"text":"def __class_getitem__(cls, item: Any) -> GenericAlias: ..."},{"col":0,"comment":"Return full path to the user-specific cache dir for this application.\n\n \"appname\" is the name of application.\n If None, just the system directory is returned.\n \"appauthor\" (only used on Windows) is the name of the\n appauthor or distributing body for this application. Typically\n it is the owning company name. This falls back to appname. You may\n pass False to disable it.\n \"version\" is an optional version path element to append to the\n path. You might want to use this if you want multiple versions\n of your app to be able to run independently. If used, this\n would typically be \".\".\n Only applied when appname is present.\n \"opinion\" (boolean) can be False to disable the appending of\n \"Cache\" to the base app data dir for Windows. See\n discussion below.\n\n Typical user cache directories are:\n Mac OS X: ~/Library/Caches/\n Unix: ~/.cache/ (XDG default)\n Win XP: C:\\Documents and Settings\\\\Local Settings\\Application Data\\\\\\Cache\n Vista: C:\\Users\\\\AppData\\Local\\\\\\Cache\n\n On Windows the only suggestion in the MSDN docs is that local settings go in\n the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming\n app data dir (the default returned by `user_data_dir` above). Apps typically\n put cache data somewhere *under* the given dir here. Some examples:\n ...\\Mozilla\\Firefox\\Profiles\\\\Cache\n ...\\Acme\\SuperApp\\Cache\\1.0\n OPINION: This function appends \"Cache\" to the `CSIDL_LOCAL_APPDATA` value.\n This can be disabled with the `opinion=False` option.\n ","endLoc":127,"header":"def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True)","id":369,"name":"user_cache_dir","nodeType":"Function","startLoc":73,"text":"def user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):\n r\"\"\"Return full path to the user-specific cache dir for this application.\n\n \"appname\" is the name of application.\n If None, just the system directory is returned.\n \"appauthor\" (only used on Windows) is the name of the\n appauthor or distributing body for this application. Typically\n it is the owning company name. This falls back to appname. You may\n pass False to disable it.\n \"version\" is an optional version path element to append to the\n path. You might want to use this if you want multiple versions\n of your app to be able to run independently. If used, this\n would typically be \".\".\n Only applied when appname is present.\n \"opinion\" (boolean) can be False to disable the appending of\n \"Cache\" to the base app data dir for Windows. See\n discussion below.\n\n Typical user cache directories are:\n Mac OS X: ~/Library/Caches/\n Unix: ~/.cache/ (XDG default)\n Win XP: C:\\Documents and Settings\\\\Local Settings\\Application Data\\\\\\Cache\n Vista: C:\\Users\\\\AppData\\Local\\\\\\Cache\n\n On Windows the only suggestion in the MSDN docs is that local settings go in\n the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming\n app data dir (the default returned by `user_data_dir` above). Apps typically\n put cache data somewhere *under* the given dir here. Some examples:\n ...\\Mozilla\\Firefox\\Profiles\\\\Cache\n ...\\Acme\\SuperApp\\Cache\\1.0\n OPINION: This function appends \"Cache\" to the `CSIDL_LOCAL_APPDATA` value.\n This can be disabled with the `opinion=False` option.\n \"\"\"\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"},{"className":"Sequence","col":0,"comment":"null","endLoc":522,"id":370,"nodeType":"Class","startLoc":510,"text":"class Sequence(Collection[_T_co], Reversible[_T_co], Generic[_T_co]):\n @overload\n @abstractmethod\n def __getitem__(self, index: int) -> _T_co: ...\n @overload\n @abstractmethod\n def __getitem__(self, index: slice) -> Sequence[_T_co]: ...\n # Mixin methods\n def index(self, value: Any, start: int = 0, stop: int = ...) -> int: ...\n def count(self, value: Any) -> int: ...\n def __contains__(self, value: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __reversed__(self) -> Iterator[_T_co]: ..."},{"id":373,"name":"seaborn/colors","nodeType":"Package"},{"fileName":"xkcd_rgb.py","filePath":"seaborn/colors","id":374,"nodeType":"File","text":"xkcd_rgb = {'acid green': '#8ffe09',\n 'adobe': '#bd6c48',\n 'algae': '#54ac68',\n 'algae green': '#21c36f',\n 'almost black': '#070d0d',\n 'amber': '#feb308',\n 'amethyst': '#9b5fc0',\n 'apple': '#6ecb3c',\n 'apple green': '#76cd26',\n 'apricot': '#ffb16d',\n 'aqua': '#13eac9',\n 'aqua blue': '#02d8e9',\n 'aqua green': '#12e193',\n 'aqua marine': '#2ee8bb',\n 'aquamarine': '#04d8b2',\n 'army green': '#4b5d16',\n 'asparagus': '#77ab56',\n 'aubergine': '#3d0734',\n 'auburn': '#9a3001',\n 'avocado': '#90b134',\n 'avocado green': '#87a922',\n 'azul': '#1d5dec',\n 'azure': '#069af3',\n 'baby blue': '#a2cffe',\n 'baby green': '#8cff9e',\n 'baby pink': '#ffb7ce',\n 'baby poo': '#ab9004',\n 'baby poop': '#937c00',\n 'baby poop green': '#8f9805',\n 'baby puke green': '#b6c406',\n 'baby purple': '#ca9bf7',\n 'baby shit brown': '#ad900d',\n 'baby shit green': '#889717',\n 'banana': '#ffff7e',\n 'banana yellow': '#fafe4b',\n 'barbie pink': '#fe46a5',\n 'barf green': '#94ac02',\n 'barney': '#ac1db8',\n 'barney purple': '#a00498',\n 'battleship grey': '#6b7c85',\n 'beige': '#e6daa6',\n 'berry': '#990f4b',\n 'bile': '#b5c306',\n 'black': '#000000',\n 'bland': '#afa88b',\n 'blood': '#770001',\n 'blood orange': '#fe4b03',\n 'blood red': '#980002',\n 'blue': '#0343df',\n 'blue blue': '#2242c7',\n 'blue green': '#137e6d',\n 'blue grey': '#607c8e',\n 'blue purple': '#5729ce',\n 'blue violet': '#5d06e9',\n 'blue with a hint of purple': '#533cc6',\n 'blue/green': '#0f9b8e',\n 'blue/grey': '#758da3',\n 'blue/purple': '#5a06ef',\n 'blueberry': '#464196',\n 'bluegreen': '#017a79',\n 'bluegrey': '#85a3b2',\n 'bluey green': '#2bb179',\n 'bluey grey': '#89a0b0',\n 'bluey purple': '#6241c7',\n 'bluish': '#2976bb',\n 'bluish green': '#10a674',\n 'bluish grey': '#748b97',\n 'bluish purple': '#703be7',\n 'blurple': '#5539cc',\n 'blush': '#f29e8e',\n 'blush pink': '#fe828c',\n 'booger': '#9bb53c',\n 'booger green': '#96b403',\n 'bordeaux': '#7b002c',\n 'boring green': '#63b365',\n 'bottle green': '#044a05',\n 'brick': '#a03623',\n 'brick orange': '#c14a09',\n 'brick red': '#8f1402',\n 'bright aqua': '#0bf9ea',\n 'bright blue': '#0165fc',\n 'bright cyan': '#41fdfe',\n 'bright green': '#01ff07',\n 'bright lavender': '#c760ff',\n 'bright light blue': '#26f7fd',\n 'bright light green': '#2dfe54',\n 'bright lilac': '#c95efb',\n 'bright lime': '#87fd05',\n 'bright lime green': '#65fe08',\n 'bright magenta': '#ff08e8',\n 'bright olive': '#9cbb04',\n 'bright orange': '#ff5b00',\n 'bright pink': '#fe01b1',\n 'bright purple': '#be03fd',\n 'bright red': '#ff000d',\n 'bright sea green': '#05ffa6',\n 'bright sky blue': '#02ccfe',\n 'bright teal': '#01f9c6',\n 'bright turquoise': '#0ffef9',\n 'bright violet': '#ad0afd',\n 'bright yellow': '#fffd01',\n 'bright yellow green': '#9dff00',\n 'british racing green': '#05480d',\n 'bronze': '#a87900',\n 'brown': '#653700',\n 'brown green': '#706c11',\n 'brown grey': '#8d8468',\n 'brown orange': '#b96902',\n 'brown red': '#922b05',\n 'brown yellow': '#b29705',\n 'brownish': '#9c6d57',\n 'brownish green': '#6a6e09',\n 'brownish grey': '#86775f',\n 'brownish orange': '#cb7723',\n 'brownish pink': '#c27e79',\n 'brownish purple': '#76424e',\n 'brownish red': '#9e3623',\n 'brownish yellow': '#c9b003',\n 'browny green': '#6f6c0a',\n 'browny orange': '#ca6b02',\n 'bruise': '#7e4071',\n 'bubble gum pink': '#ff69af',\n 'bubblegum': '#ff6cb5',\n 'bubblegum pink': '#fe83cc',\n 'buff': '#fef69e',\n 'burgundy': '#610023',\n 'burnt orange': '#c04e01',\n 'burnt red': '#9f2305',\n 'burnt siena': '#b75203',\n 'burnt sienna': '#b04e0f',\n 'burnt umber': '#a0450e',\n 'burnt yellow': '#d5ab09',\n 'burple': '#6832e3',\n 'butter': '#ffff81',\n 'butter yellow': '#fffd74',\n 'butterscotch': '#fdb147',\n 'cadet blue': '#4e7496',\n 'camel': '#c69f59',\n 'camo': '#7f8f4e',\n 'camo green': '#526525',\n 'camouflage green': '#4b6113',\n 'canary': '#fdff63',\n 'canary yellow': '#fffe40',\n 'candy pink': '#ff63e9',\n 'caramel': '#af6f09',\n 'carmine': '#9d0216',\n 'carnation': '#fd798f',\n 'carnation pink': '#ff7fa7',\n 'carolina blue': '#8ab8fe',\n 'celadon': '#befdb7',\n 'celery': '#c1fd95',\n 'cement': '#a5a391',\n 'cerise': '#de0c62',\n 'cerulean': '#0485d1',\n 'cerulean blue': '#056eee',\n 'charcoal': '#343837',\n 'charcoal grey': '#3c4142',\n 'chartreuse': '#c1f80a',\n 'cherry': '#cf0234',\n 'cherry red': '#f7022a',\n 'chestnut': '#742802',\n 'chocolate': '#3d1c02',\n 'chocolate brown': '#411900',\n 'cinnamon': '#ac4f06',\n 'claret': '#680018',\n 'clay': '#b66a50',\n 'clay brown': '#b2713d',\n 'clear blue': '#247afd',\n 'cloudy blue': '#acc2d9',\n 'cobalt': '#1e488f',\n 'cobalt blue': '#030aa7',\n 'cocoa': '#875f42',\n 'coffee': '#a6814c',\n 'cool blue': '#4984b8',\n 'cool green': '#33b864',\n 'cool grey': '#95a3a6',\n 'copper': '#b66325',\n 'coral': '#fc5a50',\n 'coral pink': '#ff6163',\n 'cornflower': '#6a79f7',\n 'cornflower blue': '#5170d7',\n 'cranberry': '#9e003a',\n 'cream': '#ffffc2',\n 'creme': '#ffffb6',\n 'crimson': '#8c000f',\n 'custard': '#fffd78',\n 'cyan': '#00ffff',\n 'dandelion': '#fedf08',\n 'dark': '#1b2431',\n 'dark aqua': '#05696b',\n 'dark aquamarine': '#017371',\n 'dark beige': '#ac9362',\n 'dark blue': '#00035b',\n 'dark blue green': '#005249',\n 'dark blue grey': '#1f3b4d',\n 'dark brown': '#341c02',\n 'dark coral': '#cf524e',\n 'dark cream': '#fff39a',\n 'dark cyan': '#0a888a',\n 'dark forest green': '#002d04',\n 'dark fuchsia': '#9d0759',\n 'dark gold': '#b59410',\n 'dark grass green': '#388004',\n 'dark green': '#033500',\n 'dark green blue': '#1f6357',\n 'dark grey': '#363737',\n 'dark grey blue': '#29465b',\n 'dark hot pink': '#d90166',\n 'dark indigo': '#1f0954',\n 'dark khaki': '#9b8f55',\n 'dark lavender': '#856798',\n 'dark lilac': '#9c6da5',\n 'dark lime': '#84b701',\n 'dark lime green': '#7ebd01',\n 'dark magenta': '#960056',\n 'dark maroon': '#3c0008',\n 'dark mauve': '#874c62',\n 'dark mint': '#48c072',\n 'dark mint green': '#20c073',\n 'dark mustard': '#a88905',\n 'dark navy': '#000435',\n 'dark navy blue': '#00022e',\n 'dark olive': '#373e02',\n 'dark olive green': '#3c4d03',\n 'dark orange': '#c65102',\n 'dark pastel green': '#56ae57',\n 'dark peach': '#de7e5d',\n 'dark periwinkle': '#665fd1',\n 'dark pink': '#cb416b',\n 'dark plum': '#3f012c',\n 'dark purple': '#35063e',\n 'dark red': '#840000',\n 'dark rose': '#b5485d',\n 'dark royal blue': '#02066f',\n 'dark sage': '#598556',\n 'dark salmon': '#c85a53',\n 'dark sand': '#a88f59',\n 'dark sea green': '#11875d',\n 'dark seafoam': '#1fb57a',\n 'dark seafoam green': '#3eaf76',\n 'dark sky blue': '#448ee4',\n 'dark slate blue': '#214761',\n 'dark tan': '#af884a',\n 'dark taupe': '#7f684e',\n 'dark teal': '#014d4e',\n 'dark turquoise': '#045c5a',\n 'dark violet': '#34013f',\n 'dark yellow': '#d5b60a',\n 'dark yellow green': '#728f02',\n 'darkblue': '#030764',\n 'darkgreen': '#054907',\n 'darkish blue': '#014182',\n 'darkish green': '#287c37',\n 'darkish pink': '#da467d',\n 'darkish purple': '#751973',\n 'darkish red': '#a90308',\n 'deep aqua': '#08787f',\n 'deep blue': '#040273',\n 'deep brown': '#410200',\n 'deep green': '#02590f',\n 'deep lavender': '#8d5eb7',\n 'deep lilac': '#966ebd',\n 'deep magenta': '#a0025c',\n 'deep orange': '#dc4d01',\n 'deep pink': '#cb0162',\n 'deep purple': '#36013f',\n 'deep red': '#9a0200',\n 'deep rose': '#c74767',\n 'deep sea blue': '#015482',\n 'deep sky blue': '#0d75f8',\n 'deep teal': '#00555a',\n 'deep turquoise': '#017374',\n 'deep violet': '#490648',\n 'denim': '#3b638c',\n 'denim blue': '#3b5b92',\n 'desert': '#ccad60',\n 'diarrhea': '#9f8303',\n 'dirt': '#8a6e45',\n 'dirt brown': '#836539',\n 'dirty blue': '#3f829d',\n 'dirty green': '#667e2c',\n 'dirty orange': '#c87606',\n 'dirty pink': '#ca7b80',\n 'dirty purple': '#734a65',\n 'dirty yellow': '#cdc50a',\n 'dodger blue': '#3e82fc',\n 'drab': '#828344',\n 'drab green': '#749551',\n 'dried blood': '#4b0101',\n 'duck egg blue': '#c3fbf4',\n 'dull blue': '#49759c',\n 'dull brown': '#876e4b',\n 'dull green': '#74a662',\n 'dull orange': '#d8863b',\n 'dull pink': '#d5869d',\n 'dull purple': '#84597e',\n 'dull red': '#bb3f3f',\n 'dull teal': '#5f9e8f',\n 'dull yellow': '#eedc5b',\n 'dusk': '#4e5481',\n 'dusk blue': '#26538d',\n 'dusky blue': '#475f94',\n 'dusky pink': '#cc7a8b',\n 'dusky purple': '#895b7b',\n 'dusky rose': '#ba6873',\n 'dust': '#b2996e',\n 'dusty blue': '#5a86ad',\n 'dusty green': '#76a973',\n 'dusty lavender': '#ac86a8',\n 'dusty orange': '#f0833a',\n 'dusty pink': '#d58a94',\n 'dusty purple': '#825f87',\n 'dusty red': '#b9484e',\n 'dusty rose': '#c0737a',\n 'dusty teal': '#4c9085',\n 'earth': '#a2653e',\n 'easter green': '#8cfd7e',\n 'easter purple': '#c071fe',\n 'ecru': '#feffca',\n 'egg shell': '#fffcc4',\n 'eggplant': '#380835',\n 'eggplant purple': '#430541',\n 'eggshell': '#ffffd4',\n 'eggshell blue': '#c4fff7',\n 'electric blue': '#0652ff',\n 'electric green': '#21fc0d',\n 'electric lime': '#a8ff04',\n 'electric pink': '#ff0490',\n 'electric purple': '#aa23ff',\n 'emerald': '#01a049',\n 'emerald green': '#028f1e',\n 'evergreen': '#05472a',\n 'faded blue': '#658cbb',\n 'faded green': '#7bb274',\n 'faded orange': '#f0944d',\n 'faded pink': '#de9dac',\n 'faded purple': '#916e99',\n 'faded red': '#d3494e',\n 'faded yellow': '#feff7f',\n 'fawn': '#cfaf7b',\n 'fern': '#63a950',\n 'fern green': '#548d44',\n 'fire engine red': '#fe0002',\n 'flat blue': '#3c73a8',\n 'flat green': '#699d4c',\n 'fluorescent green': '#08ff08',\n 'fluro green': '#0aff02',\n 'foam green': '#90fda9',\n 'forest': '#0b5509',\n 'forest green': '#06470c',\n 'forrest green': '#154406',\n 'french blue': '#436bad',\n 'fresh green': '#69d84f',\n 'frog green': '#58bc08',\n 'fuchsia': '#ed0dd9',\n 'gold': '#dbb40c',\n 'golden': '#f5bf03',\n 'golden brown': '#b27a01',\n 'golden rod': '#f9bc08',\n 'golden yellow': '#fec615',\n 'goldenrod': '#fac205',\n 'grape': '#6c3461',\n 'grape purple': '#5d1451',\n 'grapefruit': '#fd5956',\n 'grass': '#5cac2d',\n 'grass green': '#3f9b0b',\n 'grassy green': '#419c03',\n 'green': '#15b01a',\n 'green apple': '#5edc1f',\n 'green blue': '#06b48b',\n 'green brown': '#544e03',\n 'green grey': '#77926f',\n 'green teal': '#0cb577',\n 'green yellow': '#c9ff27',\n 'green/blue': '#01c08d',\n 'green/yellow': '#b5ce08',\n 'greenblue': '#23c48b',\n 'greenish': '#40a368',\n 'greenish beige': '#c9d179',\n 'greenish blue': '#0b8b87',\n 'greenish brown': '#696112',\n 'greenish cyan': '#2afeb7',\n 'greenish grey': '#96ae8d',\n 'greenish tan': '#bccb7a',\n 'greenish teal': '#32bf84',\n 'greenish turquoise': '#00fbb0',\n 'greenish yellow': '#cdfd02',\n 'greeny blue': '#42b395',\n 'greeny brown': '#696006',\n 'greeny grey': '#7ea07a',\n 'greeny yellow': '#c6f808',\n 'grey': '#929591',\n 'grey blue': '#6b8ba4',\n 'grey brown': '#7f7053',\n 'grey green': '#789b73',\n 'grey pink': '#c3909b',\n 'grey purple': '#826d8c',\n 'grey teal': '#5e9b8a',\n 'grey/blue': '#647d8e',\n 'grey/green': '#86a17d',\n 'greyblue': '#77a1b5',\n 'greyish': '#a8a495',\n 'greyish blue': '#5e819d',\n 'greyish brown': '#7a6a4f',\n 'greyish green': '#82a67d',\n 'greyish pink': '#c88d94',\n 'greyish purple': '#887191',\n 'greyish teal': '#719f91',\n 'gross green': '#a0bf16',\n 'gunmetal': '#536267',\n 'hazel': '#8e7618',\n 'heather': '#a484ac',\n 'heliotrope': '#d94ff5',\n 'highlighter green': '#1bfc06',\n 'hospital green': '#9be5aa',\n 'hot green': '#25ff29',\n 'hot magenta': '#f504c9',\n 'hot pink': '#ff028d',\n 'hot purple': '#cb00f5',\n 'hunter green': '#0b4008',\n 'ice': '#d6fffa',\n 'ice blue': '#d7fffe',\n 'icky green': '#8fae22',\n 'indian red': '#850e04',\n 'indigo': '#380282',\n 'indigo blue': '#3a18b1',\n 'iris': '#6258c4',\n 'irish green': '#019529',\n 'ivory': '#ffffcb',\n 'jade': '#1fa774',\n 'jade green': '#2baf6a',\n 'jungle green': '#048243',\n 'kelley green': '#009337',\n 'kelly green': '#02ab2e',\n 'kermit green': '#5cb200',\n 'key lime': '#aeff6e',\n 'khaki': '#aaa662',\n 'khaki green': '#728639',\n 'kiwi': '#9cef43',\n 'kiwi green': '#8ee53f',\n 'lavender': '#c79fef',\n 'lavender blue': '#8b88f8',\n 'lavender pink': '#dd85d7',\n 'lawn green': '#4da409',\n 'leaf': '#71aa34',\n 'leaf green': '#5ca904',\n 'leafy green': '#51b73b',\n 'leather': '#ac7434',\n 'lemon': '#fdff52',\n 'lemon green': '#adf802',\n 'lemon lime': '#bffe28',\n 'lemon yellow': '#fdff38',\n 'lichen': '#8fb67b',\n 'light aqua': '#8cffdb',\n 'light aquamarine': '#7bfdc7',\n 'light beige': '#fffeb6',\n 'light blue': '#95d0fc',\n 'light blue green': '#7efbb3',\n 'light blue grey': '#b7c9e2',\n 'light bluish green': '#76fda8',\n 'light bright green': '#53fe5c',\n 'light brown': '#ad8150',\n 'light burgundy': '#a8415b',\n 'light cyan': '#acfffc',\n 'light eggplant': '#894585',\n 'light forest green': '#4f9153',\n 'light gold': '#fddc5c',\n 'light grass green': '#9af764',\n 'light green': '#96f97b',\n 'light green blue': '#56fca2',\n 'light greenish blue': '#63f7b4',\n 'light grey': '#d8dcd6',\n 'light grey blue': '#9dbcd4',\n 'light grey green': '#b7e1a1',\n 'light indigo': '#6d5acf',\n 'light khaki': '#e6f2a2',\n 'light lavendar': '#efc0fe',\n 'light lavender': '#dfc5fe',\n 'light light blue': '#cafffb',\n 'light light green': '#c8ffb0',\n 'light lilac': '#edc8ff',\n 'light lime': '#aefd6c',\n 'light lime green': '#b9ff66',\n 'light magenta': '#fa5ff7',\n 'light maroon': '#a24857',\n 'light mauve': '#c292a1',\n 'light mint': '#b6ffbb',\n 'light mint green': '#a6fbb2',\n 'light moss green': '#a6c875',\n 'light mustard': '#f7d560',\n 'light navy': '#155084',\n 'light navy blue': '#2e5a88',\n 'light neon green': '#4efd54',\n 'light olive': '#acbf69',\n 'light olive green': '#a4be5c',\n 'light orange': '#fdaa48',\n 'light pastel green': '#b2fba5',\n 'light pea green': '#c4fe82',\n 'light peach': '#ffd8b1',\n 'light periwinkle': '#c1c6fc',\n 'light pink': '#ffd1df',\n 'light plum': '#9d5783',\n 'light purple': '#bf77f6',\n 'light red': '#ff474c',\n 'light rose': '#ffc5cb',\n 'light royal blue': '#3a2efe',\n 'light sage': '#bcecac',\n 'light salmon': '#fea993',\n 'light sea green': '#98f6b0',\n 'light seafoam': '#a0febf',\n 'light seafoam green': '#a7ffb5',\n 'light sky blue': '#c6fcff',\n 'light tan': '#fbeeac',\n 'light teal': '#90e4c1',\n 'light turquoise': '#7ef4cc',\n 'light urple': '#b36ff6',\n 'light violet': '#d6b4fc',\n 'light yellow': '#fffe7a',\n 'light yellow green': '#ccfd7f',\n 'light yellowish green': '#c2ff89',\n 'lightblue': '#7bc8f6',\n 'lighter green': '#75fd63',\n 'lighter purple': '#a55af4',\n 'lightgreen': '#76ff7b',\n 'lightish blue': '#3d7afd',\n 'lightish green': '#61e160',\n 'lightish purple': '#a552e6',\n 'lightish red': '#fe2f4a',\n 'lilac': '#cea2fd',\n 'liliac': '#c48efd',\n 'lime': '#aaff32',\n 'lime green': '#89fe05',\n 'lime yellow': '#d0fe1d',\n 'lipstick': '#d5174e',\n 'lipstick red': '#c0022f',\n 'macaroni and cheese': '#efb435',\n 'magenta': '#c20078',\n 'mahogany': '#4a0100',\n 'maize': '#f4d054',\n 'mango': '#ffa62b',\n 'manilla': '#fffa86',\n 'marigold': '#fcc006',\n 'marine': '#042e60',\n 'marine blue': '#01386a',\n 'maroon': '#650021',\n 'mauve': '#ae7181',\n 'medium blue': '#2c6fbb',\n 'medium brown': '#7f5112',\n 'medium green': '#39ad48',\n 'medium grey': '#7d7f7c',\n 'medium pink': '#f36196',\n 'medium purple': '#9e43a2',\n 'melon': '#ff7855',\n 'merlot': '#730039',\n 'metallic blue': '#4f738e',\n 'mid blue': '#276ab3',\n 'mid green': '#50a747',\n 'midnight': '#03012d',\n 'midnight blue': '#020035',\n 'midnight purple': '#280137',\n 'military green': '#667c3e',\n 'milk chocolate': '#7f4e1e',\n 'mint': '#9ffeb0',\n 'mint green': '#8fff9f',\n 'minty green': '#0bf77d',\n 'mocha': '#9d7651',\n 'moss': '#769958',\n 'moss green': '#658b38',\n 'mossy green': '#638b27',\n 'mud': '#735c12',\n 'mud brown': '#60460f',\n 'mud green': '#606602',\n 'muddy brown': '#886806',\n 'muddy green': '#657432',\n 'muddy yellow': '#bfac05',\n 'mulberry': '#920a4e',\n 'murky green': '#6c7a0e',\n 'mushroom': '#ba9e88',\n 'mustard': '#ceb301',\n 'mustard brown': '#ac7e04',\n 'mustard green': '#a8b504',\n 'mustard yellow': '#d2bd0a',\n 'muted blue': '#3b719f',\n 'muted green': '#5fa052',\n 'muted pink': '#d1768f',\n 'muted purple': '#805b87',\n 'nasty green': '#70b23f',\n 'navy': '#01153e',\n 'navy blue': '#001146',\n 'navy green': '#35530a',\n 'neon blue': '#04d9ff',\n 'neon green': '#0cff0c',\n 'neon pink': '#fe019a',\n 'neon purple': '#bc13fe',\n 'neon red': '#ff073a',\n 'neon yellow': '#cfff04',\n 'nice blue': '#107ab0',\n 'night blue': '#040348',\n 'ocean': '#017b92',\n 'ocean blue': '#03719c',\n 'ocean green': '#3d9973',\n 'ocher': '#bf9b0c',\n 'ochre': '#bf9005',\n 'ocre': '#c69c04',\n 'off blue': '#5684ae',\n 'off green': '#6ba353',\n 'off white': '#ffffe4',\n 'off yellow': '#f1f33f',\n 'old pink': '#c77986',\n 'old rose': '#c87f89',\n 'olive': '#6e750e',\n 'olive brown': '#645403',\n 'olive drab': '#6f7632',\n 'olive green': '#677a04',\n 'olive yellow': '#c2b709',\n 'orange': '#f97306',\n 'orange brown': '#be6400',\n 'orange pink': '#ff6f52',\n 'orange red': '#fd411e',\n 'orange yellow': '#ffad01',\n 'orangeish': '#fd8d49',\n 'orangered': '#fe420f',\n 'orangey brown': '#b16002',\n 'orangey red': '#fa4224',\n 'orangey yellow': '#fdb915',\n 'orangish': '#fc824a',\n 'orangish brown': '#b25f03',\n 'orangish red': '#f43605',\n 'orchid': '#c875c4',\n 'pale': '#fff9d0',\n 'pale aqua': '#b8ffeb',\n 'pale blue': '#d0fefe',\n 'pale brown': '#b1916e',\n 'pale cyan': '#b7fffa',\n 'pale gold': '#fdde6c',\n 'pale green': '#c7fdb5',\n 'pale grey': '#fdfdfe',\n 'pale lavender': '#eecffe',\n 'pale light green': '#b1fc99',\n 'pale lilac': '#e4cbff',\n 'pale lime': '#befd73',\n 'pale lime green': '#b1ff65',\n 'pale magenta': '#d767ad',\n 'pale mauve': '#fed0fc',\n 'pale olive': '#b9cc81',\n 'pale olive green': '#b1d27b',\n 'pale orange': '#ffa756',\n 'pale peach': '#ffe5ad',\n 'pale pink': '#ffcfdc',\n 'pale purple': '#b790d4',\n 'pale red': '#d9544d',\n 'pale rose': '#fdc1c5',\n 'pale salmon': '#ffb19a',\n 'pale sky blue': '#bdf6fe',\n 'pale teal': '#82cbb2',\n 'pale turquoise': '#a5fbd5',\n 'pale violet': '#ceaefa',\n 'pale yellow': '#ffff84',\n 'parchment': '#fefcaf',\n 'pastel blue': '#a2bffe',\n 'pastel green': '#b0ff9d',\n 'pastel orange': '#ff964f',\n 'pastel pink': '#ffbacd',\n 'pastel purple': '#caa0ff',\n 'pastel red': '#db5856',\n 'pastel yellow': '#fffe71',\n 'pea': '#a4bf20',\n 'pea green': '#8eab12',\n 'pea soup': '#929901',\n 'pea soup green': '#94a617',\n 'peach': '#ffb07c',\n 'peachy pink': '#ff9a8a',\n 'peacock blue': '#016795',\n 'pear': '#cbf85f',\n 'periwinkle': '#8e82fe',\n 'periwinkle blue': '#8f99fb',\n 'perrywinkle': '#8f8ce7',\n 'petrol': '#005f6a',\n 'pig pink': '#e78ea5',\n 'pine': '#2b5d34',\n 'pine green': '#0a481e',\n 'pink': '#ff81c0',\n 'pink purple': '#db4bda',\n 'pink red': '#f5054f',\n 'pink/purple': '#ef1de7',\n 'pinkish': '#d46a7e',\n 'pinkish brown': '#b17261',\n 'pinkish grey': '#c8aca9',\n 'pinkish orange': '#ff724c',\n 'pinkish purple': '#d648d7',\n 'pinkish red': '#f10c45',\n 'pinkish tan': '#d99b82',\n 'pinky': '#fc86aa',\n 'pinky purple': '#c94cbe',\n 'pinky red': '#fc2647',\n 'piss yellow': '#ddd618',\n 'pistachio': '#c0fa8b',\n 'plum': '#580f41',\n 'plum purple': '#4e0550',\n 'poison green': '#40fd14',\n 'poo': '#8f7303',\n 'poo brown': '#885f01',\n 'poop': '#7f5e00',\n 'poop brown': '#7a5901',\n 'poop green': '#6f7c00',\n 'powder blue': '#b1d1fc',\n 'powder pink': '#ffb2d0',\n 'primary blue': '#0804f9',\n 'prussian blue': '#004577',\n 'puce': '#a57e52',\n 'puke': '#a5a502',\n 'puke brown': '#947706',\n 'puke green': '#9aae07',\n 'puke yellow': '#c2be0e',\n 'pumpkin': '#e17701',\n 'pumpkin orange': '#fb7d07',\n 'pure blue': '#0203e2',\n 'purple': '#7e1e9c',\n 'purple blue': '#632de9',\n 'purple brown': '#673a3f',\n 'purple grey': '#866f85',\n 'purple pink': '#e03fd8',\n 'purple red': '#990147',\n 'purple/blue': '#5d21d0',\n 'purple/pink': '#d725de',\n 'purpleish': '#98568d',\n 'purpleish blue': '#6140ef',\n 'purpleish pink': '#df4ec8',\n 'purpley': '#8756e4',\n 'purpley blue': '#5f34e7',\n 'purpley grey': '#947e94',\n 'purpley pink': '#c83cb9',\n 'purplish': '#94568c',\n 'purplish blue': '#601ef9',\n 'purplish brown': '#6b4247',\n 'purplish grey': '#7a687f',\n 'purplish pink': '#ce5dae',\n 'purplish red': '#b0054b',\n 'purply': '#983fb2',\n 'purply blue': '#661aee',\n 'purply pink': '#f075e6',\n 'putty': '#beae8a',\n 'racing green': '#014600',\n 'radioactive green': '#2cfa1f',\n 'raspberry': '#b00149',\n 'raw sienna': '#9a6200',\n 'raw umber': '#a75e09',\n 'really light blue': '#d4ffff',\n 'red': '#e50000',\n 'red brown': '#8b2e16',\n 'red orange': '#fd3c06',\n 'red pink': '#fa2a55',\n 'red purple': '#820747',\n 'red violet': '#9e0168',\n 'red wine': '#8c0034',\n 'reddish': '#c44240',\n 'reddish brown': '#7f2b0a',\n 'reddish grey': '#997570',\n 'reddish orange': '#f8481c',\n 'reddish pink': '#fe2c54',\n 'reddish purple': '#910951',\n 'reddy brown': '#6e1005',\n 'rich blue': '#021bf9',\n 'rich purple': '#720058',\n 'robin egg blue': '#8af1fe',\n \"robin's egg\": '#6dedfd',\n \"robin's egg blue\": '#98eff9',\n 'rosa': '#fe86a4',\n 'rose': '#cf6275',\n 'rose pink': '#f7879a',\n 'rose red': '#be013c',\n 'rosy pink': '#f6688e',\n 'rouge': '#ab1239',\n 'royal': '#0c1793',\n 'royal blue': '#0504aa',\n 'royal purple': '#4b006e',\n 'ruby': '#ca0147',\n 'russet': '#a13905',\n 'rust': '#a83c09',\n 'rust brown': '#8b3103',\n 'rust orange': '#c45508',\n 'rust red': '#aa2704',\n 'rusty orange': '#cd5909',\n 'rusty red': '#af2f0d',\n 'saffron': '#feb209',\n 'sage': '#87ae73',\n 'sage green': '#88b378',\n 'salmon': '#ff796c',\n 'salmon pink': '#fe7b7c',\n 'sand': '#e2ca76',\n 'sand brown': '#cba560',\n 'sand yellow': '#fce166',\n 'sandstone': '#c9ae74',\n 'sandy': '#f1da7a',\n 'sandy brown': '#c4a661',\n 'sandy yellow': '#fdee73',\n 'sap green': '#5c8b15',\n 'sapphire': '#2138ab',\n 'scarlet': '#be0119',\n 'sea': '#3c9992',\n 'sea blue': '#047495',\n 'sea green': '#53fca1',\n 'seafoam': '#80f9ad',\n 'seafoam blue': '#78d1b6',\n 'seafoam green': '#7af9ab',\n 'seaweed': '#18d17b',\n 'seaweed green': '#35ad6b',\n 'sepia': '#985e2b',\n 'shamrock': '#01b44c',\n 'shamrock green': '#02c14d',\n 'shit': '#7f5f00',\n 'shit brown': '#7b5804',\n 'shit green': '#758000',\n 'shocking pink': '#fe02a2',\n 'sick green': '#9db92c',\n 'sickly green': '#94b21c',\n 'sickly yellow': '#d0e429',\n 'sienna': '#a9561e',\n 'silver': '#c5c9c7',\n 'sky': '#82cafc',\n 'sky blue': '#75bbfd',\n 'slate': '#516572',\n 'slate blue': '#5b7c99',\n 'slate green': '#658d6d',\n 'slate grey': '#59656d',\n 'slime green': '#99cc04',\n 'snot': '#acbb0d',\n 'snot green': '#9dc100',\n 'soft blue': '#6488ea',\n 'soft green': '#6fc276',\n 'soft pink': '#fdb0c0',\n 'soft purple': '#a66fb5',\n 'spearmint': '#1ef876',\n 'spring green': '#a9f971',\n 'spruce': '#0a5f38',\n 'squash': '#f2ab15',\n 'steel': '#738595',\n 'steel blue': '#5a7d9a',\n 'steel grey': '#6f828a',\n 'stone': '#ada587',\n 'stormy blue': '#507b9c',\n 'straw': '#fcf679',\n 'strawberry': '#fb2943',\n 'strong blue': '#0c06f7',\n 'strong pink': '#ff0789',\n 'sun yellow': '#ffdf22',\n 'sunflower': '#ffc512',\n 'sunflower yellow': '#ffda03',\n 'sunny yellow': '#fff917',\n 'sunshine yellow': '#fffd37',\n 'swamp': '#698339',\n 'swamp green': '#748500',\n 'tan': '#d1b26f',\n 'tan brown': '#ab7e4c',\n 'tan green': '#a9be70',\n 'tangerine': '#ff9408',\n 'taupe': '#b9a281',\n 'tea': '#65ab7c',\n 'tea green': '#bdf8a3',\n 'teal': '#029386',\n 'teal blue': '#01889f',\n 'teal green': '#25a36f',\n 'tealish': '#24bca8',\n 'tealish green': '#0cdc73',\n 'terra cotta': '#c9643b',\n 'terracota': '#cb6843',\n 'terracotta': '#ca6641',\n 'tiffany blue': '#7bf2da',\n 'tomato': '#ef4026',\n 'tomato red': '#ec2d01',\n 'topaz': '#13bbaf',\n 'toupe': '#c7ac7d',\n 'toxic green': '#61de2a',\n 'tree green': '#2a7e19',\n 'true blue': '#010fcc',\n 'true green': '#089404',\n 'turquoise': '#06c2ac',\n 'turquoise blue': '#06b1c4',\n 'turquoise green': '#04f489',\n 'turtle green': '#75b84f',\n 'twilight': '#4e518b',\n 'twilight blue': '#0a437a',\n 'ugly blue': '#31668a',\n 'ugly brown': '#7d7103',\n 'ugly green': '#7a9703',\n 'ugly pink': '#cd7584',\n 'ugly purple': '#a442a0',\n 'ugly yellow': '#d0c101',\n 'ultramarine': '#2000b1',\n 'ultramarine blue': '#1805db',\n 'umber': '#b26400',\n 'velvet': '#750851',\n 'vermillion': '#f4320c',\n 'very dark blue': '#000133',\n 'very dark brown': '#1d0200',\n 'very dark green': '#062e03',\n 'very dark purple': '#2a0134',\n 'very light blue': '#d5ffff',\n 'very light brown': '#d3b683',\n 'very light green': '#d1ffbd',\n 'very light pink': '#fff4f2',\n 'very light purple': '#f6cefc',\n 'very pale blue': '#d6fffe',\n 'very pale green': '#cffdbc',\n 'vibrant blue': '#0339f8',\n 'vibrant green': '#0add08',\n 'vibrant purple': '#ad03de',\n 'violet': '#9a0eea',\n 'violet blue': '#510ac9',\n 'violet pink': '#fb5ffc',\n 'violet red': '#a50055',\n 'viridian': '#1e9167',\n 'vivid blue': '#152eff',\n 'vivid green': '#2fef10',\n 'vivid purple': '#9900fa',\n 'vomit': '#a2a415',\n 'vomit green': '#89a203',\n 'vomit yellow': '#c7c10c',\n 'warm blue': '#4b57db',\n 'warm brown': '#964e02',\n 'warm grey': '#978a84',\n 'warm pink': '#fb5581',\n 'warm purple': '#952e8f',\n 'washed out green': '#bcf5a6',\n 'water blue': '#0e87cc',\n 'watermelon': '#fd4659',\n 'weird green': '#3ae57f',\n 'wheat': '#fbdd7e',\n 'white': '#ffffff',\n 'windows blue': '#3778bf',\n 'wine': '#80013f',\n 'wine red': '#7b0323',\n 'wintergreen': '#20f986',\n 'wisteria': '#a87dc2',\n 'yellow': '#ffff14',\n 'yellow brown': '#b79400',\n 'yellow green': '#c0fb2d',\n 'yellow ochre': '#cb9d06',\n 'yellow orange': '#fcb001',\n 'yellow tan': '#ffe36e',\n 'yellow/green': '#c8fd3d',\n 'yellowgreen': '#bbf90f',\n 'yellowish': '#faee66',\n 'yellowish brown': '#9b7a01',\n 'yellowish green': '#b0dd16',\n 'yellowish orange': '#ffab0f',\n 'yellowish tan': '#fcfc81',\n 'yellowy brown': '#ae8b0c',\n 'yellowy green': '#bff128'}\n"},{"col":0,"comment":"","endLoc":949,"header":"xkcd_rgb.py#","id":381,"name":"","nodeType":"Function","startLoc":1,"text":"xkcd_rgb = {'acid green': '#8ffe09',\n 'adobe': '#bd6c48',\n 'algae': '#54ac68',\n 'algae green': '#21c36f',\n 'almost black': '#070d0d',\n 'amber': '#feb308',\n 'amethyst': '#9b5fc0',\n 'apple': '#6ecb3c',\n 'apple green': '#76cd26',\n 'apricot': '#ffb16d',\n 'aqua': '#13eac9',\n 'aqua blue': '#02d8e9',\n 'aqua green': '#12e193',\n 'aqua marine': '#2ee8bb',\n 'aquamarine': '#04d8b2',\n 'army green': '#4b5d16',\n 'asparagus': '#77ab56',\n 'aubergine': '#3d0734',\n 'auburn': '#9a3001',\n 'avocado': '#90b134',\n 'avocado green': '#87a922',\n 'azul': '#1d5dec',\n 'azure': '#069af3',\n 'baby blue': '#a2cffe',\n 'baby green': '#8cff9e',\n 'baby pink': '#ffb7ce',\n 'baby poo': '#ab9004',\n 'baby poop': '#937c00',\n 'baby poop green': '#8f9805',\n 'baby puke green': '#b6c406',\n 'baby purple': '#ca9bf7',\n 'baby shit brown': '#ad900d',\n 'baby shit green': '#889717',\n 'banana': '#ffff7e',\n 'banana yellow': '#fafe4b',\n 'barbie pink': '#fe46a5',\n 'barf green': '#94ac02',\n 'barney': '#ac1db8',\n 'barney purple': '#a00498',\n 'battleship grey': '#6b7c85',\n 'beige': '#e6daa6',\n 'berry': '#990f4b',\n 'bile': '#b5c306',\n 'black': '#000000',\n 'bland': '#afa88b',\n 'blood': '#770001',\n 'blood orange': '#fe4b03',\n 'blood red': '#980002',\n 'blue': '#0343df',\n 'blue blue': '#2242c7',\n 'blue green': '#137e6d',\n 'blue grey': '#607c8e',\n 'blue purple': '#5729ce',\n 'blue violet': '#5d06e9',\n 'blue with a hint of purple': '#533cc6',\n 'blue/green': '#0f9b8e',\n 'blue/grey': '#758da3',\n 'blue/purple': '#5a06ef',\n 'blueberry': '#464196',\n 'bluegreen': '#017a79',\n 'bluegrey': '#85a3b2',\n 'bluey green': '#2bb179',\n 'bluey grey': '#89a0b0',\n 'bluey purple': '#6241c7',\n 'bluish': '#2976bb',\n 'bluish green': '#10a674',\n 'bluish grey': '#748b97',\n 'bluish purple': '#703be7',\n 'blurple': '#5539cc',\n 'blush': '#f29e8e',\n 'blush pink': '#fe828c',\n 'booger': '#9bb53c',\n 'booger green': '#96b403',\n 'bordeaux': '#7b002c',\n 'boring green': '#63b365',\n 'bottle green': '#044a05',\n 'brick': '#a03623',\n 'brick orange': '#c14a09',\n 'brick red': '#8f1402',\n 'bright aqua': '#0bf9ea',\n 'bright blue': '#0165fc',\n 'bright cyan': '#41fdfe',\n 'bright green': '#01ff07',\n 'bright lavender': '#c760ff',\n 'bright light blue': '#26f7fd',\n 'bright light green': '#2dfe54',\n 'bright lilac': '#c95efb',\n 'bright lime': '#87fd05',\n 'bright lime green': '#65fe08',\n 'bright magenta': '#ff08e8',\n 'bright olive': '#9cbb04',\n 'bright orange': '#ff5b00',\n 'bright pink': '#fe01b1',\n 'bright purple': '#be03fd',\n 'bright red': '#ff000d',\n 'bright sea green': '#05ffa6',\n 'bright sky blue': '#02ccfe',\n 'bright teal': '#01f9c6',\n 'bright turquoise': '#0ffef9',\n 'bright violet': '#ad0afd',\n 'bright yellow': '#fffd01',\n 'bright yellow green': '#9dff00',\n 'british racing green': '#05480d',\n 'bronze': '#a87900',\n 'brown': '#653700',\n 'brown green': '#706c11',\n 'brown grey': '#8d8468',\n 'brown orange': '#b96902',\n 'brown red': '#922b05',\n 'brown yellow': '#b29705',\n 'brownish': '#9c6d57',\n 'brownish green': '#6a6e09',\n 'brownish grey': '#86775f',\n 'brownish orange': '#cb7723',\n 'brownish pink': '#c27e79',\n 'brownish purple': '#76424e',\n 'brownish red': '#9e3623',\n 'brownish yellow': '#c9b003',\n 'browny green': '#6f6c0a',\n 'browny orange': '#ca6b02',\n 'bruise': '#7e4071',\n 'bubble gum pink': '#ff69af',\n 'bubblegum': '#ff6cb5',\n 'bubblegum pink': '#fe83cc',\n 'buff': '#fef69e',\n 'burgundy': '#610023',\n 'burnt orange': '#c04e01',\n 'burnt red': '#9f2305',\n 'burnt siena': '#b75203',\n 'burnt sienna': '#b04e0f',\n 'burnt umber': '#a0450e',\n 'burnt yellow': '#d5ab09',\n 'burple': '#6832e3',\n 'butter': '#ffff81',\n 'butter yellow': '#fffd74',\n 'butterscotch': '#fdb147',\n 'cadet blue': '#4e7496',\n 'camel': '#c69f59',\n 'camo': '#7f8f4e',\n 'camo green': '#526525',\n 'camouflage green': '#4b6113',\n 'canary': '#fdff63',\n 'canary yellow': '#fffe40',\n 'candy pink': '#ff63e9',\n 'caramel': '#af6f09',\n 'carmine': '#9d0216',\n 'carnation': '#fd798f',\n 'carnation pink': '#ff7fa7',\n 'carolina blue': '#8ab8fe',\n 'celadon': '#befdb7',\n 'celery': '#c1fd95',\n 'cement': '#a5a391',\n 'cerise': '#de0c62',\n 'cerulean': '#0485d1',\n 'cerulean blue': '#056eee',\n 'charcoal': '#343837',\n 'charcoal grey': '#3c4142',\n 'chartreuse': '#c1f80a',\n 'cherry': '#cf0234',\n 'cherry red': '#f7022a',\n 'chestnut': '#742802',\n 'chocolate': '#3d1c02',\n 'chocolate brown': '#411900',\n 'cinnamon': '#ac4f06',\n 'claret': '#680018',\n 'clay': '#b66a50',\n 'clay brown': '#b2713d',\n 'clear blue': '#247afd',\n 'cloudy blue': '#acc2d9',\n 'cobalt': '#1e488f',\n 'cobalt blue': '#030aa7',\n 'cocoa': '#875f42',\n 'coffee': '#a6814c',\n 'cool blue': '#4984b8',\n 'cool green': '#33b864',\n 'cool grey': '#95a3a6',\n 'copper': '#b66325',\n 'coral': '#fc5a50',\n 'coral pink': '#ff6163',\n 'cornflower': '#6a79f7',\n 'cornflower blue': '#5170d7',\n 'cranberry': '#9e003a',\n 'cream': '#ffffc2',\n 'creme': '#ffffb6',\n 'crimson': '#8c000f',\n 'custard': '#fffd78',\n 'cyan': '#00ffff',\n 'dandelion': '#fedf08',\n 'dark': '#1b2431',\n 'dark aqua': '#05696b',\n 'dark aquamarine': '#017371',\n 'dark beige': '#ac9362',\n 'dark blue': '#00035b',\n 'dark blue green': '#005249',\n 'dark blue grey': '#1f3b4d',\n 'dark brown': '#341c02',\n 'dark coral': '#cf524e',\n 'dark cream': '#fff39a',\n 'dark cyan': '#0a888a',\n 'dark forest green': '#002d04',\n 'dark fuchsia': '#9d0759',\n 'dark gold': '#b59410',\n 'dark grass green': '#388004',\n 'dark green': '#033500',\n 'dark green blue': '#1f6357',\n 'dark grey': '#363737',\n 'dark grey blue': '#29465b',\n 'dark hot pink': '#d90166',\n 'dark indigo': '#1f0954',\n 'dark khaki': '#9b8f55',\n 'dark lavender': '#856798',\n 'dark lilac': '#9c6da5',\n 'dark lime': '#84b701',\n 'dark lime green': '#7ebd01',\n 'dark magenta': '#960056',\n 'dark maroon': '#3c0008',\n 'dark mauve': '#874c62',\n 'dark mint': '#48c072',\n 'dark mint green': '#20c073',\n 'dark mustard': '#a88905',\n 'dark navy': '#000435',\n 'dark navy blue': '#00022e',\n 'dark olive': '#373e02',\n 'dark olive green': '#3c4d03',\n 'dark orange': '#c65102',\n 'dark pastel green': '#56ae57',\n 'dark peach': '#de7e5d',\n 'dark periwinkle': '#665fd1',\n 'dark pink': '#cb416b',\n 'dark plum': '#3f012c',\n 'dark purple': '#35063e',\n 'dark red': '#840000',\n 'dark rose': '#b5485d',\n 'dark royal blue': '#02066f',\n 'dark sage': '#598556',\n 'dark salmon': '#c85a53',\n 'dark sand': '#a88f59',\n 'dark sea green': '#11875d',\n 'dark seafoam': '#1fb57a',\n 'dark seafoam green': '#3eaf76',\n 'dark sky blue': '#448ee4',\n 'dark slate blue': '#214761',\n 'dark tan': '#af884a',\n 'dark taupe': '#7f684e',\n 'dark teal': '#014d4e',\n 'dark turquoise': '#045c5a',\n 'dark violet': '#34013f',\n 'dark yellow': '#d5b60a',\n 'dark yellow green': '#728f02',\n 'darkblue': '#030764',\n 'darkgreen': '#054907',\n 'darkish blue': '#014182',\n 'darkish green': '#287c37',\n 'darkish pink': '#da467d',\n 'darkish purple': '#751973',\n 'darkish red': '#a90308',\n 'deep aqua': '#08787f',\n 'deep blue': '#040273',\n 'deep brown': '#410200',\n 'deep green': '#02590f',\n 'deep lavender': '#8d5eb7',\n 'deep lilac': '#966ebd',\n 'deep magenta': '#a0025c',\n 'deep orange': '#dc4d01',\n 'deep pink': '#cb0162',\n 'deep purple': '#36013f',\n 'deep red': '#9a0200',\n 'deep rose': '#c74767',\n 'deep sea blue': '#015482',\n 'deep sky blue': '#0d75f8',\n 'deep teal': '#00555a',\n 'deep turquoise': '#017374',\n 'deep violet': '#490648',\n 'denim': '#3b638c',\n 'denim blue': '#3b5b92',\n 'desert': '#ccad60',\n 'diarrhea': '#9f8303',\n 'dirt': '#8a6e45',\n 'dirt brown': '#836539',\n 'dirty blue': '#3f829d',\n 'dirty green': '#667e2c',\n 'dirty orange': '#c87606',\n 'dirty pink': '#ca7b80',\n 'dirty purple': '#734a65',\n 'dirty yellow': '#cdc50a',\n 'dodger blue': '#3e82fc',\n 'drab': '#828344',\n 'drab green': '#749551',\n 'dried blood': '#4b0101',\n 'duck egg blue': '#c3fbf4',\n 'dull blue': '#49759c',\n 'dull brown': '#876e4b',\n 'dull green': '#74a662',\n 'dull orange': '#d8863b',\n 'dull pink': '#d5869d',\n 'dull purple': '#84597e',\n 'dull red': '#bb3f3f',\n 'dull teal': '#5f9e8f',\n 'dull yellow': '#eedc5b',\n 'dusk': '#4e5481',\n 'dusk blue': '#26538d',\n 'dusky blue': '#475f94',\n 'dusky pink': '#cc7a8b',\n 'dusky purple': '#895b7b',\n 'dusky rose': '#ba6873',\n 'dust': '#b2996e',\n 'dusty blue': '#5a86ad',\n 'dusty green': '#76a973',\n 'dusty lavender': '#ac86a8',\n 'dusty orange': '#f0833a',\n 'dusty pink': '#d58a94',\n 'dusty purple': '#825f87',\n 'dusty red': '#b9484e',\n 'dusty rose': '#c0737a',\n 'dusty teal': '#4c9085',\n 'earth': '#a2653e',\n 'easter green': '#8cfd7e',\n 'easter purple': '#c071fe',\n 'ecru': '#feffca',\n 'egg shell': '#fffcc4',\n 'eggplant': '#380835',\n 'eggplant purple': '#430541',\n 'eggshell': '#ffffd4',\n 'eggshell blue': '#c4fff7',\n 'electric blue': '#0652ff',\n 'electric green': '#21fc0d',\n 'electric lime': '#a8ff04',\n 'electric pink': '#ff0490',\n 'electric purple': '#aa23ff',\n 'emerald': '#01a049',\n 'emerald green': '#028f1e',\n 'evergreen': '#05472a',\n 'faded blue': '#658cbb',\n 'faded green': '#7bb274',\n 'faded orange': '#f0944d',\n 'faded pink': '#de9dac',\n 'faded purple': '#916e99',\n 'faded red': '#d3494e',\n 'faded yellow': '#feff7f',\n 'fawn': '#cfaf7b',\n 'fern': '#63a950',\n 'fern green': '#548d44',\n 'fire engine red': '#fe0002',\n 'flat blue': '#3c73a8',\n 'flat green': '#699d4c',\n 'fluorescent green': '#08ff08',\n 'fluro green': '#0aff02',\n 'foam green': '#90fda9',\n 'forest': '#0b5509',\n 'forest green': '#06470c',\n 'forrest green': '#154406',\n 'french blue': '#436bad',\n 'fresh green': '#69d84f',\n 'frog green': '#58bc08',\n 'fuchsia': '#ed0dd9',\n 'gold': '#dbb40c',\n 'golden': '#f5bf03',\n 'golden brown': '#b27a01',\n 'golden rod': '#f9bc08',\n 'golden yellow': '#fec615',\n 'goldenrod': '#fac205',\n 'grape': '#6c3461',\n 'grape purple': '#5d1451',\n 'grapefruit': '#fd5956',\n 'grass': '#5cac2d',\n 'grass green': '#3f9b0b',\n 'grassy green': '#419c03',\n 'green': '#15b01a',\n 'green apple': '#5edc1f',\n 'green blue': '#06b48b',\n 'green brown': '#544e03',\n 'green grey': '#77926f',\n 'green teal': '#0cb577',\n 'green yellow': '#c9ff27',\n 'green/blue': '#01c08d',\n 'green/yellow': '#b5ce08',\n 'greenblue': '#23c48b',\n 'greenish': '#40a368',\n 'greenish beige': '#c9d179',\n 'greenish blue': '#0b8b87',\n 'greenish brown': '#696112',\n 'greenish cyan': '#2afeb7',\n 'greenish grey': '#96ae8d',\n 'greenish tan': '#bccb7a',\n 'greenish teal': '#32bf84',\n 'greenish turquoise': '#00fbb0',\n 'greenish yellow': '#cdfd02',\n 'greeny blue': '#42b395',\n 'greeny brown': '#696006',\n 'greeny grey': '#7ea07a',\n 'greeny yellow': '#c6f808',\n 'grey': '#929591',\n 'grey blue': '#6b8ba4',\n 'grey brown': '#7f7053',\n 'grey green': '#789b73',\n 'grey pink': '#c3909b',\n 'grey purple': '#826d8c',\n 'grey teal': '#5e9b8a',\n 'grey/blue': '#647d8e',\n 'grey/green': '#86a17d',\n 'greyblue': '#77a1b5',\n 'greyish': '#a8a495',\n 'greyish blue': '#5e819d',\n 'greyish brown': '#7a6a4f',\n 'greyish green': '#82a67d',\n 'greyish pink': '#c88d94',\n 'greyish purple': '#887191',\n 'greyish teal': '#719f91',\n 'gross green': '#a0bf16',\n 'gunmetal': '#536267',\n 'hazel': '#8e7618',\n 'heather': '#a484ac',\n 'heliotrope': '#d94ff5',\n 'highlighter green': '#1bfc06',\n 'hospital green': '#9be5aa',\n 'hot green': '#25ff29',\n 'hot magenta': '#f504c9',\n 'hot pink': '#ff028d',\n 'hot purple': '#cb00f5',\n 'hunter green': '#0b4008',\n 'ice': '#d6fffa',\n 'ice blue': '#d7fffe',\n 'icky green': '#8fae22',\n 'indian red': '#850e04',\n 'indigo': '#380282',\n 'indigo blue': '#3a18b1',\n 'iris': '#6258c4',\n 'irish green': '#019529',\n 'ivory': '#ffffcb',\n 'jade': '#1fa774',\n 'jade green': '#2baf6a',\n 'jungle green': '#048243',\n 'kelley green': '#009337',\n 'kelly green': '#02ab2e',\n 'kermit green': '#5cb200',\n 'key lime': '#aeff6e',\n 'khaki': '#aaa662',\n 'khaki green': '#728639',\n 'kiwi': '#9cef43',\n 'kiwi green': '#8ee53f',\n 'lavender': '#c79fef',\n 'lavender blue': '#8b88f8',\n 'lavender pink': '#dd85d7',\n 'lawn green': '#4da409',\n 'leaf': '#71aa34',\n 'leaf green': '#5ca904',\n 'leafy green': '#51b73b',\n 'leather': '#ac7434',\n 'lemon': '#fdff52',\n 'lemon green': '#adf802',\n 'lemon lime': '#bffe28',\n 'lemon yellow': '#fdff38',\n 'lichen': '#8fb67b',\n 'light aqua': '#8cffdb',\n 'light aquamarine': '#7bfdc7',\n 'light beige': '#fffeb6',\n 'light blue': '#95d0fc',\n 'light blue green': '#7efbb3',\n 'light blue grey': '#b7c9e2',\n 'light bluish green': '#76fda8',\n 'light bright green': '#53fe5c',\n 'light brown': '#ad8150',\n 'light burgundy': '#a8415b',\n 'light cyan': '#acfffc',\n 'light eggplant': '#894585',\n 'light forest green': '#4f9153',\n 'light gold': '#fddc5c',\n 'light grass green': '#9af764',\n 'light green': '#96f97b',\n 'light green blue': '#56fca2',\n 'light greenish blue': '#63f7b4',\n 'light grey': '#d8dcd6',\n 'light grey blue': '#9dbcd4',\n 'light grey green': '#b7e1a1',\n 'light indigo': '#6d5acf',\n 'light khaki': '#e6f2a2',\n 'light lavendar': '#efc0fe',\n 'light lavender': '#dfc5fe',\n 'light light blue': '#cafffb',\n 'light light green': '#c8ffb0',\n 'light lilac': '#edc8ff',\n 'light lime': '#aefd6c',\n 'light lime green': '#b9ff66',\n 'light magenta': '#fa5ff7',\n 'light maroon': '#a24857',\n 'light mauve': '#c292a1',\n 'light mint': '#b6ffbb',\n 'light mint green': '#a6fbb2',\n 'light moss green': '#a6c875',\n 'light mustard': '#f7d560',\n 'light navy': '#155084',\n 'light navy blue': '#2e5a88',\n 'light neon green': '#4efd54',\n 'light olive': '#acbf69',\n 'light olive green': '#a4be5c',\n 'light orange': '#fdaa48',\n 'light pastel green': '#b2fba5',\n 'light pea green': '#c4fe82',\n 'light peach': '#ffd8b1',\n 'light periwinkle': '#c1c6fc',\n 'light pink': '#ffd1df',\n 'light plum': '#9d5783',\n 'light purple': '#bf77f6',\n 'light red': '#ff474c',\n 'light rose': '#ffc5cb',\n 'light royal blue': '#3a2efe',\n 'light sage': '#bcecac',\n 'light salmon': '#fea993',\n 'light sea green': '#98f6b0',\n 'light seafoam': '#a0febf',\n 'light seafoam green': '#a7ffb5',\n 'light sky blue': '#c6fcff',\n 'light tan': '#fbeeac',\n 'light teal': '#90e4c1',\n 'light turquoise': '#7ef4cc',\n 'light urple': '#b36ff6',\n 'light violet': '#d6b4fc',\n 'light yellow': '#fffe7a',\n 'light yellow green': '#ccfd7f',\n 'light yellowish green': '#c2ff89',\n 'lightblue': '#7bc8f6',\n 'lighter green': '#75fd63',\n 'lighter purple': '#a55af4',\n 'lightgreen': '#76ff7b',\n 'lightish blue': '#3d7afd',\n 'lightish green': '#61e160',\n 'lightish purple': '#a552e6',\n 'lightish red': '#fe2f4a',\n 'lilac': '#cea2fd',\n 'liliac': '#c48efd',\n 'lime': '#aaff32',\n 'lime green': '#89fe05',\n 'lime yellow': '#d0fe1d',\n 'lipstick': '#d5174e',\n 'lipstick red': '#c0022f',\n 'macaroni and cheese': '#efb435',\n 'magenta': '#c20078',\n 'mahogany': '#4a0100',\n 'maize': '#f4d054',\n 'mango': '#ffa62b',\n 'manilla': '#fffa86',\n 'marigold': '#fcc006',\n 'marine': '#042e60',\n 'marine blue': '#01386a',\n 'maroon': '#650021',\n 'mauve': '#ae7181',\n 'medium blue': '#2c6fbb',\n 'medium brown': '#7f5112',\n 'medium green': '#39ad48',\n 'medium grey': '#7d7f7c',\n 'medium pink': '#f36196',\n 'medium purple': '#9e43a2',\n 'melon': '#ff7855',\n 'merlot': '#730039',\n 'metallic blue': '#4f738e',\n 'mid blue': '#276ab3',\n 'mid green': '#50a747',\n 'midnight': '#03012d',\n 'midnight blue': '#020035',\n 'midnight purple': '#280137',\n 'military green': '#667c3e',\n 'milk chocolate': '#7f4e1e',\n 'mint': '#9ffeb0',\n 'mint green': '#8fff9f',\n 'minty green': '#0bf77d',\n 'mocha': '#9d7651',\n 'moss': '#769958',\n 'moss green': '#658b38',\n 'mossy green': '#638b27',\n 'mud': '#735c12',\n 'mud brown': '#60460f',\n 'mud green': '#606602',\n 'muddy brown': '#886806',\n 'muddy green': '#657432',\n 'muddy yellow': '#bfac05',\n 'mulberry': '#920a4e',\n 'murky green': '#6c7a0e',\n 'mushroom': '#ba9e88',\n 'mustard': '#ceb301',\n 'mustard brown': '#ac7e04',\n 'mustard green': '#a8b504',\n 'mustard yellow': '#d2bd0a',\n 'muted blue': '#3b719f',\n 'muted green': '#5fa052',\n 'muted pink': '#d1768f',\n 'muted purple': '#805b87',\n 'nasty green': '#70b23f',\n 'navy': '#01153e',\n 'navy blue': '#001146',\n 'navy green': '#35530a',\n 'neon blue': '#04d9ff',\n 'neon green': '#0cff0c',\n 'neon pink': '#fe019a',\n 'neon purple': '#bc13fe',\n 'neon red': '#ff073a',\n 'neon yellow': '#cfff04',\n 'nice blue': '#107ab0',\n 'night blue': '#040348',\n 'ocean': '#017b92',\n 'ocean blue': '#03719c',\n 'ocean green': '#3d9973',\n 'ocher': '#bf9b0c',\n 'ochre': '#bf9005',\n 'ocre': '#c69c04',\n 'off blue': '#5684ae',\n 'off green': '#6ba353',\n 'off white': '#ffffe4',\n 'off yellow': '#f1f33f',\n 'old pink': '#c77986',\n 'old rose': '#c87f89',\n 'olive': '#6e750e',\n 'olive brown': '#645403',\n 'olive drab': '#6f7632',\n 'olive green': '#677a04',\n 'olive yellow': '#c2b709',\n 'orange': '#f97306',\n 'orange brown': '#be6400',\n 'orange pink': '#ff6f52',\n 'orange red': '#fd411e',\n 'orange yellow': '#ffad01',\n 'orangeish': '#fd8d49',\n 'orangered': '#fe420f',\n 'orangey brown': '#b16002',\n 'orangey red': '#fa4224',\n 'orangey yellow': '#fdb915',\n 'orangish': '#fc824a',\n 'orangish brown': '#b25f03',\n 'orangish red': '#f43605',\n 'orchid': '#c875c4',\n 'pale': '#fff9d0',\n 'pale aqua': '#b8ffeb',\n 'pale blue': '#d0fefe',\n 'pale brown': '#b1916e',\n 'pale cyan': '#b7fffa',\n 'pale gold': '#fdde6c',\n 'pale green': '#c7fdb5',\n 'pale grey': '#fdfdfe',\n 'pale lavender': '#eecffe',\n 'pale light green': '#b1fc99',\n 'pale lilac': '#e4cbff',\n 'pale lime': '#befd73',\n 'pale lime green': '#b1ff65',\n 'pale magenta': '#d767ad',\n 'pale mauve': '#fed0fc',\n 'pale olive': '#b9cc81',\n 'pale olive green': '#b1d27b',\n 'pale orange': '#ffa756',\n 'pale peach': '#ffe5ad',\n 'pale pink': '#ffcfdc',\n 'pale purple': '#b790d4',\n 'pale red': '#d9544d',\n 'pale rose': '#fdc1c5',\n 'pale salmon': '#ffb19a',\n 'pale sky blue': '#bdf6fe',\n 'pale teal': '#82cbb2',\n 'pale turquoise': '#a5fbd5',\n 'pale violet': '#ceaefa',\n 'pale yellow': '#ffff84',\n 'parchment': '#fefcaf',\n 'pastel blue': '#a2bffe',\n 'pastel green': '#b0ff9d',\n 'pastel orange': '#ff964f',\n 'pastel pink': '#ffbacd',\n 'pastel purple': '#caa0ff',\n 'pastel red': '#db5856',\n 'pastel yellow': '#fffe71',\n 'pea': '#a4bf20',\n 'pea green': '#8eab12',\n 'pea soup': '#929901',\n 'pea soup green': '#94a617',\n 'peach': '#ffb07c',\n 'peachy pink': '#ff9a8a',\n 'peacock blue': '#016795',\n 'pear': '#cbf85f',\n 'periwinkle': '#8e82fe',\n 'periwinkle blue': '#8f99fb',\n 'perrywinkle': '#8f8ce7',\n 'petrol': '#005f6a',\n 'pig pink': '#e78ea5',\n 'pine': '#2b5d34',\n 'pine green': '#0a481e',\n 'pink': '#ff81c0',\n 'pink purple': '#db4bda',\n 'pink red': '#f5054f',\n 'pink/purple': '#ef1de7',\n 'pinkish': '#d46a7e',\n 'pinkish brown': '#b17261',\n 'pinkish grey': '#c8aca9',\n 'pinkish orange': '#ff724c',\n 'pinkish purple': '#d648d7',\n 'pinkish red': '#f10c45',\n 'pinkish tan': '#d99b82',\n 'pinky': '#fc86aa',\n 'pinky purple': '#c94cbe',\n 'pinky red': '#fc2647',\n 'piss yellow': '#ddd618',\n 'pistachio': '#c0fa8b',\n 'plum': '#580f41',\n 'plum purple': '#4e0550',\n 'poison green': '#40fd14',\n 'poo': '#8f7303',\n 'poo brown': '#885f01',\n 'poop': '#7f5e00',\n 'poop brown': '#7a5901',\n 'poop green': '#6f7c00',\n 'powder blue': '#b1d1fc',\n 'powder pink': '#ffb2d0',\n 'primary blue': '#0804f9',\n 'prussian blue': '#004577',\n 'puce': '#a57e52',\n 'puke': '#a5a502',\n 'puke brown': '#947706',\n 'puke green': '#9aae07',\n 'puke yellow': '#c2be0e',\n 'pumpkin': '#e17701',\n 'pumpkin orange': '#fb7d07',\n 'pure blue': '#0203e2',\n 'purple': '#7e1e9c',\n 'purple blue': '#632de9',\n 'purple brown': '#673a3f',\n 'purple grey': '#866f85',\n 'purple pink': '#e03fd8',\n 'purple red': '#990147',\n 'purple/blue': '#5d21d0',\n 'purple/pink': '#d725de',\n 'purpleish': '#98568d',\n 'purpleish blue': '#6140ef',\n 'purpleish pink': '#df4ec8',\n 'purpley': '#8756e4',\n 'purpley blue': '#5f34e7',\n 'purpley grey': '#947e94',\n 'purpley pink': '#c83cb9',\n 'purplish': '#94568c',\n 'purplish blue': '#601ef9',\n 'purplish brown': '#6b4247',\n 'purplish grey': '#7a687f',\n 'purplish pink': '#ce5dae',\n 'purplish red': '#b0054b',\n 'purply': '#983fb2',\n 'purply blue': '#661aee',\n 'purply pink': '#f075e6',\n 'putty': '#beae8a',\n 'racing green': '#014600',\n 'radioactive green': '#2cfa1f',\n 'raspberry': '#b00149',\n 'raw sienna': '#9a6200',\n 'raw umber': '#a75e09',\n 'really light blue': '#d4ffff',\n 'red': '#e50000',\n 'red brown': '#8b2e16',\n 'red orange': '#fd3c06',\n 'red pink': '#fa2a55',\n 'red purple': '#820747',\n 'red violet': '#9e0168',\n 'red wine': '#8c0034',\n 'reddish': '#c44240',\n 'reddish brown': '#7f2b0a',\n 'reddish grey': '#997570',\n 'reddish orange': '#f8481c',\n 'reddish pink': '#fe2c54',\n 'reddish purple': '#910951',\n 'reddy brown': '#6e1005',\n 'rich blue': '#021bf9',\n 'rich purple': '#720058',\n 'robin egg blue': '#8af1fe',\n \"robin's egg\": '#6dedfd',\n \"robin's egg blue\": '#98eff9',\n 'rosa': '#fe86a4',\n 'rose': '#cf6275',\n 'rose pink': '#f7879a',\n 'rose red': '#be013c',\n 'rosy pink': '#f6688e',\n 'rouge': '#ab1239',\n 'royal': '#0c1793',\n 'royal blue': '#0504aa',\n 'royal purple': '#4b006e',\n 'ruby': '#ca0147',\n 'russet': '#a13905',\n 'rust': '#a83c09',\n 'rust brown': '#8b3103',\n 'rust orange': '#c45508',\n 'rust red': '#aa2704',\n 'rusty orange': '#cd5909',\n 'rusty red': '#af2f0d',\n 'saffron': '#feb209',\n 'sage': '#87ae73',\n 'sage green': '#88b378',\n 'salmon': '#ff796c',\n 'salmon pink': '#fe7b7c',\n 'sand': '#e2ca76',\n 'sand brown': '#cba560',\n 'sand yellow': '#fce166',\n 'sandstone': '#c9ae74',\n 'sandy': '#f1da7a',\n 'sandy brown': '#c4a661',\n 'sandy yellow': '#fdee73',\n 'sap green': '#5c8b15',\n 'sapphire': '#2138ab',\n 'scarlet': '#be0119',\n 'sea': '#3c9992',\n 'sea blue': '#047495',\n 'sea green': '#53fca1',\n 'seafoam': '#80f9ad',\n 'seafoam blue': '#78d1b6',\n 'seafoam green': '#7af9ab',\n 'seaweed': '#18d17b',\n 'seaweed green': '#35ad6b',\n 'sepia': '#985e2b',\n 'shamrock': '#01b44c',\n 'shamrock green': '#02c14d',\n 'shit': '#7f5f00',\n 'shit brown': '#7b5804',\n 'shit green': '#758000',\n 'shocking pink': '#fe02a2',\n 'sick green': '#9db92c',\n 'sickly green': '#94b21c',\n 'sickly yellow': '#d0e429',\n 'sienna': '#a9561e',\n 'silver': '#c5c9c7',\n 'sky': '#82cafc',\n 'sky blue': '#75bbfd',\n 'slate': '#516572',\n 'slate blue': '#5b7c99',\n 'slate green': '#658d6d',\n 'slate grey': '#59656d',\n 'slime green': '#99cc04',\n 'snot': '#acbb0d',\n 'snot green': '#9dc100',\n 'soft blue': '#6488ea',\n 'soft green': '#6fc276',\n 'soft pink': '#fdb0c0',\n 'soft purple': '#a66fb5',\n 'spearmint': '#1ef876',\n 'spring green': '#a9f971',\n 'spruce': '#0a5f38',\n 'squash': '#f2ab15',\n 'steel': '#738595',\n 'steel blue': '#5a7d9a',\n 'steel grey': '#6f828a',\n 'stone': '#ada587',\n 'stormy blue': '#507b9c',\n 'straw': '#fcf679',\n 'strawberry': '#fb2943',\n 'strong blue': '#0c06f7',\n 'strong pink': '#ff0789',\n 'sun yellow': '#ffdf22',\n 'sunflower': '#ffc512',\n 'sunflower yellow': '#ffda03',\n 'sunny yellow': '#fff917',\n 'sunshine yellow': '#fffd37',\n 'swamp': '#698339',\n 'swamp green': '#748500',\n 'tan': '#d1b26f',\n 'tan brown': '#ab7e4c',\n 'tan green': '#a9be70',\n 'tangerine': '#ff9408',\n 'taupe': '#b9a281',\n 'tea': '#65ab7c',\n 'tea green': '#bdf8a3',\n 'teal': '#029386',\n 'teal blue': '#01889f',\n 'teal green': '#25a36f',\n 'tealish': '#24bca8',\n 'tealish green': '#0cdc73',\n 'terra cotta': '#c9643b',\n 'terracota': '#cb6843',\n 'terracotta': '#ca6641',\n 'tiffany blue': '#7bf2da',\n 'tomato': '#ef4026',\n 'tomato red': '#ec2d01',\n 'topaz': '#13bbaf',\n 'toupe': '#c7ac7d',\n 'toxic green': '#61de2a',\n 'tree green': '#2a7e19',\n 'true blue': '#010fcc',\n 'true green': '#089404',\n 'turquoise': '#06c2ac',\n 'turquoise blue': '#06b1c4',\n 'turquoise green': '#04f489',\n 'turtle green': '#75b84f',\n 'twilight': '#4e518b',\n 'twilight blue': '#0a437a',\n 'ugly blue': '#31668a',\n 'ugly brown': '#7d7103',\n 'ugly green': '#7a9703',\n 'ugly pink': '#cd7584',\n 'ugly purple': '#a442a0',\n 'ugly yellow': '#d0c101',\n 'ultramarine': '#2000b1',\n 'ultramarine blue': '#1805db',\n 'umber': '#b26400',\n 'velvet': '#750851',\n 'vermillion': '#f4320c',\n 'very dark blue': '#000133',\n 'very dark brown': '#1d0200',\n 'very dark green': '#062e03',\n 'very dark purple': '#2a0134',\n 'very light blue': '#d5ffff',\n 'very light brown': '#d3b683',\n 'very light green': '#d1ffbd',\n 'very light pink': '#fff4f2',\n 'very light purple': '#f6cefc',\n 'very pale blue': '#d6fffe',\n 'very pale green': '#cffdbc',\n 'vibrant blue': '#0339f8',\n 'vibrant green': '#0add08',\n 'vibrant purple': '#ad03de',\n 'violet': '#9a0eea',\n 'violet blue': '#510ac9',\n 'violet pink': '#fb5ffc',\n 'violet red': '#a50055',\n 'viridian': '#1e9167',\n 'vivid blue': '#152eff',\n 'vivid green': '#2fef10',\n 'vivid purple': '#9900fa',\n 'vomit': '#a2a415',\n 'vomit green': '#89a203',\n 'vomit yellow': '#c7c10c',\n 'warm blue': '#4b57db',\n 'warm brown': '#964e02',\n 'warm grey': '#978a84',\n 'warm pink': '#fb5581',\n 'warm purple': '#952e8f',\n 'washed out green': '#bcf5a6',\n 'water blue': '#0e87cc',\n 'watermelon': '#fd4659',\n 'weird green': '#3ae57f',\n 'wheat': '#fbdd7e',\n 'white': '#ffffff',\n 'windows blue': '#3778bf',\n 'wine': '#80013f',\n 'wine red': '#7b0323',\n 'wintergreen': '#20f986',\n 'wisteria': '#a87dc2',\n 'yellow': '#ffff14',\n 'yellow brown': '#b79400',\n 'yellow green': '#c0fb2d',\n 'yellow ochre': '#cb9d06',\n 'yellow orange': '#fcb001',\n 'yellow tan': '#ffe36e',\n 'yellow/green': '#c8fd3d',\n 'yellowgreen': '#bbf90f',\n 'yellowish': '#faee66',\n 'yellowish brown': '#9b7a01',\n 'yellowish green': '#b0dd16',\n 'yellowish orange': '#ffab0f',\n 'yellowish tan': '#fcfc81',\n 'yellowy brown': '#ae8b0c',\n 'yellowy green': '#bff128'}"},{"col":0,"comment":"null","endLoc":177,"header":"def _get_win_folder_with_pywin32(csidl_name)","id":395,"name":"_get_win_folder_with_pywin32","nodeType":"Function","startLoc":153,"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"},{"col":0,"comment":"null","endLoc":194,"header":"def xyz_to_rgb(triple)","id":396,"name":"xyz_to_rgb","nodeType":"Function","startLoc":192,"text":"def xyz_to_rgb(triple):\n xyz = map(lambda row: dot_product(row, triple), m)\n return list(map(from_linear, xyz))"},{"col":0,"comment":"null","endLoc":123,"header":"def dot_product(a, b)","id":397,"name":"dot_product","nodeType":"Function","startLoc":122,"text":"def dot_product(a, b):\n return sum(map(operator.mul, a, b))"},{"col":4,"comment":"Given data, return numpy.histogram parameters to define bins.","endLoc":163,"header":"def _define_bin_params(self, data, orient, scale_type)","id":398,"name":"_define_bin_params","nodeType":"Function","startLoc":143,"text":"def _define_bin_params(self, data, orient, scale_type):\n \"\"\"Given data, return numpy.histogram parameters to define bins.\"\"\"\n vals = data[orient]\n weights = 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, weights, 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"},{"fileName":"scatterplot_categorical.py","filePath":"examples","id":399,"nodeType":"File","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=\"\")\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":8,"id":401,"name":"sns","nodeType":"Attribute","startLoc":8,"text":"sns"},{"attributeType":"null","col":0,"comment":"null","endLoc":12,"id":403,"name":"df","nodeType":"Attribute","startLoc":12,"text":"df"},{"col":0,"comment":"Report available example datasets, useful for reporting issues.\n\n Requires an internet connection.\n\n ","endLoc":517,"header":"def get_dataset_names()","id":405,"name":"get_dataset_names","nodeType":"Function","startLoc":505,"text":"def 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"},{"attributeType":"null","col":0,"comment":"null","endLoc":15,"id":408,"name":"ax","nodeType":"Attribute","startLoc":15,"text":"ax"},{"col":4,"comment":"null","endLoc":513,"header":"@overload\n @abstractmethod\n def __getitem__(self, index: int) -> _T_co","id":409,"name":"__getitem__","nodeType":"Function","startLoc":511,"text":"@overload\n @abstractmethod\n def __getitem__(self, index: int) -> _T_co: ..."},{"col":4,"comment":"null","endLoc":516,"header":"@overload\n @abstractmethod\n def __getitem__(self, index: slice) -> Sequence[_T_co]","id":410,"name":"__getitem__","nodeType":"Function","startLoc":514,"text":"@overload\n @abstractmethod\n def __getitem__(self, index: slice) -> Sequence[_T_co]: ..."},{"col":4,"comment":"null","endLoc":518,"header":"def index(self, value: Any, start: int = 0, stop: int = ...) -> int","id":411,"name":"index","nodeType":"Function","startLoc":518,"text":"def index(self, value: Any, start: int = 0, stop: int = ...) -> int: ..."},{"col":4,"comment":"null","endLoc":519,"header":"def count(self, value: Any) -> int","id":412,"name":"count","nodeType":"Function","startLoc":519,"text":"def count(self, value: Any) -> int: ..."},{"col":4,"comment":"null","endLoc":520,"header":"def __contains__(self, value: object) -> bool","id":413,"name":"__contains__","nodeType":"Function","startLoc":520,"text":"def __contains__(self, value: object) -> bool: ..."},{"col":4,"comment":"null","endLoc":521,"header":"def __iter__(self) -> Iterator[_T_co]","id":414,"name":"__iter__","nodeType":"Function","startLoc":521,"text":"def __iter__(self) -> Iterator[_T_co]: ..."},{"col":4,"comment":"null","endLoc":522,"header":"def __reversed__(self) -> Iterator[_T_co]","id":415,"name":"__reversed__","nodeType":"Function","startLoc":522,"text":"def __reversed__(self) -> Iterator[_T_co]: ..."},{"className":"Mapping","col":0,"comment":"null","endLoc":641,"id":416,"nodeType":"Class","startLoc":627,"text":"class Mapping(Collection[_KT], Generic[_KT, _VT_co]):\n # TODO: We wish the key type could also be covariant, but that doesn't work,\n # see discussion in https://github.com/python/typing/pull/273.\n @abstractmethod\n def __getitem__(self, __key: _KT) -> _VT_co: ...\n # Mixin methods\n @overload\n def get(self, __key: _KT) -> _VT_co | None: ...\n @overload\n def get(self, __key: _KT, default: _VT_co | _T) -> _VT_co | _T: ...\n def items(self) -> ItemsView[_KT, _VT_co]: ...\n def keys(self) -> KeysView[_KT]: ...\n def values(self) -> ValuesView[_VT_co]: ...\n def __contains__(self, __key: object) -> bool: ...\n def __eq__(self, __other: object) -> bool: ..."},{"attributeType":"bool","col":8,"comment":"null","endLoc":61,"id":417,"name":"_grouping","nodeType":"Attribute","startLoc":61,"text":"self._grouping"},{"col":0,"comment":"","endLoc":7,"header":"scatterplot_categorical.py#","id":418,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nScatterplot with categorical variables\n======================================\n\n_thumb: .45, .45\n\n\"\"\"\n\nsns.set_theme(style=\"whitegrid\", palette=\"muted\")\n\ndf = sns.load_dataset(\"penguins\")\n\nax = sns.swarmplot(data=df, x=\"body_mass_g\", y=\"sex\", hue=\"species\")\n\nax.set(ylabel=\"\")"},{"col":0,"comment":"null","endLoc":2675,"header":"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)","id":419,"name":"swarmplot","nodeType":"Function","startLoc":2617,"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"},{"attributeType":"str | None","col":8,"comment":"null","endLoc":59,"id":421,"name":"_depend","nodeType":"Attribute","startLoc":59,"text":"self._depend"},{"col":0,"comment":"null","endLoc":64,"header":"def urlopen(\n url: str | Request,\n data: _DataType | None = None,\n timeout: float | None = ...,\n *,\n cafile: str | None = None,\n capath: str | None = None,\n cadefault: bool = False,\n context: ssl.SSLContext | None = None,\n) -> _UrlopenRet","id":422,"name":"urlopen","nodeType":"Function","startLoc":55,"text":"def urlopen(\n url: str | Request,\n data: _DataType | None = None,\n timeout: float | None = ...,\n *,\n cafile: str | None = None,\n capath: str | None = None,\n cadefault: bool = False,\n context: ssl.SSLContext | None = None,\n) -> _UrlopenRet: ..."},{"col":0,"comment":"null","endLoc":308,"header":"def urlretrieve(\n url: str,\n filename: StrOrBytesPath | None = None,\n reporthook: Callable[[int, int, int], object] | None = None,\n data: _DataType = None,\n) -> tuple[str, HTTPMessage]","id":423,"name":"urlretrieve","nodeType":"Function","startLoc":303,"text":"def urlretrieve(\n url: str,\n filename: StrOrBytesPath | None = None,\n reporthook: Callable[[int, int, int], object] | None = None,\n data: _DataType = None,\n) -> tuple[str, HTTPMessage]: ..."},{"col":4,"comment":"null","endLoc":631,"header":"@abstractmethod\n def __getitem__(self, __key: _KT) -> _VT_co","id":425,"name":"__getitem__","nodeType":"Function","startLoc":630,"text":"@abstractmethod\n def __getitem__(self, __key: _KT) -> _VT_co: ..."},{"col":4,"comment":"null","endLoc":634,"header":"@overload\n def get(self, __key: _KT) -> _VT_co | None","id":426,"name":"get","nodeType":"Function","startLoc":633,"text":"@overload\n def get(self, __key: _KT) -> _VT_co | None: ..."},{"col":4,"comment":"null","endLoc":636,"header":"@overload\n def get(self, __key: _KT, default: _VT_co | _T) -> _VT_co | _T","id":427,"name":"get","nodeType":"Function","startLoc":635,"text":"@overload\n def get(self, __key: _KT, default: _VT_co | _T) -> _VT_co | _T: ..."},{"col":4,"comment":"null","endLoc":637,"header":"def items(self) -> ItemsView[_KT, _VT_co]","id":428,"name":"items","nodeType":"Function","startLoc":637,"text":"def items(self) -> ItemsView[_KT, _VT_co]: ..."},{"col":4,"comment":"null","endLoc":638,"header":"def keys(self) -> KeysView[_KT]","id":429,"name":"keys","nodeType":"Function","startLoc":638,"text":"def keys(self) -> KeysView[_KT]: ..."},{"col":4,"comment":"null","endLoc":639,"header":"def values(self) -> ValuesView[_VT_co]","id":430,"name":"values","nodeType":"Function","startLoc":639,"text":"def values(self) -> ValuesView[_VT_co]: ..."},{"col":4,"comment":"null","endLoc":640,"header":"def __contains__(self, __key: object) -> bool","id":431,"name":"__contains__","nodeType":"Function","startLoc":640,"text":"def __contains__(self, __key: object) -> bool: ..."},{"col":4,"comment":"null","endLoc":641,"header":"def __eq__(self, __other: object) -> bool","id":432,"name":"__eq__","nodeType":"Function","startLoc":641,"text":"def __eq__(self, __other: object) -> bool: ..."},{"attributeType":"bool","col":8,"comment":"null","endLoc":60,"id":433,"name":"_auto","nodeType":"Attribute","startLoc":60,"text":"self._auto"},{"attributeType":"None","col":8,"comment":"null","endLoc":57,"id":434,"name":"_val","nodeType":"Attribute","startLoc":57,"text":"self._val"},{"fileName":"base.py","filePath":"seaborn/_marks","id":435,"nodeType":"File","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)\nfrom seaborn._core.exceptions import PlotSpecError\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)\n\n\n# 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?\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 scale = scales[name]\n value = data[name]\n try:\n feature = scale(value)\n except Exception as err:\n raise PlotSpecError._during(\"Scaling operation\", name) from err\n\n if return_array:\n feature = np.asarray(feature)\n return feature\n\n if feature.depend is not None:\n # TODO add source_func or similar to transform the source value?\n # e.g. set linewidth as a proportion of pointsize?\n return self._resolve(data, feature.depend, scales)\n\n default = prop.standardize(feature.default)\n if return_multiple:\n default = [default] * len(data)\n if return_array:\n default = np.array(default)\n return default\n\n def _infer_orient(self, scales: dict) -> str: # TODO type scales\n\n # 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\n return None\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\n\n\ndef resolve_color(\n mark: Mark,\n data: DataFrame | dict,\n prefix: str = \"\",\n scales: dict[str, Scale] | None = None,\n) -> RGBATuple | ndarray:\n \"\"\"\n Obtain a default, specified, or mapped value for a color feature.\n\n This method exists separately to support the relationship between a\n color and its corresponding alpha. We want to respect alpha values that\n are passed in specified (or mapped) color values but also make use of a\n separate `alpha` variable, which can be mapped. This approach may also\n be extended to support mapping of specific color channels (i.e.\n luminance, chroma) in the future.\n\n Parameters\n ----------\n mark :\n Mark with the color property.\n data :\n Container with data values for features that will be semantically mapped.\n prefix :\n Support \"color\", \"fillcolor\", etc.\n\n \"\"\"\n color = mark._resolve(data, f\"{prefix}color\", scales)\n\n if f\"{prefix}alpha\" in mark._mappable_props:\n alpha = mark._resolve(data, f\"{prefix}alpha\", scales)\n else:\n alpha = mark._resolve(data, \"alpha\", scales)\n\n def visible(x, axis=None):\n \"\"\"Detect \"invisible\" colors to set alpha appropriately.\"\"\"\n # TODO First clause only needed to handle non-rgba arrays,\n # which we are trying to handle upstream\n return np.array(x).dtype.kind != \"f\" or np.isfinite(x).all(axis)\n\n # Second check here catches vectors of strings with identity scale\n # It could probably be handled better upstream. This is a tricky problem\n if np.ndim(color) < 2 and all(isinstance(x, float) for x in color):\n if len(color) == 4:\n return mpl.colors.to_rgba(color)\n alpha = alpha if visible(color) else np.nan\n return mpl.colors.to_rgba(color, alpha)\n else:\n if np.ndim(color) == 2 and color.shape[1] == 4:\n return mpl.colors.to_rgba_array(color)\n alpha = np.where(visible(color, axis=1), alpha, np.nan)\n return mpl.colors.to_rgba_array(color, alpha)\n\n # TODO should we be implementing fill here too?\n # (i.e. set fillalpha to 0 when fill=False)\n\n\ndef 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\n"},{"col":4,"comment":"Warn if vars are named in parameter without being present in the data.","endLoc":55,"header":"def _check_grouping_vars(\n self, param: str, data_vars: list[str], stacklevel: int = 2,\n ) -> None","id":436,"name":"_check_grouping_vars","nodeType":"Function","startLoc":45,"text":"def _check_grouping_vars(\n self, param: str, data_vars: list[str], stacklevel: int = 2,\n ) -> None:\n \"\"\"Warn if vars are named in parameter without being present in the data.\"\"\"\n param_vars = getattr(self, param)\n undefined = set(param_vars) - set(data_vars)\n if undefined:\n param = f\"{self.__class__.__name__}.{param}\"\n names = \", \".join(f\"{x!r}\" for x in undefined)\n msg = f\"Undefined variable(s) passed for {param}: {names}.\"\n warnings.warn(msg, stacklevel=stacklevel)"},{"attributeType":"null","col":0,"comment":"null","endLoc":138,"id":437,"name":"Any","nodeType":"Attribute","startLoc":138,"text":"Any"},{"className":"BaseException","col":0,"comment":"null","endLoc":1939,"id":438,"nodeType":"Class","startLoc":1927,"text":"class BaseException:\n args: tuple[Any, ...]\n __cause__: BaseException | None\n __context__: BaseException | None\n __suppress_context__: bool\n __traceback__: TracebackType | None\n def __init__(self, *args: object) -> None: ...\n def __setstate__(self, __state: dict[str, Any] | None) -> None: ...\n def with_traceback(self, __tb: TracebackType | None) -> Self: ...\n if sys.version_info >= (3, 11):\n # only present after add_note() is called\n __notes__: list[str]\n def add_note(self, __note: str) -> None: ..."},{"col":4,"comment":"null","endLoc":1934,"header":"def __setstate__(self, __state: dict[str, Any] | None) -> None","id":439,"name":"__setstate__","nodeType":"Function","startLoc":1934,"text":"def __setstate__(self, __state: dict[str, Any] | None) -> None: ..."},{"col":4,"comment":"null","endLoc":1935,"header":"def with_traceback(self, __tb: TracebackType | None) -> Self","id":440,"name":"with_traceback","nodeType":"Function","startLoc":1935,"text":"def with_traceback(self, __tb: TracebackType | None) -> Self: ..."},{"col":8,"comment":"null","endLoc":1939,"header":"def add_note(self, __note: str) -> None","id":441,"name":"add_note","nodeType":"Function","startLoc":1939,"text":"def add_note(self, __note: str) -> None: ..."},{"attributeType":"(Any, ...)","col":4,"comment":"null","endLoc":1928,"id":442,"name":"args","nodeType":"Attribute","startLoc":1928,"text":"args"},{"attributeType":"_SpecialForm","col":0,"comment":"null","endLoc":191,"id":443,"name":"Union","nodeType":"Attribute","startLoc":191,"text":"Union"},{"className":"Generator","col":0,"comment":"null","endLoc":424,"id":444,"nodeType":"Class","startLoc":403,"text":"class Generator(Iterator[_YieldT_co], Generic[_YieldT_co, _SendT_contra, _ReturnT_co]):\n def __next__(self) -> _YieldT_co: ...\n @abstractmethod\n def send(self, __value: _SendT_contra) -> _YieldT_co: ...\n @overload\n @abstractmethod\n def throw(\n self, __typ: Type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None\n ) -> _YieldT_co: ...\n @overload\n @abstractmethod\n def throw(self, __typ: BaseException, __val: None = None, __tb: TracebackType | None = None) -> _YieldT_co: ...\n def close(self) -> None: ...\n def __iter__(self) -> Generator[_YieldT_co, _SendT_contra, _ReturnT_co]: ...\n @property\n def gi_code(self) -> CodeType: ...\n @property\n def gi_frame(self) -> FrameType: ...\n @property\n def gi_running(self) -> bool: ...\n @property\n def gi_yieldfrom(self) -> Generator[Any, Any, Any] | None: ..."},{"col":0,"comment":"\n isfinite(x[, out])\n \n Test element-wise for finiteness (not infinity or not Not a Number).\n \n The result is returned as a boolean array.\n \n Parameters\n ----------\n x : array_like\n Input values.\n out : ndarray, optional\n Array into which the output is placed. Its type is preserved and it\n must be of the right shape to hold the output. See `doc.ufuncs`.\n \n Returns\n -------\n y : ndarray, bool\n For scalar input, the result is a new boolean with value True\n if the input is finite; otherwise the value is False (input is\n either positive infinity, negative infinity or Not a Number).\n \n For array input, the result is a boolean array with the same\n dimensions as the input and the values are True if the\n corresponding element of the input is finite; otherwise the values\n are False (element is either positive infinity, negative infinity\n or Not a Number).\n \n See Also\n --------\n isinf, isneginf, isposinf, isnan\n \n Notes\n -----\n Not a Number, positive infinity and negative infinity are considered\n to be non-finite.\n \n NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic\n (IEEE 754). This means that Not a Number is not equivalent to infinity.\n Also that positive infinity is not equivalent to negative infinity. But\n infinity is equivalent to positive infinity. Errors result if the\n second argument is also supplied when `x` is a scalar input, or if\n first and second arguments have different shapes.\n \n Examples\n --------\n >>> np.isfinite(1)\n True\n >>> np.isfinite(0)\n True\n >>> np.isfinite(np.nan)\n False\n >>> np.isfinite(np.inf)\n False\n >>> np.isfinite(np.NINF)\n False\n >>> np.isfinite([np.log(-1.),1.,np.log(0)])\n array([False, True, False], dtype=bool)\n \n >>> x = np.array([-np.inf, 0., np.inf])\n >>> y = np.array([2, 2, 2])\n >>> np.isfinite(x, y)\n array([0, 1, 0])\n >>> y\n array([0, 1, 0])\n ","endLoc":2026,"header":"def isfinite(x, out=None)","id":445,"name":"isfinite","nodeType":"Function","startLoc":1959,"text":"def isfinite(x, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n isfinite(x[, out])\n \n Test element-wise for finiteness (not infinity or not Not a Number).\n \n The result is returned as a boolean array.\n \n Parameters\n ----------\n x : array_like\n Input values.\n out : ndarray, optional\n Array into which the output is placed. Its type is preserved and it\n must be of the right shape to hold the output. See `doc.ufuncs`.\n \n Returns\n -------\n y : ndarray, bool\n For scalar input, the result is a new boolean with value True\n if the input is finite; otherwise the value is False (input is\n either positive infinity, negative infinity or Not a Number).\n \n For array input, the result is a boolean array with the same\n dimensions as the input and the values are True if the\n corresponding element of the input is finite; otherwise the values\n are False (element is either positive infinity, negative infinity\n or Not a Number).\n \n See Also\n --------\n isinf, isneginf, isposinf, isnan\n \n Notes\n -----\n Not a Number, positive infinity and negative infinity are considered\n to be non-finite.\n \n NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic\n (IEEE 754). This means that Not a Number is not equivalent to infinity.\n Also that positive infinity is not equivalent to negative infinity. But\n infinity is equivalent to positive infinity. Errors result if the\n second argument is also supplied when `x` is a scalar input, or if\n first and second arguments have different shapes.\n \n Examples\n --------\n >>> np.isfinite(1)\n True\n >>> np.isfinite(0)\n True\n >>> np.isfinite(np.nan)\n False\n >>> np.isfinite(np.inf)\n False\n >>> np.isfinite(np.NINF)\n False\n >>> np.isfinite([np.log(-1.),1.,np.log(0)])\n array([False, True, False], dtype=bool)\n \n >>> x = np.array([-np.inf, 0., np.inf])\n >>> y = np.array([2, 2, 2])\n >>> np.isfinite(x, y)\n array([0, 1, 0])\n >>> y\n array([0, 1, 0])\n \"\"\"\n pass"},{"className":"Number","col":0,"comment":"null","endLoc":11,"id":446,"nodeType":"Class","startLoc":9,"text":"class Number(metaclass=ABCMeta):\n @abstractmethod\n def __hash__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":1067,"header":"@overload\n def __init__(self) -> None","id":447,"name":"__init__","nodeType":"Function","startLoc":1066,"text":"@overload\n def __init__(self) -> None: ..."},{"col":4,"comment":"null","endLoc":1069,"header":"@overload\n def __init__(self: dict[str, _VT], **kwargs: _VT) -> None","id":448,"name":"__init__","nodeType":"Function","startLoc":1068,"text":"@overload\n def __init__(self: dict[str, _VT], **kwargs: _VT) -> None: ..."},{"col":4,"comment":"null","endLoc":1071,"header":"@overload\n def __init__(self, __map: SupportsKeysAndGetItem[_KT, _VT]) -> None","id":449,"name":"__init__","nodeType":"Function","startLoc":1070,"text":"@overload\n def __init__(self, __map: SupportsKeysAndGetItem[_KT, _VT]) -> None: ..."},{"col":4,"comment":"null","endLoc":1073,"header":"@overload\n def __init__(self: dict[str, _VT], __map: SupportsKeysAndGetItem[str, _VT], **kwargs: _VT) -> None","id":450,"name":"__init__","nodeType":"Function","startLoc":1072,"text":"@overload\n def __init__(self: dict[str, _VT], __map: SupportsKeysAndGetItem[str, _VT], **kwargs: _VT) -> None: ..."},{"col":4,"comment":"null","endLoc":1075,"header":"@overload\n def __init__(self, __iterable: Iterable[tuple[_KT, _VT]]) -> None","id":451,"name":"__init__","nodeType":"Function","startLoc":1074,"text":"@overload\n def __init__(self, __iterable: Iterable[tuple[_KT, _VT]]) -> None: ..."},{"col":4,"comment":"null","endLoc":1077,"header":"@overload\n def __init__(self: dict[str, _VT], __iterable: Iterable[tuple[str, _VT]], **kwargs: _VT) -> None","id":452,"name":"__init__","nodeType":"Function","startLoc":1076,"text":"@overload\n def __init__(self: dict[str, _VT], __iterable: Iterable[tuple[str, _VT]], **kwargs: _VT) -> None: ..."},{"col":4,"comment":"null","endLoc":1081,"header":"@overload\n def __init__(self: dict[str, str], __iterable: Iterable[list[str]]) -> None","id":453,"name":"__init__","nodeType":"Function","startLoc":1080,"text":"@overload\n def __init__(self: dict[str, str], __iterable: Iterable[list[str]]) -> None: ..."},{"col":4,"comment":"null","endLoc":1083,"header":"@overload\n def __init__(self: dict[bytes, bytes], __iterable: Iterable[list[bytes]]) -> None","id":454,"name":"__init__","nodeType":"Function","startLoc":1082,"text":"@overload\n def __init__(self: dict[bytes, bytes], __iterable: Iterable[list[bytes]]) -> None: ..."},{"col":0,"comment":"null","endLoc":316,"header":"def document_properties(mark)","id":455,"name":"document_properties","nodeType":"Function","startLoc":297,"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"},{"col":4,"comment":"\n Initialize the class to report the failure of a specific operation.\n ","endLoc":32,"header":"@classmethod\n def _during(cls, step: str, var: str = \"\") -> PlotSpecError","id":456,"name":"_during","nodeType":"Function","startLoc":21,"text":"@classmethod\n def _during(cls, step: str, var: str = \"\") -> PlotSpecError:\n \"\"\"\n Initialize the class to report the failure of a specific operation.\n \"\"\"\n message = []\n if var:\n message.append(f\"{step} failed for the `{var}` variable.\")\n else:\n message.append(f\"{step} failed.\")\n message.append(\"See the traceback above for more information.\")\n return cls(\" \".join(message))"},{"col":4,"comment":"Reorder result columns to match original order with new columns appended.","endLoc":77,"header":"def _reorder_columns(self, res, data)","id":457,"name":"_reorder_columns","nodeType":"Function","startLoc":73,"text":"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))"},{"col":4,"comment":"null","endLoc":11,"header":"@abstractmethod\n def __hash__(self) -> int","id":458,"name":"__hash__","nodeType":"Function","startLoc":10,"text":"@abstractmethod\n def __hash__(self) -> int: ..."},{"className":"datetime","col":0,"comment":"null","endLoc":331,"id":459,"nodeType":"Class","startLoc":229,"text":"class datetime(date):\n min: ClassVar[datetime]\n max: ClassVar[datetime]\n def __new__(\n cls,\n year: SupportsIndex,\n month: SupportsIndex,\n day: SupportsIndex,\n hour: SupportsIndex = ...,\n minute: SupportsIndex = ...,\n second: SupportsIndex = ...,\n microsecond: SupportsIndex = ...,\n tzinfo: _TzInfo | None = ...,\n *,\n fold: int = ...,\n ) -> Self: ...\n @property\n def hour(self) -> int: ...\n @property\n def minute(self) -> int: ...\n @property\n def second(self) -> int: ...\n @property\n def microsecond(self) -> int: ...\n @property\n def tzinfo(self) -> _TzInfo | None: ...\n @property\n def fold(self) -> int: ...\n # On <3.12, the name of the first parameter in the pure-Python implementation\n # didn't match the name in the C implementation,\n # meaning it is only *safe* to pass it as a keyword argument on 3.12+\n if sys.version_info >= (3, 12):\n @classmethod\n def fromtimestamp(cls, timestamp: float, tz: _TzInfo | None = ...) -> Self: ...\n else:\n @classmethod\n def fromtimestamp(cls, __timestamp: float, tz: _TzInfo | None = ...) -> Self: ...\n\n @classmethod\n def utcfromtimestamp(cls, __t: float) -> Self: ...\n if sys.version_info >= (3, 8):\n @classmethod\n def now(cls, tz: _TzInfo | None = None) -> Self: ...\n else:\n @overload\n @classmethod\n def now(cls, tz: None = None) -> Self: ...\n @overload\n @classmethod\n def now(cls, tz: _TzInfo) -> datetime: ...\n\n @classmethod\n def utcnow(cls) -> Self: ...\n @classmethod\n def combine(cls, date: _Date, time: _Time, tzinfo: _TzInfo | None = ...) -> Self: ...\n def timestamp(self) -> float: ...\n def utctimetuple(self) -> struct_time: ...\n def date(self) -> _Date: ...\n def time(self) -> _Time: ...\n def timetz(self) -> _Time: ...\n def replace(\n self,\n year: SupportsIndex = ...,\n month: SupportsIndex = ...,\n day: SupportsIndex = ...,\n hour: SupportsIndex = ...,\n minute: SupportsIndex = ...,\n second: SupportsIndex = ...,\n microsecond: SupportsIndex = ...,\n tzinfo: _TzInfo | None = ...,\n *,\n fold: int = ...,\n ) -> Self: ...\n if sys.version_info >= (3, 8):\n def astimezone(self, tz: _TzInfo | None = ...) -> Self: ...\n else:\n def astimezone(self, tz: _TzInfo | None = ...) -> datetime: ...\n\n def isoformat(self, sep: str = ..., timespec: str = ...) -> str: ...\n @classmethod\n def strptime(cls, __date_string: str, __format: str) -> Self: ...\n def utcoffset(self) -> timedelta | None: ...\n def tzname(self) -> str | None: ...\n def dst(self) -> timedelta | None: ...\n def __le__(self, __value: datetime) -> bool: ... # type: ignore[override]\n def __lt__(self, __value: datetime) -> bool: ... # type: ignore[override]\n def __ge__(self, __value: datetime) -> bool: ... # type: ignore[override]\n def __gt__(self, __value: datetime) -> bool: ... # type: ignore[override]\n def __eq__(self, __value: object) -> bool: ...\n def __hash__(self) -> int: ...\n if sys.version_info >= (3, 8):\n @overload # type: ignore[override]\n def __sub__(self, __value: timedelta) -> Self: ...\n @overload\n def __sub__(self: _D, __value: _D) -> timedelta: ...\n else:\n # Prior to Python 3.8, arithmetic operations always returned `datetime`, even in subclasses\n def __add__(self, __value: timedelta) -> datetime: ...\n def __radd__(self, __value: timedelta) -> datetime: ...\n @overload # type: ignore[override]\n def __sub__(self, __value: datetime) -> timedelta: ...\n @overload\n def __sub__(self, __value: timedelta) -> datetime: ..."},{"col":4,"comment":"\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 ","endLoc":103,"header":"def agg(self, data: DataFrame, *args, **kwargs) -> DataFrame","id":460,"name":"agg","nodeType":"Function","startLoc":79,"text":"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"},{"col":4,"comment":"null","endLoc":108,"header":"def _setup(\n self, data: Series, prop: Property, axis: Axis | None = None,\n ) -> Scale","id":465,"name":"_setup","nodeType":"Function","startLoc":105,"text":"def _setup(\n self, data: Series, prop: Property, axis: Axis | None = None,\n ) -> Scale:\n raise NotImplementedError()"},{"col":4,"comment":"null","endLoc":404,"header":"def __next__(self) -> _YieldT_co","id":466,"name":"__next__","nodeType":"Function","startLoc":404,"text":"def __next__(self) -> _YieldT_co: ..."},{"col":4,"comment":"null","endLoc":406,"header":"@abstractmethod\n def send(self, __value: _SendT_contra) -> _YieldT_co","id":467,"name":"send","nodeType":"Function","startLoc":405,"text":"@abstractmethod\n def send(self, __value: _SendT_contra) -> _YieldT_co: ..."},{"col":4,"comment":"null","endLoc":411,"header":"@overload\n @abstractmethod\n def throw(\n self, __typ: Type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None\n ) -> _YieldT_co","id":468,"name":"throw","nodeType":"Function","startLoc":407,"text":"@overload\n @abstractmethod\n def throw(\n self, __typ: Type[BaseException], __val: BaseException | object = None, __tb: TracebackType | None = None\n ) -> _YieldT_co: ..."},{"col":4,"comment":"null","endLoc":414,"header":"@overload\n @abstractmethod\n def throw(self, __typ: BaseException, __val: None = None, __tb: TracebackType | None = None) -> _YieldT_co","id":469,"name":"throw","nodeType":"Function","startLoc":412,"text":"@overload\n @abstractmethod\n def throw(self, __typ: BaseException, __val: None = None, __tb: TracebackType | None = None) -> _YieldT_co: ..."},{"col":4,"comment":"null","endLoc":415,"header":"def close(self) -> None","id":470,"name":"close","nodeType":"Function","startLoc":415,"text":"def close(self) -> None: ..."},{"col":4,"comment":"null","endLoc":416,"header":"def __iter__(self) -> Generator[_YieldT_co, _SendT_contra, _ReturnT_co]","id":471,"name":"__iter__","nodeType":"Function","startLoc":416,"text":"def __iter__(self) -> Generator[_YieldT_co, _SendT_contra, _ReturnT_co]: ..."},{"col":4,"comment":"null","endLoc":418,"header":"@property\n def gi_code(self) -> CodeType","id":472,"name":"gi_code","nodeType":"Function","startLoc":417,"text":"@property\n def gi_code(self) -> CodeType: ..."},{"col":4,"comment":"null","endLoc":420,"header":"@property\n def gi_frame(self) -> FrameType","id":473,"name":"gi_frame","nodeType":"Function","startLoc":419,"text":"@property\n def gi_frame(self) -> FrameType: ..."},{"col":4,"comment":"null","endLoc":422,"header":"@property\n def gi_running(self) -> bool","id":474,"name":"gi_running","nodeType":"Function","startLoc":421,"text":"@property\n def gi_running(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":424,"header":"@property\n def gi_yieldfrom(self) -> Generator[Any, Any, Any] | None","id":475,"name":"gi_yieldfrom","nodeType":"Function","startLoc":423,"text":"@property\n def gi_yieldfrom(self) -> Generator[Any, Any, Any] | None: ..."},{"className":"ndarray","col":0,"comment":"\n ndarray(shape, dtype=float, buffer=None, offset=0,\n strides=None, order=None)\n \n An array object represents a multidimensional, homogeneous array\n of fixed-size items. An associated data-type object describes the\n format of each element in the array (its byte-order, how many bytes it\n occupies in memory, whether it is an integer, a floating point number,\n or something else, etc.)\n \n Arrays should be constructed using `array`, `zeros` or `empty` (refer\n to the See Also section below). The parameters given here refer to\n a low-level method (`ndarray(...)`) for instantiating an array.\n \n For more information, refer to the `numpy` module and examine the\n methods and attributes of an array.\n \n Parameters\n ----------\n (for the __new__ method; see Notes below)\n \n shape : tuple of ints\n Shape of created array.\n dtype : data-type, optional\n Any object that can be interpreted as a numpy data type.\n buffer : object exposing buffer interface, optional\n Used to fill the array with data.\n offset : int, optional\n Offset of array data in buffer.\n strides : tuple of ints, optional\n Strides of data in memory.\n order : {'C', 'F'}, optional\n Row-major (C-style) or column-major (Fortran-style) order.\n \n Attributes\n ----------\n T : ndarray\n Transpose of the array.\n data : buffer\n The array's elements, in memory.\n dtype : dtype object\n Describes the format of the elements in the array.\n flags : dict\n Dictionary containing information related to memory use, e.g.,\n 'C_CONTIGUOUS', 'OWNDATA', 'WRITEABLE', etc.\n flat : numpy.flatiter object\n Flattened version of the array as an iterator. The iterator\n allows assignments, e.g., ``x.flat = 3`` (See `ndarray.flat` for\n assignment examples; TODO).\n imag : ndarray\n Imaginary part of the array.\n real : ndarray\n Real part of the array.\n size : int\n Number of elements in the array.\n itemsize : int\n The memory use of each array element in bytes.\n nbytes : int\n The total number of bytes required to store the array data,\n i.e., ``itemsize * size``.\n ndim : int\n The array's number of dimensions.\n shape : tuple of ints\n Shape of the array.\n strides : tuple of ints\n The step-size required to move from one element to the next in\n memory. For example, a contiguous ``(3, 4)`` array of type\n ``int16`` in C-order has strides ``(8, 2)``. This implies that\n to move from element to element in memory requires jumps of 2 bytes.\n To move from row-to-row, one needs to jump 8 bytes at a time\n (``2 * 4``).\n ctypes : ctypes object\n Class containing properties of the array needed for interaction\n with ctypes.\n base : ndarray\n If the array is a view into another array, that array is its `base`\n (unless that array is also a view). The `base` array is where the\n array data is actually stored.\n \n See Also\n --------\n array : Construct an array.\n zeros : Create an array, each element of which is zero.\n empty : Create an array, but leave its allocated memory unchanged (i.e.,\n it contains \"garbage\").\n dtype : Create a data-type.\n \n Notes\n -----\n There are two modes of creating an array using ``__new__``:\n \n 1. If `buffer` is None, then only `shape`, `dtype`, and `order`\n are used.\n 2. If `buffer` is an object exposing the buffer interface, then\n all keywords are interpreted.\n \n No ``__init__`` method is needed because the array is fully initialized\n after the ``__new__`` method.\n \n Examples\n --------\n These examples illustrate the low-level `ndarray` constructor. Refer\n to the `See Also` section above for easier ways of constructing an\n ndarray.\n \n First mode, `buffer` is None:\n \n >>> np.ndarray(shape=(2,2), dtype=float, order='F')\n array([[ -1.13698227e+002, 4.25087011e-303],\n [ 2.88528414e-306, 3.27025015e-309]]) #random\n \n Second mode:\n \n >>> np.ndarray((2,), buffer=np.array([1,2,3]),\n ... offset=np.int_().itemsize,\n ... dtype=int) # offset = 1*itemsize, i.e. skip first element\n array([2, 3])\n ","endLoc":5630,"id":476,"nodeType":"Class","startLoc":3195,"text":"class ndarray(object):\n \"\"\"\n ndarray(shape, dtype=float, buffer=None, offset=0,\n strides=None, order=None)\n \n An array object represents a multidimensional, homogeneous array\n of fixed-size items. An associated data-type object describes the\n format of each element in the array (its byte-order, how many bytes it\n occupies in memory, whether it is an integer, a floating point number,\n or something else, etc.)\n \n Arrays should be constructed using `array`, `zeros` or `empty` (refer\n to the See Also section below). The parameters given here refer to\n a low-level method (`ndarray(...)`) for instantiating an array.\n \n For more information, refer to the `numpy` module and examine the\n methods and attributes of an array.\n \n Parameters\n ----------\n (for the __new__ method; see Notes below)\n \n shape : tuple of ints\n Shape of created array.\n dtype : data-type, optional\n Any object that can be interpreted as a numpy data type.\n buffer : object exposing buffer interface, optional\n Used to fill the array with data.\n offset : int, optional\n Offset of array data in buffer.\n strides : tuple of ints, optional\n Strides of data in memory.\n order : {'C', 'F'}, optional\n Row-major (C-style) or column-major (Fortran-style) order.\n \n Attributes\n ----------\n T : ndarray\n Transpose of the array.\n data : buffer\n The array's elements, in memory.\n dtype : dtype object\n Describes the format of the elements in the array.\n flags : dict\n Dictionary containing information related to memory use, e.g.,\n 'C_CONTIGUOUS', 'OWNDATA', 'WRITEABLE', etc.\n flat : numpy.flatiter object\n Flattened version of the array as an iterator. The iterator\n allows assignments, e.g., ``x.flat = 3`` (See `ndarray.flat` for\n assignment examples; TODO).\n imag : ndarray\n Imaginary part of the array.\n real : ndarray\n Real part of the array.\n size : int\n Number of elements in the array.\n itemsize : int\n The memory use of each array element in bytes.\n nbytes : int\n The total number of bytes required to store the array data,\n i.e., ``itemsize * size``.\n ndim : int\n The array's number of dimensions.\n shape : tuple of ints\n Shape of the array.\n strides : tuple of ints\n The step-size required to move from one element to the next in\n memory. For example, a contiguous ``(3, 4)`` array of type\n ``int16`` in C-order has strides ``(8, 2)``. This implies that\n to move from element to element in memory requires jumps of 2 bytes.\n To move from row-to-row, one needs to jump 8 bytes at a time\n (``2 * 4``).\n ctypes : ctypes object\n Class containing properties of the array needed for interaction\n with ctypes.\n base : ndarray\n If the array is a view into another array, that array is its `base`\n (unless that array is also a view). The `base` array is where the\n array data is actually stored.\n \n See Also\n --------\n array : Construct an array.\n zeros : Create an array, each element of which is zero.\n empty : Create an array, but leave its allocated memory unchanged (i.e.,\n it contains \"garbage\").\n dtype : Create a data-type.\n \n Notes\n -----\n There are two modes of creating an array using ``__new__``:\n \n 1. If `buffer` is None, then only `shape`, `dtype`, and `order`\n are used.\n 2. If `buffer` is an object exposing the buffer interface, then\n all keywords are interpreted.\n \n No ``__init__`` method is needed because the array is fully initialized\n after the ``__new__`` method.\n \n Examples\n --------\n These examples illustrate the low-level `ndarray` constructor. Refer\n to the `See Also` section above for easier ways of constructing an\n ndarray.\n \n First mode, `buffer` is None:\n \n >>> np.ndarray(shape=(2,2), dtype=float, order='F')\n array([[ -1.13698227e+002, 4.25087011e-303],\n [ 2.88528414e-306, 3.27025015e-309]]) #random\n \n Second mode:\n \n >>> np.ndarray((2,), buffer=np.array([1,2,3]),\n ... offset=np.int_().itemsize,\n ... dtype=int) # offset = 1*itemsize, i.e. skip first element\n array([2, 3])\n \"\"\"\n def all(self, axis=None, out=None, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.all(axis=None, out=None, keepdims=False)\n \n Returns True if all elements evaluate to True.\n \n Refer to `numpy.all` for full documentation.\n \n See Also\n --------\n numpy.all : equivalent function\n \"\"\"\n pass\n\n def any(self, axis=None, out=None, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.any(axis=None, out=None, keepdims=False)\n \n Returns True if any of the elements of `a` evaluate to True.\n \n Refer to `numpy.any` for full documentation.\n \n See Also\n --------\n numpy.any : equivalent function\n \"\"\"\n pass\n\n def argmax(self, axis=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.argmax(axis=None, out=None)\n \n Return indices of the maximum values along the given axis.\n \n Refer to `numpy.argmax` for full documentation.\n \n See Also\n --------\n numpy.argmax : equivalent function\n \"\"\"\n pass\n\n def argmin(self, axis=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.argmin(axis=None, out=None)\n \n Return indices of the minimum values along the given axis of `a`.\n \n Refer to `numpy.argmin` for detailed documentation.\n \n See Also\n --------\n numpy.argmin : equivalent function\n \"\"\"\n pass\n\n def argpartition(self, kth, axis=-1, kind='introselect', order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.argpartition(kth, axis=-1, kind='introselect', order=None)\n \n Returns the indices that would partition this array.\n \n Refer to `numpy.argpartition` for full documentation.\n \n .. versionadded:: 1.8.0\n \n See Also\n --------\n numpy.argpartition : equivalent function\n \"\"\"\n pass\n\n def argsort(self, axis=-1, kind='quicksort', order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.argsort(axis=-1, kind='quicksort', order=None)\n \n Returns the indices that would sort this array.\n \n Refer to `numpy.argsort` for full documentation.\n \n See Also\n --------\n numpy.argsort : equivalent function\n \"\"\"\n pass\n\n def astype(self, dtype, order='K', casting='unsafe', subok=True, copy=True): # real signature unknown; restored from __doc__\n \"\"\"\n a.astype(dtype, order='K', casting='unsafe', subok=True, copy=True)\n \n Copy of the array, cast to a specified type.\n \n Parameters\n ----------\n dtype : str or dtype\n Typecode or data-type to which the array is cast.\n order : {'C', 'F', 'A', 'K'}, optional\n Controls the memory layout order of the result.\n 'C' means C order, 'F' means Fortran order, 'A'\n means 'F' order if all the arrays are Fortran contiguous,\n 'C' order otherwise, and 'K' means as close to the\n order the array elements appear in memory as possible.\n Default is 'K'.\n casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional\n Controls what kind of data casting may occur. Defaults to 'unsafe'\n for backwards compatibility.\n \n * 'no' means the data types should not be cast at all.\n * 'equiv' means only byte-order changes are allowed.\n * 'safe' means only casts which can preserve values are allowed.\n * 'same_kind' means only safe casts or casts within a kind,\n like float64 to float32, are allowed.\n * 'unsafe' means any data conversions may be done.\n subok : bool, optional\n If True, then sub-classes will be passed-through (default), otherwise\n the returned array will be forced to be a base-class array.\n copy : bool, optional\n By default, astype always returns a newly allocated array. If this\n is set to false, and the `dtype`, `order`, and `subok`\n requirements are satisfied, the input array is returned instead\n of a copy.\n \n Returns\n -------\n arr_t : ndarray\n Unless `copy` is False and the other conditions for returning the input\n array are satisfied (see description for `copy` input parameter), `arr_t`\n is a new array of the same shape as the input array, with dtype, order\n given by `dtype`, `order`.\n \n Notes\n -----\n Starting in NumPy 1.9, astype method now returns an error if the string\n dtype to cast to is not long enough in 'safe' casting mode to hold the max\n value of integer/float array that is being casted. Previously the casting\n was allowed even if the result was truncated.\n \n Raises\n ------\n ComplexWarning\n When casting from complex to float or int. To avoid this,\n one should use ``a.real.astype(t)``.\n \n Examples\n --------\n >>> x = np.array([1, 2, 2.5])\n >>> x\n array([ 1. , 2. , 2.5])\n \n >>> x.astype(int)\n array([1, 2, 2])\n \"\"\"\n pass\n\n def byteswap(self, inplace): # real signature unknown; restored from __doc__\n \"\"\"\n a.byteswap(inplace)\n \n Swap the bytes of the array elements\n \n Toggle between low-endian and big-endian data representation by\n returning a byteswapped array, optionally swapped in-place.\n \n Parameters\n ----------\n inplace : bool, optional\n If ``True``, swap bytes in-place, default is ``False``.\n \n Returns\n -------\n out : ndarray\n The byteswapped array. If `inplace` is ``True``, this is\n a view to self.\n \n Examples\n --------\n >>> A = np.array([1, 256, 8755], dtype=np.int16)\n >>> map(hex, A)\n ['0x1', '0x100', '0x2233']\n >>> A.byteswap(True)\n array([ 256, 1, 13090], dtype=int16)\n >>> map(hex, A)\n ['0x100', '0x1', '0x3322']\n \n Arrays of strings are not swapped\n \n >>> A = np.array(['ceg', 'fac'])\n >>> A.byteswap()\n array(['ceg', 'fac'],\n dtype='|S3')\n \"\"\"\n pass\n\n def choose(self, choices, out=None, mode='raise'): # real signature unknown; restored from __doc__\n \"\"\"\n a.choose(choices, out=None, mode='raise')\n \n Use an index array to construct a new array from a set of choices.\n \n Refer to `numpy.choose` for full documentation.\n \n See Also\n --------\n numpy.choose : equivalent function\n \"\"\"\n pass\n\n def clip(self, min=None, max=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.clip(min=None, max=None, out=None)\n \n Return an array whose values are limited to ``[min, max]``.\n One of max or min must be given.\n \n Refer to `numpy.clip` for full documentation.\n \n See Also\n --------\n numpy.clip : equivalent function\n \"\"\"\n pass\n\n def compress(self, condition, axis=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.compress(condition, axis=None, out=None)\n \n Return selected slices of this array along given axis.\n \n Refer to `numpy.compress` for full documentation.\n \n See Also\n --------\n numpy.compress : equivalent function\n \"\"\"\n pass\n\n def conj(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.conj()\n \n Complex-conjugate all elements.\n \n Refer to `numpy.conjugate` for full documentation.\n \n See Also\n --------\n numpy.conjugate : equivalent function\n \"\"\"\n pass\n\n def conjugate(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.conjugate()\n \n Return the complex conjugate, element-wise.\n \n Refer to `numpy.conjugate` for full documentation.\n \n See Also\n --------\n numpy.conjugate : equivalent function\n \"\"\"\n pass\n\n def copy(self, order='C'): # real signature unknown; restored from __doc__\n \"\"\"\n a.copy(order='C')\n \n Return a copy of the array.\n \n Parameters\n ----------\n order : {'C', 'F', 'A', 'K'}, optional\n Controls the memory layout of the copy. 'C' means C-order,\n 'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,\n 'C' otherwise. 'K' means match the layout of `a` as closely\n as possible. (Note that this function and :func:numpy.copy are very\n similar, but have different default values for their order=\n arguments.)\n \n See also\n --------\n numpy.copy\n numpy.copyto\n \n Examples\n --------\n >>> x = np.array([[1,2,3],[4,5,6]], order='F')\n \n >>> y = x.copy()\n \n >>> x.fill(0)\n \n >>> x\n array([[0, 0, 0],\n [0, 0, 0]])\n \n >>> y\n array([[1, 2, 3],\n [4, 5, 6]])\n \n >>> y.flags['C_CONTIGUOUS']\n True\n \"\"\"\n pass\n\n def cumprod(self, axis=None, dtype=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.cumprod(axis=None, dtype=None, out=None)\n \n Return the cumulative product of the elements along the given axis.\n \n Refer to `numpy.cumprod` for full documentation.\n \n See Also\n --------\n numpy.cumprod : equivalent function\n \"\"\"\n pass\n\n def cumsum(self, axis=None, dtype=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.cumsum(axis=None, dtype=None, out=None)\n \n Return the cumulative sum of the elements along the given axis.\n \n Refer to `numpy.cumsum` for full documentation.\n \n See Also\n --------\n numpy.cumsum : equivalent function\n \"\"\"\n pass\n\n def diagonal(self, offset=0, axis1=0, axis2=1): # real signature unknown; restored from __doc__\n \"\"\"\n a.diagonal(offset=0, axis1=0, axis2=1)\n \n Return specified diagonals. In NumPy 1.9 the returned array is a\n read-only view instead of a copy as in previous NumPy versions. In\n a future version the read-only restriction will be removed.\n \n Refer to :func:`numpy.diagonal` for full documentation.\n \n See Also\n --------\n numpy.diagonal : equivalent function\n \"\"\"\n pass\n\n def dot(self, b, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.dot(b, out=None)\n \n Dot product of two arrays.\n \n Refer to `numpy.dot` for full documentation.\n \n See Also\n --------\n numpy.dot : equivalent function\n \n Examples\n --------\n >>> a = np.eye(2)\n >>> b = np.ones((2, 2)) * 2\n >>> a.dot(b)\n array([[ 2., 2.],\n [ 2., 2.]])\n \n This array method can be conveniently chained:\n \n >>> a.dot(b).dot(b)\n array([[ 8., 8.],\n [ 8., 8.]])\n \"\"\"\n pass\n\n def dump(self, file): # real signature unknown; restored from __doc__\n \"\"\"\n a.dump(file)\n \n Dump a pickle of the array to the specified file.\n The array can be read back with pickle.load or numpy.load.\n \n Parameters\n ----------\n file : str\n A string naming the dump file.\n \"\"\"\n pass\n\n def dumps(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.dumps()\n \n Returns the pickle of the array as a string.\n pickle.loads or numpy.loads will convert the string back to an array.\n \n Parameters\n ----------\n None\n \"\"\"\n pass\n\n def fill(self, value): # real signature unknown; restored from __doc__\n \"\"\"\n a.fill(value)\n \n Fill the array with a scalar value.\n \n Parameters\n ----------\n value : scalar\n All elements of `a` will be assigned this value.\n \n Examples\n --------\n >>> a = np.array([1, 2])\n >>> a.fill(0)\n >>> a\n array([0, 0])\n >>> a = np.empty(2)\n >>> a.fill(1)\n >>> a\n array([ 1., 1.])\n \"\"\"\n pass\n\n def flatten(self, order='C'): # real signature unknown; restored from __doc__\n \"\"\"\n a.flatten(order='C')\n \n Return a copy of the array collapsed into one dimension.\n \n Parameters\n ----------\n order : {'C', 'F', 'A', 'K'}, optional\n 'C' means to flatten in row-major (C-style) order.\n 'F' means to flatten in column-major (Fortran-\n style) order. 'A' means to flatten in column-major\n order if `a` is Fortran *contiguous* in memory,\n row-major order otherwise. 'K' means to flatten\n `a` in the order the elements occur in memory.\n The default is 'C'.\n \n Returns\n -------\n y : ndarray\n A copy of the input array, flattened to one dimension.\n \n See Also\n --------\n ravel : Return a flattened array.\n flat : A 1-D flat iterator over the array.\n \n Examples\n --------\n >>> a = np.array([[1,2], [3,4]])\n >>> a.flatten()\n array([1, 2, 3, 4])\n >>> a.flatten('F')\n array([1, 3, 2, 4])\n \"\"\"\n pass\n\n def getfield(self, dtype, offset=0): # real signature unknown; restored from __doc__\n \"\"\"\n a.getfield(dtype, offset=0)\n \n Returns a field of the given array as a certain type.\n \n A field is a view of the array data with a given data-type. The values in\n the view are determined by the given type and the offset into the current\n array in bytes. The offset needs to be such that the view dtype fits in the\n array dtype; for example an array of dtype complex128 has 16-byte elements.\n If taking a view with a 32-bit integer (4 bytes), the offset needs to be\n between 0 and 12 bytes.\n \n Parameters\n ----------\n dtype : str or dtype\n The data type of the view. The dtype size of the view can not be larger\n than that of the array itself.\n offset : int\n Number of bytes to skip before beginning the element view.\n \n Examples\n --------\n >>> x = np.diag([1.+1.j]*2)\n >>> x[1, 1] = 2 + 4.j\n >>> x\n array([[ 1.+1.j, 0.+0.j],\n [ 0.+0.j, 2.+4.j]])\n >>> x.getfield(np.float64)\n array([[ 1., 0.],\n [ 0., 2.]])\n \n By choosing an offset of 8 bytes we can select the complex part of the\n array for our view:\n \n >>> x.getfield(np.float64, offset=8)\n array([[ 1., 0.],\n [ 0., 4.]])\n \"\"\"\n pass\n\n def item(self, *args): # real signature unknown; restored from __doc__\n \"\"\"\n a.item(*args)\n \n Copy an element of an array to a standard Python scalar and return it.\n \n Parameters\n ----------\n \\*args : Arguments (variable number and type)\n \n * none: in this case, the method only works for arrays\n with one element (`a.size == 1`), which element is\n copied into a standard Python scalar object and returned.\n \n * int_type: this argument is interpreted as a flat index into\n the array, specifying which element to copy and return.\n \n * tuple of int_types: functions as does a single int_type argument,\n except that the argument is interpreted as an nd-index into the\n array.\n \n Returns\n -------\n z : Standard Python scalar object\n A copy of the specified element of the array as a suitable\n Python scalar\n \n Notes\n -----\n When the data type of `a` is longdouble or clongdouble, item() returns\n a scalar array object because there is no available Python scalar that\n would not lose information. Void arrays return a buffer object for item(),\n unless fields are defined, in which case a tuple is returned.\n \n `item` is very similar to a[args], except, instead of an array scalar,\n a standard Python scalar is returned. This can be useful for speeding up\n access to elements of the array and doing arithmetic on elements of the\n array using Python's optimized math.\n \n Examples\n --------\n >>> x = np.random.randint(9, size=(3, 3))\n >>> x\n array([[3, 1, 7],\n [2, 8, 3],\n [8, 5, 3]])\n >>> x.item(3)\n 2\n >>> x.item(7)\n 5\n >>> x.item((0, 1))\n 1\n >>> x.item((2, 2))\n 3\n \"\"\"\n pass\n\n def itemset(self, *args): # real signature unknown; restored from __doc__\n \"\"\"\n a.itemset(*args)\n \n Insert scalar into an array (scalar is cast to array's dtype, if possible)\n \n There must be at least 1 argument, and define the last argument\n as *item*. Then, ``a.itemset(*args)`` is equivalent to but faster\n than ``a[args] = item``. The item should be a scalar value and `args`\n must select a single item in the array `a`.\n \n Parameters\n ----------\n \\*args : Arguments\n If one argument: a scalar, only used in case `a` is of size 1.\n If two arguments: the last argument is the value to be set\n and must be a scalar, the first argument specifies a single array\n element location. It is either an int or a tuple.\n \n Notes\n -----\n Compared to indexing syntax, `itemset` provides some speed increase\n for placing a scalar into a particular location in an `ndarray`,\n if you must do this. However, generally this is discouraged:\n among other problems, it complicates the appearance of the code.\n Also, when using `itemset` (and `item`) inside a loop, be sure\n to assign the methods to a local variable to avoid the attribute\n look-up at each loop iteration.\n \n Examples\n --------\n >>> x = np.random.randint(9, size=(3, 3))\n >>> x\n array([[3, 1, 7],\n [2, 8, 3],\n [8, 5, 3]])\n >>> x.itemset(4, 0)\n >>> x.itemset((2, 2), 9)\n >>> x\n array([[3, 1, 7],\n [2, 0, 3],\n [8, 5, 9]])\n \"\"\"\n pass\n\n def max(self, axis=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.max(axis=None, out=None)\n \n Return the maximum along a given axis.\n \n Refer to `numpy.amax` for full documentation.\n \n See Also\n --------\n numpy.amax : equivalent function\n \"\"\"\n pass\n\n def mean(self, axis=None, dtype=None, out=None, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.mean(axis=None, dtype=None, out=None, keepdims=False)\n \n Returns the average of the array elements along given axis.\n \n Refer to `numpy.mean` for full documentation.\n \n See Also\n --------\n numpy.mean : equivalent function\n \"\"\"\n pass\n\n def min(self, axis=None, out=None, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.min(axis=None, out=None, keepdims=False)\n \n Return the minimum along a given axis.\n \n Refer to `numpy.amin` for full documentation.\n \n See Also\n --------\n numpy.amin : equivalent function\n \"\"\"\n pass\n\n def newbyteorder(self, new_order='S'): # real signature unknown; restored from __doc__\n \"\"\"\n arr.newbyteorder(new_order='S')\n \n Return the array with the same data viewed with a different byte order.\n \n Equivalent to::\n \n arr.view(arr.dtype.newbytorder(new_order))\n \n Changes are also made in all fields and sub-arrays of the array data\n type.\n \n \n \n Parameters\n ----------\n new_order : string, optional\n Byte order to force; a value from the byte order specifications\n below. `new_order` codes can be any of:\n \n * 'S' - swap dtype from current to opposite endian\n * {'<', 'L'} - little endian\n * {'>', 'B'} - big endian\n * {'=', 'N'} - native order\n * {'|', 'I'} - ignore (no change to byte order)\n \n The default value ('S') results in swapping the current\n byte order. The code does a case-insensitive check on the first\n letter of `new_order` for the alternatives above. For example,\n any of 'B' or 'b' or 'biggish' are valid to specify big-endian.\n \n \n Returns\n -------\n new_arr : array\n New array object with the dtype reflecting given change to the\n byte order.\n \"\"\"\n pass\n\n def nonzero(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.nonzero()\n \n Return the indices of the elements that are non-zero.\n \n Refer to `numpy.nonzero` for full documentation.\n \n See Also\n --------\n numpy.nonzero : equivalent function\n \"\"\"\n pass\n\n def partition(self, kth, axis=-1, kind='introselect', order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.partition(kth, axis=-1, kind='introselect', order=None)\n \n Rearranges the elements in the array in such a way that value of the\n element in kth position is in the position it would be in a sorted array.\n All elements smaller than the kth element are moved before this element and\n all equal or greater are moved behind it. The ordering of the elements in\n the two partitions is undefined.\n \n .. versionadded:: 1.8.0\n \n Parameters\n ----------\n kth : int or sequence of ints\n Element index to partition by. The kth element value will be in its\n final sorted position and all smaller elements will be moved before it\n and all equal or greater elements behind it.\n The order all elements in the partitions is undefined.\n If provided with a sequence of kth it will partition all elements\n indexed by kth of them into their sorted position at once.\n axis : int, optional\n Axis along which to sort. Default is -1, which means sort along the\n last axis.\n kind : {'introselect'}, optional\n Selection algorithm. Default is 'introselect'.\n order : str or list of str, optional\n When `a` is an array with fields defined, this argument specifies\n which fields to compare first, second, etc. A single field can\n be specified as a string, and not all fields need be specified,\n but unspecified fields will still be used, in the order in which\n they come up in the dtype, to break ties.\n \n See Also\n --------\n numpy.partition : Return a parititioned copy of an array.\n argpartition : Indirect partition.\n sort : Full sort.\n \n Notes\n -----\n See ``np.partition`` for notes on the different algorithms.\n \n Examples\n --------\n >>> a = np.array([3, 4, 2, 1])\n >>> a.partition(3)\n >>> a\n array([2, 1, 3, 4])\n \n >>> a.partition((1, 3))\n array([1, 2, 3, 4])\n \"\"\"\n pass\n\n def prod(self, axis=None, dtype=None, out=None, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.prod(axis=None, dtype=None, out=None, keepdims=False)\n \n Return the product of the array elements over the given axis\n \n Refer to `numpy.prod` for full documentation.\n \n See Also\n --------\n numpy.prod : equivalent function\n \"\"\"\n pass\n\n def ptp(self, axis=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.ptp(axis=None, out=None)\n \n Peak to peak (maximum - minimum) value along a given axis.\n \n Refer to `numpy.ptp` for full documentation.\n \n See Also\n --------\n numpy.ptp : equivalent function\n \"\"\"\n pass\n\n def put(self, indices, values, mode='raise'): # real signature unknown; restored from __doc__\n \"\"\"\n a.put(indices, values, mode='raise')\n \n Set ``a.flat[n] = values[n]`` for all `n` in indices.\n \n Refer to `numpy.put` for full documentation.\n \n See Also\n --------\n numpy.put : equivalent function\n \"\"\"\n pass\n\n def ravel(self, order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.ravel([order])\n \n Return a flattened array.\n \n Refer to `numpy.ravel` for full documentation.\n \n See Also\n --------\n numpy.ravel : equivalent function\n \n ndarray.flat : a flat iterator on the array.\n \"\"\"\n pass\n\n def repeat(self, repeats, axis=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.repeat(repeats, axis=None)\n \n Repeat elements of an array.\n \n Refer to `numpy.repeat` for full documentation.\n \n See Also\n --------\n numpy.repeat : equivalent function\n \"\"\"\n pass\n\n def reshape(self, shape, *shapes, order='C'): # known case of numpy.core.multiarray.ndarray.reshape\n \"\"\"\n a.reshape(shape, order='C')\n \n Returns an array containing the same data with a new shape.\n \n Refer to `numpy.reshape` for full documentation.\n \n See Also\n --------\n numpy.reshape : equivalent function\n \"\"\"\n pass\n\n def resize(self, *new_shape, refcheck=True): # known case of numpy.core.multiarray.ndarray.resize\n \"\"\"\n a.resize(new_shape, refcheck=True)\n \n Change shape and size of array in-place.\n \n Parameters\n ----------\n new_shape : tuple of ints, or `n` ints\n Shape of resized array.\n refcheck : bool, optional\n If False, reference count will not be checked. Default is True.\n \n Returns\n -------\n None\n \n Raises\n ------\n ValueError\n If `a` does not own its own data or references or views to it exist,\n and the data memory must be changed.\n PyPy only: will always raise if the data memory must be changed, since\n there is no reliable way to determine if references or views to it\n exist.\n \n SystemError\n If the `order` keyword argument is specified. This behaviour is a\n bug in NumPy.\n \n See Also\n --------\n resize : Return a new array with the specified shape.\n \n Notes\n -----\n This reallocates space for the data area if necessary.\n \n Only contiguous arrays (data elements consecutive in memory) can be\n resized.\n \n The purpose of the reference count check is to make sure you\n do not use this array as a buffer for another Python object and then\n reallocate the memory. However, reference counts can increase in\n other ways so if you are sure that you have not shared the memory\n for this array with another Python object, then you may safely set\n `refcheck` to False.\n \n Examples\n --------\n Shrinking an array: array is flattened (in the order that the data are\n stored in memory), resized, and reshaped:\n \n >>> a = np.array([[0, 1], [2, 3]], order='C')\n >>> a.resize((2, 1))\n >>> a\n array([[0],\n [1]])\n \n >>> a = np.array([[0, 1], [2, 3]], order='F')\n >>> a.resize((2, 1))\n >>> a\n array([[0],\n [2]])\n \n Enlarging an array: as above, but missing entries are filled with zeros:\n \n >>> b = np.array([[0, 1], [2, 3]])\n >>> b.resize(2, 3) # new_shape parameter doesn't have to be a tuple\n >>> b\n array([[0, 1, 2],\n [3, 0, 0]])\n \n Referencing an array prevents resizing...\n \n >>> c = a\n >>> a.resize((1, 1))\n Traceback (most recent call last):\n ...\n ValueError: cannot resize an array that has been referenced ...\n \n Unless `refcheck` is False:\n \n >>> a.resize((1, 1), refcheck=False)\n >>> a\n array([[0]])\n >>> c\n array([[0]])\n \"\"\"\n pass\n\n def round(self, decimals=0, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.round(decimals=0, out=None)\n \n Return `a` with each element rounded to the given number of decimals.\n \n Refer to `numpy.around` for full documentation.\n \n See Also\n --------\n numpy.around : equivalent function\n \"\"\"\n pass\n\n def searchsorted(self, v, side='left', sorter=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.searchsorted(v, side='left', sorter=None)\n \n Find indices where elements of v should be inserted in a to maintain order.\n \n For full documentation, see `numpy.searchsorted`\n \n See Also\n --------\n numpy.searchsorted : equivalent function\n \"\"\"\n pass\n\n def setfield(self, val, dtype, offset=0): # real signature unknown; restored from __doc__\n \"\"\"\n a.setfield(val, dtype, offset=0)\n \n Put a value into a specified place in a field defined by a data-type.\n \n Place `val` into `a`'s field defined by `dtype` and beginning `offset`\n bytes into the field.\n \n Parameters\n ----------\n val : object\n Value to be placed in field.\n dtype : dtype object\n Data-type of the field in which to place `val`.\n offset : int, optional\n The number of bytes into the field at which to place `val`.\n \n Returns\n -------\n None\n \n See Also\n --------\n getfield\n \n Examples\n --------\n >>> x = np.eye(3)\n >>> x.getfield(np.float64)\n array([[ 1., 0., 0.],\n [ 0., 1., 0.],\n [ 0., 0., 1.]])\n >>> x.setfield(3, np.int32)\n >>> x.getfield(np.int32)\n array([[3, 3, 3],\n [3, 3, 3],\n [3, 3, 3]])\n >>> x\n array([[ 1.00000000e+000, 1.48219694e-323, 1.48219694e-323],\n [ 1.48219694e-323, 1.00000000e+000, 1.48219694e-323],\n [ 1.48219694e-323, 1.48219694e-323, 1.00000000e+000]])\n >>> x.setfield(np.eye(3), np.int32)\n >>> x\n array([[ 1., 0., 0.],\n [ 0., 1., 0.],\n [ 0., 0., 1.]])\n \"\"\"\n pass\n\n def setflags(self, write=None, align=None, uic=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.setflags(write=None, align=None, uic=None)\n \n Set array flags WRITEABLE, ALIGNED, and UPDATEIFCOPY, respectively.\n \n These Boolean-valued flags affect how numpy interprets the memory\n area used by `a` (see Notes below). The ALIGNED flag can only\n be set to True if the data is actually aligned according to the type.\n The UPDATEIFCOPY flag can never be set to True. The flag WRITEABLE\n can only be set to True if the array owns its own memory, or the\n ultimate owner of the memory exposes a writeable buffer interface,\n or is a string. (The exception for string is made so that unpickling\n can be done without copying memory.)\n \n Parameters\n ----------\n write : bool, optional\n Describes whether or not `a` can be written to.\n align : bool, optional\n Describes whether or not `a` is aligned properly for its type.\n uic : bool, optional\n Describes whether or not `a` is a copy of another \"base\" array.\n \n Notes\n -----\n Array flags provide information about how the memory area used\n for the array is to be interpreted. There are 6 Boolean flags\n in use, only three of which can be changed by the user:\n UPDATEIFCOPY, WRITEABLE, and ALIGNED.\n \n WRITEABLE (W) the data area can be written to;\n \n ALIGNED (A) the data and strides are aligned appropriately for the hardware\n (as determined by the compiler);\n \n UPDATEIFCOPY (U) this array is a copy of some other array (referenced\n by .base). When this array is deallocated, the base array will be\n updated with the contents of this array.\n \n All flags can be accessed using their first (upper case) letter as well\n as the full name.\n \n Examples\n --------\n >>> y\n array([[3, 1, 7],\n [2, 0, 0],\n [8, 5, 9]])\n >>> y.flags\n C_CONTIGUOUS : True\n F_CONTIGUOUS : False\n OWNDATA : True\n WRITEABLE : True\n ALIGNED : True\n UPDATEIFCOPY : False\n >>> y.setflags(write=0, align=0)\n >>> y.flags\n C_CONTIGUOUS : True\n F_CONTIGUOUS : False\n OWNDATA : True\n WRITEABLE : False\n ALIGNED : False\n UPDATEIFCOPY : False\n >>> y.setflags(uic=1)\n Traceback (most recent call last):\n File \"\", line 1, in \n ValueError: cannot set UPDATEIFCOPY flag to True\n \"\"\"\n pass\n\n def sort(self, axis=-1, kind='quicksort', order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.sort(axis=-1, kind='quicksort', order=None)\n \n Sort an array, in-place.\n \n Parameters\n ----------\n axis : int, optional\n Axis along which to sort. Default is -1, which means sort along the\n last axis.\n kind : {'quicksort', 'mergesort', 'heapsort'}, optional\n Sorting algorithm. Default is 'quicksort'.\n order : str or list of str, optional\n When `a` is an array with fields defined, this argument specifies\n which fields to compare first, second, etc. A single field can\n be specified as a string, and not all fields need be specified,\n but unspecified fields will still be used, in the order in which\n they come up in the dtype, to break ties.\n \n See Also\n --------\n numpy.sort : Return a sorted copy of an array.\n argsort : Indirect sort.\n lexsort : Indirect stable sort on multiple keys.\n searchsorted : Find elements in sorted array.\n partition: Partial sort.\n \n Notes\n -----\n See ``sort`` for notes on the different sorting algorithms.\n \n Examples\n --------\n >>> a = np.array([[1,4], [3,1]])\n >>> a.sort(axis=1)\n >>> a\n array([[1, 4],\n [1, 3]])\n >>> a.sort(axis=0)\n >>> a\n array([[1, 3],\n [1, 4]])\n \n Use the `order` keyword to specify a field to use when sorting a\n structured array:\n \n >>> a = np.array([('a', 2), ('c', 1)], dtype=[('x', 'S1'), ('y', int)])\n >>> a.sort(order='y')\n >>> a\n array([('c', 1), ('a', 2)],\n dtype=[('x', '|S1'), ('y', '>> x = np.array([[0, 1], [2, 3]])\n >>> x.tobytes()\n b'\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x03\\x00\\x00\\x00'\n >>> x.tobytes('C') == x.tobytes()\n True\n >>> x.tobytes('F')\n b'\\x00\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x03\\x00\\x00\\x00'\n \"\"\"\n pass\n\n def tofile(self, fid, sep=\"\", format=\"%s\"): # real signature unknown; restored from __doc__\n \"\"\"\n a.tofile(fid, sep=\"\", format=\"%s\")\n \n Write array to a file as text or binary (default).\n \n Data is always written in 'C' order, independent of the order of `a`.\n The data produced by this method can be recovered using the function\n fromfile().\n \n Parameters\n ----------\n fid : file or str\n An open file object, or a string containing a filename.\n sep : str\n Separator between array items for text output.\n If \"\" (empty), a binary file is written, equivalent to\n ``file.write(a.tobytes())``.\n format : str\n Format string for text file output.\n Each entry in the array is formatted to text by first converting\n it to the closest Python type, and then using \"format\" % item.\n \n Notes\n -----\n This is a convenience function for quick storage of array data.\n Information on endianness and precision is lost, so this method is not a\n good choice for files intended to archive data or transport data between\n machines with different endianness. Some of these problems can be overcome\n by outputting the data as text files, at the expense of speed and file\n size.\n \"\"\"\n pass\n\n def tolist(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.tolist()\n \n Return the array as a (possibly nested) list.\n \n Return a copy of the array data as a (nested) Python list.\n Data items are converted to the nearest compatible Python type.\n \n Parameters\n ----------\n none\n \n Returns\n -------\n y : list\n The possibly nested list of array elements.\n \n Notes\n -----\n The array may be recreated, ``a = np.array(a.tolist())``.\n \n Examples\n --------\n >>> a = np.array([1, 2])\n >>> a.tolist()\n [1, 2]\n >>> a = np.array([[1, 2], [3, 4]])\n >>> list(a)\n [array([1, 2]), array([3, 4])]\n >>> a.tolist()\n [[1, 2], [3, 4]]\n \"\"\"\n pass\n\n def tostring(self, order='C'): # real signature unknown; restored from __doc__\n \"\"\"\n a.tostring(order='C')\n \n Construct Python bytes containing the raw data bytes in the array.\n \n Constructs Python bytes showing a copy of the raw contents of\n data memory. The bytes object can be produced in either 'C' or 'Fortran',\n or 'Any' order (the default is 'C'-order). 'Any' order means C-order\n unless the F_CONTIGUOUS flag in the array is set, in which case it\n means 'Fortran' order.\n \n This function is a compatibility alias for tobytes. Despite its name it returns bytes not strings.\n \n Parameters\n ----------\n order : {'C', 'F', None}, optional\n Order of the data for multidimensional arrays:\n C, Fortran, or the same as for the original array.\n \n Returns\n -------\n s : bytes\n Python bytes exhibiting a copy of `a`'s raw data.\n \n Examples\n --------\n >>> x = np.array([[0, 1], [2, 3]])\n >>> x.tobytes()\n b'\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x03\\x00\\x00\\x00'\n >>> x.tobytes('C') == x.tobytes()\n True\n >>> x.tobytes('F')\n b'\\x00\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x03\\x00\\x00\\x00'\n \"\"\"\n pass\n\n def trace(self, offset=0, axis1=0, axis2=1, dtype=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None)\n \n Return the sum along diagonals of the array.\n \n Refer to `numpy.trace` for full documentation.\n \n See Also\n --------\n numpy.trace : equivalent function\n \"\"\"\n pass\n\n def transpose(self, *axes): # real signature unknown; restored from __doc__\n \"\"\"\n a.transpose(*axes)\n \n Returns a view of the array with axes transposed.\n \n For a 1-D array, this has no effect. (To change between column and\n row vectors, first cast the 1-D array into a matrix object.)\n For a 2-D array, this is the usual matrix transpose.\n For an n-D array, if axes are given, their order indicates how the\n axes are permuted (see Examples). If axes are not provided and\n ``a.shape = (i[0], i[1], ... i[n-2], i[n-1])``, then\n ``a.transpose().shape = (i[n-1], i[n-2], ... i[1], i[0])``.\n \n Parameters\n ----------\n axes : None, tuple of ints, or `n` ints\n \n * None or no argument: reverses the order of the axes.\n \n * tuple of ints: `i` in the `j`-th place in the tuple means `a`'s\n `i`-th axis becomes `a.transpose()`'s `j`-th axis.\n \n * `n` ints: same as an n-tuple of the same ints (this form is\n intended simply as a \"convenience\" alternative to the tuple form)\n \n Returns\n -------\n out : ndarray\n View of `a`, with axes suitably permuted.\n \n See Also\n --------\n ndarray.T : Array property returning the array transposed.\n \n Examples\n --------\n >>> a = np.array([[1, 2], [3, 4]])\n >>> a\n array([[1, 2],\n [3, 4]])\n >>> a.transpose()\n array([[1, 3],\n [2, 4]])\n >>> a.transpose((1, 0))\n array([[1, 3],\n [2, 4]])\n >>> a.transpose(1, 0)\n array([[1, 3],\n [2, 4]])\n \"\"\"\n pass\n\n def var(self, axis=None, dtype=None, out=None, ddof=0, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.var(axis=None, dtype=None, out=None, ddof=0, keepdims=False)\n \n Returns the variance of the array elements, along given axis.\n \n Refer to `numpy.var` for full documentation.\n \n See Also\n --------\n numpy.var : equivalent function\n \"\"\"\n pass\n\n def view(self, dtype=None, type=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.view(dtype=None, type=None)\n \n New view of array with the same data.\n \n Parameters\n ----------\n dtype : data-type or ndarray sub-class, optional\n Data-type descriptor of the returned view, e.g., float32 or int16. The\n default, None, results in the view having the same data-type as `a`.\n This argument can also be specified as an ndarray sub-class, which\n then specifies the type of the returned object (this is equivalent to\n setting the ``type`` parameter).\n type : Python type, optional\n Type of the returned view, e.g., ndarray or matrix. Again, the\n default None results in type preservation.\n \n Notes\n -----\n ``a.view()`` is used two different ways:\n \n ``a.view(some_dtype)`` or ``a.view(dtype=some_dtype)`` constructs a view\n of the array's memory with a different data-type. This can cause a\n reinterpretation of the bytes of memory.\n \n ``a.view(ndarray_subclass)`` or ``a.view(type=ndarray_subclass)`` just\n returns an instance of `ndarray_subclass` that looks at the same array\n (same shape, dtype, etc.) This does not cause a reinterpretation of the\n memory.\n \n For ``a.view(some_dtype)``, if ``some_dtype`` has a different number of\n bytes per entry than the previous dtype (for example, converting a\n regular array to a structured array), then the behavior of the view\n cannot be predicted just from the superficial appearance of ``a`` (shown\n by ``print(a)``). It also depends on exactly how ``a`` is stored in\n memory. Therefore if ``a`` is C-ordered versus fortran-ordered, versus\n defined as a slice or transpose, etc., the view may give different\n results.\n \n \n Examples\n --------\n >>> x = np.array([(1, 2)], dtype=[('a', np.int8), ('b', np.int8)])\n \n Viewing array data using a different type and dtype:\n \n >>> y = x.view(dtype=np.int16, type=np.matrix)\n >>> y\n matrix([[513]], dtype=int16)\n >>> print(type(y))\n \n \n Creating a view on a structured array so it can be used in calculations\n \n >>> x = np.array([(1, 2),(3,4)], dtype=[('a', np.int8), ('b', np.int8)])\n >>> xv = x.view(dtype=np.int8).reshape(-1,2)\n >>> xv\n array([[1, 2],\n [3, 4]], dtype=int8)\n >>> xv.mean(0)\n array([ 2., 3.])\n \n Making changes to the view changes the underlying array\n \n >>> xv[0,1] = 20\n >>> print(x)\n [(1, 20) (3, 4)]\n \n Using a view to convert an array to a recarray:\n \n >>> z = x.view(np.recarray)\n >>> z.a\n array([1], dtype=int8)\n \n Views share data:\n \n >>> x[0] = (9, 10)\n >>> z[0]\n (9, 10)\n \n Views that change the dtype size (bytes per entry) should normally be\n avoided on arrays defined by slices, transposes, fortran-ordering, etc.:\n \n >>> x = np.array([[1,2,3],[4,5,6]], dtype=np.int16)\n >>> y = x[:, 0:2]\n >>> y\n array([[1, 2],\n [4, 5]], dtype=int16)\n >>> y.view(dtype=[('width', np.int16), ('length', np.int16)])\n Traceback (most recent call last):\n File \"\", line 1, in \n ValueError: new type not compatible with array.\n >>> z = y.copy()\n >>> z.view(dtype=[('width', np.int16), ('length', np.int16)])\n array([[(1, 2)],\n [(4, 5)]], dtype=[('width', ' Object of same type as ndarray object obj. \"\"\"\n pass\n\n def __array_wrap__(self, obj): # real signature unknown; restored from __doc__\n \"\"\" a.__array_wrap__(obj) -> Object of same type as ndarray object a. \"\"\"\n pass\n\n def __array__(self, dtype=None): # known case of numpy.core.multiarray.ndarray.__array__\n \"\"\"\n a.__array__(|dtype) -> reference if type unchanged, copy otherwise.\n \n Returns either a new reference to self if dtype is not given or a new array\n of provided data type if dtype is different from the current dtype of the\n array.\n \"\"\"\n pass\n\n def __bool__(self, *args, **kwargs): # real signature unknown\n \"\"\" self != 0 \"\"\"\n pass\n\n def __complex__(self, *args, **kwargs): # real signature unknown\n pass\n\n def __contains__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return key in self. \"\"\"\n pass\n\n def __copy__(self, order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.__copy__([order])\n \n Return a copy of the array.\n \n Parameters\n ----------\n order : {'C', 'F', 'A'}, optional\n If order is 'C' (False) then the result is contiguous (default).\n If order is 'Fortran' (True) then the result has fortran order.\n If order is 'Any' (None) then the result has fortran order\n only if the array already is in fortran order.\n \"\"\"\n pass\n\n def __deepcopy__(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.__deepcopy__() -> Deep copy of array.\n \n Used if copy.deepcopy is called on an array.\n \"\"\"\n pass\n\n def __delitem__(self, *args, **kwargs): # real signature unknown\n \"\"\" Delete self[key]. \"\"\"\n pass\n\n def __divmod__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return divmod(self, value). \"\"\"\n pass\n\n def __eq__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self==value. \"\"\"\n pass\n\n def __float__(self, *args, **kwargs): # real signature unknown\n \"\"\" float(self) \"\"\"\n pass\n\n def __floordiv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self//value. \"\"\"\n pass\n\n def __getitem__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self[key]. \"\"\"\n pass\n\n def __ge__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self>=value. \"\"\"\n pass\n\n def __gt__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self>value. \"\"\"\n pass\n\n def __iadd__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self+=value. \"\"\"\n pass\n\n def __iand__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self&=value. \"\"\"\n pass\n\n def __ifloordiv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self//=value. \"\"\"\n pass\n\n def __ilshift__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self<<=value. \"\"\"\n pass\n\n def __imatmul__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self@=value. \"\"\"\n pass\n\n def __imod__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self%=value. \"\"\"\n pass\n\n def __imul__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self*=value. \"\"\"\n pass\n\n def __index__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self converted to an integer, if self is suitable for use as an index into a list. \"\"\"\n pass\n\n def __init__(self, shape, dtype=None, buffer=None, offset=0, strides=None, order=None): # real signature unknown; restored from __doc__\n pass\n\n def __int__(self, *args, **kwargs): # real signature unknown\n \"\"\" int(self) \"\"\"\n pass\n\n def __invert__(self, *args, **kwargs): # real signature unknown\n \"\"\" ~self \"\"\"\n pass\n\n def __ior__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self|=value. \"\"\"\n pass\n\n def __ipow__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self**=value. \"\"\"\n pass\n\n def __irshift__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self>>=value. \"\"\"\n pass\n\n def __isub__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self-=value. \"\"\"\n pass\n\n def __iter__(self, *args, **kwargs): # real signature unknown\n \"\"\" Implement iter(self). \"\"\"\n pass\n\n def __itruediv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self/=value. \"\"\"\n pass\n\n def __ixor__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self^=value. \"\"\"\n pass\n\n def __len__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return len(self). \"\"\"\n pass\n\n def __le__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self<=value. \"\"\"\n pass\n\n def __lshift__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self<>self. \"\"\"\n pass\n\n def __rshift__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self>>value. \"\"\"\n pass\n\n def __rsub__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value-self. \"\"\"\n pass\n\n def __rtruediv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value/self. \"\"\"\n pass\n\n def __rxor__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value^self. \"\"\"\n pass\n\n def __setitem__(self, *args, **kwargs): # real signature unknown\n \"\"\" Set self[key] to value. \"\"\"\n pass\n\n def __setstate__(self, version, shape, dtype, isfortran, rawdata): # real signature unknown; restored from __doc__\n \"\"\"\n a.__setstate__(version, shape, dtype, isfortran, rawdata)\n \n For unpickling.\n \n Parameters\n ----------\n version : int\n optional pickle version. If omitted defaults to 0.\n shape : tuple\n dtype : data-type\n isFortran : bool\n rawdata : string or list\n a binary string with the data (or a list if 'a' is an object array)\n \"\"\"\n pass\n\n def __sizeof__(self, *args, **kwargs): # real signature unknown\n pass\n\n def __str__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return str(self). \"\"\"\n pass\n\n def __sub__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self-value. \"\"\"\n pass\n\n def __truediv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self/value. \"\"\"\n pass\n\n def __xor__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self^value. \"\"\"\n pass\n\n base = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Base object if memory is from some other object.\n\n Examples\n --------\n The base of an array that owns its memory is None:\n\n >>> x = np.array([1,2,3,4])\n >>> x.base is None\n True\n\n Slicing creates a view, whose memory is shared with x:\n\n >>> y = x[2:]\n >>> y.base is x\n True\"\"\"\n\n ctypes = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"An object to simplify the interaction of the array with the ctypes\n module.\n\n This attribute creates an object that makes it easier to use arrays\n when calling shared libraries with the ctypes module. The returned\n object has, among others, data, shape, and strides attributes (see\n Notes below) which themselves return ctypes objects that can be used\n as arguments to a shared library.\n\n Parameters\n ----------\n None\n\n Returns\n -------\n c : Python object\n Possessing attributes data, shape, strides, etc.\n\n See Also\n --------\n numpy.ctypeslib\n\n Notes\n -----\n Below are the public attributes of this object which were documented\n in \"Guide to NumPy\" (we have omitted undocumented public attributes,\n as well as documented private attributes):\n\n * data: A pointer to the memory area of the array as a Python integer.\n This memory area may contain data that is not aligned, or not in correct\n byte-order. The memory area may not even be writeable. The array\n flags and data-type of this array should be respected when passing this\n attribute to arbitrary C-code to avoid trouble that can include Python\n crashing. User Beware! The value of this attribute is exactly the same\n as self._array_interface_['data'][0].\n\n * shape (c_intp*self.ndim): A ctypes array of length self.ndim where\n the basetype is the C-integer corresponding to dtype('p') on this\n platform. This base-type could be c_int, c_long, or c_longlong\n depending on the platform. The c_intp type is defined accordingly in\n numpy.ctypeslib. The ctypes array contains the shape of the underlying\n array.\n\n * strides (c_intp*self.ndim): A ctypes array of length self.ndim where\n the basetype is the same as for the shape attribute. This ctypes array\n contains the strides information from the underlying array. This strides\n information is important for showing how many bytes must be jumped to\n get to the next element in the array.\n\n * data_as(obj): Return the data pointer cast to a particular c-types object.\n For example, calling self._as_parameter_ is equivalent to\n self.data_as(ctypes.c_void_p). Perhaps you want to use the data as a\n pointer to a ctypes array of floating-point data:\n self.data_as(ctypes.POINTER(ctypes.c_double)).\n\n * shape_as(obj): Return the shape tuple as an array of some other c-types\n type. For example: self.shape_as(ctypes.c_short).\n\n * strides_as(obj): Return the strides tuple as an array of some other\n c-types type. For example: self.strides_as(ctypes.c_longlong).\n\n Be careful using the ctypes attribute - especially on temporary\n arrays or arrays constructed on the fly. For example, calling\n ``(a+b).ctypes.data_as(ctypes.c_void_p)`` returns a pointer to memory\n that is invalid because the array created as (a+b) is deallocated\n before the next Python statement. You can avoid this problem using\n either ``c=a+b`` or ``ct=(a+b).ctypes``. In the latter case, ct will\n hold a reference to the array until ct is deleted or re-assigned.\n\n If the ctypes module is not available, then the ctypes attribute\n of array objects still returns something useful, but ctypes objects\n are not returned and errors may be raised instead. In particular,\n the object will still have the as parameter attribute which will\n return an integer equal to the data attribute.\n\n Examples\n --------\n >>> import ctypes\n >>> x\n array([[0, 1],\n [2, 3]])\n >>> x.ctypes.data\n 30439712\n >>> x.ctypes.data_as(ctypes.POINTER(ctypes.c_long))\n \n >>> x.ctypes.data_as(ctypes.POINTER(ctypes.c_long)).contents\n c_long(0)\n >>> x.ctypes.data_as(ctypes.POINTER(ctypes.c_longlong)).contents\n c_longlong(4294967296L)\n >>> x.ctypes.shape\n \n >>> x.ctypes.shape_as(ctypes.c_long)\n \n >>> x.ctypes.strides\n \n >>> x.ctypes.strides_as(ctypes.c_longlong)\n \"\"\"\n\n data = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Python buffer object pointing to the start of the array's data.\"\"\"\n\n dtype = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Data-type of the array's elements.\n\n Parameters\n ----------\n None\n\n Returns\n -------\n d : numpy dtype object\n\n See Also\n --------\n numpy.dtype\n\n Examples\n --------\n >>> x\n array([[0, 1],\n [2, 3]])\n >>> x.dtype\n dtype('int32')\n >>> type(x.dtype)\n \"\"\"\n\n flags = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Information about the memory layout of the array.\n\n Attributes\n ----------\n C_CONTIGUOUS (C)\n The data is in a single, C-style contiguous segment.\n F_CONTIGUOUS (F)\n The data is in a single, Fortran-style contiguous segment.\n OWNDATA (O)\n The array owns the memory it uses or borrows it from another object.\n WRITEABLE (W)\n The data area can be written to. Setting this to False locks\n the data, making it read-only. A view (slice, etc.) inherits WRITEABLE\n from its base array at creation time, but a view of a writeable\n array may be subsequently locked while the base array remains writeable.\n (The opposite is not true, in that a view of a locked array may not\n be made writeable. However, currently, locking a base object does not\n lock any views that already reference it, so under that circumstance it\n is possible to alter the contents of a locked array via a previously\n created writeable view onto it.) Attempting to change a non-writeable\n array raises a RuntimeError exception.\n ALIGNED (A)\n The data and all elements are aligned appropriately for the hardware.\n UPDATEIFCOPY (U)\n This array is a copy of some other array. When this array is\n deallocated, the base array will be updated with the contents of\n this array.\n FNC\n F_CONTIGUOUS and not C_CONTIGUOUS.\n FORC\n F_CONTIGUOUS or C_CONTIGUOUS (one-segment test).\n BEHAVED (B)\n ALIGNED and WRITEABLE.\n CARRAY (CA)\n BEHAVED and C_CONTIGUOUS.\n FARRAY (FA)\n BEHAVED and F_CONTIGUOUS and not C_CONTIGUOUS.\n\n Notes\n -----\n The `flags` object can be accessed dictionary-like (as in ``a.flags['WRITEABLE']``),\n or by using lowercased attribute names (as in ``a.flags.writeable``). Short flag\n names are only supported in dictionary access.\n\n Only the UPDATEIFCOPY, WRITEABLE, and ALIGNED flags can be changed by\n the user, via direct assignment to the attribute or dictionary entry,\n or by calling `ndarray.setflags`.\n\n The array flags cannot be set arbitrarily:\n\n - UPDATEIFCOPY can only be set ``False``.\n - ALIGNED can only be set ``True`` if the data is truly aligned.\n - WRITEABLE can only be set ``True`` if the array owns its own memory\n or the ultimate owner of the memory exposes a writeable buffer\n interface or is a string.\n\n Arrays can be both C-style and Fortran-style contiguous simultaneously.\n This is clear for 1-dimensional arrays, but can also be true for higher\n dimensional arrays.\n\n Even for contiguous arrays a stride for a given dimension\n ``arr.strides[dim]`` may be *arbitrary* if ``arr.shape[dim] == 1``\n or the array has no elements.\n It does *not* generally hold that ``self.strides[-1] == self.itemsize``\n for C-style contiguous arrays or ``self.strides[0] == self.itemsize`` for\n Fortran-style contiguous arrays is true.\"\"\"\n\n flat = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"A 1-D iterator over the array.\n\n This is a `numpy.flatiter` instance, which acts similarly to, but is not\n a subclass of, Python's built-in iterator object.\n\n See Also\n --------\n flatten : Return a copy of the array collapsed into one dimension.\n\n flatiter\n\n Examples\n --------\n >>> x = np.arange(1, 7).reshape(2, 3)\n >>> x\n array([[1, 2, 3],\n [4, 5, 6]])\n >>> x.flat[3]\n 4\n >>> x.T\n array([[1, 4],\n [2, 5],\n [3, 6]])\n >>> x.T.flat[3]\n 5\n >>> type(x.flat)\n \n\n An assignment example:\n\n >>> x.flat = 3; x\n array([[3, 3, 3],\n [3, 3, 3]])\n >>> x.flat[[1,4]] = 1; x\n array([[3, 1, 3],\n [3, 1, 3]])\"\"\"\n\n imag = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"The imaginary part of the array.\n\n Examples\n --------\n >>> x = np.sqrt([1+0j, 0+1j])\n >>> x.imag\n array([ 0. , 0.70710678])\n >>> x.imag.dtype\n dtype('float64')\"\"\"\n\n itemsize = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Length of one array element in bytes.\n\n Examples\n --------\n >>> x = np.array([1,2,3], dtype=np.float64)\n >>> x.itemsize\n 8\n >>> x = np.array([1,2,3], dtype=np.complex128)\n >>> x.itemsize\n 16\"\"\"\n\n nbytes = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Total bytes consumed by the elements of the array.\n\n Notes\n -----\n Does not include memory consumed by non-element attributes of the\n array object.\n\n Examples\n --------\n >>> x = np.zeros((3,5,2), dtype=np.complex128)\n >>> x.nbytes\n 480\n >>> np.prod(x.shape) * x.itemsize\n 480\"\"\"\n\n ndim = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Number of array dimensions.\n\n Examples\n --------\n >>> x = np.array([1, 2, 3])\n >>> x.ndim\n 1\n >>> y = np.zeros((2, 3, 4))\n >>> y.ndim\n 3\"\"\"\n\n real = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"The real part of the array.\n\n Examples\n --------\n >>> x = np.sqrt([1+0j, 0+1j])\n >>> x.real\n array([ 1. , 0.70710678])\n >>> x.real.dtype\n dtype('float64')\n\n See Also\n --------\n numpy.real : equivalent function\"\"\"\n\n shape = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Tuple of array dimensions.\n\n Notes\n -----\n May be used to \"reshape\" the array, as long as this would not\n require a change in the total number of elements\n\n Examples\n --------\n >>> x = np.array([1, 2, 3, 4])\n >>> x.shape\n (4,)\n >>> y = np.zeros((2, 3, 4))\n >>> y.shape\n (2, 3, 4)\n >>> y.shape = (3, 8)\n >>> y\n array([[ 0., 0., 0., 0., 0., 0., 0., 0.],\n [ 0., 0., 0., 0., 0., 0., 0., 0.],\n [ 0., 0., 0., 0., 0., 0., 0., 0.]])\n >>> y.shape = (3, 6)\n Traceback (most recent call last):\n File \"\", line 1, in \n ValueError: total size of new array must be unchanged\"\"\"\n\n size = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Number of elements in the array.\n\n Equivalent to ``np.prod(a.shape)``, i.e., the product of the array's\n dimensions.\n\n Examples\n --------\n >>> x = np.zeros((3, 5, 2), dtype=np.complex128)\n >>> x.size\n 30\n >>> np.prod(x.shape)\n 30\"\"\"\n\n strides = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Tuple of bytes to step in each dimension when traversing an array.\n\n The byte offset of element ``(i[0], i[1], ..., i[n])`` in an array `a`\n is::\n\n offset = sum(np.array(i) * a.strides)\n\n A more detailed explanation of strides can be found in the\n \"ndarray.rst\" file in the NumPy reference guide.\n\n Notes\n -----\n Imagine an array of 32-bit integers (each 4 bytes)::\n\n x = np.array([[0, 1, 2, 3, 4],\n [5, 6, 7, 8, 9]], dtype=np.int32)\n\n This array is stored in memory as 40 bytes, one after the other\n (known as a contiguous block of memory). The strides of an array tell\n us how many bytes we have to skip in memory to move to the next position\n along a certain axis. For example, we have to skip 4 bytes (1 value) to\n move to the next column, but 20 bytes (5 values) to get to the same\n position in the next row. As such, the strides for the array `x` will be\n ``(20, 4)``.\n\n See Also\n --------\n numpy.lib.stride_tricks.as_strided\n\n Examples\n --------\n >>> y = np.reshape(np.arange(2*3*4), (2,3,4))\n >>> y\n array([[[ 0, 1, 2, 3],\n [ 4, 5, 6, 7],\n [ 8, 9, 10, 11]],\n [[12, 13, 14, 15],\n [16, 17, 18, 19],\n [20, 21, 22, 23]]])\n >>> y.strides\n (48, 16, 4)\n >>> y[1,1,1]\n 17\n >>> offset=sum(y.strides * np.array((1,1,1)))\n >>> offset/y.itemsize\n 17\n\n >>> x = np.reshape(np.arange(5*6*7*8), (5,6,7,8)).transpose(2,3,1,0)\n >>> x.strides\n (32, 4, 224, 1344)\n >>> i = np.array([3,5,2,2])\n >>> offset = sum(i * x.strides)\n >>> x[3,5,2,2]\n 813\n >>> offset / x.itemsize\n 813\"\"\"\n\n T = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Same as self.transpose(), except that self is returned if\n self.ndim < 2.\n\n Examples\n --------\n >>> x = np.array([[1.,2.],[3.,4.]])\n >>> x\n array([[ 1., 2.],\n [ 3., 4.]])\n >>> x.T\n array([[ 1., 3.],\n [ 2., 4.]])\n >>> x = np.array([1.,2.,3.,4.])\n >>> x\n array([ 1., 2., 3., 4.])\n >>> x.T\n array([ 1., 2., 3., 4.])\"\"\"\n\n __array_finalize__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"None.\"\"\"\n\n __array_interface__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Array protocol: Python side.\"\"\"\n\n __array_priority__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Array priority.\"\"\"\n\n __array_struct__ = property(lambda self: object(), lambda self, v: None, lambda self: None) # default\n \"\"\"Array protocol: C-struct side.\"\"\"\n\n\n __hash__ = None"},{"col":4,"comment":"Apply a DataFrame -> DataFrame mapping to each group.","endLoc":129,"header":"def apply(\n self, data: DataFrame, func: Callable[..., DataFrame],\n *args, **kwargs,\n ) -> DataFrame","id":477,"name":"apply","nodeType":"Function","startLoc":105,"text":"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 # Implies that we had a MultiIndex so key is iterable\n group_ids = dict(zip(grouper, cast(Iterable, 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)"},{"className":"object","col":0,"comment":"null","endLoc":127,"id":478,"nodeType":"Class","startLoc":90,"text":"class object:\n __doc__: str | None\n __dict__: dict[str, Any]\n __module__: str\n __annotations__: dict[str, Any]\n @property\n def __class__(self) -> type[Self]: ...\n # Ignore errors about type mismatch between property getter and setter\n @__class__.setter\n def __class__(self, __type: type[object]) -> None: ... # noqa: F811\n def __init__(self) -> None: ...\n def __new__(cls) -> Self: ...\n # N.B. `object.__setattr__` and `object.__delattr__` are heavily special-cased by type checkers.\n # Overriding them in subclasses has different semantics, even if the override has an identical signature.\n def __setattr__(self, __name: str, __value: Any) -> None: ...\n def __delattr__(self, __name: str) -> None: ...\n def __eq__(self, __value: object) -> bool: ...\n def __ne__(self, __value: object) -> bool: ...\n def __str__(self) -> str: ... # noqa: Y029\n def __repr__(self) -> str: ... # noqa: Y029\n def __hash__(self) -> int: ...\n def __format__(self, __format_spec: str) -> str: ...\n def __getattribute__(self, __name: str) -> Any: ...\n def __sizeof__(self) -> int: ...\n # return type of pickle methods is rather hard to express in the current type system\n # see #6661 and https://docs.python.org/3/library/pickle.html#object.__reduce__\n def __reduce__(self) -> str | tuple[Any, ...]: ...\n if sys.version_info >= (3, 8):\n def __reduce_ex__(self, __protocol: SupportsIndex) -> str | tuple[Any, ...]: ...\n else:\n def __reduce_ex__(self, __protocol: int) -> str | tuple[Any, ...]: ...\n if sys.version_info >= (3, 11):\n def __getstate__(self) -> object: ...\n\n def __dir__(self) -> Iterable[str]: ...\n def __init_subclass__(cls) -> None: ...\n @classmethod\n def __subclasshook__(cls, __subclass: type) -> bool: ..."},{"col":4,"comment":"null","endLoc":96,"header":"@property\n def __class__(self) -> type[Self]","id":479,"name":"__class__","nodeType":"Function","startLoc":95,"text":"@property\n def __class__(self) -> type[Self]: ..."},{"col":4,"comment":"null","endLoc":99,"header":"@__class__.setter\n def __class__(self, __type: type[object]) -> None","id":480,"name":"__class__","nodeType":"Function","startLoc":98,"text":"@__class__.setter\n def __class__(self, __type: type[object]) -> None: ... # noqa: F811"},{"col":4,"comment":"null","endLoc":100,"header":"def __init__(self) -> None","id":481,"name":"__init__","nodeType":"Function","startLoc":100,"text":"def __init__(self) -> None: ..."},{"col":4,"comment":"null","endLoc":101,"header":"def __new__(cls) -> Self","id":482,"name":"__new__","nodeType":"Function","startLoc":101,"text":"def __new__(cls) -> Self: ..."},{"col":4,"comment":"null","endLoc":104,"header":"def __setattr__(self, __name: str, __value: Any) -> None","id":483,"name":"__setattr__","nodeType":"Function","startLoc":104,"text":"def __setattr__(self, __name: str, __value: Any) -> None: ..."},{"col":4,"comment":"null","endLoc":105,"header":"def __delattr__(self, __name: str) -> None","id":484,"name":"__delattr__","nodeType":"Function","startLoc":105,"text":"def __delattr__(self, __name: str) -> None: ..."},{"col":4,"comment":"null","endLoc":106,"header":"def __eq__(self, __value: object) -> bool","id":485,"name":"__eq__","nodeType":"Function","startLoc":106,"text":"def __eq__(self, __value: object) -> bool: ..."},{"col":4,"comment":"null","endLoc":107,"header":"def __ne__(self, __value: object) -> bool","id":486,"name":"__ne__","nodeType":"Function","startLoc":107,"text":"def __ne__(self, __value: object) -> bool: ..."},{"col":4,"comment":"null","endLoc":108,"header":"def __str__(self) -> str","id":487,"name":"__str__","nodeType":"Function","startLoc":108,"text":"def __str__(self) -> str: ... # noqa: Y029"},{"col":4,"comment":"null","endLoc":109,"header":"def __repr__(self) -> str","id":488,"name":"__repr__","nodeType":"Function","startLoc":109,"text":"def __repr__(self) -> str: ... # noqa: Y029"},{"col":4,"comment":"null","endLoc":110,"header":"def __hash__(self) -> int","id":489,"name":"__hash__","nodeType":"Function","startLoc":110,"text":"def __hash__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":111,"header":"def __format__(self, __format_spec: str) -> str","id":490,"name":"__format__","nodeType":"Function","startLoc":111,"text":"def __format__(self, __format_spec: str) -> str: ..."},{"col":4,"comment":"null","endLoc":112,"header":"def __getattribute__(self, __name: str) -> Any","id":491,"name":"__getattribute__","nodeType":"Function","startLoc":112,"text":"def __getattribute__(self, __name: str) -> Any: ..."},{"col":4,"comment":"null","endLoc":113,"header":"def __sizeof__(self) -> int","id":492,"name":"__sizeof__","nodeType":"Function","startLoc":113,"text":"def __sizeof__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":116,"header":"def __reduce__(self) -> str | tuple[Any, ...]","id":493,"name":"__reduce__","nodeType":"Function","startLoc":116,"text":"def __reduce__(self) -> str | tuple[Any, ...]: ..."},{"col":8,"comment":"null","endLoc":118,"header":"def __reduce_ex__(self, __protocol: SupportsIndex) -> str | tuple[Any, ...]","id":494,"name":"__reduce_ex__","nodeType":"Function","startLoc":118,"text":"def __reduce_ex__(self, __protocol: SupportsIndex) -> str | tuple[Any, ...]: ..."},{"col":8,"comment":"null","endLoc":120,"header":"def __reduce_ex__(self, __protocol: int) -> str | tuple[Any, ...]","id":495,"name":"__reduce_ex__","nodeType":"Function","startLoc":120,"text":"def __reduce_ex__(self, __protocol: int) -> str | tuple[Any, ...]: ..."},{"col":8,"comment":"null","endLoc":122,"header":"def __getstate__(self) -> object","id":496,"name":"__getstate__","nodeType":"Function","startLoc":122,"text":"def __getstate__(self) -> object: ..."},{"col":4,"comment":"null","endLoc":124,"header":"def __dir__(self) -> Iterable[str]","id":497,"name":"__dir__","nodeType":"Function","startLoc":124,"text":"def __dir__(self) -> Iterable[str]: ..."},{"col":4,"comment":"null","endLoc":125,"header":"def __init_subclass__(cls) -> None","id":498,"name":"__init_subclass__","nodeType":"Function","startLoc":125,"text":"def __init_subclass__(cls) -> None: ..."},{"col":4,"comment":"null","endLoc":127,"header":"@classmethod\n def __subclasshook__(cls, __subclass: type) -> bool","id":499,"name":"__subclasshook__","nodeType":"Function","startLoc":126,"text":"@classmethod\n def __subclasshook__(cls, __subclass: type) -> bool: ..."},{"attributeType":"str | None","col":4,"comment":"null","endLoc":91,"id":500,"name":"__doc__","nodeType":"Attribute","startLoc":91,"text":"__doc__"},{"col":4,"comment":"null","endLoc":129,"header":"def __call__(self, data: Series) -> ArrayLike","id":501,"name":"__call__","nodeType":"Function","startLoc":110,"text":"def __call__(self, data: Series) -> ArrayLike:\n\n trans_data: Series | NDArray | list\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 trans_data = np.array([data])\n else:\n trans_data = data\n\n for func in self._pipeline:\n if func is not None:\n trans_data = func(trans_data)\n\n if scalar_data:\n return trans_data[0]\n else:\n return trans_data"},{"className":"_BaseGrid","col":0,"comment":"Base class for grids of subplots.","endLoc":95,"id":502,"nodeType":"Class","startLoc":32,"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\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\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)"},{"col":4,"comment":"Set attributes on each subplot Axes.","endLoc":40,"header":"def set(self, **kwargs)","id":503,"name":"set","nodeType":"Function","startLoc":35,"text":"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"},{"col":4,"comment":"DEPRECATED: prefer the `figure` property.","endLoc":49,"header":"@property\n def fig(self)","id":504,"name":"fig","nodeType":"Function","startLoc":42,"text":"@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"},{"col":4,"comment":"Access the :class:`matplotlib.figure.Figure` object underlying the grid.","endLoc":54,"header":"@property\n def figure(self)","id":505,"name":"figure","nodeType":"Function","startLoc":51,"text":"@property\n def figure(self):\n \"\"\"Access the :class:`matplotlib.figure.Figure` object underlying the grid.\"\"\"\n return self._figure"},{"col":4,"comment":"\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 ","endLoc":69,"header":"def apply(self, func, *args, **kwargs)","id":506,"name":"apply","nodeType":"Function","startLoc":56,"text":"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"},{"col":4,"comment":"\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 ","endLoc":83,"header":"def pipe(self, func, *args, **kwargs)","id":508,"name":"pipe","nodeType":"Function","startLoc":71,"text":"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)"},{"attributeType":"dict","col":4,"comment":"null","endLoc":92,"id":509,"name":"__dict__","nodeType":"Attribute","startLoc":92,"text":"__dict__"},{"attributeType":"bool","col":0,"comment":"null","endLoc":695,"id":510,"name":"TYPE_CHECKING","nodeType":"Attribute","startLoc":695,"text":"TYPE_CHECKING"},{"col":4,"comment":"\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 ","endLoc":95,"header":"def savefig(self, *args, **kwargs)","id":511,"name":"savefig","nodeType":"Function","startLoc":85,"text":"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)"},{"attributeType":"BaseException | None","col":4,"comment":"null","endLoc":1929,"id":513,"name":"__cause__","nodeType":"Attribute","startLoc":1929,"text":"__cause__"},{"attributeType":"BaseException | None","col":4,"comment":"null","endLoc":1930,"id":517,"name":"__context__","nodeType":"Attribute","startLoc":1930,"text":"__context__"},{"attributeType":"bool","col":4,"comment":"null","endLoc":1931,"id":518,"name":"__suppress_context__","nodeType":"Attribute","startLoc":1931,"text":"__suppress_context__"},{"className":"DotBase","col":0,"comment":"null","endLoc":103,"id":519,"nodeType":"Class","startLoc":27,"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\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)\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 )"},{"col":4,"comment":"null","endLoc":45,"header":"def _resolve_paths(self, data)","id":520,"name":"_resolve_paths","nodeType":"Function","startLoc":29,"text":"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"},{"col":4,"comment":"null","endLoc":1085,"header":"def copy(self) -> dict[_KT, _VT]","id":521,"name":"copy","nodeType":"Function","startLoc":1085,"text":"def copy(self) -> dict[_KT, _VT]: ..."},{"attributeType":"TracebackType | None","col":4,"comment":"null","endLoc":1932,"id":522,"name":"__traceback__","nodeType":"Attribute","startLoc":1932,"text":"__traceback__"},{"className":"date","col":0,"comment":"null","endLoc":118,"id":523,"nodeType":"Class","startLoc":50,"text":"class date:\n min: ClassVar[date]\n max: ClassVar[date]\n resolution: ClassVar[timedelta]\n def __new__(cls, year: SupportsIndex, month: SupportsIndex, day: SupportsIndex) -> Self: ...\n @classmethod\n def fromtimestamp(cls, __timestamp: float) -> Self: ...\n @classmethod\n def today(cls) -> Self: ...\n @classmethod\n def fromordinal(cls, __n: int) -> Self: ...\n @classmethod\n def fromisoformat(cls, __date_string: str) -> Self: ...\n if sys.version_info >= (3, 8):\n @classmethod\n def fromisocalendar(cls, year: int, week: int, day: int) -> Self: ...\n\n @property\n def year(self) -> int: ...\n @property\n def month(self) -> int: ...\n @property\n def day(self) -> int: ...\n def ctime(self) -> str: ...\n # On <3.12, the name of the parameter in the pure-Python implementation\n # didn't match the name in the C implementation,\n # meaning it is only *safe* to pass it as a keyword argument on 3.12+\n if sys.version_info >= (3, 12):\n def strftime(self, format: str) -> str: ...\n else:\n def strftime(self, __format: str) -> str: ...\n\n def __format__(self, __fmt: str) -> str: ...\n def isoformat(self) -> str: ...\n def timetuple(self) -> struct_time: ...\n def toordinal(self) -> int: ...\n def replace(self, year: SupportsIndex = ..., month: SupportsIndex = ..., day: SupportsIndex = ...) -> Self: ...\n def __le__(self, __value: date) -> bool: ...\n def __lt__(self, __value: date) -> bool: ...\n def __ge__(self, __value: date) -> bool: ...\n def __gt__(self, __value: date) -> bool: ...\n def __eq__(self, __value: object) -> bool: ...\n if sys.version_info >= (3, 8):\n def __add__(self, __value: timedelta) -> Self: ...\n def __radd__(self, __value: timedelta) -> Self: ...\n @overload\n def __sub__(self, __value: timedelta) -> Self: ...\n @overload\n def __sub__(self, __value: datetime) -> NoReturn: ...\n @overload\n def __sub__(self: _D, __value: _D) -> timedelta: ...\n else:\n # Prior to Python 3.8, arithmetic operations always returned `date`, even in subclasses\n def __add__(self, __value: timedelta) -> date: ...\n def __radd__(self, __value: timedelta) -> date: ...\n @overload\n def __sub__(self, __value: timedelta) -> date: ...\n @overload\n def __sub__(self, __value: datetime) -> NoReturn: ...\n @overload\n def __sub__(self, __value: date) -> timedelta: ...\n\n def __hash__(self) -> int: ...\n def weekday(self) -> int: ...\n def isoweekday(self) -> int: ...\n if sys.version_info >= (3, 9):\n def isocalendar(self) -> _IsoCalendarDate: ...\n else:\n def isocalendar(self) -> tuple[int, int, int]: ..."},{"col":4,"comment":"null","endLoc":54,"header":"def __new__(cls, year: SupportsIndex, month: SupportsIndex, day: SupportsIndex) -> Self","id":524,"name":"__new__","nodeType":"Function","startLoc":54,"text":"def __new__(cls, year: SupportsIndex, month: SupportsIndex, day: SupportsIndex) -> Self: ..."},{"col":4,"comment":"null","endLoc":56,"header":"@classmethod\n def fromtimestamp(cls, __timestamp: float) -> Self","id":525,"name":"fromtimestamp","nodeType":"Function","startLoc":55,"text":"@classmethod\n def fromtimestamp(cls, __timestamp: float) -> Self: ..."},{"col":4,"comment":"null","endLoc":58,"header":"@classmethod\n def today(cls) -> Self","id":526,"name":"today","nodeType":"Function","startLoc":57,"text":"@classmethod\n def today(cls) -> Self: ..."},{"col":4,"comment":"null","endLoc":60,"header":"@classmethod\n def fromordinal(cls, __n: int) -> Self","id":527,"name":"fromordinal","nodeType":"Function","startLoc":59,"text":"@classmethod\n def fromordinal(cls, __n: int) -> Self: ..."},{"col":4,"comment":"null","endLoc":62,"header":"@classmethod\n def fromisoformat(cls, __date_string: str) -> Self","id":528,"name":"fromisoformat","nodeType":"Function","startLoc":61,"text":"@classmethod\n def fromisoformat(cls, __date_string: str) -> Self: ..."},{"col":8,"comment":"null","endLoc":65,"header":"@classmethod\n def fromisocalendar(cls, year: int, week: int, day: int) -> Self","id":529,"name":"fromisocalendar","nodeType":"Function","startLoc":64,"text":"@classmethod\n def fromisocalendar(cls, year: int, week: int, day: int) -> Self: ..."},{"col":4,"comment":"null","endLoc":68,"header":"@property\n def year(self) -> int","id":530,"name":"year","nodeType":"Function","startLoc":67,"text":"@property\n def year(self) -> int: ..."},{"col":4,"comment":"null","endLoc":70,"header":"@property\n def month(self) -> int","id":531,"name":"month","nodeType":"Function","startLoc":69,"text":"@property\n def month(self) -> int: ..."},{"col":4,"comment":"null","endLoc":72,"header":"@property\n def day(self) -> int","id":532,"name":"day","nodeType":"Function","startLoc":71,"text":"@property\n def day(self) -> int: ..."},{"col":4,"comment":"null","endLoc":73,"header":"def ctime(self) -> str","id":533,"name":"ctime","nodeType":"Function","startLoc":73,"text":"def ctime(self) -> str: ..."},{"col":8,"comment":"null","endLoc":78,"header":"def strftime(self, format: str) -> str","id":534,"name":"strftime","nodeType":"Function","startLoc":78,"text":"def strftime(self, format: str) -> str: ..."},{"col":8,"comment":"null","endLoc":80,"header":"def strftime(self, __format: str) -> str","id":535,"name":"strftime","nodeType":"Function","startLoc":80,"text":"def strftime(self, __format: str) -> str: ..."},{"col":4,"comment":"null","endLoc":82,"header":"def __format__(self, __fmt: str) -> str","id":536,"name":"__format__","nodeType":"Function","startLoc":82,"text":"def __format__(self, __fmt: str) -> str: ..."},{"col":4,"comment":"null","endLoc":83,"header":"def isoformat(self) -> str","id":537,"name":"isoformat","nodeType":"Function","startLoc":83,"text":"def isoformat(self) -> str: ..."},{"col":4,"comment":"null","endLoc":84,"header":"def timetuple(self) -> struct_time","id":538,"name":"timetuple","nodeType":"Function","startLoc":84,"text":"def timetuple(self) -> struct_time: ..."},{"col":4,"comment":"null","endLoc":85,"header":"def toordinal(self) -> int","id":539,"name":"toordinal","nodeType":"Function","startLoc":85,"text":"def toordinal(self) -> int: ..."},{"col":4,"comment":"null","endLoc":86,"header":"def replace(self, year: SupportsIndex = ..., month: SupportsIndex = ..., day: SupportsIndex = ...) -> Self","id":540,"name":"replace","nodeType":"Function","startLoc":86,"text":"def replace(self, year: SupportsIndex = ..., month: SupportsIndex = ..., day: SupportsIndex = ...) -> Self: ..."},{"col":4,"comment":"null","endLoc":87,"header":"def __le__(self, __value: date) -> bool","id":541,"name":"__le__","nodeType":"Function","startLoc":87,"text":"def __le__(self, __value: date) -> bool: ..."},{"col":4,"comment":"null","endLoc":88,"header":"def __lt__(self, __value: date) -> bool","id":542,"name":"__lt__","nodeType":"Function","startLoc":88,"text":"def __lt__(self, __value: date) -> bool: ..."},{"col":4,"comment":"null","endLoc":89,"header":"def __ge__(self, __value: date) -> bool","id":543,"name":"__ge__","nodeType":"Function","startLoc":89,"text":"def __ge__(self, __value: date) -> bool: ..."},{"col":4,"comment":"null","endLoc":90,"header":"def __gt__(self, __value: date) -> bool","id":544,"name":"__gt__","nodeType":"Function","startLoc":90,"text":"def __gt__(self, __value: date) -> bool: ..."},{"col":4,"comment":"null","endLoc":91,"header":"def __eq__(self, __value: object) -> bool","id":545,"name":"__eq__","nodeType":"Function","startLoc":91,"text":"def __eq__(self, __value: object) -> bool: ..."},{"col":8,"comment":"null","endLoc":93,"header":"def __add__(self, __value: timedelta) -> Self","id":546,"name":"__add__","nodeType":"Function","startLoc":93,"text":"def __add__(self, __value: timedelta) -> Self: ..."},{"col":8,"comment":"null","endLoc":103,"header":"def __add__(self, __value: timedelta) -> date","id":547,"name":"__add__","nodeType":"Function","startLoc":103,"text":"def __add__(self, __value: timedelta) -> date: ..."},{"col":8,"comment":"null","endLoc":94,"header":"def __radd__(self, __value: timedelta) -> Self","id":548,"name":"__radd__","nodeType":"Function","startLoc":94,"text":"def __radd__(self, __value: timedelta) -> Self: ..."},{"col":8,"comment":"null","endLoc":104,"header":"def __radd__(self, __value: timedelta) -> date","id":549,"name":"__radd__","nodeType":"Function","startLoc":104,"text":"def __radd__(self, __value: timedelta) -> date: ..."},{"col":8,"comment":"null","endLoc":96,"header":"@overload\n def __sub__(self, __value: timedelta) -> Self","id":550,"name":"__sub__","nodeType":"Function","startLoc":95,"text":"@overload\n def __sub__(self, __value: timedelta) -> Self: ..."},{"col":8,"comment":"null","endLoc":98,"header":"@overload\n def __sub__(self, __value: datetime) -> NoReturn","id":551,"name":"__sub__","nodeType":"Function","startLoc":97,"text":"@overload\n def __sub__(self, __value: datetime) -> NoReturn: ..."},{"col":8,"comment":"null","endLoc":100,"header":"@overload\n def __sub__(self: _D, __value: _D) -> timedelta","id":552,"name":"__sub__","nodeType":"Function","startLoc":99,"text":"@overload\n def __sub__(self: _D, __value: _D) -> timedelta: ..."},{"col":8,"comment":"null","endLoc":106,"header":"@overload\n def __sub__(self, __value: timedelta) -> date","id":553,"name":"__sub__","nodeType":"Function","startLoc":105,"text":"@overload\n def __sub__(self, __value: timedelta) -> date: ..."},{"col":8,"comment":"null","endLoc":108,"header":"@overload\n def __sub__(self, __value: datetime) -> NoReturn","id":554,"name":"__sub__","nodeType":"Function","startLoc":107,"text":"@overload\n def __sub__(self, __value: datetime) -> NoReturn: ..."},{"col":8,"comment":"null","endLoc":110,"header":"@overload\n def __sub__(self, __value: date) -> timedelta","id":555,"name":"__sub__","nodeType":"Function","startLoc":109,"text":"@overload\n def __sub__(self, __value: date) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":112,"header":"def __hash__(self) -> int","id":556,"name":"__hash__","nodeType":"Function","startLoc":112,"text":"def __hash__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":113,"header":"def weekday(self) -> int","id":557,"name":"weekday","nodeType":"Function","startLoc":113,"text":"def weekday(self) -> int: ..."},{"col":4,"comment":"null","endLoc":114,"header":"def isoweekday(self) -> int","id":558,"name":"isoweekday","nodeType":"Function","startLoc":114,"text":"def isoweekday(self) -> int: ..."},{"col":8,"comment":"null","endLoc":116,"header":"def isocalendar(self) -> _IsoCalendarDate","id":559,"name":"isocalendar","nodeType":"Function","startLoc":116,"text":"def isocalendar(self) -> _IsoCalendarDate: ..."},{"col":8,"comment":"null","endLoc":118,"header":"def isocalendar(self) -> tuple[int, int, int]","id":560,"name":"isocalendar","nodeType":"Function","startLoc":118,"text":"def isocalendar(self) -> tuple[int, int, int]: ..."},{"attributeType":"date","col":4,"comment":"null","endLoc":51,"id":561,"name":"min","nodeType":"Attribute","startLoc":51,"text":"min"},{"attributeType":"str","col":4,"comment":"null","endLoc":93,"id":562,"name":"__module__","nodeType":"Attribute","startLoc":93,"text":"__module__"},{"attributeType":"dict","col":4,"comment":"null","endLoc":94,"id":563,"name":"__annotations__","nodeType":"Attribute","startLoc":94,"text":"__annotations__"},{"col":4,"comment":"\n a.all(axis=None, out=None, keepdims=False)\n \n Returns True if all elements evaluate to True.\n \n Refer to `numpy.all` for full documentation.\n \n See Also\n --------\n numpy.all : equivalent function\n ","endLoc":3326,"header":"def all(self, axis=None, out=None, keepdims=False)","id":565,"name":"all","nodeType":"Function","startLoc":3314,"text":"def all(self, axis=None, out=None, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.all(axis=None, out=None, keepdims=False)\n \n Returns True if all elements evaluate to True.\n \n Refer to `numpy.all` for full documentation.\n \n See Also\n --------\n numpy.all : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.any(axis=None, out=None, keepdims=False)\n \n Returns True if any of the elements of `a` evaluate to True.\n \n Refer to `numpy.any` for full documentation.\n \n See Also\n --------\n numpy.any : equivalent function\n ","endLoc":3340,"header":"def any(self, axis=None, out=None, keepdims=False)","id":566,"name":"any","nodeType":"Function","startLoc":3328,"text":"def any(self, axis=None, out=None, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.any(axis=None, out=None, keepdims=False)\n \n Returns True if any of the elements of `a` evaluate to True.\n \n Refer to `numpy.any` for full documentation.\n \n See Also\n --------\n numpy.any : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.argmax(axis=None, out=None)\n \n Return indices of the maximum values along the given axis.\n \n Refer to `numpy.argmax` for full documentation.\n \n See Also\n --------\n numpy.argmax : equivalent function\n ","endLoc":3354,"header":"def argmax(self, axis=None, out=None)","id":567,"name":"argmax","nodeType":"Function","startLoc":3342,"text":"def argmax(self, axis=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.argmax(axis=None, out=None)\n \n Return indices of the maximum values along the given axis.\n \n Refer to `numpy.argmax` for full documentation.\n \n See Also\n --------\n numpy.argmax : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.argmin(axis=None, out=None)\n \n Return indices of the minimum values along the given axis of `a`.\n \n Refer to `numpy.argmin` for detailed documentation.\n \n See Also\n --------\n numpy.argmin : equivalent function\n ","endLoc":3368,"header":"def argmin(self, axis=None, out=None)","id":568,"name":"argmin","nodeType":"Function","startLoc":3356,"text":"def argmin(self, axis=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.argmin(axis=None, out=None)\n \n Return indices of the minimum values along the given axis of `a`.\n \n Refer to `numpy.argmin` for detailed documentation.\n \n See Also\n --------\n numpy.argmin : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.argpartition(kth, axis=-1, kind='introselect', order=None)\n \n Returns the indices that would partition this array.\n \n Refer to `numpy.argpartition` for full documentation.\n \n .. versionadded:: 1.8.0\n \n See Also\n --------\n numpy.argpartition : equivalent function\n ","endLoc":3384,"header":"def argpartition(self, kth, axis=-1, kind='introselect', order=None)","id":569,"name":"argpartition","nodeType":"Function","startLoc":3370,"text":"def argpartition(self, kth, axis=-1, kind='introselect', order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.argpartition(kth, axis=-1, kind='introselect', order=None)\n \n Returns the indices that would partition this array.\n \n Refer to `numpy.argpartition` for full documentation.\n \n .. versionadded:: 1.8.0\n \n See Also\n --------\n numpy.argpartition : equivalent function\n \"\"\"\n pass"},{"col":0,"comment":"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 ","endLoc":62,"header":"def pop_recursive(d, key, default=None)","id":570,"name":"pop_recursive","nodeType":"Function","startLoc":45,"text":"def 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)"},{"col":4,"comment":"\n a.argsort(axis=-1, kind='quicksort', order=None)\n \n Returns the indices that would sort this array.\n \n Refer to `numpy.argsort` for full documentation.\n \n See Also\n --------\n numpy.argsort : equivalent function\n ","endLoc":3398,"header":"def argsort(self, axis=-1, kind='quicksort', order=None)","id":571,"name":"argsort","nodeType":"Function","startLoc":3386,"text":"def argsort(self, axis=-1, kind='quicksort', order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.argsort(axis=-1, kind='quicksort', order=None)\n \n Returns the indices that would sort this array.\n \n Refer to `numpy.argsort` for full documentation.\n \n See Also\n --------\n numpy.argsort : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.astype(dtype, order='K', casting='unsafe', subok=True, copy=True)\n \n Copy of the array, cast to a specified type.\n \n Parameters\n ----------\n dtype : str or dtype\n Typecode or data-type to which the array is cast.\n order : {'C', 'F', 'A', 'K'}, optional\n Controls the memory layout order of the result.\n 'C' means C order, 'F' means Fortran order, 'A'\n means 'F' order if all the arrays are Fortran contiguous,\n 'C' order otherwise, and 'K' means as close to the\n order the array elements appear in memory as possible.\n Default is 'K'.\n casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional\n Controls what kind of data casting may occur. Defaults to 'unsafe'\n for backwards compatibility.\n \n * 'no' means the data types should not be cast at all.\n * 'equiv' means only byte-order changes are allowed.\n * 'safe' means only casts which can preserve values are allowed.\n * 'same_kind' means only safe casts or casts within a kind,\n like float64 to float32, are allowed.\n * 'unsafe' means any data conversions may be done.\n subok : bool, optional\n If True, then sub-classes will be passed-through (default), otherwise\n the returned array will be forced to be a base-class array.\n copy : bool, optional\n By default, astype always returns a newly allocated array. If this\n is set to false, and the `dtype`, `order`, and `subok`\n requirements are satisfied, the input array is returned instead\n of a copy.\n \n Returns\n -------\n arr_t : ndarray\n Unless `copy` is False and the other conditions for returning the input\n array are satisfied (see description for `copy` input parameter), `arr_t`\n is a new array of the same shape as the input array, with dtype, order\n given by `dtype`, `order`.\n \n Notes\n -----\n Starting in NumPy 1.9, astype method now returns an error if the string\n dtype to cast to is not long enough in 'safe' casting mode to hold the max\n value of integer/float array that is being casted. Previously the casting\n was allowed even if the result was truncated.\n \n Raises\n ------\n ComplexWarning\n When casting from complex to float or int. To avoid this,\n one should use ``a.real.astype(t)``.\n \n Examples\n --------\n >>> x = np.array([1, 2, 2.5])\n >>> x\n array([ 1. , 2. , 2.5])\n \n >>> x.astype(int)\n array([1, 2, 2])\n ","endLoc":3466,"header":"def astype(self, dtype, order='K', casting='unsafe', subok=True, copy=True)","id":572,"name":"astype","nodeType":"Function","startLoc":3400,"text":"def astype(self, dtype, order='K', casting='unsafe', subok=True, copy=True): # real signature unknown; restored from __doc__\n \"\"\"\n a.astype(dtype, order='K', casting='unsafe', subok=True, copy=True)\n \n Copy of the array, cast to a specified type.\n \n Parameters\n ----------\n dtype : str or dtype\n Typecode or data-type to which the array is cast.\n order : {'C', 'F', 'A', 'K'}, optional\n Controls the memory layout order of the result.\n 'C' means C order, 'F' means Fortran order, 'A'\n means 'F' order if all the arrays are Fortran contiguous,\n 'C' order otherwise, and 'K' means as close to the\n order the array elements appear in memory as possible.\n Default is 'K'.\n casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional\n Controls what kind of data casting may occur. Defaults to 'unsafe'\n for backwards compatibility.\n \n * 'no' means the data types should not be cast at all.\n * 'equiv' means only byte-order changes are allowed.\n * 'safe' means only casts which can preserve values are allowed.\n * 'same_kind' means only safe casts or casts within a kind,\n like float64 to float32, are allowed.\n * 'unsafe' means any data conversions may be done.\n subok : bool, optional\n If True, then sub-classes will be passed-through (default), otherwise\n the returned array will be forced to be a base-class array.\n copy : bool, optional\n By default, astype always returns a newly allocated array. If this\n is set to false, and the `dtype`, `order`, and `subok`\n requirements are satisfied, the input array is returned instead\n of a copy.\n \n Returns\n -------\n arr_t : ndarray\n Unless `copy` is False and the other conditions for returning the input\n array are satisfied (see description for `copy` input parameter), `arr_t`\n is a new array of the same shape as the input array, with dtype, order\n given by `dtype`, `order`.\n \n Notes\n -----\n Starting in NumPy 1.9, astype method now returns an error if the string\n dtype to cast to is not long enough in 'safe' casting mode to hold the max\n value of integer/float array that is being casted. Previously the casting\n was allowed even if the result was truncated.\n \n Raises\n ------\n ComplexWarning\n When casting from complex to float or int. To avoid this,\n one should use ``a.real.astype(t)``.\n \n Examples\n --------\n >>> x = np.array([1, 2, 2.5])\n >>> x\n array([ 1. , 2. , 2.5])\n \n >>> x.astype(int)\n array([1, 2, 2])\n \"\"\"\n pass"},{"col":4,"comment":"\n a.byteswap(inplace)\n \n Swap the bytes of the array elements\n \n Toggle between low-endian and big-endian data representation by\n returning a byteswapped array, optionally swapped in-place.\n \n Parameters\n ----------\n inplace : bool, optional\n If ``True``, swap bytes in-place, default is ``False``.\n \n Returns\n -------\n out : ndarray\n The byteswapped array. If `inplace` is ``True``, this is\n a view to self.\n \n Examples\n --------\n >>> A = np.array([1, 256, 8755], dtype=np.int16)\n >>> map(hex, A)\n ['0x1', '0x100', '0x2233']\n >>> A.byteswap(True)\n array([ 256, 1, 13090], dtype=int16)\n >>> map(hex, A)\n ['0x100', '0x1', '0x3322']\n \n Arrays of strings are not swapped\n \n >>> A = np.array(['ceg', 'fac'])\n >>> A.byteswap()\n array(['ceg', 'fac'],\n dtype='|S3')\n ","endLoc":3505,"header":"def byteswap(self, inplace)","id":573,"name":"byteswap","nodeType":"Function","startLoc":3468,"text":"def byteswap(self, inplace): # real signature unknown; restored from __doc__\n \"\"\"\n a.byteswap(inplace)\n \n Swap the bytes of the array elements\n \n Toggle between low-endian and big-endian data representation by\n returning a byteswapped array, optionally swapped in-place.\n \n Parameters\n ----------\n inplace : bool, optional\n If ``True``, swap bytes in-place, default is ``False``.\n \n Returns\n -------\n out : ndarray\n The byteswapped array. If `inplace` is ``True``, this is\n a view to self.\n \n Examples\n --------\n >>> A = np.array([1, 256, 8755], dtype=np.int16)\n >>> map(hex, A)\n ['0x1', '0x100', '0x2233']\n >>> A.byteswap(True)\n array([ 256, 1, 13090], dtype=int16)\n >>> map(hex, A)\n ['0x100', '0x1', '0x3322']\n \n Arrays of strings are not swapped\n \n >>> A = np.array(['ceg', 'fac'])\n >>> A.byteswap()\n array(['ceg', 'fac'],\n dtype='|S3')\n \"\"\"\n pass"},{"col":4,"comment":"\n a.choose(choices, out=None, mode='raise')\n \n Use an index array to construct a new array from a set of choices.\n \n Refer to `numpy.choose` for full documentation.\n \n See Also\n --------\n numpy.choose : equivalent function\n ","endLoc":3519,"header":"def choose(self, choices, out=None, mode='raise')","id":574,"name":"choose","nodeType":"Function","startLoc":3507,"text":"def choose(self, choices, out=None, mode='raise'): # real signature unknown; restored from __doc__\n \"\"\"\n a.choose(choices, out=None, mode='raise')\n \n Use an index array to construct a new array from a set of choices.\n \n Refer to `numpy.choose` for full documentation.\n \n See Also\n --------\n numpy.choose : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.clip(min=None, max=None, out=None)\n \n Return an array whose values are limited to ``[min, max]``.\n One of max or min must be given.\n \n Refer to `numpy.clip` for full documentation.\n \n See Also\n --------\n numpy.clip : equivalent function\n ","endLoc":3534,"header":"def clip(self, min=None, max=None, out=None)","id":575,"name":"clip","nodeType":"Function","startLoc":3521,"text":"def clip(self, min=None, max=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.clip(min=None, max=None, out=None)\n \n Return an array whose values are limited to ``[min, max]``.\n One of max or min must be given.\n \n Refer to `numpy.clip` for full documentation.\n \n See Also\n --------\n numpy.clip : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.compress(condition, axis=None, out=None)\n \n Return selected slices of this array along given axis.\n \n Refer to `numpy.compress` for full documentation.\n \n See Also\n --------\n numpy.compress : equivalent function\n ","endLoc":3548,"header":"def compress(self, condition, axis=None, out=None)","id":576,"name":"compress","nodeType":"Function","startLoc":3536,"text":"def compress(self, condition, axis=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.compress(condition, axis=None, out=None)\n \n Return selected slices of this array along given axis.\n \n Refer to `numpy.compress` for full documentation.\n \n See Also\n --------\n numpy.compress : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.conj()\n \n Complex-conjugate all elements.\n \n Refer to `numpy.conjugate` for full documentation.\n \n See Also\n --------\n numpy.conjugate : equivalent function\n ","endLoc":3562,"header":"def conj(self)","id":577,"name":"conj","nodeType":"Function","startLoc":3550,"text":"def conj(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.conj()\n \n Complex-conjugate all elements.\n \n Refer to `numpy.conjugate` for full documentation.\n \n See Also\n --------\n numpy.conjugate : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.conjugate()\n \n Return the complex conjugate, element-wise.\n \n Refer to `numpy.conjugate` for full documentation.\n \n See Also\n --------\n numpy.conjugate : equivalent function\n ","endLoc":3576,"header":"def conjugate(self)","id":578,"name":"conjugate","nodeType":"Function","startLoc":3564,"text":"def conjugate(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.conjugate()\n \n Return the complex conjugate, element-wise.\n \n Refer to `numpy.conjugate` for full documentation.\n \n See Also\n --------\n numpy.conjugate : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.copy(order='C')\n \n Return a copy of the array.\n \n Parameters\n ----------\n order : {'C', 'F', 'A', 'K'}, optional\n Controls the memory layout of the copy. 'C' means C-order,\n 'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,\n 'C' otherwise. 'K' means match the layout of `a` as closely\n as possible. (Note that this function and :func:numpy.copy are very\n similar, but have different default values for their order=\n arguments.)\n \n See also\n --------\n numpy.copy\n numpy.copyto\n \n Examples\n --------\n >>> x = np.array([[1,2,3],[4,5,6]], order='F')\n \n >>> y = x.copy()\n \n >>> x.fill(0)\n \n >>> x\n array([[0, 0, 0],\n [0, 0, 0]])\n \n >>> y\n array([[1, 2, 3],\n [4, 5, 6]])\n \n >>> y.flags['C_CONTIGUOUS']\n True\n ","endLoc":3618,"header":"def copy(self, order='C')","id":579,"name":"copy","nodeType":"Function","startLoc":3578,"text":"def copy(self, order='C'): # real signature unknown; restored from __doc__\n \"\"\"\n a.copy(order='C')\n \n Return a copy of the array.\n \n Parameters\n ----------\n order : {'C', 'F', 'A', 'K'}, optional\n Controls the memory layout of the copy. 'C' means C-order,\n 'F' means F-order, 'A' means 'F' if `a` is Fortran contiguous,\n 'C' otherwise. 'K' means match the layout of `a` as closely\n as possible. (Note that this function and :func:numpy.copy are very\n similar, but have different default values for their order=\n arguments.)\n \n See also\n --------\n numpy.copy\n numpy.copyto\n \n Examples\n --------\n >>> x = np.array([[1,2,3],[4,5,6]], order='F')\n \n >>> y = x.copy()\n \n >>> x.fill(0)\n \n >>> x\n array([[0, 0, 0],\n [0, 0, 0]])\n \n >>> y\n array([[1, 2, 3],\n [4, 5, 6]])\n \n >>> y.flags['C_CONTIGUOUS']\n True\n \"\"\"\n pass"},{"col":4,"comment":"\n a.cumprod(axis=None, dtype=None, out=None)\n \n Return the cumulative product of the elements along the given axis.\n \n Refer to `numpy.cumprod` for full documentation.\n \n See Also\n --------\n numpy.cumprod : equivalent function\n ","endLoc":3632,"header":"def cumprod(self, axis=None, dtype=None, out=None)","id":580,"name":"cumprod","nodeType":"Function","startLoc":3620,"text":"def cumprod(self, axis=None, dtype=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.cumprod(axis=None, dtype=None, out=None)\n \n Return the cumulative product of the elements along the given axis.\n \n Refer to `numpy.cumprod` for full documentation.\n \n See Also\n --------\n numpy.cumprod : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.cumsum(axis=None, dtype=None, out=None)\n \n Return the cumulative sum of the elements along the given axis.\n \n Refer to `numpy.cumsum` for full documentation.\n \n See Also\n --------\n numpy.cumsum : equivalent function\n ","endLoc":3646,"header":"def cumsum(self, axis=None, dtype=None, out=None)","id":581,"name":"cumsum","nodeType":"Function","startLoc":3634,"text":"def cumsum(self, axis=None, dtype=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.cumsum(axis=None, dtype=None, out=None)\n \n Return the cumulative sum of the elements along the given axis.\n \n Refer to `numpy.cumsum` for full documentation.\n \n See Also\n --------\n numpy.cumsum : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.diagonal(offset=0, axis1=0, axis2=1)\n \n Return specified diagonals. In NumPy 1.9 the returned array is a\n read-only view instead of a copy as in previous NumPy versions. In\n a future version the read-only restriction will be removed.\n \n Refer to :func:`numpy.diagonal` for full documentation.\n \n See Also\n --------\n numpy.diagonal : equivalent function\n ","endLoc":3662,"header":"def diagonal(self, offset=0, axis1=0, axis2=1)","id":582,"name":"diagonal","nodeType":"Function","startLoc":3648,"text":"def diagonal(self, offset=0, axis1=0, axis2=1): # real signature unknown; restored from __doc__\n \"\"\"\n a.diagonal(offset=0, axis1=0, axis2=1)\n \n Return specified diagonals. In NumPy 1.9 the returned array is a\n read-only view instead of a copy as in previous NumPy versions. In\n a future version the read-only restriction will be removed.\n \n Refer to :func:`numpy.diagonal` for full documentation.\n \n See Also\n --------\n numpy.diagonal : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.dot(b, out=None)\n \n Dot product of two arrays.\n \n Refer to `numpy.dot` for full documentation.\n \n See Also\n --------\n numpy.dot : equivalent function\n \n Examples\n --------\n >>> a = np.eye(2)\n >>> b = np.ones((2, 2)) * 2\n >>> a.dot(b)\n array([[ 2., 2.],\n [ 2., 2.]])\n \n This array method can be conveniently chained:\n \n >>> a.dot(b).dot(b)\n array([[ 8., 8.],\n [ 8., 8.]])\n ","endLoc":3690,"header":"def dot(self, b, out=None)","id":583,"name":"dot","nodeType":"Function","startLoc":3664,"text":"def dot(self, b, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.dot(b, out=None)\n \n Dot product of two arrays.\n \n Refer to `numpy.dot` for full documentation.\n \n See Also\n --------\n numpy.dot : equivalent function\n \n Examples\n --------\n >>> a = np.eye(2)\n >>> b = np.ones((2, 2)) * 2\n >>> a.dot(b)\n array([[ 2., 2.],\n [ 2., 2.]])\n \n This array method can be conveniently chained:\n \n >>> a.dot(b).dot(b)\n array([[ 8., 8.],\n [ 8., 8.]])\n \"\"\"\n pass"},{"col":4,"comment":"\n a.dump(file)\n \n Dump a pickle of the array to the specified file.\n The array can be read back with pickle.load or numpy.load.\n \n Parameters\n ----------\n file : str\n A string naming the dump file.\n ","endLoc":3704,"header":"def dump(self, file)","id":584,"name":"dump","nodeType":"Function","startLoc":3692,"text":"def dump(self, file): # real signature unknown; restored from __doc__\n \"\"\"\n a.dump(file)\n \n Dump a pickle of the array to the specified file.\n The array can be read back with pickle.load or numpy.load.\n \n Parameters\n ----------\n file : str\n A string naming the dump file.\n \"\"\"\n pass"},{"col":4,"comment":"\n a.dumps()\n \n Returns the pickle of the array as a string.\n pickle.loads or numpy.loads will convert the string back to an array.\n \n Parameters\n ----------\n None\n ","endLoc":3717,"header":"def dumps(self)","id":585,"name":"dumps","nodeType":"Function","startLoc":3706,"text":"def dumps(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.dumps()\n \n Returns the pickle of the array as a string.\n pickle.loads or numpy.loads will convert the string back to an array.\n \n Parameters\n ----------\n None\n \"\"\"\n pass"},{"col":4,"comment":"\n a.fill(value)\n \n Fill the array with a scalar value.\n \n Parameters\n ----------\n value : scalar\n All elements of `a` will be assigned this value.\n \n Examples\n --------\n >>> a = np.array([1, 2])\n >>> a.fill(0)\n >>> a\n array([0, 0])\n >>> a = np.empty(2)\n >>> a.fill(1)\n >>> a\n array([ 1., 1.])\n ","endLoc":3741,"header":"def fill(self, value)","id":586,"name":"fill","nodeType":"Function","startLoc":3719,"text":"def fill(self, value): # real signature unknown; restored from __doc__\n \"\"\"\n a.fill(value)\n \n Fill the array with a scalar value.\n \n Parameters\n ----------\n value : scalar\n All elements of `a` will be assigned this value.\n \n Examples\n --------\n >>> a = np.array([1, 2])\n >>> a.fill(0)\n >>> a\n array([0, 0])\n >>> a = np.empty(2)\n >>> a.fill(1)\n >>> a\n array([ 1., 1.])\n \"\"\"\n pass"},{"col":4,"comment":"\n a.flatten(order='C')\n \n Return a copy of the array collapsed into one dimension.\n \n Parameters\n ----------\n order : {'C', 'F', 'A', 'K'}, optional\n 'C' means to flatten in row-major (C-style) order.\n 'F' means to flatten in column-major (Fortran-\n style) order. 'A' means to flatten in column-major\n order if `a` is Fortran *contiguous* in memory,\n row-major order otherwise. 'K' means to flatten\n `a` in the order the elements occur in memory.\n The default is 'C'.\n \n Returns\n -------\n y : ndarray\n A copy of the input array, flattened to one dimension.\n \n See Also\n --------\n ravel : Return a flattened array.\n flat : A 1-D flat iterator over the array.\n \n Examples\n --------\n >>> a = np.array([[1,2], [3,4]])\n >>> a.flatten()\n array([1, 2, 3, 4])\n >>> a.flatten('F')\n array([1, 3, 2, 4])\n ","endLoc":3778,"header":"def flatten(self, order='C')","id":587,"name":"flatten","nodeType":"Function","startLoc":3743,"text":"def flatten(self, order='C'): # real signature unknown; restored from __doc__\n \"\"\"\n a.flatten(order='C')\n \n Return a copy of the array collapsed into one dimension.\n \n Parameters\n ----------\n order : {'C', 'F', 'A', 'K'}, optional\n 'C' means to flatten in row-major (C-style) order.\n 'F' means to flatten in column-major (Fortran-\n style) order. 'A' means to flatten in column-major\n order if `a` is Fortran *contiguous* in memory,\n row-major order otherwise. 'K' means to flatten\n `a` in the order the elements occur in memory.\n The default is 'C'.\n \n Returns\n -------\n y : ndarray\n A copy of the input array, flattened to one dimension.\n \n See Also\n --------\n ravel : Return a flattened array.\n flat : A 1-D flat iterator over the array.\n \n Examples\n --------\n >>> a = np.array([[1,2], [3,4]])\n >>> a.flatten()\n array([1, 2, 3, 4])\n >>> a.flatten('F')\n array([1, 3, 2, 4])\n \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":110,"header":"def __init__(self)","id":588,"name":"__init__","nodeType":"Function","startLoc":103,"text":"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"},{"col":4,"comment":"Call fig.tight_layout within rect that exclude the legend.","endLoc":119,"header":"def tight_layout(self, *args, **kwargs)","id":589,"name":"tight_layout","nodeType":"Function","startLoc":112,"text":"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"},{"col":4,"comment":"\n a.getfield(dtype, offset=0)\n \n Returns a field of the given array as a certain type.\n \n A field is a view of the array data with a given data-type. The values in\n the view are determined by the given type and the offset into the current\n array in bytes. The offset needs to be such that the view dtype fits in the\n array dtype; for example an array of dtype complex128 has 16-byte elements.\n If taking a view with a 32-bit integer (4 bytes), the offset needs to be\n between 0 and 12 bytes.\n \n Parameters\n ----------\n dtype : str or dtype\n The data type of the view. The dtype size of the view can not be larger\n than that of the array itself.\n offset : int\n Number of bytes to skip before beginning the element view.\n \n Examples\n --------\n >>> x = np.diag([1.+1.j]*2)\n >>> x[1, 1] = 2 + 4.j\n >>> x\n array([[ 1.+1.j, 0.+0.j],\n [ 0.+0.j, 2.+4.j]])\n >>> x.getfield(np.float64)\n array([[ 1., 0.],\n [ 0., 2.]])\n \n By choosing an offset of 8 bytes we can select the complex part of the\n array for our view:\n \n >>> x.getfield(np.float64, offset=8)\n array([[ 1., 0.],\n [ 0., 4.]])\n ","endLoc":3819,"header":"def getfield(self, dtype, offset=0)","id":590,"name":"getfield","nodeType":"Function","startLoc":3780,"text":"def getfield(self, dtype, offset=0): # real signature unknown; restored from __doc__\n \"\"\"\n a.getfield(dtype, offset=0)\n \n Returns a field of the given array as a certain type.\n \n A field is a view of the array data with a given data-type. The values in\n the view are determined by the given type and the offset into the current\n array in bytes. The offset needs to be such that the view dtype fits in the\n array dtype; for example an array of dtype complex128 has 16-byte elements.\n If taking a view with a 32-bit integer (4 bytes), the offset needs to be\n between 0 and 12 bytes.\n \n Parameters\n ----------\n dtype : str or dtype\n The data type of the view. The dtype size of the view can not be larger\n than that of the array itself.\n offset : int\n Number of bytes to skip before beginning the element view.\n \n Examples\n --------\n >>> x = np.diag([1.+1.j]*2)\n >>> x[1, 1] = 2 + 4.j\n >>> x\n array([[ 1.+1.j, 0.+0.j],\n [ 0.+0.j, 2.+4.j]])\n >>> x.getfield(np.float64)\n array([[ 1., 0.],\n [ 0., 2.]])\n \n By choosing an offset of 8 bytes we can select the complex part of the\n array for our view:\n \n >>> x.getfield(np.float64, offset=8)\n array([[ 1., 0.],\n [ 0., 4.]])\n \"\"\"\n pass"},{"col":4,"comment":"\n a.item(*args)\n \n Copy an element of an array to a standard Python scalar and return it.\n \n Parameters\n ----------\n \\*args : Arguments (variable number and type)\n \n * none: in this case, the method only works for arrays\n with one element (`a.size == 1`), which element is\n copied into a standard Python scalar object and returned.\n \n * int_type: this argument is interpreted as a flat index into\n the array, specifying which element to copy and return.\n \n * tuple of int_types: functions as does a single int_type argument,\n except that the argument is interpreted as an nd-index into the\n array.\n \n Returns\n -------\n z : Standard Python scalar object\n A copy of the specified element of the array as a suitable\n Python scalar\n \n Notes\n -----\n When the data type of `a` is longdouble or clongdouble, item() returns\n a scalar array object because there is no available Python scalar that\n would not lose information. Void arrays return a buffer object for item(),\n unless fields are defined, in which case a tuple is returned.\n \n `item` is very similar to a[args], except, instead of an array scalar,\n a standard Python scalar is returned. This can be useful for speeding up\n access to elements of the array and doing arithmetic on elements of the\n array using Python's optimized math.\n \n Examples\n --------\n >>> x = np.random.randint(9, size=(3, 3))\n >>> x\n array([[3, 1, 7],\n [2, 8, 3],\n [8, 5, 3]])\n >>> x.item(3)\n 2\n >>> x.item(7)\n 5\n >>> x.item((0, 1))\n 1\n >>> x.item((2, 2))\n 3\n ","endLoc":3876,"header":"def item(self, *args)","id":591,"name":"item","nodeType":"Function","startLoc":3821,"text":"def item(self, *args): # real signature unknown; restored from __doc__\n \"\"\"\n a.item(*args)\n \n Copy an element of an array to a standard Python scalar and return it.\n \n Parameters\n ----------\n \\*args : Arguments (variable number and type)\n \n * none: in this case, the method only works for arrays\n with one element (`a.size == 1`), which element is\n copied into a standard Python scalar object and returned.\n \n * int_type: this argument is interpreted as a flat index into\n the array, specifying which element to copy and return.\n \n * tuple of int_types: functions as does a single int_type argument,\n except that the argument is interpreted as an nd-index into the\n array.\n \n Returns\n -------\n z : Standard Python scalar object\n A copy of the specified element of the array as a suitable\n Python scalar\n \n Notes\n -----\n When the data type of `a` is longdouble or clongdouble, item() returns\n a scalar array object because there is no available Python scalar that\n would not lose information. Void arrays return a buffer object for item(),\n unless fields are defined, in which case a tuple is returned.\n \n `item` is very similar to a[args], except, instead of an array scalar,\n a standard Python scalar is returned. This can be useful for speeding up\n access to elements of the array and doing arithmetic on elements of the\n array using Python's optimized math.\n \n Examples\n --------\n >>> x = np.random.randint(9, size=(3, 3))\n >>> x\n array([[3, 1, 7],\n [2, 8, 3],\n [8, 5, 3]])\n >>> x.item(3)\n 2\n >>> x.item(7)\n 5\n >>> x.item((0, 1))\n 1\n >>> x.item((2, 2))\n 3\n \"\"\"\n pass"},{"col":4,"comment":"\n a.itemset(*args)\n \n Insert scalar into an array (scalar is cast to array's dtype, if possible)\n \n There must be at least 1 argument, and define the last argument\n as *item*. Then, ``a.itemset(*args)`` is equivalent to but faster\n than ``a[args] = item``. The item should be a scalar value and `args`\n must select a single item in the array `a`.\n \n Parameters\n ----------\n \\*args : Arguments\n If one argument: a scalar, only used in case `a` is of size 1.\n If two arguments: the last argument is the value to be set\n and must be a scalar, the first argument specifies a single array\n element location. It is either an int or a tuple.\n \n Notes\n -----\n Compared to indexing syntax, `itemset` provides some speed increase\n for placing a scalar into a particular location in an `ndarray`,\n if you must do this. However, generally this is discouraged:\n among other problems, it complicates the appearance of the code.\n Also, when using `itemset` (and `item`) inside a loop, be sure\n to assign the methods to a local variable to avoid the attribute\n look-up at each loop iteration.\n \n Examples\n --------\n >>> x = np.random.randint(9, size=(3, 3))\n >>> x\n array([[3, 1, 7],\n [2, 8, 3],\n [8, 5, 3]])\n >>> x.itemset(4, 0)\n >>> x.itemset((2, 2), 9)\n >>> x\n array([[3, 1, 7],\n [2, 0, 3],\n [8, 5, 9]])\n ","endLoc":3921,"header":"def itemset(self, *args)","id":592,"name":"itemset","nodeType":"Function","startLoc":3878,"text":"def itemset(self, *args): # real signature unknown; restored from __doc__\n \"\"\"\n a.itemset(*args)\n \n Insert scalar into an array (scalar is cast to array's dtype, if possible)\n \n There must be at least 1 argument, and define the last argument\n as *item*. Then, ``a.itemset(*args)`` is equivalent to but faster\n than ``a[args] = item``. The item should be a scalar value and `args`\n must select a single item in the array `a`.\n \n Parameters\n ----------\n \\*args : Arguments\n If one argument: a scalar, only used in case `a` is of size 1.\n If two arguments: the last argument is the value to be set\n and must be a scalar, the first argument specifies a single array\n element location. It is either an int or a tuple.\n \n Notes\n -----\n Compared to indexing syntax, `itemset` provides some speed increase\n for placing a scalar into a particular location in an `ndarray`,\n if you must do this. However, generally this is discouraged:\n among other problems, it complicates the appearance of the code.\n Also, when using `itemset` (and `item`) inside a loop, be sure\n to assign the methods to a local variable to avoid the attribute\n look-up at each loop iteration.\n \n Examples\n --------\n >>> x = np.random.randint(9, size=(3, 3))\n >>> x\n array([[3, 1, 7],\n [2, 8, 3],\n [8, 5, 3]])\n >>> x.itemset(4, 0)\n >>> x.itemset((2, 2), 9)\n >>> x\n array([[3, 1, 7],\n [2, 0, 3],\n [8, 5, 9]])\n \"\"\"\n pass"},{"col":4,"comment":"\n a.max(axis=None, out=None)\n \n Return the maximum along a given axis.\n \n Refer to `numpy.amax` for full documentation.\n \n See Also\n --------\n numpy.amax : equivalent function\n ","endLoc":3935,"header":"def max(self, axis=None, out=None)","id":593,"name":"max","nodeType":"Function","startLoc":3923,"text":"def max(self, axis=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.max(axis=None, out=None)\n \n Return the maximum along a given axis.\n \n Refer to `numpy.amax` for full documentation.\n \n See Also\n --------\n numpy.amax : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.mean(axis=None, dtype=None, out=None, keepdims=False)\n \n Returns the average of the array elements along given axis.\n \n Refer to `numpy.mean` for full documentation.\n \n See Also\n --------\n numpy.mean : equivalent function\n ","endLoc":3949,"header":"def mean(self, axis=None, dtype=None, out=None, keepdims=False)","id":594,"name":"mean","nodeType":"Function","startLoc":3937,"text":"def mean(self, axis=None, dtype=None, out=None, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.mean(axis=None, dtype=None, out=None, keepdims=False)\n \n Returns the average of the array elements along given axis.\n \n Refer to `numpy.mean` for full documentation.\n \n See Also\n --------\n numpy.mean : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.min(axis=None, out=None, keepdims=False)\n \n Return the minimum along a given axis.\n \n Refer to `numpy.amin` for full documentation.\n \n See Also\n --------\n numpy.amin : equivalent function\n ","endLoc":3963,"header":"def min(self, axis=None, out=None, keepdims=False)","id":596,"name":"min","nodeType":"Function","startLoc":3951,"text":"def min(self, axis=None, out=None, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.min(axis=None, out=None, keepdims=False)\n \n Return the minimum along a given axis.\n \n Refer to `numpy.amin` for full documentation.\n \n See Also\n --------\n numpy.amin : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n arr.newbyteorder(new_order='S')\n \n Return the array with the same data viewed with a different byte order.\n \n Equivalent to::\n \n arr.view(arr.dtype.newbytorder(new_order))\n \n Changes are also made in all fields and sub-arrays of the array data\n type.\n \n \n \n Parameters\n ----------\n new_order : string, optional\n Byte order to force; a value from the byte order specifications\n below. `new_order` codes can be any of:\n \n * 'S' - swap dtype from current to opposite endian\n * {'<', 'L'} - little endian\n * {'>', 'B'} - big endian\n * {'=', 'N'} - native order\n * {'|', 'I'} - ignore (no change to byte order)\n \n The default value ('S') results in swapping the current\n byte order. The code does a case-insensitive check on the first\n letter of `new_order` for the alternatives above. For example,\n any of 'B' or 'b' or 'biggish' are valid to specify big-endian.\n \n \n Returns\n -------\n new_arr : array\n New array object with the dtype reflecting given change to the\n byte order.\n ","endLoc":4004,"header":"def newbyteorder(self, new_order='S')","id":597,"name":"newbyteorder","nodeType":"Function","startLoc":3965,"text":"def newbyteorder(self, new_order='S'): # real signature unknown; restored from __doc__\n \"\"\"\n arr.newbyteorder(new_order='S')\n \n Return the array with the same data viewed with a different byte order.\n \n Equivalent to::\n \n arr.view(arr.dtype.newbytorder(new_order))\n \n Changes are also made in all fields and sub-arrays of the array data\n type.\n \n \n \n Parameters\n ----------\n new_order : string, optional\n Byte order to force; a value from the byte order specifications\n below. `new_order` codes can be any of:\n \n * 'S' - swap dtype from current to opposite endian\n * {'<', 'L'} - little endian\n * {'>', 'B'} - big endian\n * {'=', 'N'} - native order\n * {'|', 'I'} - ignore (no change to byte order)\n \n The default value ('S') results in swapping the current\n byte order. The code does a case-insensitive check on the first\n letter of `new_order` for the alternatives above. For example,\n any of 'B' or 'b' or 'biggish' are valid to specify big-endian.\n \n \n Returns\n -------\n new_arr : array\n New array object with the dtype reflecting given change to the\n byte order.\n \"\"\"\n pass"},{"col":4,"comment":"\n a.nonzero()\n \n Return the indices of the elements that are non-zero.\n \n Refer to `numpy.nonzero` for full documentation.\n \n See Also\n --------\n numpy.nonzero : equivalent function\n ","endLoc":4018,"header":"def nonzero(self)","id":599,"name":"nonzero","nodeType":"Function","startLoc":4006,"text":"def nonzero(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.nonzero()\n \n Return the indices of the elements that are non-zero.\n \n Refer to `numpy.nonzero` for full documentation.\n \n See Also\n --------\n numpy.nonzero : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.partition(kth, axis=-1, kind='introselect', order=None)\n \n Rearranges the elements in the array in such a way that value of the\n element in kth position is in the position it would be in a sorted array.\n All elements smaller than the kth element are moved before this element and\n all equal or greater are moved behind it. The ordering of the elements in\n the two partitions is undefined.\n \n .. versionadded:: 1.8.0\n \n Parameters\n ----------\n kth : int or sequence of ints\n Element index to partition by. The kth element value will be in its\n final sorted position and all smaller elements will be moved before it\n and all equal or greater elements behind it.\n The order all elements in the partitions is undefined.\n If provided with a sequence of kth it will partition all elements\n indexed by kth of them into their sorted position at once.\n axis : int, optional\n Axis along which to sort. Default is -1, which means sort along the\n last axis.\n kind : {'introselect'}, optional\n Selection algorithm. Default is 'introselect'.\n order : str or list of str, optional\n When `a` is an array with fields defined, this argument specifies\n which fields to compare first, second, etc. A single field can\n be specified as a string, and not all fields need be specified,\n but unspecified fields will still be used, in the order in which\n they come up in the dtype, to break ties.\n \n See Also\n --------\n numpy.partition : Return a parititioned copy of an array.\n argpartition : Indirect partition.\n sort : Full sort.\n \n Notes\n -----\n See ``np.partition`` for notes on the different algorithms.\n \n Examples\n --------\n >>> a = np.array([3, 4, 2, 1])\n >>> a.partition(3)\n >>> a\n array([2, 1, 3, 4])\n \n >>> a.partition((1, 3))\n array([1, 2, 3, 4])\n ","endLoc":4073,"header":"def partition(self, kth, axis=-1, kind='introselect', order=None)","id":600,"name":"partition","nodeType":"Function","startLoc":4020,"text":"def partition(self, kth, axis=-1, kind='introselect', order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.partition(kth, axis=-1, kind='introselect', order=None)\n \n Rearranges the elements in the array in such a way that value of the\n element in kth position is in the position it would be in a sorted array.\n All elements smaller than the kth element are moved before this element and\n all equal or greater are moved behind it. The ordering of the elements in\n the two partitions is undefined.\n \n .. versionadded:: 1.8.0\n \n Parameters\n ----------\n kth : int or sequence of ints\n Element index to partition by. The kth element value will be in its\n final sorted position and all smaller elements will be moved before it\n and all equal or greater elements behind it.\n The order all elements in the partitions is undefined.\n If provided with a sequence of kth it will partition all elements\n indexed by kth of them into their sorted position at once.\n axis : int, optional\n Axis along which to sort. Default is -1, which means sort along the\n last axis.\n kind : {'introselect'}, optional\n Selection algorithm. Default is 'introselect'.\n order : str or list of str, optional\n When `a` is an array with fields defined, this argument specifies\n which fields to compare first, second, etc. A single field can\n be specified as a string, and not all fields need be specified,\n but unspecified fields will still be used, in the order in which\n they come up in the dtype, to break ties.\n \n See Also\n --------\n numpy.partition : Return a parititioned copy of an array.\n argpartition : Indirect partition.\n sort : Full sort.\n \n Notes\n -----\n See ``np.partition`` for notes on the different algorithms.\n \n Examples\n --------\n >>> a = np.array([3, 4, 2, 1])\n >>> a.partition(3)\n >>> a\n array([2, 1, 3, 4])\n \n >>> a.partition((1, 3))\n array([1, 2, 3, 4])\n \"\"\"\n pass"},{"col":4,"comment":"\n a.prod(axis=None, dtype=None, out=None, keepdims=False)\n \n Return the product of the array elements over the given axis\n \n Refer to `numpy.prod` for full documentation.\n \n See Also\n --------\n numpy.prod : equivalent function\n ","endLoc":4087,"header":"def prod(self, axis=None, dtype=None, out=None, keepdims=False)","id":601,"name":"prod","nodeType":"Function","startLoc":4075,"text":"def prod(self, axis=None, dtype=None, out=None, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.prod(axis=None, dtype=None, out=None, keepdims=False)\n \n Return the product of the array elements over the given axis\n \n Refer to `numpy.prod` for full documentation.\n \n See Also\n --------\n numpy.prod : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.ptp(axis=None, out=None)\n \n Peak to peak (maximum - minimum) value along a given axis.\n \n Refer to `numpy.ptp` for full documentation.\n \n See Also\n --------\n numpy.ptp : equivalent function\n ","endLoc":4101,"header":"def ptp(self, axis=None, out=None)","id":602,"name":"ptp","nodeType":"Function","startLoc":4089,"text":"def ptp(self, axis=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.ptp(axis=None, out=None)\n \n Peak to peak (maximum - minimum) value along a given axis.\n \n Refer to `numpy.ptp` for full documentation.\n \n See Also\n --------\n numpy.ptp : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.put(indices, values, mode='raise')\n \n Set ``a.flat[n] = values[n]`` for all `n` in indices.\n \n Refer to `numpy.put` for full documentation.\n \n See Also\n --------\n numpy.put : equivalent function\n ","endLoc":4115,"header":"def put(self, indices, values, mode='raise')","id":603,"name":"put","nodeType":"Function","startLoc":4103,"text":"def put(self, indices, values, mode='raise'): # real signature unknown; restored from __doc__\n \"\"\"\n a.put(indices, values, mode='raise')\n \n Set ``a.flat[n] = values[n]`` for all `n` in indices.\n \n Refer to `numpy.put` for full documentation.\n \n See Also\n --------\n numpy.put : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.ravel([order])\n \n Return a flattened array.\n \n Refer to `numpy.ravel` for full documentation.\n \n See Also\n --------\n numpy.ravel : equivalent function\n \n ndarray.flat : a flat iterator on the array.\n ","endLoc":4131,"header":"def ravel(self, order=None)","id":604,"name":"ravel","nodeType":"Function","startLoc":4117,"text":"def ravel(self, order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.ravel([order])\n \n Return a flattened array.\n \n Refer to `numpy.ravel` for full documentation.\n \n See Also\n --------\n numpy.ravel : equivalent function\n \n ndarray.flat : a flat iterator on the array.\n \"\"\"\n pass"},{"col":4,"comment":"\n a.repeat(repeats, axis=None)\n \n Repeat elements of an array.\n \n Refer to `numpy.repeat` for full documentation.\n \n See Also\n --------\n numpy.repeat : equivalent function\n ","endLoc":4145,"header":"def repeat(self, repeats, axis=None)","id":605,"name":"repeat","nodeType":"Function","startLoc":4133,"text":"def repeat(self, repeats, axis=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.repeat(repeats, axis=None)\n \n Repeat elements of an array.\n \n Refer to `numpy.repeat` for full documentation.\n \n See Also\n --------\n numpy.repeat : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.reshape(shape, order='C')\n \n Returns an array containing the same data with a new shape.\n \n Refer to `numpy.reshape` for full documentation.\n \n See Also\n --------\n numpy.reshape : equivalent function\n ","endLoc":4159,"header":"def reshape(self, shape, *shapes, order='C')","id":606,"name":"reshape","nodeType":"Function","startLoc":4147,"text":"def reshape(self, shape, *shapes, order='C'): # known case of numpy.core.multiarray.ndarray.reshape\n \"\"\"\n a.reshape(shape, order='C')\n \n Returns an array containing the same data with a new shape.\n \n Refer to `numpy.reshape` for full documentation.\n \n See Also\n --------\n numpy.reshape : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.resize(new_shape, refcheck=True)\n \n Change shape and size of array in-place.\n \n Parameters\n ----------\n new_shape : tuple of ints, or `n` ints\n Shape of resized array.\n refcheck : bool, optional\n If False, reference count will not be checked. Default is True.\n \n Returns\n -------\n None\n \n Raises\n ------\n ValueError\n If `a` does not own its own data or references or views to it exist,\n and the data memory must be changed.\n PyPy only: will always raise if the data memory must be changed, since\n there is no reliable way to determine if references or views to it\n exist.\n \n SystemError\n If the `order` keyword argument is specified. This behaviour is a\n bug in NumPy.\n \n See Also\n --------\n resize : Return a new array with the specified shape.\n \n Notes\n -----\n This reallocates space for the data area if necessary.\n \n Only contiguous arrays (data elements consecutive in memory) can be\n resized.\n \n The purpose of the reference count check is to make sure you\n do not use this array as a buffer for another Python object and then\n reallocate the memory. However, reference counts can increase in\n other ways so if you are sure that you have not shared the memory\n for this array with another Python object, then you may safely set\n `refcheck` to False.\n \n Examples\n --------\n Shrinking an array: array is flattened (in the order that the data are\n stored in memory), resized, and reshaped:\n \n >>> a = np.array([[0, 1], [2, 3]], order='C')\n >>> a.resize((2, 1))\n >>> a\n array([[0],\n [1]])\n \n >>> a = np.array([[0, 1], [2, 3]], order='F')\n >>> a.resize((2, 1))\n >>> a\n array([[0],\n [2]])\n \n Enlarging an array: as above, but missing entries are filled with zeros:\n \n >>> b = np.array([[0, 1], [2, 3]])\n >>> b.resize(2, 3) # new_shape parameter doesn't have to be a tuple\n >>> b\n array([[0, 1, 2],\n [3, 0, 0]])\n \n Referencing an array prevents resizing...\n \n >>> c = a\n >>> a.resize((1, 1))\n Traceback (most recent call last):\n ...\n ValueError: cannot resize an array that has been referenced ...\n \n Unless `refcheck` is False:\n \n >>> a.resize((1, 1), refcheck=False)\n >>> a\n array([[0]])\n >>> c\n array([[0]])\n ","endLoc":4250,"header":"def resize(self, *new_shape, refcheck=True)","id":607,"name":"resize","nodeType":"Function","startLoc":4161,"text":"def resize(self, *new_shape, refcheck=True): # known case of numpy.core.multiarray.ndarray.resize\n \"\"\"\n a.resize(new_shape, refcheck=True)\n \n Change shape and size of array in-place.\n \n Parameters\n ----------\n new_shape : tuple of ints, or `n` ints\n Shape of resized array.\n refcheck : bool, optional\n If False, reference count will not be checked. Default is True.\n \n Returns\n -------\n None\n \n Raises\n ------\n ValueError\n If `a` does not own its own data or references or views to it exist,\n and the data memory must be changed.\n PyPy only: will always raise if the data memory must be changed, since\n there is no reliable way to determine if references or views to it\n exist.\n \n SystemError\n If the `order` keyword argument is specified. This behaviour is a\n bug in NumPy.\n \n See Also\n --------\n resize : Return a new array with the specified shape.\n \n Notes\n -----\n This reallocates space for the data area if necessary.\n \n Only contiguous arrays (data elements consecutive in memory) can be\n resized.\n \n The purpose of the reference count check is to make sure you\n do not use this array as a buffer for another Python object and then\n reallocate the memory. However, reference counts can increase in\n other ways so if you are sure that you have not shared the memory\n for this array with another Python object, then you may safely set\n `refcheck` to False.\n \n Examples\n --------\n Shrinking an array: array is flattened (in the order that the data are\n stored in memory), resized, and reshaped:\n \n >>> a = np.array([[0, 1], [2, 3]], order='C')\n >>> a.resize((2, 1))\n >>> a\n array([[0],\n [1]])\n \n >>> a = np.array([[0, 1], [2, 3]], order='F')\n >>> a.resize((2, 1))\n >>> a\n array([[0],\n [2]])\n \n Enlarging an array: as above, but missing entries are filled with zeros:\n \n >>> b = np.array([[0, 1], [2, 3]])\n >>> b.resize(2, 3) # new_shape parameter doesn't have to be a tuple\n >>> b\n array([[0, 1, 2],\n [3, 0, 0]])\n \n Referencing an array prevents resizing...\n \n >>> c = a\n >>> a.resize((1, 1))\n Traceback (most recent call last):\n ...\n ValueError: cannot resize an array that has been referenced ...\n \n Unless `refcheck` is False:\n \n >>> a.resize((1, 1), refcheck=False)\n >>> a\n array([[0]])\n >>> c\n array([[0]])\n \"\"\"\n pass"},{"col":4,"comment":"\n a.round(decimals=0, out=None)\n \n Return `a` with each element rounded to the given number of decimals.\n \n Refer to `numpy.around` for full documentation.\n \n See Also\n --------\n numpy.around : equivalent function\n ","endLoc":4264,"header":"def round(self, decimals=0, out=None)","id":608,"name":"round","nodeType":"Function","startLoc":4252,"text":"def round(self, decimals=0, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.round(decimals=0, out=None)\n \n Return `a` with each element rounded to the given number of decimals.\n \n Refer to `numpy.around` for full documentation.\n \n See Also\n --------\n numpy.around : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.searchsorted(v, side='left', sorter=None)\n \n Find indices where elements of v should be inserted in a to maintain order.\n \n For full documentation, see `numpy.searchsorted`\n \n See Also\n --------\n numpy.searchsorted : equivalent function\n ","endLoc":4278,"header":"def searchsorted(self, v, side='left', sorter=None)","id":609,"name":"searchsorted","nodeType":"Function","startLoc":4266,"text":"def searchsorted(self, v, side='left', sorter=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.searchsorted(v, side='left', sorter=None)\n \n Find indices where elements of v should be inserted in a to maintain order.\n \n For full documentation, see `numpy.searchsorted`\n \n See Also\n --------\n numpy.searchsorted : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.setfield(val, dtype, offset=0)\n \n Put a value into a specified place in a field defined by a data-type.\n \n Place `val` into `a`'s field defined by `dtype` and beginning `offset`\n bytes into the field.\n \n Parameters\n ----------\n val : object\n Value to be placed in field.\n dtype : dtype object\n Data-type of the field in which to place `val`.\n offset : int, optional\n The number of bytes into the field at which to place `val`.\n \n Returns\n -------\n None\n \n See Also\n --------\n getfield\n \n Examples\n --------\n >>> x = np.eye(3)\n >>> x.getfield(np.float64)\n array([[ 1., 0., 0.],\n [ 0., 1., 0.],\n [ 0., 0., 1.]])\n >>> x.setfield(3, np.int32)\n >>> x.getfield(np.int32)\n array([[3, 3, 3],\n [3, 3, 3],\n [3, 3, 3]])\n >>> x\n array([[ 1.00000000e+000, 1.48219694e-323, 1.48219694e-323],\n [ 1.48219694e-323, 1.00000000e+000, 1.48219694e-323],\n [ 1.48219694e-323, 1.48219694e-323, 1.00000000e+000]])\n >>> x.setfield(np.eye(3), np.int32)\n >>> x\n array([[ 1., 0., 0.],\n [ 0., 1., 0.],\n [ 0., 0., 1.]])\n ","endLoc":4328,"header":"def setfield(self, val, dtype, offset=0)","id":610,"name":"setfield","nodeType":"Function","startLoc":4280,"text":"def setfield(self, val, dtype, offset=0): # real signature unknown; restored from __doc__\n \"\"\"\n a.setfield(val, dtype, offset=0)\n \n Put a value into a specified place in a field defined by a data-type.\n \n Place `val` into `a`'s field defined by `dtype` and beginning `offset`\n bytes into the field.\n \n Parameters\n ----------\n val : object\n Value to be placed in field.\n dtype : dtype object\n Data-type of the field in which to place `val`.\n offset : int, optional\n The number of bytes into the field at which to place `val`.\n \n Returns\n -------\n None\n \n See Also\n --------\n getfield\n \n Examples\n --------\n >>> x = np.eye(3)\n >>> x.getfield(np.float64)\n array([[ 1., 0., 0.],\n [ 0., 1., 0.],\n [ 0., 0., 1.]])\n >>> x.setfield(3, np.int32)\n >>> x.getfield(np.int32)\n array([[3, 3, 3],\n [3, 3, 3],\n [3, 3, 3]])\n >>> x\n array([[ 1.00000000e+000, 1.48219694e-323, 1.48219694e-323],\n [ 1.48219694e-323, 1.00000000e+000, 1.48219694e-323],\n [ 1.48219694e-323, 1.48219694e-323, 1.00000000e+000]])\n >>> x.setfield(np.eye(3), np.int32)\n >>> x\n array([[ 1., 0., 0.],\n [ 0., 1., 0.],\n [ 0., 0., 1.]])\n \"\"\"\n pass"},{"col":4,"comment":"\n a.setflags(write=None, align=None, uic=None)\n \n Set array flags WRITEABLE, ALIGNED, and UPDATEIFCOPY, respectively.\n \n These Boolean-valued flags affect how numpy interprets the memory\n area used by `a` (see Notes below). The ALIGNED flag can only\n be set to True if the data is actually aligned according to the type.\n The UPDATEIFCOPY flag can never be set to True. The flag WRITEABLE\n can only be set to True if the array owns its own memory, or the\n ultimate owner of the memory exposes a writeable buffer interface,\n or is a string. (The exception for string is made so that unpickling\n can be done without copying memory.)\n \n Parameters\n ----------\n write : bool, optional\n Describes whether or not `a` can be written to.\n align : bool, optional\n Describes whether or not `a` is aligned properly for its type.\n uic : bool, optional\n Describes whether or not `a` is a copy of another \"base\" array.\n \n Notes\n -----\n Array flags provide information about how the memory area used\n for the array is to be interpreted. There are 6 Boolean flags\n in use, only three of which can be changed by the user:\n UPDATEIFCOPY, WRITEABLE, and ALIGNED.\n \n WRITEABLE (W) the data area can be written to;\n \n ALIGNED (A) the data and strides are aligned appropriately for the hardware\n (as determined by the compiler);\n \n UPDATEIFCOPY (U) this array is a copy of some other array (referenced\n by .base). When this array is deallocated, the base array will be\n updated with the contents of this array.\n \n All flags can be accessed using their first (upper case) letter as well\n as the full name.\n \n Examples\n --------\n >>> y\n array([[3, 1, 7],\n [2, 0, 0],\n [8, 5, 9]])\n >>> y.flags\n C_CONTIGUOUS : True\n F_CONTIGUOUS : False\n OWNDATA : True\n WRITEABLE : True\n ALIGNED : True\n UPDATEIFCOPY : False\n >>> y.setflags(write=0, align=0)\n >>> y.flags\n C_CONTIGUOUS : True\n F_CONTIGUOUS : False\n OWNDATA : True\n WRITEABLE : False\n ALIGNED : False\n UPDATEIFCOPY : False\n >>> y.setflags(uic=1)\n Traceback (most recent call last):\n File \"\", line 1, in \n ValueError: cannot set UPDATEIFCOPY flag to True\n ","endLoc":4399,"header":"def setflags(self, write=None, align=None, uic=None)","id":611,"name":"setflags","nodeType":"Function","startLoc":4330,"text":"def setflags(self, write=None, align=None, uic=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.setflags(write=None, align=None, uic=None)\n \n Set array flags WRITEABLE, ALIGNED, and UPDATEIFCOPY, respectively.\n \n These Boolean-valued flags affect how numpy interprets the memory\n area used by `a` (see Notes below). The ALIGNED flag can only\n be set to True if the data is actually aligned according to the type.\n The UPDATEIFCOPY flag can never be set to True. The flag WRITEABLE\n can only be set to True if the array owns its own memory, or the\n ultimate owner of the memory exposes a writeable buffer interface,\n or is a string. (The exception for string is made so that unpickling\n can be done without copying memory.)\n \n Parameters\n ----------\n write : bool, optional\n Describes whether or not `a` can be written to.\n align : bool, optional\n Describes whether or not `a` is aligned properly for its type.\n uic : bool, optional\n Describes whether or not `a` is a copy of another \"base\" array.\n \n Notes\n -----\n Array flags provide information about how the memory area used\n for the array is to be interpreted. There are 6 Boolean flags\n in use, only three of which can be changed by the user:\n UPDATEIFCOPY, WRITEABLE, and ALIGNED.\n \n WRITEABLE (W) the data area can be written to;\n \n ALIGNED (A) the data and strides are aligned appropriately for the hardware\n (as determined by the compiler);\n \n UPDATEIFCOPY (U) this array is a copy of some other array (referenced\n by .base). When this array is deallocated, the base array will be\n updated with the contents of this array.\n \n All flags can be accessed using their first (upper case) letter as well\n as the full name.\n \n Examples\n --------\n >>> y\n array([[3, 1, 7],\n [2, 0, 0],\n [8, 5, 9]])\n >>> y.flags\n C_CONTIGUOUS : True\n F_CONTIGUOUS : False\n OWNDATA : True\n WRITEABLE : True\n ALIGNED : True\n UPDATEIFCOPY : False\n >>> y.setflags(write=0, align=0)\n >>> y.flags\n C_CONTIGUOUS : True\n F_CONTIGUOUS : False\n OWNDATA : True\n WRITEABLE : False\n ALIGNED : False\n UPDATEIFCOPY : False\n >>> y.setflags(uic=1)\n Traceback (most recent call last):\n File \"\", line 1, in \n ValueError: cannot set UPDATEIFCOPY flag to True\n \"\"\"\n pass"},{"col":4,"comment":"\n a.sort(axis=-1, kind='quicksort', order=None)\n \n Sort an array, in-place.\n \n Parameters\n ----------\n axis : int, optional\n Axis along which to sort. Default is -1, which means sort along the\n last axis.\n kind : {'quicksort', 'mergesort', 'heapsort'}, optional\n Sorting algorithm. Default is 'quicksort'.\n order : str or list of str, optional\n When `a` is an array with fields defined, this argument specifies\n which fields to compare first, second, etc. A single field can\n be specified as a string, and not all fields need be specified,\n but unspecified fields will still be used, in the order in which\n they come up in the dtype, to break ties.\n \n See Also\n --------\n numpy.sort : Return a sorted copy of an array.\n argsort : Indirect sort.\n lexsort : Indirect stable sort on multiple keys.\n searchsorted : Find elements in sorted array.\n partition: Partial sort.\n \n Notes\n -----\n See ``sort`` for notes on the different sorting algorithms.\n \n Examples\n --------\n >>> a = np.array([[1,4], [3,1]])\n >>> a.sort(axis=1)\n >>> a\n array([[1, 4],\n [1, 3]])\n >>> a.sort(axis=0)\n >>> a\n array([[1, 3],\n [1, 4]])\n \n Use the `order` keyword to specify a field to use when sorting a\n structured array:\n \n >>> a = np.array([('a', 2), ('c', 1)], dtype=[('x', 'S1'), ('y', int)])\n >>> a.sort(order='y')\n >>> a\n array([('c', 1), ('a', 2)],\n dtype=[('x', '|S1'), ('y', '>> a = np.array([[1,4], [3,1]])\n >>> a.sort(axis=1)\n >>> a\n array([[1, 4],\n [1, 3]])\n >>> a.sort(axis=0)\n >>> a\n array([[1, 3],\n [1, 4]])\n \n Use the `order` keyword to specify a field to use when sorting a\n structured array:\n \n >>> a = np.array([('a', 2), ('c', 1)], dtype=[('x', 'S1'), ('y', int)])\n >>> a.sort(order='y')\n >>> a\n array([('c', 1), ('a', 2)],\n dtype=[('x', '|S1'), ('y', '>> x = np.array([[0, 1], [2, 3]])\n >>> x.tobytes()\n b'\u0000\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0002\u0000\u0000\u0000\u0003\u0000\u0000\u0000'\n >>> x.tobytes('C') == x.tobytes()\n True\n >>> x.tobytes('F')\n b'\u0000\u0000\u0000\u0000\u0002\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0003\u0000\u0000\u0000'\n ","endLoc":4561,"header":"def tobytes(self, order='C')","id":618,"name":"tobytes","nodeType":"Function","startLoc":4526,"text":"def tobytes(self, order='C'): # real signature unknown; restored from __doc__\n \"\"\"\n a.tobytes(order='C')\n \n Construct Python bytes containing the raw data bytes in the array.\n \n Constructs Python bytes showing a copy of the raw contents of\n data memory. The bytes object can be produced in either 'C' or 'Fortran',\n or 'Any' order (the default is 'C'-order). 'Any' order means C-order\n unless the F_CONTIGUOUS flag in the array is set, in which case it\n means 'Fortran' order.\n \n .. versionadded:: 1.9.0\n \n Parameters\n ----------\n order : {'C', 'F', None}, optional\n Order of the data for multidimensional arrays:\n C, Fortran, or the same as for the original array.\n \n Returns\n -------\n s : bytes\n Python bytes exhibiting a copy of `a`'s raw data.\n \n Examples\n --------\n >>> x = np.array([[0, 1], [2, 3]])\n >>> x.tobytes()\n b'\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x03\\x00\\x00\\x00'\n >>> x.tobytes('C') == x.tobytes()\n True\n >>> x.tobytes('F')\n b'\\x00\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x03\\x00\\x00\\x00'\n \"\"\"\n pass"},{"col":4,"comment":"\n a.tofile(fid, sep=\"\", format=\"%s\")\n \n Write array to a file as text or binary (default).\n \n Data is always written in 'C' order, independent of the order of `a`.\n The data produced by this method can be recovered using the function\n fromfile().\n \n Parameters\n ----------\n fid : file or str\n An open file object, or a string containing a filename.\n sep : str\n Separator between array items for text output.\n If \"\" (empty), a binary file is written, equivalent to\n ``file.write(a.tobytes())``.\n format : str\n Format string for text file output.\n Each entry in the array is formatted to text by first converting\n it to the closest Python type, and then using \"format\" % item.\n \n Notes\n -----\n This is a convenience function for quick storage of array data.\n Information on endianness and precision is lost, so this method is not a\n good choice for files intended to archive data or transport data between\n machines with different endianness. Some of these problems can be overcome\n by outputting the data as text files, at the expense of speed and file\n size.\n ","endLoc":4595,"header":"def tofile(self, fid, sep=\"\", format=\"%s\")","id":619,"name":"tofile","nodeType":"Function","startLoc":4563,"text":"def tofile(self, fid, sep=\"\", format=\"%s\"): # real signature unknown; restored from __doc__\n \"\"\"\n a.tofile(fid, sep=\"\", format=\"%s\")\n \n Write array to a file as text or binary (default).\n \n Data is always written in 'C' order, independent of the order of `a`.\n The data produced by this method can be recovered using the function\n fromfile().\n \n Parameters\n ----------\n fid : file or str\n An open file object, or a string containing a filename.\n sep : str\n Separator between array items for text output.\n If \"\" (empty), a binary file is written, equivalent to\n ``file.write(a.tobytes())``.\n format : str\n Format string for text file output.\n Each entry in the array is formatted to text by first converting\n it to the closest Python type, and then using \"format\" % item.\n \n Notes\n -----\n This is a convenience function for quick storage of array data.\n Information on endianness and precision is lost, so this method is not a\n good choice for files intended to archive data or transport data between\n machines with different endianness. Some of these problems can be overcome\n by outputting the data as text files, at the expense of speed and file\n size.\n \"\"\"\n pass"},{"attributeType":"date","col":4,"comment":"null","endLoc":52,"id":620,"name":"max","nodeType":"Attribute","startLoc":52,"text":"max"},{"col":4,"comment":"\n a.tolist()\n \n Return the array as a (possibly nested) list.\n \n Return a copy of the array data as a (nested) Python list.\n Data items are converted to the nearest compatible Python type.\n \n Parameters\n ----------\n none\n \n Returns\n -------\n y : list\n The possibly nested list of array elements.\n \n Notes\n -----\n The array may be recreated, ``a = np.array(a.tolist())``.\n \n Examples\n --------\n >>> a = np.array([1, 2])\n >>> a.tolist()\n [1, 2]\n >>> a = np.array([[1, 2], [3, 4]])\n >>> list(a)\n [array([1, 2]), array([3, 4])]\n >>> a.tolist()\n [[1, 2], [3, 4]]\n ","endLoc":4630,"header":"def tolist(self)","id":621,"name":"tolist","nodeType":"Function","startLoc":4597,"text":"def tolist(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.tolist()\n \n Return the array as a (possibly nested) list.\n \n Return a copy of the array data as a (nested) Python list.\n Data items are converted to the nearest compatible Python type.\n \n Parameters\n ----------\n none\n \n Returns\n -------\n y : list\n The possibly nested list of array elements.\n \n Notes\n -----\n The array may be recreated, ``a = np.array(a.tolist())``.\n \n Examples\n --------\n >>> a = np.array([1, 2])\n >>> a.tolist()\n [1, 2]\n >>> a = np.array([[1, 2], [3, 4]])\n >>> list(a)\n [array([1, 2]), array([3, 4])]\n >>> a.tolist()\n [[1, 2], [3, 4]]\n \"\"\"\n pass"},{"col":4,"comment":"\n a.tostring(order='C')\n \n Construct Python bytes containing the raw data bytes in the array.\n \n Constructs Python bytes showing a copy of the raw contents of\n data memory. The bytes object can be produced in either 'C' or 'Fortran',\n or 'Any' order (the default is 'C'-order). 'Any' order means C-order\n unless the F_CONTIGUOUS flag in the array is set, in which case it\n means 'Fortran' order.\n \n This function is a compatibility alias for tobytes. Despite its name it returns bytes not strings.\n \n Parameters\n ----------\n order : {'C', 'F', None}, optional\n Order of the data for multidimensional arrays:\n C, Fortran, or the same as for the original array.\n \n Returns\n -------\n s : bytes\n Python bytes exhibiting a copy of `a`'s raw data.\n \n Examples\n --------\n >>> x = np.array([[0, 1], [2, 3]])\n >>> x.tobytes()\n b'\u0000\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0002\u0000\u0000\u0000\u0003\u0000\u0000\u0000'\n >>> x.tobytes('C') == x.tobytes()\n True\n >>> x.tobytes('F')\n b'\u0000\u0000\u0000\u0000\u0002\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0003\u0000\u0000\u0000'\n ","endLoc":4667,"header":"def tostring(self, order='C')","id":622,"name":"tostring","nodeType":"Function","startLoc":4632,"text":"def tostring(self, order='C'): # real signature unknown; restored from __doc__\n \"\"\"\n a.tostring(order='C')\n \n Construct Python bytes containing the raw data bytes in the array.\n \n Constructs Python bytes showing a copy of the raw contents of\n data memory. The bytes object can be produced in either 'C' or 'Fortran',\n or 'Any' order (the default is 'C'-order). 'Any' order means C-order\n unless the F_CONTIGUOUS flag in the array is set, in which case it\n means 'Fortran' order.\n \n This function is a compatibility alias for tobytes. Despite its name it returns bytes not strings.\n \n Parameters\n ----------\n order : {'C', 'F', None}, optional\n Order of the data for multidimensional arrays:\n C, Fortran, or the same as for the original array.\n \n Returns\n -------\n s : bytes\n Python bytes exhibiting a copy of `a`'s raw data.\n \n Examples\n --------\n >>> x = np.array([[0, 1], [2, 3]])\n >>> x.tobytes()\n b'\\x00\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x03\\x00\\x00\\x00'\n >>> x.tobytes('C') == x.tobytes()\n True\n >>> x.tobytes('F')\n b'\\x00\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x03\\x00\\x00\\x00'\n \"\"\"\n pass"},{"attributeType":"timedelta","col":4,"comment":"null","endLoc":53,"id":623,"name":"resolution","nodeType":"Attribute","startLoc":53,"text":"resolution"},{"col":4,"comment":"\n a.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None)\n \n Return the sum along diagonals of the array.\n \n Refer to `numpy.trace` for full documentation.\n \n See Also\n --------\n numpy.trace : equivalent function\n ","endLoc":4681,"header":"def trace(self, offset=0, axis1=0, axis2=1, dtype=None, out=None)","id":624,"name":"trace","nodeType":"Function","startLoc":4669,"text":"def trace(self, offset=0, axis1=0, axis2=1, dtype=None, out=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None)\n \n Return the sum along diagonals of the array.\n \n Refer to `numpy.trace` for full documentation.\n \n See Also\n --------\n numpy.trace : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.transpose(*axes)\n \n Returns a view of the array with axes transposed.\n \n For a 1-D array, this has no effect. (To change between column and\n row vectors, first cast the 1-D array into a matrix object.)\n For a 2-D array, this is the usual matrix transpose.\n For an n-D array, if axes are given, their order indicates how the\n axes are permuted (see Examples). If axes are not provided and\n ``a.shape = (i[0], i[1], ... i[n-2], i[n-1])``, then\n ``a.transpose().shape = (i[n-1], i[n-2], ... i[1], i[0])``.\n \n Parameters\n ----------\n axes : None, tuple of ints, or `n` ints\n \n * None or no argument: reverses the order of the axes.\n \n * tuple of ints: `i` in the `j`-th place in the tuple means `a`'s\n `i`-th axis becomes `a.transpose()`'s `j`-th axis.\n \n * `n` ints: same as an n-tuple of the same ints (this form is\n intended simply as a \"convenience\" alternative to the tuple form)\n \n Returns\n -------\n out : ndarray\n View of `a`, with axes suitably permuted.\n \n See Also\n --------\n ndarray.T : Array property returning the array transposed.\n \n Examples\n --------\n >>> a = np.array([[1, 2], [3, 4]])\n >>> a\n array([[1, 2],\n [3, 4]])\n >>> a.transpose()\n array([[1, 3],\n [2, 4]])\n >>> a.transpose((1, 0))\n array([[1, 3],\n [2, 4]])\n >>> a.transpose(1, 0)\n array([[1, 3],\n [2, 4]])\n ","endLoc":4734,"header":"def transpose(self, *axes)","id":625,"name":"transpose","nodeType":"Function","startLoc":4683,"text":"def transpose(self, *axes): # real signature unknown; restored from __doc__\n \"\"\"\n a.transpose(*axes)\n \n Returns a view of the array with axes transposed.\n \n For a 1-D array, this has no effect. (To change between column and\n row vectors, first cast the 1-D array into a matrix object.)\n For a 2-D array, this is the usual matrix transpose.\n For an n-D array, if axes are given, their order indicates how the\n axes are permuted (see Examples). If axes are not provided and\n ``a.shape = (i[0], i[1], ... i[n-2], i[n-1])``, then\n ``a.transpose().shape = (i[n-1], i[n-2], ... i[1], i[0])``.\n \n Parameters\n ----------\n axes : None, tuple of ints, or `n` ints\n \n * None or no argument: reverses the order of the axes.\n \n * tuple of ints: `i` in the `j`-th place in the tuple means `a`'s\n `i`-th axis becomes `a.transpose()`'s `j`-th axis.\n \n * `n` ints: same as an n-tuple of the same ints (this form is\n intended simply as a \"convenience\" alternative to the tuple form)\n \n Returns\n -------\n out : ndarray\n View of `a`, with axes suitably permuted.\n \n See Also\n --------\n ndarray.T : Array property returning the array transposed.\n \n Examples\n --------\n >>> a = np.array([[1, 2], [3, 4]])\n >>> a\n array([[1, 2],\n [3, 4]])\n >>> a.transpose()\n array([[1, 3],\n [2, 4]])\n >>> a.transpose((1, 0))\n array([[1, 3],\n [2, 4]])\n >>> a.transpose(1, 0)\n array([[1, 3],\n [2, 4]])\n \"\"\"\n pass"},{"col":4,"comment":"\n a.var(axis=None, dtype=None, out=None, ddof=0, keepdims=False)\n \n Returns the variance of the array elements, along given axis.\n \n Refer to `numpy.var` for full documentation.\n \n See Also\n --------\n numpy.var : equivalent function\n ","endLoc":4748,"header":"def var(self, axis=None, dtype=None, out=None, ddof=0, keepdims=False)","id":626,"name":"var","nodeType":"Function","startLoc":4736,"text":"def var(self, axis=None, dtype=None, out=None, ddof=0, keepdims=False): # real signature unknown; restored from __doc__\n \"\"\"\n a.var(axis=None, dtype=None, out=None, ddof=0, keepdims=False)\n \n Returns the variance of the array elements, along given axis.\n \n Refer to `numpy.var` for full documentation.\n \n See Also\n --------\n numpy.var : equivalent function\n \"\"\"\n pass"},{"col":4,"comment":"\n a.view(dtype=None, type=None)\n \n New view of array with the same data.\n \n Parameters\n ----------\n dtype : data-type or ndarray sub-class, optional\n Data-type descriptor of the returned view, e.g., float32 or int16. The\n default, None, results in the view having the same data-type as `a`.\n This argument can also be specified as an ndarray sub-class, which\n then specifies the type of the returned object (this is equivalent to\n setting the ``type`` parameter).\n type : Python type, optional\n Type of the returned view, e.g., ndarray or matrix. Again, the\n default None results in type preservation.\n \n Notes\n -----\n ``a.view()`` is used two different ways:\n \n ``a.view(some_dtype)`` or ``a.view(dtype=some_dtype)`` constructs a view\n of the array's memory with a different data-type. This can cause a\n reinterpretation of the bytes of memory.\n \n ``a.view(ndarray_subclass)`` or ``a.view(type=ndarray_subclass)`` just\n returns an instance of `ndarray_subclass` that looks at the same array\n (same shape, dtype, etc.) This does not cause a reinterpretation of the\n memory.\n \n For ``a.view(some_dtype)``, if ``some_dtype`` has a different number of\n bytes per entry than the previous dtype (for example, converting a\n regular array to a structured array), then the behavior of the view\n cannot be predicted just from the superficial appearance of ``a`` (shown\n by ``print(a)``). It also depends on exactly how ``a`` is stored in\n memory. Therefore if ``a`` is C-ordered versus fortran-ordered, versus\n defined as a slice or transpose, etc., the view may give different\n results.\n \n \n Examples\n --------\n >>> x = np.array([(1, 2)], dtype=[('a', np.int8), ('b', np.int8)])\n \n Viewing array data using a different type and dtype:\n \n >>> y = x.view(dtype=np.int16, type=np.matrix)\n >>> y\n matrix([[513]], dtype=int16)\n >>> print(type(y))\n \n \n Creating a view on a structured array so it can be used in calculations\n \n >>> x = np.array([(1, 2),(3,4)], dtype=[('a', np.int8), ('b', np.int8)])\n >>> xv = x.view(dtype=np.int8).reshape(-1,2)\n >>> xv\n array([[1, 2],\n [3, 4]], dtype=int8)\n >>> xv.mean(0)\n array([ 2., 3.])\n \n Making changes to the view changes the underlying array\n \n >>> xv[0,1] = 20\n >>> print(x)\n [(1, 20) (3, 4)]\n \n Using a view to convert an array to a recarray:\n \n >>> z = x.view(np.recarray)\n >>> z.a\n array([1], dtype=int8)\n \n Views share data:\n \n >>> x[0] = (9, 10)\n >>> z[0]\n (9, 10)\n \n Views that change the dtype size (bytes per entry) should normally be\n avoided on arrays defined by slices, transposes, fortran-ordering, etc.:\n \n >>> x = np.array([[1,2,3],[4,5,6]], dtype=np.int16)\n >>> y = x[:, 0:2]\n >>> y\n array([[1, 2],\n [4, 5]], dtype=int16)\n >>> y.view(dtype=[('width', np.int16), ('length', np.int16)])\n Traceback (most recent call last):\n File \"\", line 1, in \n ValueError: new type not compatible with array.\n >>> z = y.copy()\n >>> z.view(dtype=[('width', np.int16), ('length', np.int16)])\n array([[(1, 2)],\n [(4, 5)]], dtype=[('width', '>> x = np.array([(1, 2)], dtype=[('a', np.int8), ('b', np.int8)])\n \n Viewing array data using a different type and dtype:\n \n >>> y = x.view(dtype=np.int16, type=np.matrix)\n >>> y\n matrix([[513]], dtype=int16)\n >>> print(type(y))\n \n \n Creating a view on a structured array so it can be used in calculations\n \n >>> x = np.array([(1, 2),(3,4)], dtype=[('a', np.int8), ('b', np.int8)])\n >>> xv = x.view(dtype=np.int8).reshape(-1,2)\n >>> xv\n array([[1, 2],\n [3, 4]], dtype=int8)\n >>> xv.mean(0)\n array([ 2., 3.])\n \n Making changes to the view changes the underlying array\n \n >>> xv[0,1] = 20\n >>> print(x)\n [(1, 20) (3, 4)]\n \n Using a view to convert an array to a recarray:\n \n >>> z = x.view(np.recarray)\n >>> z.a\n array([1], dtype=int8)\n \n Views share data:\n \n >>> x[0] = (9, 10)\n >>> z[0]\n (9, 10)\n \n Views that change the dtype size (bytes per entry) should normally be\n avoided on arrays defined by slices, transposes, fortran-ordering, etc.:\n \n >>> x = np.array([[1,2,3],[4,5,6]], dtype=np.int16)\n >>> y = x[:, 0:2]\n >>> y\n array([[1, 2],\n [4, 5]], dtype=int16)\n >>> y.view(dtype=[('width', np.int16), ('length', np.int16)])\n Traceback (most recent call last):\n File \"\", line 1, in \n ValueError: new type not compatible with array.\n >>> z = y.copy()\n >>> z.view(dtype=[('width', np.int16), ('length', np.int16)])\n array([[(1, 2)],\n [(4, 5)]], dtype=[('width', ' Object of same type as ndarray object obj. ","endLoc":4864,"header":"def __array_prepare__(self, obj)","id":631,"name":"__array_prepare__","nodeType":"Function","startLoc":4862,"text":"def __array_prepare__(self, obj): # real signature unknown; restored from __doc__\n \"\"\" a.__array_prepare__(obj) -> Object of same type as ndarray object obj. \"\"\"\n pass"},{"col":4,"comment":" a.__array_wrap__(obj) -> Object of same type as ndarray object a. ","endLoc":4868,"header":"def __array_wrap__(self, obj)","id":632,"name":"__array_wrap__","nodeType":"Function","startLoc":4866,"text":"def __array_wrap__(self, obj): # real signature unknown; restored from __doc__\n \"\"\" a.__array_wrap__(obj) -> Object of same type as ndarray object a. \"\"\"\n pass"},{"col":4,"comment":"\n a.__array__(|dtype) -> reference if type unchanged, copy otherwise.\n \n Returns either a new reference to self if dtype is not given or a new array\n of provided data type if dtype is different from the current dtype of the\n array.\n ","endLoc":4878,"header":"def __array__(self, dtype=None)","id":633,"name":"__array__","nodeType":"Function","startLoc":4870,"text":"def __array__(self, dtype=None): # known case of numpy.core.multiarray.ndarray.__array__\n \"\"\"\n a.__array__(|dtype) -> reference if type unchanged, copy otherwise.\n \n Returns either a new reference to self if dtype is not given or a new array\n of provided data type if dtype is different from the current dtype of the\n array.\n \"\"\"\n pass"},{"col":4,"comment":" self != 0 ","endLoc":4882,"header":"def __bool__(self, *args, **kwargs)","id":634,"name":"__bool__","nodeType":"Function","startLoc":4880,"text":"def __bool__(self, *args, **kwargs): # real signature unknown\n \"\"\" self != 0 \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":4885,"header":"def __complex__(self, *args, **kwargs)","id":635,"name":"__complex__","nodeType":"Function","startLoc":4884,"text":"def __complex__(self, *args, **kwargs): # real signature unknown\n pass"},{"col":4,"comment":" Return key in self. ","endLoc":4889,"header":"def __contains__(self, *args, **kwargs)","id":636,"name":"__contains__","nodeType":"Function","startLoc":4887,"text":"def __contains__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return key in self. \"\"\"\n pass"},{"col":4,"comment":"\n a.__copy__([order])\n \n Return a copy of the array.\n \n Parameters\n ----------\n order : {'C', 'F', 'A'}, optional\n If order is 'C' (False) then the result is contiguous (default).\n If order is 'Fortran' (True) then the result has fortran order.\n If order is 'Any' (None) then the result has fortran order\n only if the array already is in fortran order.\n ","endLoc":4905,"header":"def __copy__(self, order=None)","id":637,"name":"__copy__","nodeType":"Function","startLoc":4891,"text":"def __copy__(self, order=None): # real signature unknown; restored from __doc__\n \"\"\"\n a.__copy__([order])\n \n Return a copy of the array.\n \n Parameters\n ----------\n order : {'C', 'F', 'A'}, optional\n If order is 'C' (False) then the result is contiguous (default).\n If order is 'Fortran' (True) then the result has fortran order.\n If order is 'Any' (None) then the result has fortran order\n only if the array already is in fortran order.\n \"\"\"\n pass"},{"col":4,"comment":"\n a.__deepcopy__() -> Deep copy of array.\n \n Used if copy.deepcopy is called on an array.\n ","endLoc":4913,"header":"def __deepcopy__(self)","id":638,"name":"__deepcopy__","nodeType":"Function","startLoc":4907,"text":"def __deepcopy__(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.__deepcopy__() -> Deep copy of array.\n \n Used if copy.deepcopy is called on an array.\n \"\"\"\n pass"},{"col":4,"comment":" Delete self[key]. ","endLoc":4917,"header":"def __delitem__(self, *args, **kwargs)","id":639,"name":"__delitem__","nodeType":"Function","startLoc":4915,"text":"def __delitem__(self, *args, **kwargs): # real signature unknown\n \"\"\" Delete self[key]. \"\"\"\n pass"},{"col":4,"comment":" Return divmod(self, value). ","endLoc":4921,"header":"def __divmod__(self, *args, **kwargs)","id":640,"name":"__divmod__","nodeType":"Function","startLoc":4919,"text":"def __divmod__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return divmod(self, value). \"\"\"\n pass"},{"col":4,"comment":" Return self==value. ","endLoc":4925,"header":"def __eq__(self, *args, **kwargs)","id":641,"name":"__eq__","nodeType":"Function","startLoc":4923,"text":"def __eq__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self==value. \"\"\"\n pass"},{"col":4,"comment":" float(self) ","endLoc":4929,"header":"def __float__(self, *args, **kwargs)","id":642,"name":"__float__","nodeType":"Function","startLoc":4927,"text":"def __float__(self, *args, **kwargs): # real signature unknown\n \"\"\" float(self) \"\"\"\n pass"},{"col":4,"comment":" Return self//value. ","endLoc":4933,"header":"def __floordiv__(self, *args, **kwargs)","id":643,"name":"__floordiv__","nodeType":"Function","startLoc":4931,"text":"def __floordiv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self//value. \"\"\"\n pass"},{"col":4,"comment":" Return self[key]. ","endLoc":4937,"header":"def __getitem__(self, *args, **kwargs)","id":644,"name":"__getitem__","nodeType":"Function","startLoc":4935,"text":"def __getitem__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self[key]. \"\"\"\n pass"},{"col":4,"comment":" Return self>=value. ","endLoc":4941,"header":"def __ge__(self, *args, **kwargs)","id":645,"name":"__ge__","nodeType":"Function","startLoc":4939,"text":"def __ge__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self>=value. \"\"\"\n pass"},{"col":4,"comment":" Return self>value. ","endLoc":4945,"header":"def __gt__(self, *args, **kwargs)","id":646,"name":"__gt__","nodeType":"Function","startLoc":4943,"text":"def __gt__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self>value. \"\"\"\n pass"},{"col":4,"comment":" Return self+=value. ","endLoc":4949,"header":"def __iadd__(self, *args, **kwargs)","id":647,"name":"__iadd__","nodeType":"Function","startLoc":4947,"text":"def __iadd__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self+=value. \"\"\"\n pass"},{"col":4,"comment":" Return self&=value. ","endLoc":4953,"header":"def __iand__(self, *args, **kwargs)","id":648,"name":"__iand__","nodeType":"Function","startLoc":4951,"text":"def __iand__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self&=value. \"\"\"\n pass"},{"col":4,"comment":" Return self//=value. ","endLoc":4957,"header":"def __ifloordiv__(self, *args, **kwargs)","id":649,"name":"__ifloordiv__","nodeType":"Function","startLoc":4955,"text":"def __ifloordiv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self//=value. \"\"\"\n pass"},{"col":4,"comment":" Return self<<=value. ","endLoc":4961,"header":"def __ilshift__(self, *args, **kwargs)","id":650,"name":"__ilshift__","nodeType":"Function","startLoc":4959,"text":"def __ilshift__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self<<=value. \"\"\"\n pass"},{"col":4,"comment":" Return self@=value. ","endLoc":4965,"header":"def __imatmul__(self, *args, **kwargs)","id":651,"name":"__imatmul__","nodeType":"Function","startLoc":4963,"text":"def __imatmul__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self@=value. \"\"\"\n pass"},{"col":4,"comment":" Return self%=value. ","endLoc":4969,"header":"def __imod__(self, *args, **kwargs)","id":652,"name":"__imod__","nodeType":"Function","startLoc":4967,"text":"def __imod__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self%=value. \"\"\"\n pass"},{"col":4,"comment":" Return self*=value. ","endLoc":4973,"header":"def __imul__(self, *args, **kwargs)","id":653,"name":"__imul__","nodeType":"Function","startLoc":4971,"text":"def __imul__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self*=value. \"\"\"\n pass"},{"col":4,"comment":" Return self converted to an integer, if self is suitable for use as an index into a list. ","endLoc":4977,"header":"def __index__(self, *args, **kwargs)","id":654,"name":"__index__","nodeType":"Function","startLoc":4975,"text":"def __index__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self converted to an integer, if self is suitable for use as an index into a list. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":4980,"header":"def __init__(self, shape, dtype=None, buffer=None, offset=0, strides=None, order=None)","id":655,"name":"__init__","nodeType":"Function","startLoc":4979,"text":"def __init__(self, shape, dtype=None, buffer=None, offset=0, strides=None, order=None): # real signature unknown; restored from __doc__\n pass"},{"col":4,"comment":" int(self) ","endLoc":4984,"header":"def __int__(self, *args, **kwargs)","id":656,"name":"__int__","nodeType":"Function","startLoc":4982,"text":"def __int__(self, *args, **kwargs): # real signature unknown\n \"\"\" int(self) \"\"\"\n pass"},{"col":4,"comment":" ~self ","endLoc":4988,"header":"def __invert__(self, *args, **kwargs)","id":657,"name":"__invert__","nodeType":"Function","startLoc":4986,"text":"def __invert__(self, *args, **kwargs): # real signature unknown\n \"\"\" ~self \"\"\"\n pass"},{"col":4,"comment":" Return self|=value. ","endLoc":4992,"header":"def __ior__(self, *args, **kwargs)","id":658,"name":"__ior__","nodeType":"Function","startLoc":4990,"text":"def __ior__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self|=value. \"\"\"\n pass"},{"col":4,"comment":" Return self**=value. ","endLoc":4996,"header":"def __ipow__(self, *args, **kwargs)","id":659,"name":"__ipow__","nodeType":"Function","startLoc":4994,"text":"def __ipow__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self**=value. \"\"\"\n pass"},{"col":4,"comment":" Return self>>=value. ","endLoc":5000,"header":"def __irshift__(self, *args, **kwargs)","id":660,"name":"__irshift__","nodeType":"Function","startLoc":4998,"text":"def __irshift__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self>>=value. \"\"\"\n pass"},{"col":4,"comment":" Return self-=value. ","endLoc":5004,"header":"def __isub__(self, *args, **kwargs)","id":661,"name":"__isub__","nodeType":"Function","startLoc":5002,"text":"def __isub__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self-=value. \"\"\"\n pass"},{"col":4,"comment":" Implement iter(self). ","endLoc":5008,"header":"def __iter__(self, *args, **kwargs)","id":662,"name":"__iter__","nodeType":"Function","startLoc":5006,"text":"def __iter__(self, *args, **kwargs): # real signature unknown\n \"\"\" Implement iter(self). \"\"\"\n pass"},{"col":4,"comment":" Return self/=value. ","endLoc":5012,"header":"def __itruediv__(self, *args, **kwargs)","id":663,"name":"__itruediv__","nodeType":"Function","startLoc":5010,"text":"def __itruediv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self/=value. \"\"\"\n pass"},{"col":4,"comment":" Return self^=value. ","endLoc":5016,"header":"def __ixor__(self, *args, **kwargs)","id":664,"name":"__ixor__","nodeType":"Function","startLoc":5014,"text":"def __ixor__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self^=value. \"\"\"\n pass"},{"col":4,"comment":" Return len(self). ","endLoc":5020,"header":"def __len__(self, *args, **kwargs)","id":665,"name":"__len__","nodeType":"Function","startLoc":5018,"text":"def __len__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return len(self). \"\"\"\n pass"},{"col":4,"comment":" Return self<=value. ","endLoc":5024,"header":"def __le__(self, *args, **kwargs)","id":666,"name":"__le__","nodeType":"Function","startLoc":5022,"text":"def __le__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self<=value. \"\"\"\n pass"},{"col":4,"comment":" Return self< Self","id":668,"name":"__new__","nodeType":"Function","startLoc":232,"text":"def __new__(\n cls,\n year: SupportsIndex,\n month: SupportsIndex,\n day: SupportsIndex,\n hour: SupportsIndex = ...,\n minute: SupportsIndex = ...,\n second: SupportsIndex = ...,\n microsecond: SupportsIndex = ...,\n tzinfo: _TzInfo | None = ...,\n *,\n fold: int = ...,\n ) -> Self: ..."},{"col":4,"comment":" Return self int","id":672,"name":"hour","nodeType":"Function","startLoc":245,"text":"@property\n def hour(self) -> int: ..."},{"col":4,"comment":" Return self*value. ","endLoc":5044,"header":"def __mul__(self, *args, **kwargs)","id":673,"name":"__mul__","nodeType":"Function","startLoc":5042,"text":"def __mul__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self*value. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":248,"header":"@property\n def minute(self) -> int","id":674,"name":"minute","nodeType":"Function","startLoc":247,"text":"@property\n def minute(self) -> int: ..."},{"col":4,"comment":"null","endLoc":250,"header":"@property\n def second(self) -> int","id":675,"name":"second","nodeType":"Function","startLoc":249,"text":"@property\n def second(self) -> int: ..."},{"col":4,"comment":" -self ","endLoc":5048,"header":"def __neg__(self, *args, **kwargs)","id":676,"name":"__neg__","nodeType":"Function","startLoc":5046,"text":"def __neg__(self, *args, **kwargs): # real signature unknown\n \"\"\" -self \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":252,"header":"@property\n def microsecond(self) -> int","id":677,"name":"microsecond","nodeType":"Function","startLoc":251,"text":"@property\n def microsecond(self) -> int: ..."},{"col":4,"comment":" Create and return a new object. See help(type) for accurate signature. ","endLoc":5053,"header":"@staticmethod # known case of __new__\n def __new__(*args, **kwargs)","id":678,"name":"__new__","nodeType":"Function","startLoc":5050,"text":"@staticmethod # known case of __new__\n def __new__(*args, **kwargs): # real signature unknown\n \"\"\" Create and return a new object. See help(type) for accurate signature. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":254,"header":"@property\n def tzinfo(self) -> _TzInfo | None","id":679,"name":"tzinfo","nodeType":"Function","startLoc":253,"text":"@property\n def tzinfo(self) -> _TzInfo | None: ..."},{"col":4,"comment":"null","endLoc":256,"header":"@property\n def fold(self) -> int","id":680,"name":"fold","nodeType":"Function","startLoc":255,"text":"@property\n def fold(self) -> int: ..."},{"col":4,"comment":" Return self!=value. ","endLoc":5057,"header":"def __ne__(self, *args, **kwargs)","id":681,"name":"__ne__","nodeType":"Function","startLoc":5055,"text":"def __ne__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self!=value. \"\"\"\n pass"},{"col":8,"comment":"null","endLoc":262,"header":"@classmethod\n def fromtimestamp(cls, timestamp: float, tz: _TzInfo | None = ...) -> Self","id":682,"name":"fromtimestamp","nodeType":"Function","startLoc":261,"text":"@classmethod\n def fromtimestamp(cls, timestamp: float, tz: _TzInfo | None = ...) -> Self: ..."},{"col":4,"comment":" Return self|value. ","endLoc":5061,"header":"def __or__(self, *args, **kwargs)","id":683,"name":"__or__","nodeType":"Function","startLoc":5059,"text":"def __or__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self|value. \"\"\"\n pass"},{"col":4,"comment":" +self ","endLoc":5065,"header":"def __pos__(self, *args, **kwargs)","id":684,"name":"__pos__","nodeType":"Function","startLoc":5063,"text":"def __pos__(self, *args, **kwargs): # real signature unknown\n \"\"\" +self \"\"\"\n pass"},{"col":8,"comment":"null","endLoc":265,"header":"@classmethod\n def fromtimestamp(cls, __timestamp: float, tz: _TzInfo | None = ...) -> Self","id":685,"name":"fromtimestamp","nodeType":"Function","startLoc":264,"text":"@classmethod\n def fromtimestamp(cls, __timestamp: float, tz: _TzInfo | None = ...) -> Self: ..."},{"col":4,"comment":" Return pow(self, value, mod). ","endLoc":5069,"header":"def __pow__(self, *args, **kwargs)","id":686,"name":"__pow__","nodeType":"Function","startLoc":5067,"text":"def __pow__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return pow(self, value, mod). \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":268,"header":"@classmethod\n def utcfromtimestamp(cls, __t: float) -> Self","id":687,"name":"utcfromtimestamp","nodeType":"Function","startLoc":267,"text":"@classmethod\n def utcfromtimestamp(cls, __t: float) -> Self: ..."},{"col":8,"comment":"null","endLoc":271,"header":"@classmethod\n def now(cls, tz: _TzInfo | None = None) -> Self","id":689,"name":"now","nodeType":"Function","startLoc":270,"text":"@classmethod\n def now(cls, tz: _TzInfo | None = None) -> Self: ..."},{"col":4,"comment":" Return value+self. ","endLoc":5073,"header":"def __radd__(self, *args, **kwargs)","id":690,"name":"__radd__","nodeType":"Function","startLoc":5071,"text":"def __radd__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value+self. \"\"\"\n pass"},{"col":8,"comment":"null","endLoc":275,"header":"@overload\n @classmethod\n def now(cls, tz: None = None) -> Self","id":692,"name":"now","nodeType":"Function","startLoc":273,"text":"@overload\n @classmethod\n def now(cls, tz: None = None) -> Self: ..."},{"col":4,"comment":" Return value&self. ","endLoc":5077,"header":"def __rand__(self, *args, **kwargs)","id":693,"name":"__rand__","nodeType":"Function","startLoc":5075,"text":"def __rand__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value&self. \"\"\"\n pass"},{"col":4,"comment":" Return divmod(value, self). ","endLoc":5081,"header":"def __rdivmod__(self, *args, **kwargs)","id":694,"name":"__rdivmod__","nodeType":"Function","startLoc":5079,"text":"def __rdivmod__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return divmod(value, self). \"\"\"\n pass"},{"col":8,"comment":"null","endLoc":278,"header":"@overload\n @classmethod\n def now(cls, tz: _TzInfo) -> datetime","id":696,"name":"now","nodeType":"Function","startLoc":276,"text":"@overload\n @classmethod\n def now(cls, tz: _TzInfo) -> datetime: ..."},{"col":4,"comment":"\n a.__reduce__()\n \n For pickling.\n ","endLoc":5089,"header":"def __reduce__(self)","id":697,"name":"__reduce__","nodeType":"Function","startLoc":5083,"text":"def __reduce__(self): # real signature unknown; restored from __doc__\n \"\"\"\n a.__reduce__()\n \n For pickling.\n \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":281,"header":"@classmethod\n def utcnow(cls) -> Self","id":698,"name":"utcnow","nodeType":"Function","startLoc":280,"text":"@classmethod\n def utcnow(cls) -> Self: ..."},{"col":4,"comment":" Return repr(self). ","endLoc":5093,"header":"def __repr__(self, *args, **kwargs)","id":699,"name":"__repr__","nodeType":"Function","startLoc":5091,"text":"def __repr__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return repr(self). \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":283,"header":"@classmethod\n def combine(cls, date: _Date, time: _Time, tzinfo: _TzInfo | None = ...) -> Self","id":700,"name":"combine","nodeType":"Function","startLoc":282,"text":"@classmethod\n def combine(cls, date: _Date, time: _Time, tzinfo: _TzInfo | None = ...) -> Self: ..."},{"col":4,"comment":" Return value//self. ","endLoc":5097,"header":"def __rfloordiv__(self, *args, **kwargs)","id":701,"name":"__rfloordiv__","nodeType":"Function","startLoc":5095,"text":"def __rfloordiv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value//self. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":284,"header":"def timestamp(self) -> float","id":702,"name":"timestamp","nodeType":"Function","startLoc":284,"text":"def timestamp(self) -> float: ..."},{"col":4,"comment":" Return value< struct_time","id":704,"name":"utctimetuple","nodeType":"Function","startLoc":285,"text":"def utctimetuple(self) -> struct_time: ..."},{"col":4,"comment":"null","endLoc":286,"header":"def date(self) -> _Date","id":705,"name":"date","nodeType":"Function","startLoc":286,"text":"def date(self) -> _Date: ..."},{"col":4,"comment":" Return value@self. ","endLoc":5105,"header":"def __rmatmul__(self, *args, **kwargs)","id":706,"name":"__rmatmul__","nodeType":"Function","startLoc":5103,"text":"def __rmatmul__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value@self. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":287,"header":"def time(self) -> _Time","id":707,"name":"time","nodeType":"Function","startLoc":287,"text":"def time(self) -> _Time: ..."},{"col":4,"comment":" Return value%self. ","endLoc":5109,"header":"def __rmod__(self, *args, **kwargs)","id":708,"name":"__rmod__","nodeType":"Function","startLoc":5107,"text":"def __rmod__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value%self. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":288,"header":"def timetz(self) -> _Time","id":709,"name":"timetz","nodeType":"Function","startLoc":288,"text":"def timetz(self) -> _Time: ..."},{"col":4,"comment":"null","endLoc":301,"header":"def replace(\n self,\n year: SupportsIndex = ...,\n month: SupportsIndex = ...,\n day: SupportsIndex = ...,\n hour: SupportsIndex = ...,\n minute: SupportsIndex = ...,\n second: SupportsIndex = ...,\n microsecond: SupportsIndex = ...,\n tzinfo: _TzInfo | None = ...,\n *,\n fold: int = ...,\n ) -> Self","id":710,"name":"replace","nodeType":"Function","startLoc":289,"text":"def replace(\n self,\n year: SupportsIndex = ...,\n month: SupportsIndex = ...,\n day: SupportsIndex = ...,\n hour: SupportsIndex = ...,\n minute: SupportsIndex = ...,\n second: SupportsIndex = ...,\n microsecond: SupportsIndex = ...,\n tzinfo: _TzInfo | None = ...,\n *,\n fold: int = ...,\n ) -> Self: ..."},{"col":4,"comment":" Return value*self. ","endLoc":5113,"header":"def __rmul__(self, *args, **kwargs)","id":711,"name":"__rmul__","nodeType":"Function","startLoc":5111,"text":"def __rmul__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value*self. \"\"\"\n pass"},{"col":4,"comment":" Return value|self. ","endLoc":5117,"header":"def __ror__(self, *args, **kwargs)","id":712,"name":"__ror__","nodeType":"Function","startLoc":5115,"text":"def __ror__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value|self. \"\"\"\n pass"},{"col":4,"comment":" Return pow(value, self, mod). ","endLoc":5121,"header":"def __rpow__(self, *args, **kwargs)","id":713,"name":"__rpow__","nodeType":"Function","startLoc":5119,"text":"def __rpow__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return pow(value, self, mod). \"\"\"\n pass"},{"col":8,"comment":"null","endLoc":303,"header":"def astimezone(self, tz: _TzInfo | None = ...) -> Self","id":714,"name":"astimezone","nodeType":"Function","startLoc":303,"text":"def astimezone(self, tz: _TzInfo | None = ...) -> Self: ..."},{"col":4,"comment":" Return value>>self. ","endLoc":5125,"header":"def __rrshift__(self, *args, **kwargs)","id":715,"name":"__rrshift__","nodeType":"Function","startLoc":5123,"text":"def __rrshift__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value>>self. \"\"\"\n pass"},{"col":8,"comment":"null","endLoc":305,"header":"def astimezone(self, tz: _TzInfo | None = ...) -> datetime","id":716,"name":"astimezone","nodeType":"Function","startLoc":305,"text":"def astimezone(self, tz: _TzInfo | None = ...) -> datetime: ..."},{"col":4,"comment":" Return self>>value. ","endLoc":5129,"header":"def __rshift__(self, *args, **kwargs)","id":717,"name":"__rshift__","nodeType":"Function","startLoc":5127,"text":"def __rshift__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self>>value. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":307,"header":"def isoformat(self, sep: str = ..., timespec: str = ...) -> str","id":718,"name":"isoformat","nodeType":"Function","startLoc":307,"text":"def isoformat(self, sep: str = ..., timespec: str = ...) -> str: ..."},{"col":4,"comment":" Return value-self. ","endLoc":5133,"header":"def __rsub__(self, *args, **kwargs)","id":719,"name":"__rsub__","nodeType":"Function","startLoc":5131,"text":"def __rsub__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value-self. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":309,"header":"@classmethod\n def strptime(cls, __date_string: str, __format: str) -> Self","id":720,"name":"strptime","nodeType":"Function","startLoc":308,"text":"@classmethod\n def strptime(cls, __date_string: str, __format: str) -> Self: ..."},{"col":4,"comment":" Return value/self. ","endLoc":5137,"header":"def __rtruediv__(self, *args, **kwargs)","id":721,"name":"__rtruediv__","nodeType":"Function","startLoc":5135,"text":"def __rtruediv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value/self. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":310,"header":"def utcoffset(self) -> timedelta | None","id":722,"name":"utcoffset","nodeType":"Function","startLoc":310,"text":"def utcoffset(self) -> timedelta | None: ..."},{"col":4,"comment":" Return value^self. ","endLoc":5141,"header":"def __rxor__(self, *args, **kwargs)","id":723,"name":"__rxor__","nodeType":"Function","startLoc":5139,"text":"def __rxor__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return value^self. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":311,"header":"def tzname(self) -> str | None","id":724,"name":"tzname","nodeType":"Function","startLoc":311,"text":"def tzname(self) -> str | None: ..."},{"col":4,"comment":"null","endLoc":312,"header":"def dst(self) -> timedelta | None","id":725,"name":"dst","nodeType":"Function","startLoc":312,"text":"def dst(self) -> timedelta | None: ..."},{"col":4,"comment":" Set self[key] to value. ","endLoc":5145,"header":"def __setitem__(self, *args, **kwargs)","id":726,"name":"__setitem__","nodeType":"Function","startLoc":5143,"text":"def __setitem__(self, *args, **kwargs): # real signature unknown\n \"\"\" Set self[key] to value. \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":313,"header":"def __le__(self, __value: datetime) -> bool","id":727,"name":"__le__","nodeType":"Function","startLoc":313,"text":"def __le__(self, __value: datetime) -> bool: ... # type: ignore[override]"},{"col":4,"comment":"\n a.__setstate__(version, shape, dtype, isfortran, rawdata)\n \n For unpickling.\n \n Parameters\n ----------\n version : int\n optional pickle version. If omitted defaults to 0.\n shape : tuple\n dtype : data-type\n isFortran : bool\n rawdata : string or list\n a binary string with the data (or a list if 'a' is an object array)\n ","endLoc":5163,"header":"def __setstate__(self, version, shape, dtype, isfortran, rawdata)","id":728,"name":"__setstate__","nodeType":"Function","startLoc":5147,"text":"def __setstate__(self, version, shape, dtype, isfortran, rawdata): # real signature unknown; restored from __doc__\n \"\"\"\n a.__setstate__(version, shape, dtype, isfortran, rawdata)\n \n For unpickling.\n \n Parameters\n ----------\n version : int\n optional pickle version. If omitted defaults to 0.\n shape : tuple\n dtype : data-type\n isFortran : bool\n rawdata : string or list\n a binary string with the data (or a list if 'a' is an object array)\n \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":314,"header":"def __lt__(self, __value: datetime) -> bool","id":729,"name":"__lt__","nodeType":"Function","startLoc":314,"text":"def __lt__(self, __value: datetime) -> bool: ... # type: ignore[override]"},{"col":4,"comment":"null","endLoc":315,"header":"def __ge__(self, __value: datetime) -> bool","id":730,"name":"__ge__","nodeType":"Function","startLoc":315,"text":"def __ge__(self, __value: datetime) -> bool: ... # type: ignore[override]"},{"col":4,"comment":"null","endLoc":316,"header":"def __gt__(self, __value: datetime) -> bool","id":731,"name":"__gt__","nodeType":"Function","startLoc":316,"text":"def __gt__(self, __value: datetime) -> bool: ... # type: ignore[override]"},{"col":4,"comment":"null","endLoc":5166,"header":"def __sizeof__(self, *args, **kwargs)","id":732,"name":"__sizeof__","nodeType":"Function","startLoc":5165,"text":"def __sizeof__(self, *args, **kwargs): # real signature unknown\n pass"},{"col":4,"comment":"null","endLoc":317,"header":"def __eq__(self, __value: object) -> bool","id":733,"name":"__eq__","nodeType":"Function","startLoc":317,"text":"def __eq__(self, __value: object) -> bool: ..."},{"col":4,"comment":" Return str(self). ","endLoc":5170,"header":"def __str__(self, *args, **kwargs)","id":734,"name":"__str__","nodeType":"Function","startLoc":5168,"text":"def __str__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return str(self). \"\"\"\n pass"},{"col":4,"comment":"null","endLoc":318,"header":"def __hash__(self) -> int","id":735,"name":"__hash__","nodeType":"Function","startLoc":318,"text":"def __hash__(self) -> int: ..."},{"col":8,"comment":"null","endLoc":321,"header":"@overload # type: ignore[override]\n def __sub__(self, __value: timedelta) -> Self","id":736,"name":"__sub__","nodeType":"Function","startLoc":320,"text":"@overload # type: ignore[override]\n def __sub__(self, __value: timedelta) -> Self: ..."},{"col":4,"comment":" Return self-value. ","endLoc":5174,"header":"def __sub__(self, *args, **kwargs)","id":737,"name":"__sub__","nodeType":"Function","startLoc":5172,"text":"def __sub__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self-value. \"\"\"\n pass"},{"col":8,"comment":"null","endLoc":323,"header":"@overload\n def __sub__(self: _D, __value: _D) -> timedelta","id":738,"name":"__sub__","nodeType":"Function","startLoc":322,"text":"@overload\n def __sub__(self: _D, __value: _D) -> timedelta: ..."},{"col":4,"comment":" Return self/value. ","endLoc":5178,"header":"def __truediv__(self, *args, **kwargs)","id":739,"name":"__truediv__","nodeType":"Function","startLoc":5176,"text":"def __truediv__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self/value. \"\"\"\n pass"},{"col":8,"comment":"null","endLoc":329,"header":"@overload # type: ignore[override]\n def __sub__(self, __value: datetime) -> timedelta","id":740,"name":"__sub__","nodeType":"Function","startLoc":328,"text":"@overload # type: ignore[override]\n def __sub__(self, __value: datetime) -> timedelta: ..."},{"col":4,"comment":" Return self^value. ","endLoc":5182,"header":"def __xor__(self, *args, **kwargs)","id":741,"name":"__xor__","nodeType":"Function","startLoc":5180,"text":"def __xor__(self, *args, **kwargs): # real signature unknown\n \"\"\" Return self^value. \"\"\"\n pass"},{"col":8,"comment":"null","endLoc":331,"header":"@overload\n def __sub__(self, __value: timedelta) -> datetime","id":742,"name":"__sub__","nodeType":"Function","startLoc":330,"text":"@overload\n def __sub__(self, __value: timedelta) -> datetime: ..."},{"col":8,"comment":"null","endLoc":326,"header":"def __add__(self, __value: timedelta) -> datetime","id":743,"name":"__add__","nodeType":"Function","startLoc":326,"text":"def __add__(self, __value: timedelta) -> datetime: ..."},{"col":8,"comment":"null","endLoc":327,"header":"def __radd__(self, __value: timedelta) -> datetime","id":744,"name":"__radd__","nodeType":"Function","startLoc":327,"text":"def __radd__(self, __value: timedelta) -> datetime: ..."},{"attributeType":"null","col":4,"comment":"Base object if memory is from some other object.\n\n Examples\n --------\n The base of an array that owns its memory is None:\n\n >>> x = np.array([1,2,3,4])\n >>> x.base is None\n True\n\n Slicing creates a view, whose memory is shared with x:\n\n >>> y = x[2:]\n >>> y.base is x\n True","endLoc":5184,"id":745,"name":"base","nodeType":"Attribute","startLoc":5184,"text":"base"},{"attributeType":"datetime","col":4,"comment":"null","endLoc":230,"id":746,"name":"min","nodeType":"Attribute","startLoc":230,"text":"min"},{"col":4,"comment":"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 ","endLoc":223,"header":"def add_legend(self, legend_data=None, title=None, label_order=None,\n adjust_subtitles=False, **kwargs)","id":747,"name":"add_legend","nodeType":"Function","startLoc":121,"text":"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"},{"col":0,"comment":"Convert the input to an array.\n\n Parameters\n ----------\n a : array_like\n Input data, in any form that can be converted to an array. This\n includes lists, lists of tuples, tuples, tuples of tuples, tuples\n of lists and ndarrays.\n dtype : data-type, optional\n By default, the data-type is inferred from the input data.\n order : {'C', 'F'}, optional\n Whether to use row-major (C-style) or\n column-major (Fortran-style) memory representation.\n Defaults to 'C'.\n\n Returns\n -------\n out : ndarray\n Array interpretation of `a`. No copy is performed if the input\n is already an ndarray with matching dtype and order. If `a` is a\n subclass of ndarray, a base class ndarray is returned.\n\n See Also\n --------\n asanyarray : Similar function which passes through subclasses.\n ascontiguousarray : Convert input to a contiguous array.\n asfarray : Convert input to a floating point ndarray.\n asfortranarray : Convert input to an ndarray with column-major\n memory order.\n asarray_chkfinite : Similar function which checks input for NaNs and Infs.\n fromiter : Create an array from an iterator.\n fromfunction : Construct an array by executing a function on grid\n positions.\n\n Examples\n --------\n Convert a list into an array:\n\n >>> a = [1, 2]\n >>> np.asarray(a)\n array([1, 2])\n\n Existing arrays are not copied:\n\n >>> a = np.array([1, 2])\n >>> np.asarray(a) is a\n True\n\n If `dtype` is set, array is copied only if dtype does not match:\n\n >>> a = np.array([1, 2], dtype=np.float32)\n >>> np.asarray(a, dtype=np.float32) is a\n True\n >>> np.asarray(a, dtype=np.float64) is a\n False\n\n Contrary to `asanyarray`, ndarray subclasses are not passed through:\n\n >>> issubclass(np.matrix, np.ndarray)\n True\n >>> a = np.matrix([[1, 2]])\n >>> np.asarray(a) is a\n False\n >>> np.asanyarray(a) is a\n True\n\n ","endLoc":531,"header":"def asarray(a, dtype=None, order=None)","id":749,"name":"asarray","nodeType":"Function","startLoc":463,"text":"def asarray(a, dtype=None, order=None):\n \"\"\"Convert the input to an array.\n\n Parameters\n ----------\n a : array_like\n Input data, in any form that can be converted to an array. This\n includes lists, lists of tuples, tuples, tuples of tuples, tuples\n of lists and ndarrays.\n dtype : data-type, optional\n By default, the data-type is inferred from the input data.\n order : {'C', 'F'}, optional\n Whether to use row-major (C-style) or\n column-major (Fortran-style) memory representation.\n Defaults to 'C'.\n\n Returns\n -------\n out : ndarray\n Array interpretation of `a`. No copy is performed if the input\n is already an ndarray with matching dtype and order. If `a` is a\n subclass of ndarray, a base class ndarray is returned.\n\n See Also\n --------\n asanyarray : Similar function which passes through subclasses.\n ascontiguousarray : Convert input to a contiguous array.\n asfarray : Convert input to a floating point ndarray.\n asfortranarray : Convert input to an ndarray with column-major\n memory order.\n asarray_chkfinite : Similar function which checks input for NaNs and Infs.\n fromiter : Create an array from an iterator.\n fromfunction : Construct an array by executing a function on grid\n positions.\n\n Examples\n --------\n Convert a list into an array:\n\n >>> a = [1, 2]\n >>> np.asarray(a)\n array([1, 2])\n\n Existing arrays are not copied:\n\n >>> a = np.array([1, 2])\n >>> np.asarray(a) is a\n True\n\n If `dtype` is set, array is copied only if dtype does not match:\n\n >>> a = np.array([1, 2], dtype=np.float32)\n >>> np.asarray(a, dtype=np.float32) is a\n True\n >>> np.asarray(a, dtype=np.float64) is a\n False\n\n Contrary to `asanyarray`, ndarray subclasses are not passed through:\n\n >>> issubclass(np.matrix, np.ndarray)\n True\n >>> a = np.matrix([[1, 2]])\n >>> np.asarray(a) is a\n False\n >>> np.asanyarray(a) is a\n True\n\n \"\"\"\n return array(a, dtype, copy=False, order=order)"},{"col":0,"comment":"\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 ","endLoc":103,"header":"def strip_output(nb)","id":750,"name":"strip_output","nodeType":"Function","startLoc":65,"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"},{"attributeType":"null","col":4,"comment":"An object to simplify the interaction of the array with the ctypes\n module.\n\n This attribute creates an object that makes it easier to use arrays\n when calling shared libraries with the ctypes module. The returned\n object has, among others, data, shape, and strides attributes (see\n Notes below) which themselves return ctypes objects that can be used\n as arguments to a shared library.\n\n Parameters\n ----------\n None\n\n Returns\n -------\n c : Python object\n Possessing attributes data, shape, strides, etc.\n\n See Also\n --------\n numpy.ctypeslib\n\n Notes\n -----\n Below are the public attributes of this object which were documented\n in \"Guide to NumPy\" (we have omitted undocumented public attributes,\n as well as documented private attributes):\n\n * data: A pointer to the memory area of the array as a Python integer.\n This memory area may contain data that is not aligned, or not in correct\n byte-order. The memory area may not even be writeable. The array\n flags and data-type of this array should be respected when passing this\n attribute to arbitrary C-code to avoid trouble that can include Python\n crashing. User Beware! The value of this attribute is exactly the same\n as self._array_interface_['data'][0].\n\n * shape (c_intp*self.ndim): A ctypes array of length self.ndim where\n the basetype is the C-integer corresponding to dtype('p') on this\n platform. This base-type could be c_int, c_long, or c_longlong\n depending on the platform. The c_intp type is defined accordingly in\n numpy.ctypeslib. The ctypes array contains the shape of the underlying\n array.\n\n * strides (c_intp*self.ndim): A ctypes array of length self.ndim where\n the basetype is the same as for the shape attribute. This ctypes array\n contains the strides information from the underlying array. This strides\n information is important for showing how many bytes must be jumped to\n get to the next element in the array.\n\n * data_as(obj): Return the data pointer cast to a particular c-types object.\n For example, calling self._as_parameter_ is equivalent to\n self.data_as(ctypes.c_void_p). Perhaps you want to use the data as a\n pointer to a ctypes array of floating-point data:\n self.data_as(ctypes.POINTER(ctypes.c_double)).\n\n * shape_as(obj): Return the shape tuple as an array of some other c-types\n type. For example: self.shape_as(ctypes.c_short).\n\n * strides_as(obj): Return the strides tuple as an array of some other\n c-types type. For example: self.strides_as(ctypes.c_longlong).\n\n Be careful using the ctypes attribute - especially on temporary\n arrays or arrays constructed on the fly. For example, calling\n ``(a+b).ctypes.data_as(ctypes.c_void_p)`` returns a pointer to memory\n that is invalid because the array created as (a+b) is deallocated\n before the next Python statement. You can avoid this problem using\n either ``c=a+b`` or ``ct=(a+b).ctypes``. In the latter case, ct will\n hold a reference to the array until ct is deleted or re-assigned.\n\n If the ctypes module is not available, then the ctypes attribute\n of array objects still returns something useful, but ctypes objects\n are not returned and errors may be raised instead. In particular,\n the object will still have the as parameter attribute which will\n return an integer equal to the data attribute.\n\n Examples\n --------\n >>> import ctypes\n >>> x\n array([[0, 1],\n [2, 3]])\n >>> x.ctypes.data\n 30439712\n >>> x.ctypes.data_as(ctypes.POINTER(ctypes.c_long))\n \n >>> x.ctypes.data_as(ctypes.POINTER(ctypes.c_long)).contents\n c_long(0)\n >>> x.ctypes.data_as(ctypes.POINTER(ctypes.c_longlong)).contents\n c_longlong(4294967296L)\n >>> x.ctypes.shape\n \n >>> x.ctypes.shape_as(ctypes.c_long)\n \n >>> x.ctypes.strides\n \n >>> x.ctypes.strides_as(ctypes.c_longlong)\n ","endLoc":5201,"id":751,"name":"ctypes","nodeType":"Attribute","startLoc":5201,"text":"ctypes"},{"attributeType":"datetime","col":4,"comment":"null","endLoc":231,"id":752,"name":"max","nodeType":"Attribute","startLoc":231,"text":"max"},{"col":0,"comment":"Make cls.map a classmethod with same signature as cls.__init__.","endLoc":16,"header":"def share_init_params_with_map(cls)","id":753,"name":"share_init_params_with_map","nodeType":"Function","startLoc":4,"text":"def 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"},{"col":4,"comment":"null","endLoc":1086,"header":"def keys(self) -> dict_keys[_KT, _VT]","id":754,"name":"keys","nodeType":"Function","startLoc":1086,"text":"def keys(self) -> dict_keys[_KT, _VT]: ..."},{"attributeType":"null","col":4,"comment":"Python buffer object pointing to the start of the array's data.","endLoc":5300,"id":755,"name":"data","nodeType":"Attribute","startLoc":5300,"text":"data"},{"attributeType":"null","col":4,"comment":"Data-type of the array's elements.\n\n Parameters\n ----------\n None\n\n Returns\n -------\n d : numpy dtype object\n\n See Also\n --------\n numpy.dtype\n\n Examples\n --------\n >>> x\n array([[0, 1],\n [2, 3]])\n >>> x.dtype\n dtype('int32')\n >>> type(x.dtype)\n ","endLoc":5303,"id":756,"name":"dtype","nodeType":"Attribute","startLoc":5303,"text":"dtype"},{"attributeType":"null","col":17,"comment":"null","endLoc":6,"id":757,"name":"pd","nodeType":"Attribute","startLoc":6,"text":"pd"},{"col":0,"comment":"","endLoc":1,"header":"groupby.py#","id":758,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"Simplified split-apply-combine paradigm on dataframes for internal use.\"\"\"\n\nif TYPE_CHECKING:\n from typing import Callable\n from pandas import DataFrame, MultiIndex, Index"},{"col":4,"comment":"null","endLoc":321,"header":"def signature(\n obj: _IntrospectableCallable,\n *,\n follow_wrapped: bool = True,\n globals: Mapping[str, Any] | None = None,\n locals: Mapping[str, Any] | None = None,\n eval_str: bool = False,\n ) -> Signature","id":759,"name":"signature","nodeType":"Function","startLoc":314,"text":"def signature(\n obj: _IntrospectableCallable,\n *,\n follow_wrapped: bool = True,\n globals: Mapping[str, Any] | None = None,\n locals: Mapping[str, Any] | None = None,\n eval_str: bool = False,\n ) -> Signature: ..."},{"attributeType":"null","col":4,"comment":"Information about the memory layout of the array.\n\n Attributes\n ----------\n C_CONTIGUOUS (C)\n The data is in a single, C-style contiguous segment.\n F_CONTIGUOUS (F)\n The data is in a single, Fortran-style contiguous segment.\n OWNDATA (O)\n The array owns the memory it uses or borrows it from another object.\n WRITEABLE (W)\n The data area can be written to. Setting this to False locks\n the data, making it read-only. A view (slice, etc.) inherits WRITEABLE\n from its base array at creation time, but a view of a writeable\n array may be subsequently locked while the base array remains writeable.\n (The opposite is not true, in that a view of a locked array may not\n be made writeable. However, currently, locking a base object does not\n lock any views that already reference it, so under that circumstance it\n is possible to alter the contents of a locked array via a previously\n created writeable view onto it.) Attempting to change a non-writeable\n array raises a RuntimeError exception.\n ALIGNED (A)\n The data and all elements are aligned appropriately for the hardware.\n UPDATEIFCOPY (U)\n This array is a copy of some other array. When this array is\n deallocated, the base array will be updated with the contents of\n this array.\n FNC\n F_CONTIGUOUS and not C_CONTIGUOUS.\n FORC\n F_CONTIGUOUS or C_CONTIGUOUS (one-segment test).\n BEHAVED (B)\n ALIGNED and WRITEABLE.\n CARRAY (CA)\n BEHAVED and C_CONTIGUOUS.\n FARRAY (FA)\n BEHAVED and F_CONTIGUOUS and not C_CONTIGUOUS.\n\n Notes\n -----\n The `flags` object can be accessed dictionary-like (as in ``a.flags['WRITEABLE']``),\n or by using lowercased attribute names (as in ``a.flags.writeable``). Short flag\n names are only supported in dictionary access.\n\n Only the UPDATEIFCOPY, WRITEABLE, and ALIGNED flags can be changed by\n the user, via direct assignment to the attribute or dictionary entry,\n or by calling `ndarray.setflags`.\n\n The array flags cannot be set arbitrarily:\n\n - UPDATEIFCOPY can only be set ``False``.\n - ALIGNED can only be set ``True`` if the data is truly aligned.\n - WRITEABLE can only be set ``True`` if the array owns its own memory\n or the ultimate owner of the memory exposes a writeable buffer\n interface or is a string.\n\n Arrays can be both C-style and Fortran-style contiguous simultaneously.\n This is clear for 1-dimensional arrays, but can also be true for higher\n dimensional arrays.\n\n Even for contiguous arrays a stride for a given dimension\n ``arr.strides[dim]`` may be *arbitrary* if ``arr.shape[dim] == 1``\n or the array has no elements.\n It does *not* generally hold that ``self.strides[-1] == self.itemsize``\n for C-style contiguous arrays or ``self.strides[0] == self.itemsize`` for\n Fortran-style contiguous arrays is true.","endLoc":5328,"id":760,"name":"flags","nodeType":"Attribute","startLoc":5328,"text":"flags"},{"id":761,"name":"relplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"These examples will illustrate only some of the functionality that :func:`relplot` is capable of. For more information, consult the examples for :func:`scatterplot` and :func:`lineplot`, which are used when ``kind=\\\"scatter\\\"`` or ``kind=\\\"line\\\"``, respectively.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\\n\",\n \"import matplotlib.pyplot as plt\\n\",\n \"sns.set_theme(style=\\\"ticks\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"To illustrate ``kind=\\\"scatter\\\"`` (the default style of plot), we will use the \\\"tips\\\" dataset:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"tips = sns.load_dataset(\\\"tips\\\")\\n\",\n \"tips.head()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Assigning ``x`` and ``y`` and any semantic mapping variables will draw a single plot:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.relplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"day\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Assigning a ``col`` variable creates a faceted figure with multiple subplots arranged across the columns of the grid:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.relplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"day\\\", col=\\\"time\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Different variables can be assigned to facet on both the columns and rows:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.relplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"day\\\", col=\\\"time\\\", row=\\\"sex\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"When the variable assigned to ``col`` has many levels, it can be \\\"wrapped\\\" across multiple rows:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.relplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"time\\\", col=\\\"day\\\", col_wrap=2)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Assigning multiple semantic variables can show multi-dimensional relationships, but be mindful to avoid making an overly-complicated plot.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.relplot(\\n\",\n \" data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", col=\\\"time\\\",\\n\",\n \" hue=\\\"time\\\", size=\\\"size\\\", style=\\\"sex\\\",\\n\",\n \" palette=[\\\"b\\\", \\\"r\\\"], sizes=(10, 100)\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"When there is a natural continuity to one of the variables, it makes more sense to show lines instead of points. To draw the figure using :func:`lineplot`, set ``kind=\\\"line\\\"``. We will illustrate this effect with the \\\"fmri dataset:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"fmri = sns.load_dataset(\\\"fmri\\\")\\n\",\n \"fmri.head()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Using ``kind=\\\"line\\\"`` offers the same flexibility for semantic mappings as ``kind=\\\"scatter\\\"``, but :func:`lineplot` transforms the data more before plotting. Observations are sorted by their ``x`` value, and repeated observations are aggregated. By default, the resulting plot shows the mean and 95% CI for each unit\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.relplot(\\n\",\n \" data=fmri, x=\\\"timepoint\\\", y=\\\"signal\\\", col=\\\"region\\\",\\n\",\n \" hue=\\\"event\\\", style=\\\"event\\\", kind=\\\"line\\\",\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The size and shape of the figure is parametrized by the ``height`` and ``aspect`` ratio of each individual facet:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.relplot(\\n\",\n \" data=fmri,\\n\",\n \" x=\\\"timepoint\\\", y=\\\"signal\\\",\\n\",\n \" hue=\\\"event\\\", style=\\\"event\\\", col=\\\"region\\\",\\n\",\n \" height=4, aspect=.7, kind=\\\"line\\\"\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The object returned by :func:`relplot` is always a :class:`FacetGrid`, which has several methods that allow you to quickly tweak the title, labels, and other aspects of the plot:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"g = sns.relplot(\\n\",\n \" data=fmri,\\n\",\n \" x=\\\"timepoint\\\", y=\\\"signal\\\",\\n\",\n \" hue=\\\"event\\\", style=\\\"event\\\", col=\\\"region\\\",\\n\",\n \" height=4, aspect=.7, kind=\\\"line\\\"\\n\",\n \")\\n\",\n \"(g.map(plt.axhline, y=0, color=\\\".7\\\", dashes=(2, 1), zorder=0)\\n\",\n \" .set_axis_labels(\\\"Timepoint\\\", \\\"Percent signal change\\\")\\n\",\n \" .set_titles(\\\"Region: {col_name} cortex\\\")\\n\",\n \" .tight_layout(w_pad=0))\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"It is also possible to use wide-form data with :func:`relplot`:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"flights_wide = sns.load_dataset(\\\"flights\\\").pivot(\\\"year\\\", \\\"month\\\", \\\"passengers\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Faceting is not an option in this case, but the plot will still take advantage of the external legend offered by :class:`FacetGrid`:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.relplot(data=flights_wide, kind=\\\"line\\\")\"\n ]\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"id":762,"name":"boxplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"7edcf92f-6c11-4dc4-b684-118b3235d067\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn as sns\\n\",\n \"sns.set_theme(style=\\\"whitegrid\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"90798548-e999-4127-8191-ce01e252f305\",\n \"metadata\": {},\n \"source\": [\n \"Draw a single horizontal boxplot, assigning the data directly to the coordinate variable:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"80532f2c-0f34-456c-9d5c-673682385461\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"df = sns.load_dataset(\\\"titanic\\\")\\n\",\n \"sns.boxplot(x=df[\\\"age\\\"])\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"98e6f351-2983-4edc-93e6-03b2d91ed5f1\",\n \"metadata\": {},\n \"source\": [\n \"Group by a categorical variable, referencing columns in a dataframe:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"f1e0a6a4-151d-42d7-a098-ec9b91f20906\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.boxplot(data=df, x=\\\"age\\\", y=\\\"class\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"a4bebd98-9719-4279-b0b5-700ca0aa087d\",\n \"metadata\": {},\n \"source\": [\n \"Draw a vertical boxplot with nested grouping by two variables:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"b8f74dc4-2b59-423a-90a7-dbf900c89251\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.boxplot(data=df, x=\\\"age\\\", y=\\\"class\\\", hue=\\\"alive\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"8b4a7418-d945-4ec6-90d2-8ec10c552a08\",\n \"metadata\": {},\n \"source\": [\n \"Control the order of the boxes:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"2a496593-7c12-4739-b3db-46b777599c65\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.boxplot(data=df, x=\\\"fare\\\", y=\\\"alive\\\", order=[\\\"yes\\\", \\\"no\\\"])\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"4a5b57c0-7835-49c0-b899-012d3b112efc\",\n \"metadata\": {},\n \"source\": [\n \"Draw a box for multiple numeric columns:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"a4ca0f44-be47-4014-9ac5-01c9b47c5bdc\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.boxplot(data=df[[\\\"age\\\", \\\"fare\\\"]], orient=\\\"h\\\")\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"d0e68414-2f63-442f-9d2e-24fc9ab1f5e3\",\n \"metadata\": {},\n \"source\": [\n \"Use a `hue` variable whithout changing the box width or position:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"c242ee2b-22af-47f7-8de6-84e5ff95271f\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.boxplot(data=df, x=\\\"fare\\\", y=\\\"deck\\\", hue=\\\"deck\\\", dodge=False)\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"5dca0faa-96ec-4e64-a187-482a9d10a03b\",\n \"metadata\": {},\n \"source\": [\n \"Pass additional keyword arguments to matplotlib:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"66c81b6e-e7fb-46c5-aa7b-f001241569b0\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.boxplot(\\n\",\n \" data=df, x=\\\"age\\\", y=\\\"class\\\",\\n\",\n \" notch=True, showcaps=False,\\n\",\n \" flierprops={\\\"marker\\\": \\\"x\\\"},\\n\",\n \" boxprops={\\\"facecolor\\\": (.4, .6, .8, .5)},\\n\",\n \" medianprops={\\\"color\\\": \\\"coral\\\"},\\n\",\n \")\"\n ]\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":763,"name":"CITATION.cff","nodeType":"TextFile","path":"","text":"cff-version: 1.2.0\nmessage: \"If seaborn is integral to a scientific publication, please cite the following paper:\"\npreferred-citation:\n type: article\n authors:\n - family-names: \"Waskom\"\n given-names: \"Michael Lawrence\"\n orcid: \"https://orcid.org/0000-0002-9817-6869\"\n doi: \"10.21105/joss.03021\"\n journal: \"Journal of Open Source Software\"\n month: April\n title: \"seaborn: statistical data visualization\"\n issue: 6\n volume: 60\n year: 2021\n url: \"https://joss.theoj.org/papers/10.21105/joss.03021\"\n"},{"id":764,"name":"color_palettes.ipynb","nodeType":"TextFile","path":"doc/_tutorial","text":"{\n \"cells\": [\n {\n \"cell_type\": \"raw\",\n \"metadata\": {\n \"raw_mimetype\": \"text/restructuredtext\"\n },\n \"source\": [\n \".. _palette_tutorial:\\n\",\n \"\\n\",\n \".. currentmodule:: seaborn\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Choosing color palettes\\n\",\n \"=======================\\n\",\n \"\\n\",\n \"Seaborn makes it easy to use colors that are well-suited to the characteristics of your data and your visualization goals. This chapter discusses both the general principles that should guide your choices and the tools in seaborn that help you quickly find the best solution for a given application.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import numpy as np\\n\",\n \"import matplotlib as mpl\\n\",\n \"import seaborn as sns\\n\",\n \"import matplotlib.pyplot as plt\\n\",\n \"sns.set_theme(style=\\\"white\\\", rc={\\\"xtick.major.pad\\\": 1, \\\"ytick.major.pad\\\": 1})\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"%matplotlib inline\\n\",\n \"np.random.seed(sum(map(ord, \\\"palettes\\\")))\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"# Add colormap display methods to matplotlib colormaps.\\n\",\n \"# These are forthcoming in matplotlib 3.4, but, the matplotlib display\\n\",\n \"# method includes the colormap name, which is redundant.\\n\",\n \"def _repr_png_(self):\\n\",\n \" \\\"\\\"\\\"Generate a PNG representation of the Colormap.\\\"\\\"\\\"\\n\",\n \" import io\\n\",\n \" from PIL import Image\\n\",\n \" import numpy as np\\n\",\n \" IMAGE_SIZE = (400, 50)\\n\",\n \" X = np.tile(np.linspace(0, 1, IMAGE_SIZE[0]), (IMAGE_SIZE[1], 1))\\n\",\n \" pixels = self(X, bytes=True)\\n\",\n \" png_bytes = io.BytesIO()\\n\",\n \" Image.fromarray(pixels).save(png_bytes, format='png')\\n\",\n \" return png_bytes.getvalue()\\n\",\n \" \\n\",\n \"def _repr_html_(self):\\n\",\n \" \\\"\\\"\\\"Generate an HTML representation of the Colormap.\\\"\\\"\\\"\\n\",\n \" import base64\\n\",\n \" png_bytes = self._repr_png_()\\n\",\n \" png_base64 = base64.b64encode(png_bytes).decode('ascii')\\n\",\n \" return ('')\\n\",\n \" \\n\",\n \"import matplotlib as mpl\\n\",\n \"mpl.colors.Colormap._repr_png_ = _repr_png_\\n\",\n \"mpl.colors.Colormap._repr_html_ = _repr_html_\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"General principles for using color in plots\\n\",\n \"-------------------------------------------\\n\",\n \"\\n\",\n \"Components of color\\n\",\n \"~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"Because of the way our eyes work, a particular color can be defined using three components. We usually program colors in a computer by specifying their RGB values, which set the intensity of the red, green, and blue channels in a display. But for analyzing the perceptual attributes of a color, it's better to think in terms of *hue*, *saturation*, and *luminance* channels.\\n\",\n \"\\n\",\n \"Hue is the component that distinguishes \\\"different colors\\\" in a non-technical sense. It's property of color that leads to first-order names like \\\"red\\\" and \\\"blue\\\":\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide-input\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"sns.husl_palette(8, s=.7)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Saturation (or chroma) is the *colorfulness*. Two colors with different hues will look more distinct when they have more saturation:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide-input\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"c = sns.color_palette(\\\"muted\\\")[0]\\n\",\n \"sns.blend_palette([sns.desaturate(c, 0), c], 8)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"And lightness corresponds to how much light is emitted (or reflected, for printed colors), ranging from black to white:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide-input\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"sns.blend_palette([\\\".1\\\", c, \\\".95\\\"], 8)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Vary hue to distinguish categories\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"When you want to represent multiple categories in a plot, you typically should vary the color of the elements. Consider this simple example: in which of these two plots is it easier to count the number of triangular points?\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide-input\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"n = 45\\n\",\n \"rng = np.random.default_rng(200)\\n\",\n \"x = rng.uniform(0, 1, n * 2)\\n\",\n \"y = rng.uniform(0, 1, n * 2)\\n\",\n \"a = np.concatenate([np.zeros(n * 2 - 10), np.ones(10)])\\n\",\n \"\\n\",\n \"f, axs = plt.subplots(1, 2, figsize=(7, 3.5), sharey=True, sharex=True)\\n\",\n \"\\n\",\n \"sns.scatterplot(\\n\",\n \" x=x[::2], y=y[::2], style=a[::2], size=a[::2], legend=False,\\n\",\n \" markers=[\\\"o\\\", (3, 1, 1)], sizes=[70, 140], ax=axs[0],\\n\",\n \")\\n\",\n \"\\n\",\n \"sns.scatterplot(\\n\",\n \" x=x[1::2], y=y[1::2], style=a[1::2], size=a[1::2], hue=a[1::2], legend=False,\\n\",\n \" markers=[\\\"o\\\", (3, 1, 1)], sizes=[70, 140], ax=axs[1],\\n\",\n \")\\n\",\n \"\\n\",\n \"f.tight_layout(w_pad=2)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"In the plot on the right, the orange triangles \\\"pop out\\\", making it easy to distinguish them from the circles. This pop-out effect happens because our visual system prioritizes color differences.\\n\",\n \"\\n\",\n \"The blue and orange colors differ mostly in terms of their hue. Hue is useful for representing categories: most people can distinguish a moderate number of hues relatively easily, and points that have different hues but similar brightness or intensity seem equally important. It also makes plots easier to talk about. Consider this example:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide-input\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"b = np.tile(np.arange(10), n // 5)\\n\",\n \"\\n\",\n \"f, axs = plt.subplots(1, 2, figsize=(7, 3.5), sharey=True, sharex=True)\\n\",\n \"\\n\",\n \"sns.scatterplot(\\n\",\n \" x=x[::2], y=y[::2], hue=b[::2],\\n\",\n \" legend=False, palette=\\\"muted\\\", s=70, ax=axs[0],\\n\",\n \")\\n\",\n \"\\n\",\n \"sns.scatterplot(\\n\",\n \" x=x[1::2], y=y[1::2], hue=b[1::2],\\n\",\n \" legend=False, palette=\\\"blend:.75,C0\\\", s=70, ax=axs[1],\\n\",\n \")\\n\",\n \"\\n\",\n \"f.tight_layout(w_pad=2)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Most people would be able to quickly ascertain that there are five distinct categories in the plot on the left and, if asked to characterize the \\\"blue\\\" points, would be able to do so.\\n\",\n \"\\n\",\n \"With the plot on the right, where the points are all blue but vary in their luminance and saturation, it's harder to say how many unique categories are present. And how would we talk about a particular category? \\\"The fairly-but-not-too-blue points?\\\" What's more, the gray dots seem to fade into the background, de-emphasizing them relative to the more intense blue dots. If the categories are equally important, this is a poor representation.\\n\",\n \"\\n\",\n \"So as a general rule, use hue variation to represent categories. With that said, here are few notes of caution. If you have more than a handful of colors in your plot, it can become difficult to keep in mind what each one means, unless there are pre-existing associations between the categories and the colors used to represent them. This makes your plot harder to interpret: rather than focusing on the data, a viewer will have to continually refer to the legend to make sense of what is shown. So you should strive not to make plots that are too complex. And be mindful that not everyone sees colors the same way. Varying both shape (or some other attribute) and color can help people with anomalous color vision understand your plots, and it can keep them (somewhat) interpretable if they are printed to black-and-white.\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Vary luminance to represent numbers\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"On the other hand, hue variations are not well suited to representing numeric data. Consider this example, where we need colors to represent the counts in a bivariate histogram. On the left, we use a circular colormap, where gradual changes in the number of observation within each bin correspond to gradual changes in hue. On the right, we use a palette that uses brighter colors to represent bins with larger counts:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide-input\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"penguins = sns.load_dataset(\\\"penguins\\\")\\n\",\n \"\\n\",\n \"f, axs = plt.subplots(1, 2, figsize=(7, 4.25), sharey=True, sharex=True)\\n\",\n \"\\n\",\n \"sns.histplot(\\n\",\n \" data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\",\\n\",\n \" binwidth=(3, .75), cmap=\\\"hls\\\", ax=axs[0],\\n\",\n \" cbar=True, cbar_kws=dict(orientation=\\\"horizontal\\\", pad=.1),\\n\",\n \")\\n\",\n \"axs[0].set(xlabel=\\\"\\\", ylabel=\\\"\\\")\\n\",\n \"\\n\",\n \"\\n\",\n \"sns.histplot(\\n\",\n \" data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\",\\n\",\n \" binwidth=(3, .75), cmap=\\\"flare_r\\\", ax=axs[1],\\n\",\n \" cbar=True, cbar_kws=dict(orientation=\\\"horizontal\\\", pad=.1),\\n\",\n \")\\n\",\n \"axs[1].set(xlabel=\\\"\\\", ylabel=\\\"\\\")\\n\",\n \"\\n\",\n \"f.tight_layout(w_pad=3)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"With the hue-based palette, it's quite difficult to ascertain the shape of the bivariate distribution. In contrast, the luminance palette makes it much more clear that there are two prominent peaks.\\n\",\n \"\\n\",\n \"Varying luminance helps you see structure in data, and changes in luminance are more intuitively processed as changes in importance. But the plot on the right does not use a grayscale colormap. Its colorfulness makes it more interesting, and the subtle hue variation increases the perceptual distance between two values. As a result, small differences slightly easier to resolve.\\n\",\n \"\\n\",\n \"These examples show that color palette choices are about more than aesthetics: the colors you choose can reveal patterns in your data if used effectively or hide them if used poorly. There is not one optimal palette, but there are palettes that are better or worse for particular datasets and visualization approaches.\\n\",\n \"\\n\",\n \"And aesthetics do matter: the more that people want to look at your figures, the greater the chance that they will learn something from them. This is true even when you are making plots for yourself. During exploratory data analysis, you may generate many similar figures. Varying the color palettes will add a sense of novelty, which keeps you engaged and prepared to notice interesting features of your data.\\n\",\n \"\\n\",\n \"So how can you choose color palettes that both represent your data well and look attractive?\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {\n \"raw_mimetype\": \"text/restructuredtext\"\n },\n \"source\": [\n \"Tools for choosing color palettes\\n\",\n \"---------------------------------\\n\",\n \"\\n\",\n \"The most important function for working with color palettes is, aptly, :func:`color_palette`. This function provides an interface to most of the possible ways that one can generate color palettes in seaborn. And it's used internally by any function that has a ``palette`` argument.\\n\",\n \"\\n\",\n \"The primary argument to :func:`color_palette` is usually a string: either the name of a specific palette or the name of a family and additional arguments to select a specific member. In the latter case, :func:`color_palette` will delegate to more specific function, such as :func:`cubehelix_palette`. It's also possible to pass a list of colors specified any way that matplotlib accepts (an RGB tuple, a hex code, or a name in the X11 table). The return value is an object that wraps a list of RGB tuples with a few useful methods, such as conversion to hex codes and a rich HTML representation.\\n\",\n \"\\n\",\n \"Calling :func:`color_palette` with no arguments will return the current default color palette that matplotlib (and most seaborn functions) will use if colors are not otherwise specified. This default palette can be set with the corresponding :func:`set_palette` function, which calls :func:`color_palette` internally and accepts the same arguments.\\n\",\n \"\\n\",\n \"To motivate the different options that :func:`color_palette` provides, it will be useful to introduce a classification scheme for color palettes. Broadly, palettes fall into one of three categories:\\n\",\n \"\\n\",\n \"- qualitative palettes, good for representing categorical data\\n\",\n \"- sequential palettes, good for representing numeric data\\n\",\n \"- diverging palettes, good for representing numeric data with a categorical boundary\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \".. _qualitative_palettes:\\n\",\n \"\\n\",\n \"Qualitative color palettes\\n\",\n \"--------------------------\\n\",\n \"\\n\",\n \"Qualitative palettes are well-suited to representing categorical data because most of their variation is in the hue component. The default color palette in seaborn is a qualitative palette with ten distinct hues:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette()\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"These colors have the same ordering as the default matplotlib color palette, ``\\\"tab10\\\"``, but they are a bit less intense. Compare:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"tab10\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Seaborn in fact has six variations of matplotlib's palette, called ``deep``, ``muted``, ``pastel``, ``bright``, ``dark``, and ``colorblind``. These span a range of average luminance and saturation values:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"tags\": [\n \"hide-input\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import io\\n\",\n \"from IPython.display import SVG\\n\",\n \"f = mpl.figure.Figure(figsize=(6, 6))\\n\",\n \"\\n\",\n \"ax_locs = dict(\\n\",\n \" deep=(.4, .4),\\n\",\n \" bright=(.8, .8),\\n\",\n \" muted=(.49, .71),\\n\",\n \" dark=(.8, .2),\\n\",\n \" pastel=(.2, .8),\\n\",\n \" colorblind=(.71, .49),\\n\",\n \")\\n\",\n \"\\n\",\n \"s = .35\\n\",\n \"\\n\",\n \"for pal, (x, y) in ax_locs.items():\\n\",\n \" ax = f.add_axes([x - s / 2, y - s / 2, s, s])\\n\",\n \" ax.pie(np.ones(10),\\n\",\n \" colors=sns.color_palette(pal, 10),\\n\",\n \" counterclock=False, startangle=180,\\n\",\n \" wedgeprops=dict(linewidth=1, edgecolor=\\\"w\\\"))\\n\",\n \" f.text(x, y, pal, ha=\\\"center\\\", va=\\\"center\\\", size=14,\\n\",\n \" bbox=dict(facecolor=\\\"white\\\", alpha=0.85, boxstyle=\\\"round,pad=0.2\\\"))\\n\",\n \"\\n\",\n \"f.text(.1, .05, \\\"Saturation\\\", size=18, ha=\\\"left\\\", va=\\\"center\\\",\\n\",\n \" bbox=dict(facecolor=\\\"white\\\", edgecolor=\\\"w\\\"))\\n\",\n \"f.text(.05, .1, \\\"Luminance\\\", size=18, ha=\\\"center\\\", va=\\\"bottom\\\", rotation=90,\\n\",\n \" bbox=dict(facecolor=\\\"white\\\", edgecolor=\\\"w\\\"))\\n\",\n \"\\n\",\n \"ax = f.add_axes([0, 0, 1, 1])\\n\",\n \"ax.set_axis_off()\\n\",\n \"ax.arrow(.15, .05, .4, 0, width=.002, head_width=.015, color=\\\".15\\\")\\n\",\n \"ax.arrow(.05, .15, 0, .4, width=.002, head_width=.015, color=\\\".15\\\")\\n\",\n \"ax.set(xlim=(0, 1), ylim=(0, 1))\\n\",\n \"f.savefig(svg:=io.StringIO(), format=\\\"svg\\\")\\n\",\n \"SVG(svg.getvalue())\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Many people find the moderated hues of the default ``\\\"deep\\\"`` palette to be aesthetically pleasing, but they are also less distinct. As a result, they may be more difficult to discriminate in some contexts, which is something to keep in mind when making publication graphics. `This comparison `_ can be helpful for estimating how the seaborn color palettes perform when simulating different forms of colorblindess.\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Using circular color systems\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"When you have an arbitrary number of categories, the easiest approach to finding unique hues is to draw evenly-spaced colors in a circular color space (one where the hue changes while keeping the brightness and saturation constant). This is what most seaborn functions default to when they need to use more colors than are currently set in the default color cycle.\\n\",\n \"\\n\",\n \"The most common way to do this uses the ``hls`` color space, which is a simple transformation of RGB values. We saw this color palette before as a counterexample for how to plot a histogram:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"hls\\\", 8)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {\n \"raw_mimetype\": \"text/restructuredtext\"\n },\n \"source\": [\n \"Because of the way the human visual system works, colors that have the same luminance and saturation in terms of their RGB values won't necessarily look equally intense To remedy this, seaborn provides an interface to the `husl `_ system (since renamed to HSLuv), which achieves less intensity variation as you rotate around the color wheel:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"husl\\\", 8)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"When seaborn needs a categorical palette with more colors than are available in the current default, it will use this approach.\\n\",\n \"\\n\",\n \"Using categorical Color Brewer palettes\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"Another source of visually pleasing categorical palettes comes from the `Color Brewer `_ tool (which also has sequential and diverging palettes, as we'll see below).\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"Set2\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Be aware that the qualitative Color Brewer palettes have different lengths, and the default behavior of :func:`color_palette` is to give you the full list:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"Paired\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \".. _sequential_palettes:\\n\",\n \"\\n\",\n \"Sequential color palettes\\n\",\n \"-------------------------\\n\",\n \"\\n\",\n \"The second major class of color palettes is called \\\"sequential\\\". This kind of mapping is appropriate when data range from relatively low or uninteresting values to relatively high or interesting values (or vice versa). As we saw above, the primary dimension of variation in a sequential palette is luminance. Some seaborn functions will default to a sequential palette when you are mapping numeric data. (For historical reasons, both categorical and numeric mappings are specified with the ``hue`` parameter in functions like :func:`relplot` or :func:`displot`, even though numeric mappings use color palettes with relatively little hue variation).\\n\",\n \"\\n\",\n \"Perceptually uniform palettes\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"Because they are intended to represent numeric values, the best sequential palettes will be *perceptually uniform*, meaning that the relative discriminability of two colors is proportional to the difference between the corresponding data values. Seaborn includes four perceptually uniform sequential colormaps: ``\\\"rocket\\\"``, ``\\\"mako\\\"``, ``\\\"flare\\\"``, and ``\\\"crest\\\"``. The first two have a very wide luminance range and are well suited for applications such as heatmaps, where colors fill the space they are plotted into:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"rocket\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"mako\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Because the extreme values of these colormaps approach white, they are not well-suited for coloring elements such as lines or points: it will be difficult to discriminate important values against a white or gray background. The \\\"flare\\\" and \\\"crest\\\" colormaps are a better choice for such plots. They have a more restricted range of luminance variations, which they compensate for with a slightly more pronounced variation in hue. The default direction of the luminance ramp is also reversed, so that smaller values have lighter colors:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"flare\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"crest\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"It is also possible to use the perceptually uniform colormaps provided by matplotlib, such as ``\\\"magma\\\"`` and ``\\\"viridis\\\"``:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"magma\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"viridis\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"As with the convention in matplotlib, every continuous colormap has a reversed version, which has the suffix ``\\\"_r\\\"``:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"rocket_r\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Discrete vs. continuous mapping\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"One thing to be aware of is that seaborn can generate discrete values from sequential colormaps and, when doing so, it will not use the most extreme values. Compare the discrete version of ``\\\"rocket\\\"`` against the continuous version shown above:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"rocket\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Internally, seaborn uses the discrete version for categorical data and the continuous version when in numeric mapping mode. Discrete sequential colormaps can be well-suited for visualizing categorical data with an intrinsic ordering, especially if there is some hue variation.\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {\n \"raw_mimetype\": \"text/restructuredtext\"\n },\n \"source\": [\n \".. _cubehelix_palettes:\\n\",\n \"\\n\",\n \"Sequential \\\"cubehelix\\\" palettes\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"The perceptually uniform colormaps are difficult to programmatically generate, because they are not based on the RGB color space. The `cubehelix `_ system offers an RGB-based compromise: it generates sequential palettes with a linear increase or decrease in brightness and some continuous variation in hue. While not perfectly perceptually uniform, the resulting colormaps have many good properties. Importantly, many aspects of the design process are parameterizable.\\n\",\n \"\\n\",\n \"Matplotlib has the default cubehelix version built into it:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"cubehelix\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The default palette returned by the seaborn :func:`cubehelix_palette` function is a bit different from the matplotlib default in that it does not rotate as far around the hue wheel or cover as wide a range of intensities. It also reverses the luminance ramp:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.cubehelix_palette(as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Other arguments to :func:`cubehelix_palette` control how the palette looks. The two main things you'll change are the ``start`` (a value between 0 and 3) and ``rot``, or number of rotations (an arbitrary value, but usually between -1 and 1)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.cubehelix_palette(start=.5, rot=-.5, as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The more you rotate, the more hue variation you will see:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.cubehelix_palette(start=.5, rot=-.75, as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"You can control both how dark and light the endpoints are and their order:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.cubehelix_palette(start=2, rot=0, dark=0, light=.95, reverse=True, as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"The :func:`color_palette` accepts a string code, starting with ``\\\"ch:\\\"``, for generating an arbitrary cubehelix palette. You can passs the names of parameters in the string:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"ch:start=.2,rot=-.3\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"And for compactness, each parameter can be specified with its first letter:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"ch:s=-.2,r=.6\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Custom sequential palettes\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"For a simpler interface to custom sequential palettes, you can use :func:`light_palette` or :func:`dark_palette`, which are both seeded with a single color and produce a palette that ramps either from light or dark desaturated values to that color:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.light_palette(\\\"seagreen\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.dark_palette(\\\"#69d\\\", reverse=True, as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"As with cubehelix palettes, you can also specify light or dark palettes through :func:`color_palette` or anywhere ``palette`` is accepted:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"light:b\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Reverse the colormap by adding ``\\\"_r\\\"``:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"dark:salmon_r\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Sequential Color Brewer palettes\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"The Color Brewer library also has some good options for sequential palettes. They include palettes with one primary hue:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"Blues\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Along with multi-hue options:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"YlOrBr\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \".. _diverging_palettes:\\n\",\n \"\\n\",\n \"Diverging color palettes\\n\",\n \"------------------------\\n\",\n \"\\n\",\n \"The third class of color palettes is called \\\"diverging\\\". These are used for data where both large low and high values are interesting and span a midpoint value (often 0) that should be demphasized. The rules for choosing good diverging palettes are similar to good sequential palettes, except now there should be two dominant hues in the colormap, one at (or near) each pole. It's also important that the starting values are of similar brightness and saturation.\\n\",\n \"\\n\",\n \"Perceptually uniform diverging palettes\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"Seaborn includes two perceptually uniform diverging palettes: ``\\\"vlag\\\"`` and ``\\\"icefire\\\"``. They both use blue and red at their poles, which many intuitively processes as \\\"cold\\\" and \\\"hot\\\":\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"vlag\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"icefire\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"Custom diverging palettes\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"You can also use the seaborn function :func:`diverging_palette` to create a custom colormap for diverging data. This function makes diverging palettes using the ``husl`` color system. You pass it two hues (in degrees) and, optionally, the lightness and saturation values for the extremes. Using ``husl`` means that the extreme values, and the resulting ramps to the midpoint, while not perfectly perceptually uniform, will be well-balanced:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.diverging_palette(220, 20, as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"This is convenient when you want to stray from the boring confines of cold-hot approaches:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.diverging_palette(145, 300, s=60, as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"It's also possible to make a palette where the midpoint is dark rather than light:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.diverging_palette(250, 30, l=65, center=\\\"dark\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"It's important to emphasize here that using red and green, while intuitive, `should be avoided `_.\\n\",\n \"\\n\",\n \"Other diverging palettes\\n\",\n \"~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n \"\\n\",\n \"There are a few other good diverging palettes built into matplotlib, including Color Brewer palettes:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"Spectral\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"And the ``coolwarm`` palette, which has less contrast between the middle values and the extremes:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"sns.color_palette(\\\"coolwarm\\\", as_cmap=True)\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"metadata\": {},\n \"source\": [\n \"As you can see, there are many options for using color in your visualizations. Seaborn tries both to use good defaults and to offer a lot of flexibility.\\n\",\n \"\\n\",\n \"This discussion is only the beginning, and there are a number of good resources for learning more about techniques for using color in visualizations. One great example is this `series of blog posts `_ from the NASA Earth Observatory. The matplotlib docs also have a `nice tutorial `_ that illustrates some of the perceptual properties of their colormaps.\"\n ]\n }\n ],\n \"metadata\": {\n \"celltoolbar\": \"Tags\",\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"id":765,"name":"objects.Dodge.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"4d44a940-db84-4e16-bc83-e67d08d6d56a\",\n \"metadata\": {\n \"tags\": [\n \"hide\"\n ]\n },\n \"outputs\": [],\n \"source\": [\n \"import seaborn.objects as so\\n\",\n \"from seaborn import load_dataset\\n\",\n \"tips = load_dataset(\\\"tips\\\").astype({\\\"time\\\": str})\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"ce99e1a1-c213-478f-a5bc-d19e2c4d70db\",\n \"metadata\": {},\n \"source\": [\n \"This transform modifies both the width and position (along the orientation axis) of marks that would otherwise overlap:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"f6a84062-2c2b-4a45-91cb-77f29462104d\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"(\\n\",\n \" so.Plot(tips, \\\"day\\\", color=\\\"time\\\")\\n\",\n \" .add(so.Bar(), so.Count(), so.Dodge())\\n\",\n \")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"55d3a9a8-c973-4e91-9f3a-bc137df15f48\",\n \"metadata\": {},\n \"source\": [\n \"By default, empty space may appear when variables are not fully crossed:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"08ae1c65-5ad9-47a3-a8f3-d901bd4821f2\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p = so.Plot(tips, \\\"day\\\", color=\\\"time\\\")\\n\",\n \"p.add(so.Bar(), so.Count(), so.Dodge())\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"2125f07d-4210-4d49-8761-bcfa3f9c67f5\",\n \"metadata\": {},\n \"source\": [\n \"The `empty` parameter handles this case; use it to fill out the space:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"c2314343-de73-45d7-9595-acf5f7d62e93\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p.add(so.Bar(), so.Count(), so.Dodge(empty=\\\"fill\\\"))\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"08f4382c-842e-4777-a452-1d88251da6e7\",\n \"metadata\": {},\n \"source\": [\n \"Or center the marks while using a consistent width:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"1e0745e4-be11-4703-bf9c-4b13cbb76e91\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p.add(so.Bar(), so.Count(), so.Dodge(empty=\\\"drop\\\"))\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"7d29ec53-caef-4cff-9828-dc242adb5c49\",\n \"metadata\": {},\n \"source\": [\n \"Use `gap` to add a bit of spacing between dodged marks:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"342aca16-c67b-4bc4-9101-fec6c398aa0f\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p = so.Plot(tips, \\\"day\\\", \\\"total_bill\\\", color=\\\"sex\\\")\\n\",\n \"p.add(so.Bar(), so.Agg(\\\"sum\\\"), so.Dodge(gap=.1))\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"68b52dcb-c5e7-4186-b61f-e96fac5f4d40\",\n \"metadata\": {},\n \"source\": [\n \"When multiple semantic variables are used, each distinct group will be dodged:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"497f3e3b-39bc-4381-85bb-be5bb5c60b1f\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p.add(so.Dot(), so.Dodge(), fill=\\\"smoker\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"795835d2-904f-4343-89c2-b91be9c1c504\",\n \"metadata\": {},\n \"source\": [\n \"Use `by` to dodge only a subset of variables:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"da01f6c0-c425-409c-a010-5cb52a794dc9\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p.add(so.Dot(), so.Dodge(by=[\\\"color\\\"]), fill=\\\"smoker\\\")\"\n ]\n },\n {\n \"cell_type\": \"raw\",\n \"id\": \"77de77da-2fad-4374-9d14-90520e448c90\",\n \"metadata\": {},\n \"source\": [\n \"When combining with other transforms (such as :class:`Jitter` or :class:`Stack`), be mindful of the order that they are applied in:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"29ccabd6-6bd5-4563-a337-f8f8d25f7dad\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"p.add(so.Dot(), so.Dodge(), so.Jitter())\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"a73fe9a5-c717-41fd-874e-be72334ea6d4\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"py310\",\n \"language\": \"python\",\n \"name\": \"py310\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.0\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"attributeType":"null","col":4,"comment":"A 1-D iterator over the array.\n\n This is a `numpy.flatiter` instance, which acts similarly to, but is not\n a subclass of, Python's built-in iterator object.\n\n See Also\n --------\n flatten : Return a copy of the array collapsed into one dimension.\n\n flatiter\n\n Examples\n --------\n >>> x = np.arange(1, 7).reshape(2, 3)\n >>> x\n array([[1, 2, 3],\n [4, 5, 6]])\n >>> x.flat[3]\n 4\n >>> x.T\n array([[1, 4],\n [2, 5],\n [3, 6]])\n >>> x.T.flat[3]\n 5\n >>> type(x.flat)\n \n\n An assignment example:\n\n >>> x.flat = 3; x\n array([[3, 3, 3],\n [3, 3, 3]])\n >>> x.flat[[1,4]] = 1; x\n array([[3, 1, 3],\n [3, 1, 3]])","endLoc":5396,"id":768,"name":"flat","nodeType":"Attribute","startLoc":5396,"text":"flat"},{"attributeType":"null","col":4,"comment":"The imaginary part of the array.\n\n Examples\n --------\n >>> x = np.sqrt([1+0j, 0+1j])\n >>> x.imag\n array([ 0. , 0.70710678])\n >>> x.imag.dtype\n dtype('float64')","endLoc":5434,"id":770,"name":"imag","nodeType":"Attribute","startLoc":5434,"text":"imag"},{"attributeType":"null","col":4,"comment":"Length of one array element in bytes.\n\n Examples\n --------\n >>> x = np.array([1,2,3], dtype=np.float64)\n >>> x.itemsize\n 8\n >>> x = np.array([1,2,3], dtype=np.complex128)\n >>> x.itemsize\n 16","endLoc":5445,"id":771,"name":"itemsize","nodeType":"Attribute","startLoc":5445,"text":"itemsize"},{"col":0,"comment":"null","endLoc":204,"header":"def _get_win_folder_with_ctypes(csidl_name)","id":773,"name":"_get_win_folder_with_ctypes","nodeType":"Function","startLoc":180,"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"},{"attributeType":"null","col":4,"comment":"Total bytes consumed by the elements of the array.\n\n Notes\n -----\n Does not include memory consumed by non-element attributes of the\n array object.\n\n Examples\n --------\n >>> x = np.zeros((3,5,2), dtype=np.complex128)\n >>> x.nbytes\n 480\n >>> np.prod(x.shape) * x.itemsize\n 480","endLoc":5457,"id":775,"name":"nbytes","nodeType":"Attribute","startLoc":5457,"text":"nbytes"},{"className":"AreaBase","col":0,"comment":"null","endLoc":86,"id":778,"nodeType":"Class","startLoc":21,"text":"class 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)\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, kind=\"mergesort\")\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\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 )"},{"col":4,"comment":"null","endLoc":51,"header":"def _plot(self, split_gen, scales, orient)","id":779,"name":"_plot","nodeType":"Function","startLoc":23,"text":"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)"},{"attributeType":"null","col":4,"comment":"Number of array dimensions.\n\n Examples\n --------\n >>> x = np.array([1, 2, 3])\n >>> x.ndim\n 1\n >>> y = np.zeros((2, 3, 4))\n >>> y.ndim\n 3","endLoc":5473,"id":780,"name":"ndim","nodeType":"Attribute","startLoc":5473,"text":"ndim"},{"attributeType":"null","col":4,"comment":"The real part of the array.\n\n Examples\n --------\n >>> x = np.sqrt([1+0j, 0+1j])\n >>> x.real\n array([ 1. , 0.70710678])\n >>> x.real.dtype\n dtype('float64')\n\n See Also\n --------\n numpy.real : equivalent function","endLoc":5485,"id":783,"name":"real","nodeType":"Attribute","startLoc":5485,"text":"real"},{"fileName":"test_subplots.py","filePath":"tests/_core","id":784,"nodeType":"File","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)\n\n\nclass 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\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\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\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\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\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\"\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\"\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\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\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\"\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\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\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\"\n\n\nclass 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)\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\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\"\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\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\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}\"\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\"]\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\n"},{"className":"Subplots","col":0,"comment":"\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 ","endLoc":269,"id":785,"nodeType":"Class","startLoc":16,"text":"class 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)\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?\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\"]\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\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\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 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)"},{"attributeType":"tuple","col":4,"comment":"Tuple of array dimensions.\n\n Notes\n -----\n May be used to \"reshape\" the array, as long as this would not\n require a change in the total number of elements\n\n Examples\n --------\n >>> x = np.array([1, 2, 3, 4])\n >>> x.shape\n (4,)\n >>> y = np.zeros((2, 3, 4))\n >>> y.shape\n (2, 3, 4)\n >>> y.shape = (3, 8)\n >>> y\n array([[ 0., 0., 0., 0., 0., 0., 0., 0.],\n [ 0., 0., 0., 0., 0., 0., 0., 0.],\n [ 0., 0., 0., 0., 0., 0., 0., 0.]])\n >>> y.shape = (3, 6)\n Traceback (most recent call last):\n File \"\", line 1, in \n ValueError: total size of new array must be unchanged","endLoc":5500,"id":787,"name":"shape","nodeType":"Attribute","startLoc":5500,"text":"shape"},{"col":4,"comment":"null","endLoc":324,"header":"def signature(obj: _IntrospectableCallable, *, follow_wrapped: bool = True) -> Signature","id":788,"name":"signature","nodeType":"Function","startLoc":324,"text":"def signature(obj: _IntrospectableCallable, *, follow_wrapped: bool = True) -> Signature: ..."},{"col":4,"comment":"null","endLoc":44,"header":"def __init__(\n self,\n subplot_spec: dict, # TODO define as TypedDict\n facet_spec: FacetSpec,\n pair_spec: PairSpec,\n )","id":790,"name":"__init__","nodeType":"Function","startLoc":32,"text":"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)"},{"attributeType":"null","col":4,"comment":"Number of elements in the array.\n\n Equivalent to ``np.prod(a.shape)``, i.e., the product of the array's\n dimensions.\n\n Examples\n --------\n >>> x = np.zeros((3, 5, 2), dtype=np.complex128)\n >>> x.size\n 30\n >>> np.prod(x.shape)\n 30","endLoc":5526,"id":791,"name":"size","nodeType":"Attribute","startLoc":5526,"text":"size"},{"className":"Text","col":0,"comment":"\n A textual mark to annotate or represent data values.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Text.rst\n\n ","endLoc":76,"id":792,"nodeType":"Class","startLoc":21,"text":"@document_properties\n@dataclass\nclass Text(Mark):\n \"\"\"\n A textual mark to annotate or represent data values.\n\n Examples\n --------\n .. include:: ../docstrings/objects.Text.rst\n\n \"\"\"\n text: MappableString = Mappable(\"\")\n color: MappableColor = Mappable(\"k\")\n alpha: MappableFloat = Mappable(1)\n fontsize: MappableFloat = Mappable(rc=\"font.size\")\n halign: MappableString = Mappable(\"center\")\n valign: MappableString = Mappable(\"center_baseline\")\n offset: MappableFloat = Mappable(4)\n\n def _plot(self, split_gen, scales, orient):\n\n ax_data = defaultdict(list)\n\n for keys, data, ax in split_gen():\n\n vals = resolve_properties(self, keys, scales)\n color = resolve_color(self, keys, \"\", scales)\n\n halign = vals[\"halign\"]\n valign = vals[\"valign\"]\n fontsize = vals[\"fontsize\"]\n offset = vals[\"offset\"] / 72\n\n offset_trans = ScaledTranslation(\n {\"right\": -offset, \"left\": +offset}.get(halign, 0),\n {\"top\": -offset, \"bottom\": +offset, \"baseline\": +offset}.get(valign, 0),\n ax.figure.dpi_scale_trans,\n )\n\n for row in data.to_dict(\"records\"):\n artist = mpl.text.Text(\n x=row[\"x\"],\n y=row[\"y\"],\n text=str(row.get(\"text\", vals[\"text\"])),\n color=color,\n fontsize=fontsize,\n horizontalalignment=halign,\n verticalalignment=valign,\n transform=ax.transData + offset_trans,\n **self.artist_kws,\n )\n ax.add_artist(artist)\n ax_data[ax].append([row[\"x\"], row[\"y\"]])\n\n for ax, ax_vals in ax_data.items():\n ax.update_datalim(np.array(ax_vals))"},{"col":0,"comment":"\n Test whether all array elements along a given axis evaluate to True.\n\n Parameters\n ----------\n a : array_like\n Input array or object that can be converted to an array.\n axis : None or int or tuple of ints, optional\n Axis or axes along which a logical AND reduction is performed.\n The default (`axis` = `None`) is to perform a logical AND over all\n the dimensions of the input array. `axis` may be negative, in\n which case it counts from the last to the first axis.\n\n .. versionadded:: 1.7.0\n\n If this is a tuple of ints, a reduction is performed on multiple\n axes, instead of a single axis or all the axes as before.\n out : ndarray, optional\n Alternate output array in which to place the result.\n It must have the same shape as the expected output and its\n type is preserved (e.g., if ``dtype(out)`` is float, the result\n will consist of 0.0's and 1.0's). See `doc.ufuncs` (Section\n \"Output arguments\") for more details.\n\n keepdims : bool, optional\n If this is set to True, the axes which are reduced are left\n in the result as dimensions with size one. With this option,\n the result will broadcast correctly against the input array.\n\n If the default value is passed, then `keepdims` will not be\n passed through to the `all` method of sub-classes of\n `ndarray`, however any non-default value will be. If the\n sub-classes `sum` method does not implement `keepdims` any\n exceptions will be raised.\n\n Returns\n -------\n all : ndarray, bool\n A new boolean or array is returned unless `out` is specified,\n in which case a reference to `out` is returned.\n\n See Also\n --------\n ndarray.all : equivalent method\n\n any : Test whether any element along a given axis evaluates to True.\n\n Notes\n -----\n Not a Number (NaN), positive infinity and negative infinity\n evaluate to `True` because these are not equal to zero.\n\n Examples\n --------\n >>> np.all([[True,False],[True,True]])\n False\n\n >>> np.all([[True,False],[True,True]], axis=0)\n array([ True, False], dtype=bool)\n\n >>> np.all([-1, 4, 5])\n True\n\n >>> np.all([1.0, np.nan])\n True\n\n >>> o=np.array([False])\n >>> z=np.all([-1, 4, 5], out=o)\n >>> id(z), id(o), z # doctest: +SKIP\n (28293632, 28293632, array([ True], dtype=bool))\n\n ","endLoc":2030,"header":"def all(a, axis=None, out=None, keepdims=np._NoValue)","id":793,"name":"all","nodeType":"Function","startLoc":1953,"text":"def all(a, axis=None, out=None, keepdims=np._NoValue):\n \"\"\"\n Test whether all array elements along a given axis evaluate to True.\n\n Parameters\n ----------\n a : array_like\n Input array or object that can be converted to an array.\n axis : None or int or tuple of ints, optional\n Axis or axes along which a logical AND reduction is performed.\n The default (`axis` = `None`) is to perform a logical AND over all\n the dimensions of the input array. `axis` may be negative, in\n which case it counts from the last to the first axis.\n\n .. versionadded:: 1.7.0\n\n If this is a tuple of ints, a reduction is performed on multiple\n axes, instead of a single axis or all the axes as before.\n out : ndarray, optional\n Alternate output array in which to place the result.\n It must have the same shape as the expected output and its\n type is preserved (e.g., if ``dtype(out)`` is float, the result\n will consist of 0.0's and 1.0's). See `doc.ufuncs` (Section\n \"Output arguments\") for more details.\n\n keepdims : bool, optional\n If this is set to True, the axes which are reduced are left\n in the result as dimensions with size one. With this option,\n the result will broadcast correctly against the input array.\n\n If the default value is passed, then `keepdims` will not be\n passed through to the `all` method of sub-classes of\n `ndarray`, however any non-default value will be. If the\n sub-classes `sum` method does not implement `keepdims` any\n exceptions will be raised.\n\n Returns\n -------\n all : ndarray, bool\n A new boolean or array is returned unless `out` is specified,\n in which case a reference to `out` is returned.\n\n See Also\n --------\n ndarray.all : equivalent method\n\n any : Test whether any element along a given axis evaluates to True.\n\n Notes\n -----\n Not a Number (NaN), positive infinity and negative infinity\n evaluate to `True` because these are not equal to zero.\n\n Examples\n --------\n >>> np.all([[True,False],[True,True]])\n False\n\n >>> np.all([[True,False],[True,True]], axis=0)\n array([ True, False], dtype=bool)\n\n >>> np.all([-1, 4, 5])\n True\n\n >>> np.all([1.0, np.nan])\n True\n\n >>> o=np.array([False])\n >>> z=np.all([-1, 4, 5], out=o)\n >>> id(z), id(o), z # doctest: +SKIP\n (28293632, 28293632, array([ True], dtype=bool))\n\n \"\"\"\n arr = asanyarray(a)\n kwargs = {}\n if keepdims is not np._NoValue:\n kwargs['keepdims'] = keepdims\n return arr.all(axis=axis, out=out, **kwargs)"},{"col":4,"comment":"null","endLoc":76,"header":"def _plot(self, split_gen, scales, orient)","id":794,"name":"_plot","nodeType":"Function","startLoc":40,"text":"def _plot(self, split_gen, scales, orient):\n\n ax_data = defaultdict(list)\n\n for keys, data, ax in split_gen():\n\n vals = resolve_properties(self, keys, scales)\n color = resolve_color(self, keys, \"\", scales)\n\n halign = vals[\"halign\"]\n valign = vals[\"valign\"]\n fontsize = vals[\"fontsize\"]\n offset = vals[\"offset\"] / 72\n\n offset_trans = ScaledTranslation(\n {\"right\": -offset, \"left\": +offset}.get(halign, 0),\n {\"top\": -offset, \"bottom\": +offset, \"baseline\": +offset}.get(valign, 0),\n ax.figure.dpi_scale_trans,\n )\n\n for row in data.to_dict(\"records\"):\n artist = mpl.text.Text(\n x=row[\"x\"],\n y=row[\"y\"],\n text=str(row.get(\"text\", vals[\"text\"])),\n color=color,\n fontsize=fontsize,\n horizontalalignment=halign,\n verticalalignment=valign,\n transform=ax.transData + offset_trans,\n **self.artist_kws,\n )\n ax.add_artist(artist)\n ax_data[ax].append([row[\"x\"], row[\"y\"]])\n\n for ax, ax_vals in ax_data.items():\n ax.update_datalim(np.array(ax_vals))"},{"attributeType":"null","col":4,"comment":"Tuple of bytes to step in each dimension when traversing an array.\n\n The byte offset of element ``(i[0], i[1], ..., i[n])`` in an array `a`\n is::\n\n offset = sum(np.array(i) * a.strides)\n\n A more detailed explanation of strides can be found in the\n \"ndarray.rst\" file in the NumPy reference guide.\n\n Notes\n -----\n Imagine an array of 32-bit integers (each 4 bytes)::\n\n x = np.array([[0, 1, 2, 3, 4],\n [5, 6, 7, 8, 9]], dtype=np.int32)\n\n This array is stored in memory as 40 bytes, one after the other\n (known as a contiguous block of memory). The strides of an array tell\n us how many bytes we have to skip in memory to move to the next position\n along a certain axis. For example, we have to skip 4 bytes (1 value) to\n move to the next column, but 20 bytes (5 values) to get to the same\n position in the next row. As such, the strides for the array `x` will be\n ``(20, 4)``.\n\n See Also\n --------\n numpy.lib.stride_tricks.as_strided\n\n Examples\n --------\n >>> y = np.reshape(np.arange(2*3*4), (2,3,4))\n >>> y\n array([[[ 0, 1, 2, 3],\n [ 4, 5, 6, 7],\n [ 8, 9, 10, 11]],\n [[12, 13, 14, 15],\n [16, 17, 18, 19],\n [20, 21, 22, 23]]])\n >>> y.strides\n (48, 16, 4)\n >>> y[1,1,1]\n 17\n >>> offset=sum(y.strides * np.array((1,1,1)))\n >>> offset/y.itemsize\n 17\n\n >>> x = np.reshape(np.arange(5*6*7*8), (5,6,7,8)).transpose(2,3,1,0)\n >>> x.strides\n (32, 4, 224, 1344)\n >>> i = np.array([3,5,2,2])\n >>> offset = sum(i * x.strides)\n >>> x[3,5,2,2]\n 813\n >>> offset / x.itemsize\n 813","endLoc":5540,"id":795,"name":"strides","nodeType":"Attribute","startLoc":5540,"text":"strides"},{"attributeType":"null","col":4,"comment":"Same as self.transpose(), except that self is returned if\n self.ndim < 2.\n\n Examples\n --------\n >>> x = np.array([[1.,2.],[3.,4.]])\n >>> x\n array([[ 1., 2.],\n [ 3., 4.]])\n >>> x.T\n array([[ 1., 3.],\n [ 2., 4.]])\n >>> x = np.array([1.,2.,3.,4.])\n >>> x\n array([ 1., 2., 3., 4.])\n >>> x.T\n array([ 1., 2., 3., 4.])","endLoc":5598,"id":796,"name":"T","nodeType":"Attribute","startLoc":5598,"text":"T"},{"col":4,"comment":"Reject specs that pair and facet on (or wrap to) same figure dimension.","endLoc":76,"header":"def _check_dimension_uniqueness(\n self, facet_spec: FacetSpec, pair_spec: PairSpec\n ) -> None","id":798,"name":"_check_dimension_uniqueness","nodeType":"Function","startLoc":46,"text":"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?"},{"attributeType":"null","col":4,"comment":"None.","endLoc":5617,"id":800,"name":"__array_finalize__","nodeType":"Attribute","startLoc":5617,"text":"__array_finalize__"},{"col":0,"comment":"null","endLoc":230,"header":"def _get_win_folder_with_jna(csidl_name)","id":801,"name":"_get_win_folder_with_jna","nodeType":"Function","startLoc":206,"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"},{"col":4,"comment":"null","endLoc":1761,"header":"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 )","id":802,"name":"__init__","nodeType":"Function","startLoc":1681,"text":"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)"},{"col":4,"comment":"null","endLoc":1100,"header":"@overload # type: ignore[override]\n def get(self, __key: _KT) -> _VT | None","id":803,"name":"get","nodeType":"Function","startLoc":1099,"text":"@overload # type: ignore[override]\n def get(self, __key: _KT) -> _VT | None: ..."},{"col":4,"comment":"null","endLoc":1102,"header":"@overload\n def get(self, __key: _KT, __default: _VT) -> _VT","id":804,"name":"get","nodeType":"Function","startLoc":1101,"text":"@overload\n def get(self, __key: _KT, __default: _VT) -> _VT: ..."},{"col":4,"comment":"null","endLoc":1104,"header":"@overload\n def get(self, __key: _KT, __default: _T) -> _VT | _T","id":805,"name":"get","nodeType":"Function","startLoc":1103,"text":"@overload\n def get(self, __key: _KT, __default: _T) -> _VT | _T: ..."},{"col":0,"comment":"null","endLoc":641,"header":"def 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)","id":806,"name":"lmplot","nodeType":"Function","startLoc":560,"text":"def 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"},{"attributeType":"null","col":4,"comment":"Array protocol: Python side.","endLoc":5620,"id":807,"name":"__array_interface__","nodeType":"Attribute","startLoc":5620,"text":"__array_interface__"},{"attributeType":"Path","col":0,"comment":"null","endLoc":11,"id":808,"name":"path","nodeType":"Attribute","startLoc":11,"text":"path"},{"attributeType":"null","col":4,"comment":"Array priority.","endLoc":5623,"id":809,"name":"__array_priority__","nodeType":"Attribute","startLoc":5623,"text":"__array_priority__"},{"col":4,"comment":"null","endLoc":70,"header":"def assert_rc_params_equal(self, params1, params2)","id":810,"name":"assert_rc_params_equal","nodeType":"Function","startLoc":58,"text":"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"},{"col":0,"comment":"null","endLoc":991,"header":"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)","id":811,"name":"relplot","nodeType":"Function","startLoc":825,"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\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 # Pass \"\" when the variable name is None to overwrite internal variables\n g.set_axis_labels(variables.get(\"x\") or \"\", variables.get(\"y\") or \"\")\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"},{"attributeType":"null","col":4,"comment":"Array protocol: C-struct side.","endLoc":5626,"id":812,"name":"__array_struct__","nodeType":"Attribute","startLoc":5626,"text":"__array_struct__"},{"attributeType":"null","col":4,"comment":"null","endLoc":5630,"id":813,"name":"__hash__","nodeType":"Attribute","startLoc":5630,"text":"__hash__"},{"col":0,"comment":"null","endLoc":8,"header":"@overload\ndef warn(message: str, category: type[Warning] | None = None, stacklevel: int = 1, source: Any | None = None) -> None","id":814,"name":"warn","nodeType":"Function","startLoc":7,"text":"@overload\ndef warn(message: str, category: type[Warning] | None = None, stacklevel: int = 1, source: Any | None = None) -> None: ..."},{"className":"TestAxesStyle","col":0,"comment":"null","endLoc":180,"id":815,"nodeType":"Class","startLoc":73,"text":"class TestAxesStyle(RCParamFixtures):\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()\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()\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()"},{"col":0,"comment":"","endLoc":1,"header":"check_gallery.py#","id":816,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"Execute the scripts that comprise the example gallery in the online docs.\"\"\"\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\")"},{"col":4,"comment":"null","endLoc":80,"header":"def test_default_return(self)","id":820,"name":"test_default_return","nodeType":"Function","startLoc":77,"text":"def test_default_return(self):\n\n current = rcmod.axes_style()\n self.assert_rc_params(current)"},{"col":0,"comment":"\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 ","endLoc":300,"header":"def axes_style(style=None, rc=None)","id":829,"name":"axes_style","nodeType":"Function","startLoc":146,"text":"def 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 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"},{"col":0,"comment":"null","endLoc":10,"header":"@overload\ndef warn(message: Warning, category: Any = None, stacklevel: int = 1, source: Any | None = None) -> None","id":830,"name":"warn","nodeType":"Function","startLoc":9,"text":"@overload\ndef warn(message: Warning, category: Any = None, stacklevel: int = 1, source: Any | None = None) -> None: ..."},{"col":4,"comment":"Apply statistical transform to data subgroups and return combined result.","endLoc":65,"header":"def __call__(\n self,\n data: DataFrame,\n groupby: GroupBy,\n orient: str,\n scales: dict[str, Scale],\n ) -> DataFrame","id":831,"name":"__call__","nodeType":"Function","startLoc":57,"text":"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"},{"attributeType":"bool","col":4,"comment":"null","endLoc":31,"id":834,"name":"group_by_orient","nodeType":"Attribute","startLoc":31,"text":"group_by_orient"},{"attributeType":"null","col":0,"comment":"null","endLoc":803,"id":838,"name":"PROPERTIES","nodeType":"Attribute","startLoc":803,"text":"PROPERTIES"},{"col":14,"endLoc":193,"id":839,"nodeType":"Lambda","startLoc":193,"text":"lambda row: dot_product(row, triple)"},{"className":"Property","col":0,"comment":"Base class for visual properties that can be set directly or be data scaling.","endLoc":140,"id":841,"nodeType":"Class","startLoc":47,"text":"class 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\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()\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)\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)\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"},{"col":4,"comment":"null","endLoc":168,"header":"def _get_bins_and_eval(self, data, orient, groupby, scale_type)","id":842,"name":"_get_bins_and_eval","nodeType":"Function","startLoc":165,"text":"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)"},{"col":4,"comment":"Given data, initialize appropriate scale class.","endLoc":76,"header":"def default_scale(self, data: Series) -> Scale","id":843,"name":"default_scale","nodeType":"Function","startLoc":62,"text":"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()"},{"col":0,"comment":"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 ","endLoc":150,"header":"def _get_win_folder_from_registry(csidl_name)","id":844,"name":"_get_win_folder_from_registry","nodeType":"Function","startLoc":132,"text":"def _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"},{"col":4,"comment":"null","endLoc":181,"header":"def _eval(self, data, orient, bin_kws)","id":845,"name":"_eval","nodeType":"Function","startLoc":170,"text":"def _eval(self, data, orient, bin_kws):\n\n vals = data[orient]\n weights = data.get(\"weight\", None)\n\n density = self.stat == \"density\"\n hist, edges = np.histogram(vals, **bin_kws, weights=weights, density=density)\n\n width = np.diff(edges)\n center = edges[:-1] + width / 2\n\n return pd.DataFrame({orient: center, \"count\": hist, \"space\": width})"},{"className":"Version","col":0,"comment":"null","endLoc":347,"id":851,"nodeType":"Class","startLoc":214,"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\"\"\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)\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"},{"attributeType":"str","col":4,"comment":"null","endLoc":109,"id":852,"name":"_","nodeType":"Attribute","startLoc":109,"text":"_"},{"col":0,"comment":"null","endLoc":13,"header":"@pytest.fixture\ndef random()","id":853,"name":"random","nodeType":"Function","startLoc":11,"text":"@pytest.fixture\ndef random():\n np.random.seed(sum(map(ord, \"test_algorithms\")))"},{"className":"_BaseVersion","col":0,"comment":"null","endLoc":177,"id":854,"nodeType":"Class","startLoc":134,"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"},{"col":4,"comment":"null","endLoc":138,"header":"def __hash__(self) -> int","id":855,"name":"__hash__","nodeType":"Function","startLoc":137,"text":"def __hash__(self) -> int:\n return hash(self._key)"},{"col":4,"comment":"Subset a dictionary arguments with known semantic variables.","endLoc":661,"header":"@classmethod\n def get_semantics(cls, kwargs, semantics=None)","id":857,"name":"get_semantics","nodeType":"Function","startLoc":651,"text":"@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"},{"col":4,"comment":"null","endLoc":140,"header":"@staticmethod\n def _identity()","id":860,"name":"_identity","nodeType":"Function","startLoc":131,"text":"@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()"},{"col":4,"comment":"null","endLoc":147,"header":"def __lt__(self, other: \"_BaseVersion\") -> bool","id":862,"name":"__lt__","nodeType":"Function","startLoc":143,"text":"def __lt__(self, other: \"_BaseVersion\") -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key < other._key"},{"col":4,"comment":"null","endLoc":1014,"header":"def append(self, __object: _T) -> None","id":864,"name":"append","nodeType":"Function","startLoc":1014,"text":"def append(self, __object: _T) -> None: ..."},{"col":4,"comment":"null","endLoc":60,"header":"def _resolve_properties(self, data, scales)","id":865,"name":"_resolve_properties","nodeType":"Function","startLoc":47,"text":"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"},{"col":4,"comment":"null","endLoc":119,"header":"def __init__(\n self,\n data=None,\n variables={},\n order=None,\n orient=None,\n require_numeric=False,\n legend=\"auto\",\n )","id":866,"name":"__init__","nodeType":"Function","startLoc":56,"text":"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"},{"col":4,"comment":"null","endLoc":153,"header":"def __le__(self, other: \"_BaseVersion\") -> bool","id":868,"name":"__le__","nodeType":"Function","startLoc":149,"text":"def __le__(self, other: \"_BaseVersion\") -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key <= other._key"},{"className":"PolyFit","col":0,"comment":"\n Fit a polynomial of the given order and resample data onto predicted curve.\n ","endLoc":44,"id":869,"nodeType":"Class","startLoc":10,"text":"@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 (\n groupby\n .apply(data.dropna(subset=[\"x\", \"y\"]), self._fit_predict)\n )"},{"col":4,"comment":"null","endLoc":34,"header":"def _fit_predict(self, data)","id":870,"name":"_fit_predict","nodeType":"Function","startLoc":22,"text":"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))"},{"attributeType":"tuple | str | list | dict | None","col":4,"comment":"null","endLoc":57,"id":871,"name":"values","nodeType":"Attribute","startLoc":57,"text":"values"},{"col":4,"comment":"null","endLoc":159,"header":"def __eq__(self, other: object) -> bool","id":872,"name":"__eq__","nodeType":"Function","startLoc":155,"text":"def __eq__(self, other: object) -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key == other._key"},{"col":4,"comment":"null","endLoc":165,"header":"def __ge__(self, other: \"_BaseVersion\") -> bool","id":875,"name":"__ge__","nodeType":"Function","startLoc":161,"text":"def __ge__(self, other: \"_BaseVersion\") -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key >= other._key"},{"col":4,"comment":"null","endLoc":171,"header":"def __gt__(self, other: \"_BaseVersion\") -> bool","id":876,"name":"__gt__","nodeType":"Function","startLoc":167,"text":"def __gt__(self, other: \"_BaseVersion\") -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key > other._key"},{"col":4,"comment":"null","endLoc":177,"header":"def __ne__(self, other: object) -> bool","id":881,"name":"__ne__","nodeType":"Function","startLoc":173,"text":"def __ne__(self, other: object) -> bool:\n if not isinstance(other, _BaseVersion):\n return NotImplemented\n\n return self._key != other._key"},{"attributeType":"(int, (int, ...), InfinityType | NegativeInfinityType | (str, int), InfinityType | NegativeInfinityType | (str, int), InfinityType | NegativeInfinityType | (str, int), NegativeInfinityType | (InfinityType | NegativeInfinityType | int | str | (InfinityType | NegativeInfinityType | int | str, str) | (NegativeInfinityType, InfinityType | NegativeInfinityType | int | str), ...)) | (int, (str, ...))","col":4,"comment":"null","endLoc":135,"id":885,"name":"_key","nodeType":"Attribute","startLoc":135,"text":"_key"},{"col":4,"comment":"null","endLoc":649,"header":"def __init__(self, data=None, variables={})","id":886,"name":"__init__","nodeType":"Function","startLoc":632,"text":"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}\")()"},{"col":4,"comment":"Define plot variables, optionally using lookup from `data`.","endLoc":715,"header":"def assign_variables(self, data=None, variables={})","id":887,"name":"assign_variables","nodeType":"Function","startLoc":689,"text":"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"},{"attributeType":"Generator","col":0,"comment":"null","endLoc":12,"id":888,"name":"py_files","nodeType":"Attribute","startLoc":12,"text":"py_files"},{"fileName":"version.py","filePath":"seaborn/external","id":889,"nodeType":"File","text":"\"\"\"Extract reference documentation from the pypa/packaging source tree.\n\nIn the process of copying, some unused methods / classes were removed.\nThese include:\n\n- parse()\n- anything involving LegacyVersion\n\nThis software is made available under the terms of *either* of the licenses\nfound in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made\nunder the terms of *both* these licenses.\n\nVendored from:\n- https://github.com/pypa/packaging/\n- commit ba07d8287b4554754ac7178d177033ea3f75d489 (09/09/2021)\n\"\"\"\n\n\n# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\n\nimport 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\n\n\nInfinity = 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\n\n\nNegativeInfinity = 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 \"\"\"\n\n\nclass _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\n\n\n# 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\"\"\"\n\n\nclass 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\"\"\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)\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\n\n\ndef _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\n\n\ndef _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\n"},{"attributeType":"_SpecialForm","col":0,"comment":"null","endLoc":200,"id":890,"name":"Optional","nodeType":"Attribute","startLoc":200,"text":"Optional"},{"className":"SupportsInt","col":0,"comment":"null","endLoc":333,"id":891,"nodeType":"Class","startLoc":330,"text":"@runtime_checkable\nclass SupportsInt(Protocol, metaclass=ABCMeta):\n    @abstractmethod\n    def __int__(self) -> int: ..."},{"col":4,"comment":"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        ","endLoc":857,"header":"def _assign_variables_wideform(self, data=None, **kwargs)","id":892,"name":"_assign_variables_wideform","nodeType":"Function","startLoc":717,"text":"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\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"},{"col":4,"comment":"null","endLoc":333,"header":"@abstractmethod\n    def __int__(self) -> int","id":893,"name":"__int__","nodeType":"Function","startLoc":332,"text":"@abstractmethod\n    def __int__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":1106,"header":"@overload\n    def pop(self, __key: _KT) -> _VT","id":894,"name":"pop","nodeType":"Function","startLoc":1105,"text":"@overload\n    def pop(self, __key: _KT) -> _VT: ..."},{"col":4,"comment":"null","endLoc":1108,"header":"@overload\n    def pop(self, __key: _KT, __default: _VT) -> _VT","id":895,"name":"pop","nodeType":"Function","startLoc":1107,"text":"@overload\n    def pop(self, __key: _KT, __default: _VT) -> _VT: ..."},{"col":4,"comment":"null","endLoc":1110,"header":"@overload\n    def pop(self, __key: _KT, __default: _T) -> _VT | _T","id":896,"name":"pop","nodeType":"Function","startLoc":1109,"text":"@overload\n    def pop(self, __key: _KT, __default: _T) -> _VT | _T: ..."},{"attributeType":"tuple","col":0,"comment":"null","endLoc":201,"id":897,"name":"Tuple","nodeType":"Attribute","startLoc":201,"text":"Tuple"},{"fileName":"counting.py","filePath":"seaborn/_stats","id":898,"nodeType":"File","text":"from __future__ import annotations\nfrom dataclasses import dataclass\nfrom typing import ClassVar\n\nimport numpy as np\nimport pandas as pd\nfrom pandas import DataFrame\n\nfrom seaborn._core.groupby import GroupBy\nfrom seaborn._core.scales import Scale\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 Count(Stat):\n    \"\"\"\n    Count distinct observations within groups.\n\n    See Also\n    --------\n    Hist : A more fully-featured transform including binning and/or normalization.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Count.rst\n\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        data[var] = data[orient]\n        res = (\n            groupby\n            .agg(data, {var: len})\n            .dropna(subset=[\"x\", \"y\"])\n            .reset_index(drop=True)\n        )\n        return res\n\n\n@dataclass\nclass Hist(Stat):\n    \"\"\"\n    Bin observations, count them, and optionally normalize or cumulate.\n\n    Parameters\n    ----------\n    stat : str\n        Aggregate statistic to compute in each bin:\n\n        - `count`: the number of observations\n        - `density`: normalize so that the total area of the histogram equals 1\n        - `percent`: normalize so that bar heights sum to 100\n        - `probability` or `proportion`: normalize so that bar heights sum to 1\n        - `frequency`: divide the number of observations by the bin width\n\n    bins : str, int, or ArrayLike\n        Generic parameter that can be the name of a reference rule, the number\n        of bins, or the bin breaks. Passed to :func:`numpy.histogram_bin_edges`.\n    binwidth : float\n        Width of each bin; overrides `bins` but can be used with `binrange`.\n    binrange : (min, max)\n        Lowest and highest value for bin edges; can be used with either\n        `bins` (when a number) or `binwidth`. Defaults to data extremes.\n    common_norm : bool or list of variables\n        When not `False`, the normalization is applied across groups. Use\n        `True` to normalize across all groups, or pass variable name(s) that\n        define normalization groups.\n    common_bins : bool or list of variables\n        When not `False`, the same bins are used for all groups. Use `True` to\n        share bins across all groups, or pass variable name(s) to share within.\n    cumulative : bool\n        If True, cumulate the bin values.\n    discrete : bool\n        If True, set `binwidth` and `binrange` so that bins have unit width and\n        are centered on integer values\n\n    Notes\n    -----\n    The choice of bins for computing and plotting a histogram can exert\n    substantial influence on the insights that one is able to draw from the\n    visualization. If the bins are too large, they may erase important features.\n    On the other hand, bins that are too small may be dominated by random\n    variability, obscuring the shape of the true underlying distribution. The\n    default bin size is determined using a reference rule that depends on the\n    sample 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\n    different bin sizes to be sure that you are not missing something important.\n    This function allows you to specify bins in several different ways, such as\n    by setting the total number of bins to use, the width of each bin, or the\n    specific locations where the bins should break.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Hist.rst\n\n    \"\"\"\n    stat: str = \"count\"\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    discrete: bool = False\n\n    def __post_init__(self):\n\n        stat_options = [\n            \"count\", \"density\", \"percent\", \"probability\", \"proportion\", \"frequency\"\n        ]\n        self._check_param_one_of(\"stat\", stat_options)\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\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        weights = 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, weights, 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\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        weights = data.get(\"weight\", None)\n\n        density = self.stat == \"density\"\n        hist, edges = np.histogram(vals, **bin_kws, weights=weights, density=density)\n\n        width = np.diff(edges)\n        center = edges[:-1] + width / 2\n\n        return pd.DataFrame({orient: center, \"count\": hist, \"space\": width})\n\n    def _normalize(self, data):\n\n        hist = data[\"count\"]\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(**{self.stat: hist})\n\n    def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n\n        scale_type = scales[orient].__class__.__name__.lower()\n        grouping_vars = [str(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                self._check_grouping_vars(\"common_bins\", grouping_vars)\n\n            data = bin_groupby.apply(\n                data, self._get_bins_and_eval, orient, groupby, scale_type,\n            )\n\n        if not grouping_vars or self.common_norm is True:\n            data = self._normalize(data)\n        else:\n            if self.common_norm is False:\n                norm_groupby = GroupBy(grouping_vars)\n            else:\n                norm_groupby = GroupBy(self.common_norm)\n                self._check_grouping_vars(\"common_norm\", grouping_vars)\n            data = norm_groupby.apply(data, self._normalize)\n\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        return data.assign(**{other: data[self.stat]})\n"},{"className":"InfinityType","col":0,"comment":"null","endLoc":60,"id":899,"nodeType":"Class","startLoc":34,"text":"class 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"},{"col":4,"comment":"null","endLoc":36,"header":"def __repr__(self) -> str","id":900,"name":"__repr__","nodeType":"Function","startLoc":35,"text":"def __repr__(self) -> str:\n        return \"Infinity\""},{"col":4,"comment":"null","endLoc":39,"header":"def __hash__(self) -> int","id":901,"name":"__hash__","nodeType":"Function","startLoc":38,"text":"def __hash__(self) -> int:\n        return hash(repr(self))"},{"className":"Count","col":0,"comment":"\n    Count distinct observations within groups.\n\n    See Also\n    --------\n    Hist : A more fully-featured transform including binning and/or normalization.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Count.rst\n\n    ","endLoc":46,"id":903,"nodeType":"Class","startLoc":18,"text":"@dataclass\nclass Count(Stat):\n    \"\"\"\n    Count distinct observations within groups.\n\n    See Also\n    --------\n    Hist : A more fully-featured transform including binning and/or normalization.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Count.rst\n\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        data[var] = data[orient]\n        res = (\n            groupby\n            .agg(data, {var: len})\n            .dropna(subset=[\"x\", \"y\"])\n            .reset_index(drop=True)\n        )\n        return res"},{"col":4,"comment":"null","endLoc":46,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":905,"name":"__call__","nodeType":"Function","startLoc":34,"text":"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        data[var] = data[orient]\n        res = (\n            groupby\n            .agg(data, {var: len})\n            .dropna(subset=[\"x\", \"y\"])\n            .reset_index(drop=True)\n        )\n        return res"},{"col":0,"comment":"\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    ","endLoc":332,"header":"def set_style(style=None, rc=None)","id":907,"name":"set_style","nodeType":"Function","startLoc":303,"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)"},{"col":4,"comment":"null","endLoc":42,"header":"def __lt__(self, other: object) -> bool","id":908,"name":"__lt__","nodeType":"Function","startLoc":41,"text":"def __lt__(self, other: object) -> bool:\n        return False"},{"col":4,"comment":"null","endLoc":45,"header":"def __le__(self, other: object) -> bool","id":909,"name":"__le__","nodeType":"Function","startLoc":44,"text":"def __le__(self, other: object) -> bool:\n        return False"},{"col":4,"comment":"null","endLoc":48,"header":"def __eq__(self, other: object) -> bool","id":910,"name":"__eq__","nodeType":"Function","startLoc":47,"text":"def __eq__(self, other: object) -> bool:\n        return isinstance(other, self.__class__)"},{"attributeType":"int","col":4,"comment":"null","endLoc":59,"id":911,"name":"_priority","nodeType":"Attribute","startLoc":59,"text":"_priority"},{"col":0,"comment":"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    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    ","endLoc":534,"header":"def set_palette(palette, n_colors=None, desat=None, color_codes=False)","id":912,"name":"set_palette","nodeType":"Function","startLoc":502,"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    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"},{"col":4,"comment":"null","endLoc":51,"header":"def __ne__(self, other: object) -> bool","id":913,"name":"__ne__","nodeType":"Function","startLoc":50,"text":"def __ne__(self, other: object) -> bool:\n        return not isinstance(other, self.__class__)"},{"col":0,"comment":"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.ListedColormap`.\n\n    Returns\n    -------\n    list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    set_palette : Set the default color cycle for all plots.\n    set_color_codes : Reassign color codes like ``\"b\"``, ``\"g\"``, etc. to\n                      colors from one of the seaborn palettes.\n\n    Examples\n    --------\n\n    .. include:: ../docstrings/color_palette.rst\n\n    ","endLoc":255,"header":"def color_palette(palette=None, n_colors=None, desat=None, as_cmap=False)","id":920,"name":"color_palette","nodeType":"Function","startLoc":122,"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.ListedColormap`.\n\n    Returns\n    -------\n    list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    set_palette : Set the default color cycle for all plots.\n    set_color_codes : Reassign color codes like ``\"b\"``, ``\"g\"``, etc. to\n                      colors from one of the seaborn palettes.\n\n    Examples\n    --------\n\n    .. include:: ../docstrings/color_palette.rst\n\n    \"\"\"\n    if palette is None:\n        palette = get_color_cycle()\n        if n_colors is None:\n            n_colors = len(palette)\n\n    elif not isinstance(palette, str):\n        palette = palette\n        if n_colors is None:\n            n_colors = len(palette)\n    else:\n\n        if n_colors is None:\n            # Use all colors in a qualitative palette or 6 of another kind\n            n_colors = QUAL_PALETTE_SIZES.get(palette, 6)\n\n        if palette in SEABORN_PALETTES:\n            # Named \"seaborn variant\" of matplotlib default color cycle\n            palette = SEABORN_PALETTES[palette]\n\n        elif palette == \"hls\":\n            # Evenly spaced colors in cylindrical RGB space\n            palette = hls_palette(n_colors, as_cmap=as_cmap)\n\n        elif palette == \"husl\":\n            # Evenly spaced colors in cylindrical Lab space\n            palette = husl_palette(n_colors, as_cmap=as_cmap)\n\n        elif palette.lower() == \"jet\":\n            # Paternalism\n            raise ValueError(\"No.\")\n\n        elif palette.startswith(\"ch:\"):\n            # Cubehelix palette with params specified in string\n            args, kwargs = _parse_cubehelix_args(palette)\n            palette = cubehelix_palette(n_colors, *args, **kwargs, as_cmap=as_cmap)\n\n        elif palette.startswith(\"light:\"):\n            # light palette to color specified in string\n            _, color = palette.split(\":\")\n            reverse = color.endswith(\"_r\")\n            if reverse:\n                color = color[:-2]\n            palette = light_palette(color, n_colors, reverse=reverse, as_cmap=as_cmap)\n\n        elif palette.startswith(\"dark:\"):\n            # light palette to color specified in string\n            _, color = palette.split(\":\")\n            reverse = color.endswith(\"_r\")\n            if reverse:\n                color = color[:-2]\n            palette = dark_palette(color, n_colors, reverse=reverse, as_cmap=as_cmap)\n\n        elif palette.startswith(\"blend:\"):\n            # blend palette between colors specified in string\n            _, colors = palette.split(\":\")\n            colors = colors.split(\",\")\n            palette = blend_palette(colors, n_colors, as_cmap=as_cmap)\n\n        else:\n            try:\n                # Perhaps a named matplotlib colormap?\n                palette = mpl_palette(palette, n_colors, as_cmap=as_cmap)\n            except (ValueError, KeyError):  # Error class changed in mpl36\n                raise ValueError(f\"{palette!r} is not a valid palette name\")\n\n    if desat is not None:\n        palette = [desaturate(c, desat) for c in palette]\n\n    if not as_cmap:\n\n        # Always return as many colors as we asked for\n        pal_cycle = cycle(palette)\n        palette = [next(pal_cycle) for _ in range(n_colors)]\n\n        # Always return in r, g, b tuple format\n        try:\n            palette = map(mpl.colors.colorConverter.to_rgb, palette)\n            palette = _ColorPalette(palette)\n        except ValueError:\n            raise ValueError(f\"Could not generate a palette for {palette}\")\n\n    return palette"},{"col":4,"comment":"null","endLoc":54,"header":"def __gt__(self, other: object) -> bool","id":921,"name":"__gt__","nodeType":"Function","startLoc":53,"text":"def __gt__(self, other: object) -> bool:\n        return True"},{"col":4,"comment":"null","endLoc":57,"header":"def __ge__(self, other: object) -> bool","id":922,"name":"__ge__","nodeType":"Function","startLoc":56,"text":"def __ge__(self, other: object) -> bool:\n        return True"},{"col":4,"comment":"null","endLoc":60,"header":"def __neg__(self: object) -> \"NegativeInfinityType\"","id":923,"name":"__neg__","nodeType":"Function","startLoc":59,"text":"def __neg__(self: object) -> \"NegativeInfinityType\":\n        return NegativeInfinity"},{"className":"NegativeInfinityType","col":0,"comment":"null","endLoc":92,"id":924,"nodeType":"Class","startLoc":66,"text":"class 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"},{"col":4,"comment":"null","endLoc":68,"header":"def __repr__(self) -> str","id":926,"name":"__repr__","nodeType":"Function","startLoc":67,"text":"def __repr__(self) -> str:\n        return \"-Infinity\""},{"col":4,"comment":"null","endLoc":71,"header":"def __hash__(self) -> int","id":927,"name":"__hash__","nodeType":"Function","startLoc":70,"text":"def __hash__(self) -> int:\n        return hash(repr(self))"},{"attributeType":"Sequence","col":4,"comment":"null","endLoc":60,"id":928,"name":"_pipeline","nodeType":"Attribute","startLoc":60,"text":"_pipeline"},{"col":4,"comment":"null","endLoc":74,"header":"def __lt__(self, other: object) -> bool","id":929,"name":"__lt__","nodeType":"Function","startLoc":73,"text":"def __lt__(self, other: object) -> bool:\n        return True"},{"col":4,"comment":"null","endLoc":77,"header":"def __le__(self, other: object) -> bool","id":930,"name":"__le__","nodeType":"Function","startLoc":76,"text":"def __le__(self, other: object) -> bool:\n        return True"},{"col":4,"comment":"null","endLoc":80,"header":"def __eq__(self, other: object) -> bool","id":932,"name":"__eq__","nodeType":"Function","startLoc":79,"text":"def __eq__(self, other: object) -> bool:\n        return isinstance(other, self.__class__)"},{"col":4,"comment":"null","endLoc":83,"header":"def __ne__(self, other: object) -> bool","id":934,"name":"__ne__","nodeType":"Function","startLoc":82,"text":"def __ne__(self, other: object) -> bool:\n        return not isinstance(other, self.__class__)"},{"col":4,"comment":"null","endLoc":86,"header":"def __gt__(self, other: object) -> bool","id":936,"name":"__gt__","nodeType":"Function","startLoc":85,"text":"def __gt__(self, other: object) -> bool:\n        return False"},{"col":4,"comment":"null","endLoc":89,"header":"def __ge__(self, other: object) -> bool","id":937,"name":"__ge__","nodeType":"Function","startLoc":88,"text":"def __ge__(self, other: object) -> bool:\n        return False"},{"col":4,"comment":"null","endLoc":92,"header":"def __neg__(self: object) -> InfinityType","id":938,"name":"__neg__","nodeType":"Function","startLoc":91,"text":"def __neg__(self: object) -> InfinityType:\n        return Infinity"},{"className":"InvalidVersion","col":0,"comment":"\n    An invalid version was found, users should refer to PEP 440.\n    ","endLoc":131,"id":939,"nodeType":"Class","startLoc":128,"text":"class InvalidVersion(ValueError):\n    \"\"\"\n    An invalid version was found, users should refer to PEP 440.\n    \"\"\""},{"className":"ValueError","col":0,"comment":"null","endLoc":2011,"id":941,"nodeType":"Class","startLoc":2011,"text":"class ValueError(Exception): ..."},{"attributeType":"Generator","col":0,"comment":"null","endLoc":13,"id":942,"name":"ipynb_files","nodeType":"Attribute","startLoc":13,"text":"ipynb_files"},{"attributeType":"null","col":4,"comment":"null","endLoc":61,"id":943,"name":"_matplotlib_scale","nodeType":"Attribute","startLoc":61,"text":"_matplotlib_scale"},{"col":0,"comment":"\n    Convert inputs to arrays with at least one dimension.\n\n    Scalar inputs are converted to 1-dimensional arrays, whilst\n    higher-dimensional inputs are preserved.\n\n    Parameters\n    ----------\n    arys1, arys2, ... : array_like\n        One or more input arrays.\n\n    Returns\n    -------\n    ret : ndarray\n        An array, or list of arrays, each with ``a.ndim >= 1``.\n        Copies are made only if necessary.\n\n    See Also\n    --------\n    atleast_2d, atleast_3d\n\n    Examples\n    --------\n    >>> np.atleast_1d(1.0)\n    array([ 1.])\n\n    >>> x = np.arange(9.0).reshape(3,3)\n    >>> np.atleast_1d(x)\n    array([[ 0.,  1.,  2.],\n           [ 3.,  4.,  5.],\n           [ 6.,  7.,  8.]])\n    >>> np.atleast_1d(x) is x\n    True\n\n    >>> np.atleast_1d(1, [3, 4])\n    [array([1]), array([3, 4])]\n\n    ","endLoc":59,"header":"def atleast_1d(*arys)","id":944,"name":"atleast_1d","nodeType":"Function","startLoc":9,"text":"def atleast_1d(*arys):\n    \"\"\"\n    Convert inputs to arrays with at least one dimension.\n\n    Scalar inputs are converted to 1-dimensional arrays, whilst\n    higher-dimensional inputs are preserved.\n\n    Parameters\n    ----------\n    arys1, arys2, ... : array_like\n        One or more input arrays.\n\n    Returns\n    -------\n    ret : ndarray\n        An array, or list of arrays, each with ``a.ndim >= 1``.\n        Copies are made only if necessary.\n\n    See Also\n    --------\n    atleast_2d, atleast_3d\n\n    Examples\n    --------\n    >>> np.atleast_1d(1.0)\n    array([ 1.])\n\n    >>> x = np.arange(9.0).reshape(3,3)\n    >>> np.atleast_1d(x)\n    array([[ 0.,  1.,  2.],\n           [ 3.,  4.,  5.],\n           [ 6.,  7.,  8.]])\n    >>> np.atleast_1d(x) is x\n    True\n\n    >>> np.atleast_1d(1, [3, 4])\n    [array([1]), array([3, 4])]\n\n    \"\"\"\n    res = []\n    for ary in arys:\n        ary = asanyarray(ary)\n        if len(ary.shape) == 0:\n            result = ary.reshape(1)\n        else:\n            result = ary\n        res.append(result)\n    if len(res) == 1:\n        return res[0]\n    else:\n        return res"},{"col":0,"comment":"null","endLoc":383,"header":"def _parse_letter_version(\n    letter: str, number: Union[str, bytes, SupportsInt]\n) -> Optional[Tuple[str, int]]","id":945,"name":"_parse_letter_version","nodeType":"Function","startLoc":350,"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"},{"col":4,"comment":"null","endLoc":245,"header":"def __init__(self, version: str) -> None","id":946,"name":"__init__","nodeType":"Function","startLoc":218,"text":"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        )"},{"attributeType":"list","col":0,"comment":"null","endLoc":15,"id":947,"name":"datasets","nodeType":"Attribute","startLoc":15,"text":"datasets"},{"col":0,"comment":"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    ","endLoc":295,"header":"def get_color_cycle()","id":948,"name":"get_color_cycle","nodeType":"Function","startLoc":281,"text":"def 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\"]"},{"attributeType":"Path","col":4,"comment":"null","endLoc":17,"id":949,"name":"fname","nodeType":"Attribute","startLoc":17,"text":"fname"},{"attributeType":"staticmethod","col":4,"comment":"null","endLoc":62,"id":950,"name":"_spacer","nodeType":"Attribute","startLoc":62,"text":"_spacer"},{"attributeType":"(list, list) | None","col":4,"comment":"null","endLoc":63,"id":951,"name":"_legend","nodeType":"Attribute","startLoc":63,"text":"_legend"},{"attributeType":"null","col":8,"comment":"null","endLoc":67,"id":954,"name":"_tick_params","nodeType":"Attribute","startLoc":67,"text":"self._tick_params"},{"attributeType":"(list, list) | None","col":8,"comment":"null","endLoc":69,"id":955,"name":"_legend","nodeType":"Attribute","startLoc":69,"text":"self._legend"},{"col":0,"comment":"\n    Return hues with constant lightness and saturation in the HLS system.\n\n    The hues are evenly sampled along a circular path. The resulting palette will be\n    appropriate for categorical or cyclical data.\n\n    The `h`, `l`, and `s` values should be between 0 and 1.\n\n    .. note::\n        While the separation of the resulting colors will be mathematically\n        constant, the HLS system does not construct a perceptually-uniform space,\n        so their apparent intensity will vary.\n\n    Parameters\n    ----------\n    n_colors : int\n        Number of colors in the palette.\n    h : float\n        The value of the first hue.\n    l : float\n        The lightness value.\n    s : float\n        The saturation intensity.\n    as_cmap : bool\n        If True, return a matplotlib colormap object.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    husl_palette : Make a palette using evenly spaced hues in the HUSL system.\n\n    Examples\n    --------\n    .. include:: ../docstrings/hls_palette.rst\n\n    ","endLoc":309,"header":"def hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False)","id":956,"name":"hls_palette","nodeType":"Function","startLoc":258,"text":"def hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False):  # noqa\n    \"\"\"\n    Return hues with constant lightness and saturation in the HLS system.\n\n    The hues are evenly sampled along a circular path. The resulting palette will be\n    appropriate for categorical or cyclical data.\n\n    The `h`, `l`, and `s` values should be between 0 and 1.\n\n    .. note::\n        While the separation of the resulting colors will be mathematically\n        constant, the HLS system does not construct a perceptually-uniform space,\n        so their apparent intensity will vary.\n\n    Parameters\n    ----------\n    n_colors : int\n        Number of colors in the palette.\n    h : float\n        The value of the first hue.\n    l : float\n        The lightness value.\n    s : float\n        The saturation intensity.\n    as_cmap : bool\n        If True, return a matplotlib colormap object.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    husl_palette : Make a palette using evenly spaced hues in the HUSL system.\n\n    Examples\n    --------\n    .. include:: ../docstrings/hls_palette.rst\n\n    \"\"\"\n    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)"},{"attributeType":"null","col":8,"comment":"null","endLoc":68,"id":957,"name":"_label_params","nodeType":"Attribute","startLoc":68,"text":"self._label_params"},{"id":959,"name":"tests/_marks","nodeType":"Package"},{"fileName":"test_line.py","filePath":"tests/_marks","id":960,"nodeType":"File","text":"\nimport numpy as np\nimport matplotlib as mpl\nfrom matplotlib.colors import same_color, to_rgba\n\nfrom numpy.testing import assert_array_equal, assert_array_almost_equal\n\nfrom seaborn._core.plot import Plot\nfrom seaborn._core.moves import Dodge\nfrom seaborn._marks.line import Dash, 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])\n\n    def test_shared_colors_direct(self):\n\n        x = y = [1, 2, 3]\n        color = \".44\"\n        m = Path(color=color)\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(), color)\n        assert same_color(line.get_markeredgecolor(), color)\n        assert same_color(line.get_markerfacecolor(), color)\n\n    def test_separate_colors_direct(self):\n\n        x = y = [1, 2, 3]\n        y = [1, 2, 3]\n        m = Path(color=\".22\", edgecolor=\".55\", fillcolor=\".77\")\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)\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        colors = p._theme[\"axes.prop_cycle\"].by_key()[\"color\"]\n        for i, line in enumerate(ax.get_lines()):\n            assert same_color(line.get_color(), colors[i])\n            assert same_color(line.get_markeredgecolor(), colors[i])\n            assert same_color(line.get_markerfacecolor(), colors[i])\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        colors = p._theme[\"axes.prop_cycle\"].by_key()[\"color\"]\n        for i, line in enumerate(ax.get_lines()):\n            assert same_color(line.get_color(), colors[i // 2])\n            assert same_color(line.get_markeredgecolor(), colors[i // 2])\n            assert same_color(line.get_markerfacecolor(), colors[i % 2])\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)\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))\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\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()\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\"\n\n\nclass 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])\n\n\nclass 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])\n\n    def test_set_properties(self):\n\n        x = y = [1, 2, 3]\n        m = Paths(color=\".737\", 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))\n\n    def test_mapped_properties(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]\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))\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\"\n\n\nclass 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])\n\n    def test_single_orient_value(self):\n\n        x = [1, 1, 1]\n        y = [1, 2, 3]\n        p = Plot(x, y).add(Lines()).plot()\n        lines, = p._figure.axes[0].collections\n        verts = lines.get_paths()[0].vertices.T\n        assert_array_equal(verts[0], x)\n        assert_array_equal(verts[1], y)\n\n\nclass 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]])\n\n    def test_auto_range(self):\n\n        x = [1, 1, 2, 2, 2]\n        y = [1, 2, 3, 4, 5]\n\n        p = Plot(x=x, y=y).add(Range()).plot()\n        lines, = p._figure.axes[0].collections\n        paths = lines.get_paths()\n        assert_array_equal(paths[0].vertices, [(1, 1), (1, 2)])\n        assert_array_equal(paths[1].vertices, [(2, 3), (2, 5)])\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        colors = p._theme[\"axes.prop_cycle\"].by_key()[\"color\"]\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], colors[i // 2])\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=\".654\", 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\n\n\nclass TestDash:\n\n    def test_xy_data(self):\n\n        x = [0, 0, 1, 2]\n        y = [1, 2, 3, 4]\n\n        p = Plot(x=x, y=y).add(Dash()).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_almost_equal(verts[0], [x[i] - .4, x[i] + .4])\n            assert_array_equal(verts[1], [y[i], y[i]])\n\n    def test_xy_data_grouped(self):\n\n        x = [0, 0, 1, 2]\n        y = [1, 2, 3, 4]\n        color = [\"a\", \"b\", \"a\", \"b\"]\n\n        p = Plot(x=x, y=y, color=color).add(Dash()).plot()\n        lines, = p._figure.axes[0].collections\n\n        idx = [0, 2, 1, 3]\n        for i, path in zip(idx, lines.get_paths()):\n            verts = path.vertices.T\n            assert_array_almost_equal(verts[0], [x[i] - .4, x[i] + .4])\n            assert_array_equal(verts[1], [y[i], y[i]])\n\n    def test_set_properties(self):\n\n        x = [0, 0, 1, 2]\n        y = [1, 2, 3, 4]\n\n        m = Dash(color=\".8\", linewidth=4)\n        p = Plot(x=x, y=y).add(m).plot()\n        lines, = p._figure.axes[0].collections\n\n        for color in lines.get_color():\n            assert same_color(color, m.color)\n        for linewidth in lines.get_linewidth():\n            assert linewidth == m.linewidth\n\n    def test_mapped_properties(self):\n\n        x = [0, 1]\n        y = [1, 2]\n        color = [\"a\", \"b\"]\n        linewidth = [1, 2]\n\n        p = Plot(x=x, y=y, color=color, linewidth=linewidth).add(Dash()).plot()\n        lines, = p._figure.axes[0].collections\n        palette = p._theme[\"axes.prop_cycle\"].by_key()[\"color\"]\n\n        for color, line_color in zip(palette, lines.get_color()):\n            assert same_color(color, line_color)\n\n        linewidths = lines.get_linewidths()\n        assert linewidths[1] > linewidths[0]\n\n    def test_width(self):\n\n        x = [0, 0, 1, 2]\n        y = [1, 2, 3, 4]\n\n        p = Plot(x=x, y=y).add(Dash(width=.4)).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_almost_equal(verts[0], [x[i] - .2, x[i] + .2])\n            assert_array_equal(verts[1], [y[i], y[i]])\n\n    def test_dodge(self):\n\n        x = [0, 1]\n        y = [1, 2]\n        group = [\"a\", \"b\"]\n\n        p = Plot(x=x, y=y, group=group).add(Dash(), Dodge()).plot()\n        lines, = p._figure.axes[0].collections\n\n        paths = lines.get_paths()\n\n        v0 = paths[0].vertices.T\n        assert_array_almost_equal(v0[0], [-.4, 0])\n        assert_array_equal(v0[1], [y[0], y[0]])\n\n        v1 = paths[1].vertices.T\n        assert_array_almost_equal(v1[0], [1, 1.4])\n        assert_array_equal(v1[1], [y[1], y[1]])\n"},{"col":0,"comment":"\n    Raises an AssertionError if two objects are not equal up to desired\n    precision.\n\n    .. note:: It is recommended to use one of `assert_allclose`,\n              `assert_array_almost_equal_nulp` or `assert_array_max_ulp`\n              instead of this function for more consistent floating point\n              comparisons.\n\n    The test verifies identical shapes and that the elements of ``actual`` and\n    ``desired`` satisfy.\n\n        ``abs(desired-actual) < 1.5 * 10**(-decimal)``\n\n    That is a looser test than originally documented, but agrees with what the\n    actual implementation did up to rounding vagaries. An exception is raised\n    at shape mismatch or conflicting values. In contrast to the standard usage\n    in numpy, NaNs are compared like numbers, no assertion is raised if both\n    objects have NaNs in the same positions.\n\n    Parameters\n    ----------\n    x : array_like\n        The actual object to check.\n    y : array_like\n        The desired, expected object.\n    decimal : int, optional\n        Desired precision, default is 6.\n    err_msg : str, optional\n      The error message to be printed in case of failure.\n    verbose : bool, optional\n        If True, the conflicting values are appended to the error message.\n\n    Raises\n    ------\n    AssertionError\n        If actual and desired are not equal up to specified precision.\n\n    See Also\n    --------\n    assert_allclose: Compare two array_like objects for equality with desired\n                     relative and/or absolute precision.\n    assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal\n\n    Examples\n    --------\n    the first assert does not raise an exception\n\n    >>> np.testing.assert_array_almost_equal([1.0,2.333,np.nan],\n                                             [1.0,2.333,np.nan])\n\n    >>> np.testing.assert_array_almost_equal([1.0,2.33333,np.nan],\n    ...                                      [1.0,2.33339,np.nan], decimal=5)\n    ...\n    :\n    AssertionError:\n    Arrays are not almost equal\n    \n    (mismatch 50.0%)\n     x: array([ 1.     ,  2.33333,      NaN])\n     y: array([ 1.     ,  2.33339,      NaN])\n\n    >>> np.testing.assert_array_almost_equal([1.0,2.33333,np.nan],\n    ...                                      [1.0,2.33333, 5], decimal=5)\n    :\n    ValueError:\n    Arrays are not almost equal\n     x: array([ 1.     ,  2.33333,      NaN])\n     y: array([ 1.     ,  2.33333,  5.     ])\n\n    ","endLoc":979,"header":"def assert_array_almost_equal(x, y, decimal=6, err_msg='', verbose=True)","id":961,"name":"assert_array_almost_equal","nodeType":"Function","startLoc":874,"text":"def assert_array_almost_equal(x, y, decimal=6, err_msg='', verbose=True):\n    \"\"\"\n    Raises an AssertionError if two objects are not equal up to desired\n    precision.\n\n    .. note:: It is recommended to use one of `assert_allclose`,\n              `assert_array_almost_equal_nulp` or `assert_array_max_ulp`\n              instead of this function for more consistent floating point\n              comparisons.\n\n    The test verifies identical shapes and that the elements of ``actual`` and\n    ``desired`` satisfy.\n\n        ``abs(desired-actual) < 1.5 * 10**(-decimal)``\n\n    That is a looser test than originally documented, but agrees with what the\n    actual implementation did up to rounding vagaries. An exception is raised\n    at shape mismatch or conflicting values. In contrast to the standard usage\n    in numpy, NaNs are compared like numbers, no assertion is raised if both\n    objects have NaNs in the same positions.\n\n    Parameters\n    ----------\n    x : array_like\n        The actual object to check.\n    y : array_like\n        The desired, expected object.\n    decimal : int, optional\n        Desired precision, default is 6.\n    err_msg : str, optional\n      The error message to be printed in case of failure.\n    verbose : bool, optional\n        If True, the conflicting values are appended to the error message.\n\n    Raises\n    ------\n    AssertionError\n        If actual and desired are not equal up to specified precision.\n\n    See Also\n    --------\n    assert_allclose: Compare two array_like objects for equality with desired\n                     relative and/or absolute precision.\n    assert_array_almost_equal_nulp, assert_array_max_ulp, assert_equal\n\n    Examples\n    --------\n    the first assert does not raise an exception\n\n    >>> np.testing.assert_array_almost_equal([1.0,2.333,np.nan],\n                                             [1.0,2.333,np.nan])\n\n    >>> np.testing.assert_array_almost_equal([1.0,2.33333,np.nan],\n    ...                                      [1.0,2.33339,np.nan], decimal=5)\n    ...\n    :\n    AssertionError:\n    Arrays are not almost equal\n    \n    (mismatch 50.0%)\n     x: array([ 1.     ,  2.33333,      NaN])\n     y: array([ 1.     ,  2.33339,      NaN])\n\n    >>> np.testing.assert_array_almost_equal([1.0,2.33333,np.nan],\n    ...                                      [1.0,2.33333, 5], decimal=5)\n    :\n    ValueError:\n    Arrays are not almost equal\n     x: array([ 1.     ,  2.33333,      NaN])\n     y: array([ 1.     ,  2.33333,  5.     ])\n\n    \"\"\"\n    __tracebackhide__ = True  # Hide traceback for py.test\n    from numpy.core import around, number, float_, result_type, array\n    from numpy.core.numerictypes import issubdtype\n    from numpy.core.fromnumeric import any as npany\n\n    def compare(x, y):\n        try:\n            if npany(gisinf(x)) or npany( gisinf(y)):\n                xinfid = gisinf(x)\n                yinfid = gisinf(y)\n                if not xinfid == yinfid:\n                    return False\n                # if one item, x and y is +- inf\n                if x.size == y.size == 1:\n                    return x == y\n                x = x[~xinfid]\n                y = y[~yinfid]\n        except (TypeError, NotImplementedError):\n            pass\n\n        # make sure y is an inexact type to avoid abs(MIN_INT); will cause\n        # casting of x later.\n        dtype = result_type(y, 1.)\n        y = array(y, dtype=dtype, copy=False, subok=True)\n        z = abs(x - y)\n\n        if not issubdtype(z.dtype, number):\n            z = z.astype(float_)  # handle object arrays\n\n        return z < 1.5 * 10.0**(-decimal)\n\n    assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose,\n             header=('Arrays are not almost equal to %d decimals' % decimal),\n             precision=decimal)"},{"className":"EstimateAggregator","col":0,"comment":"null","endLoc":516,"id":962,"nodeType":"Class","startLoc":454,"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\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})"},{"className":"Nominal","col":0,"comment":"\n    A categorical scale without relative importance / magnitude.\n    ","endLoc":301,"id":963,"nodeType":"Class","startLoc":143,"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, otypes=[\"object\"])\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        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\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\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"},{"col":4,"comment":"null","endLoc":234,"header":"def _setup(\n        self, data: Series, prop: Property, axis: Axis | None = None,\n    ) -> Scale","id":964,"name":"_setup","nodeType":"Function","startLoc":155,"text":"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, otypes=[\"object\"])\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        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"},{"attributeType":"TextIO","col":24,"comment":"null","endLoc":18,"id":967,"name":"fid","nodeType":"Attribute","startLoc":18,"text":"fid"},{"col":0,"comment":"null","endLoc":22,"header":"def test_vartype_object()","id":968,"name":"test_vartype_object","nodeType":"Function","startLoc":14,"text":"def 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\")"},{"col":4,"comment":"\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        ","endLoc":478,"header":"def __init__(self, estimator, errorbar=None, **boot_kws)","id":969,"name":"__init__","nodeType":"Function","startLoc":456,"text":"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"},{"col":4,"comment":"null","endLoc":85,"header":"def _plot(self, split_gen, scales, orient)","id":970,"name":"_plot","nodeType":"Function","startLoc":62,"text":"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)"},{"col":0,"comment":"Check type and value of errorbar argument and assign default level.","endLoc":554,"header":"def _validate_errorbar_arg(arg)","id":986,"name":"_validate_errorbar_arg","nodeType":"Function","startLoc":526,"text":"def _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"},{"col":0,"comment":"null","endLoc":57,"header":"def test_variable_type()","id":987,"name":"test_variable_type","nodeType":"Function","startLoc":25,"text":"def 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\""},{"attributeType":"str","col":7,"comment":"null","endLoc":109,"id":988,"name":"fpath","nodeType":"Attribute","startLoc":109,"text":"fpath"},{"col":4,"comment":"Given data and a scaling argument, initialize appropriate scale class.","endLoc":96,"header":"def infer_scale(self, arg: Any, data: Series) -> Scale","id":990,"name":"infer_scale","nodeType":"Function","startLoc":78,"text":"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)"},{"attributeType":"bool","col":4,"comment":"null","endLoc":32,"id":992,"name":"group_by_orient","nodeType":"Attribute","startLoc":32,"text":"group_by_orient"},{"col":0,"comment":"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    ","endLoc":1635,"header":"def infer_orient(x=None, y=None, orient=None, require_numeric=True)","id":994,"name":"infer_orient","nodeType":"Function","startLoc":1556,"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\""},{"col":0,"comment":"\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    ","endLoc":1553,"header":"def variable_type(vector, boolean_type=\"numeric\")","id":995,"name":"variable_type","nodeType":"Function","startLoc":1473,"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\")"},{"attributeType":"str","col":14,"comment":"null","endLoc":109,"id":996,"name":"outdir","nodeType":"Attribute","startLoc":109,"text":"outdir"},{"col":4,"comment":"null","endLoc":543,"header":"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    )","id":997,"name":"__init__","nodeType":"Function","startLoc":366,"text":"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)"},{"col":4,"comment":"Parse faceting and pairing information to define figure structure.","endLoc":100,"header":"def _determine_grid_dimensions(\n        self, facet_spec: FacetSpec, pair_spec: PairSpec\n    ) -> None","id":998,"name":"_determine_grid_dimensions","nodeType":"Function","startLoc":78,"text":"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\"]"},{"col":0,"comment":"","endLoc":1,"header":"counting.py#","id":1000,"name":"","nodeType":"Function","startLoc":1,"text":"if TYPE_CHECKING:\n    from numpy.typing import ArrayLike"},{"attributeType":"str","col":4,"comment":"null","endLoc":110,"id":1001,"name":"basedir","nodeType":"Attribute","startLoc":110,"text":"basedir"},{"id":1003,"name":"hls_palette.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"158cd1cf-6b30-4054-b32f-a166fcb883be\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme()\\n\",\n    \"sns.palettes._patch_colormap_display()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"c81b86cb-fb4e-418b-8d2f-6cd10601ac5a\",\n   \"metadata\": {},\n   \"source\": [\n    \"By default, return 6 colors with identical lightness and saturation and evenly-sampled hues:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"6c3eaeaf-88eb-4012-96ea-41b328fa98b9\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.hls_palette()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"f7624b0b-2311-45de-b6a5-fc07132ce455\",\n   \"metadata\": {},\n   \"source\": [\n    \"Increase the number of colors:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"555c29d1-6972-4a19-ad32-957fb7545634\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.hls_palette(8)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"24713fa6-e485-4358-9ffc-d40bd9543caa\",\n   \"metadata\": {},\n   \"source\": [\n    \"Decrease the lightness:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b6f80b4c-f7b4-4deb-a119-cdf6cfe1f7b5\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.hls_palette(l=.3)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"e521b514-5572-43e8-95ae-a20cc30169b8\",\n   \"metadata\": {},\n   \"source\": [\n    \"Decrease the saturation:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f88bd038-0c9c-48b1-92b0-d272a9c199f4\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.hls_palette(s=.3)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"92a2212c-2177-4c82-8a5e-9dd788e9f87c\",\n   \"metadata\": {},\n   \"source\": [\n    \"Change the start-point for hue sampling:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f8da8fbc-551c-4896-b1b8-04203e740d78\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.hls_palette(h=.5)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"87780608-1f5a-409f-b31f-6a31a599f122\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return a continuous colormap. Notice the perceptual discontinuities, especially around yellow, cyan, and magenta: \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4c622b3b-70d7-4139-8389-f3d0d4addd66\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.hls_palette(as_cmap=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"3a83c1de-88c5-4327-abd2-19e8f3642052\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"fileName":"large_distributions.py","filePath":"examples","id":1005,"nodeType":"File","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)\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":6,"id":1006,"name":"sns","nodeType":"Attribute","startLoc":6,"text":"sns"},{"col":4,"comment":"null","endLoc":1466,"header":"def __init__(self, data)","id":1007,"name":"__init__","nodeType":"Function","startLoc":1464,"text":"def __init__(self, data):\n        assert data in self.allowed, data\n        super().__init__(data)"},{"attributeType":"null","col":0,"comment":"null","endLoc":9,"id":1012,"name":"diamonds","nodeType":"Attribute","startLoc":9,"text":"diamonds"},{"col":0,"comment":"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    ","endLoc":1771,"header":"def categorical_order(vector, order=None)","id":1013,"name":"categorical_order","nodeType":"Function","startLoc":1735,"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)"},{"attributeType":"null","col":8,"comment":"null","endLoc":18,"id":1015,"name":"s","nodeType":"Attribute","startLoc":18,"text":"s"},{"col":4,"comment":"null","endLoc":103,"header":"def _legend_artist(\n        self, variables: list[str], value: Any, scales: dict[str, Scale],\n    ) -> Artist","id":1017,"name":"_legend_artist","nodeType":"Function","startLoc":87,"text":"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        )"},{"col":0,"comment":"null","endLoc":94,"header":"def test_categorical_order()","id":1018,"name":"test_categorical_order","nodeType":"Function","startLoc":60,"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\"]"},{"attributeType":"list","col":0,"comment":"null","endLoc":10,"id":1019,"name":"clarity_ranking","nodeType":"Attribute","startLoc":10,"text":"clarity_ranking"},{"attributeType":"null","col":4,"comment":"null","endLoc":21,"id":1020,"name":"cmap","nodeType":"Attribute","startLoc":21,"text":"cmap"},{"col":4,"comment":"null","endLoc":54,"header":"def _standardize_coordinate_parameters(self, data, orient)","id":1021,"name":"_standardize_coordinate_parameters","nodeType":"Function","startLoc":53,"text":"def _standardize_coordinate_parameters(self, data, orient):\n        return data"},{"col":0,"comment":"","endLoc":5,"header":"large_distributions.py#","id":1022,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nPlotting large distributions\n============================\n\n\"\"\"\n\nsns.set_theme(style=\"whitegrid\")\n\ndiamonds = sns.load_dataset(\"diamonds\")\n\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)"},{"className":"Dot","col":0,"comment":"\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    ","endLoc":157,"id":1023,"nodeType":"Class","startLoc":106,"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)\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"},{"col":4,"comment":"null","endLoc":157,"header":"def _resolve_properties(self, data, scales)","id":1024,"name":"_resolve_properties","nodeType":"Function","startLoc":132,"text":"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"},{"col":0,"comment":"null","endLoc":2416,"header":"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)","id":1025,"name":"boxenplot","nodeType":"Function","startLoc":2399,"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"},{"attributeType":"null","col":4,"comment":"null","endLoc":24,"id":1028,"name":"x","nodeType":"Attribute","startLoc":24,"text":"x"},{"col":0,"comment":"\n    Takes a string like abc.1.twelve and turns it into (\"abc\", 1, \"twelve\").\n    ","endLoc":398,"header":"def _parse_local_version(local: str) -> Optional[LocalType]","id":1030,"name":"_parse_local_version","nodeType":"Function","startLoc":389,"text":"def _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"},{"attributeType":"str","col":13,"comment":"null","endLoc":110,"id":1034,"name":"fname","nodeType":"Attribute","startLoc":110,"text":"fname"},{"attributeType":"str","col":4,"comment":"null","endLoc":111,"id":1035,"name":"fstem","nodeType":"Attribute","startLoc":111,"text":"fstem"},{"col":4,"comment":"null","endLoc":1786,"header":"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)","id":1036,"name":"__init__","nodeType":"Function","startLoc":1747,"text":"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)"},{"attributeType":"TextIO","col":24,"comment":"null","endLoc":114,"id":1037,"name":"f","nodeType":"Attribute","startLoc":114,"text":"f"},{"attributeType":"null","col":7,"comment":"null","endLoc":24,"id":1038,"name":"y","nodeType":"Attribute","startLoc":24,"text":"y"},{"col":0,"comment":"","endLoc":6,"header":"palette_generation.py#","id":1039,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nDifferent cubehelix palettes\n============================\n\n_thumb: .4, .65\n\"\"\"\n\nsns.set_theme(style=\"white\")\n\nrs = np.random.RandomState(50)\n\nf, axes = plt.subplots(3, 3, figsize=(9, 9), sharex=True, sharey=True)\n\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))\n\nf.subplots_adjust(0, 0, 1, 1, .08, .08)"},{"col":0,"comment":"Raise if value for param is not in options.","endLoc":793,"header":"def _check_argument(param, options, value)","id":1042,"name":"_check_argument","nodeType":"Function","startLoc":788,"text":"def _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        )"},{"fileName":"test_regression.py","filePath":"tests","id":1043,"nodeType":"File","text":"import warnings\n\nimport 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)\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])\n\n\nclass 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\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\"\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)\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)\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]\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))\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\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)\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()\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)))\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))\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)\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\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 warnings.catch_warnings():\n            warnings.simplefilter(\"ignore\", RuntimeWarning)\n            _, yhat, _ = p.fit_regression(x_range=(-3, 3))\n        assert np.isnan(yhat).all()\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)\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)\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()\n\n\nclass 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)\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()\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\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\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\"])\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)\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])\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]])\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]\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())\n"},{"col":0,"comment":"null","endLoc":36,"header":"def husl_to_hex(h, s, l)","id":1046,"name":"husl_to_hex","nodeType":"Function","startLoc":35,"text":"def husl_to_hex(h, s, l):\n    return rgb_to_hex(husl_to_rgb(h, s, l))"},{"col":0,"comment":"null","endLoc":189,"header":"def rgb_to_hex(triple)","id":1047,"name":"rgb_to_hex","nodeType":"Function","startLoc":187,"text":"def rgb_to_hex(triple):\n    [r, g, b] = triple\n    return '#%02x%02x%02x' % tuple(rgb_prepare([r, g, b]))"},{"col":0,"comment":"null","endLoc":175,"header":"def rgb_prepare(triple)","id":1048,"name":"rgb_prepare","nodeType":"Function","startLoc":156,"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"},{"col":4,"comment":"Return a function that maps from data domain to property range.","endLoc":104,"header":"def get_mapping(\n        self, scale: Scale, data: Series\n    ) -> Callable[[ArrayLike], ArrayLike]","id":1049,"name":"get_mapping","nodeType":"Function","startLoc":98,"text":"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"},{"col":4,"comment":"Coerce flexible property value to standardized representation.","endLoc":108,"header":"def standardize(self, val: Any) -> Any","id":1050,"name":"standardize","nodeType":"Function","startLoc":106,"text":"def standardize(self, val: Any) -> Any:\n        \"\"\"Coerce flexible property value to standardized representation.\"\"\"\n        return val"},{"col":4,"comment":"Input check when values are provided as a dictionary.","endLoc":116,"header":"def _check_dict_entries(self, levels: list, values: dict) -> None","id":1051,"name":"_check_dict_entries","nodeType":"Function","startLoc":110,"text":"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)"},{"col":0,"comment":"null","endLoc":461,"header":"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","id":1054,"name":"_cmpkey","nodeType":"Function","startLoc":401,"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"},{"col":0,"comment":"null","endLoc":2339,"header":"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)","id":1056,"name":"jointplot","nodeType":"Function","startLoc":2179,"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    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"},{"col":42,"endLoc":416,"id":1057,"nodeType":"Lambda","startLoc":416,"text":"lambda x: x == 0"},{"className":"TestLinearPlotter","col":0,"comment":"null","endLoc":99,"id":1058,"nodeType":"Class","startLoc":28,"text":"class 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)\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])"},{"col":4,"comment":"null","endLoc":45,"header":"def test_establish_variables_from_frame(self)","id":1059,"name":"test_establish_variables_from_frame","nodeType":"Function","startLoc":39,"text":"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)"},{"col":0,"comment":"Test that bootstrapping gives the right answer in dumb cases.","endLoc":23,"header":"def test_bootstrap(random)","id":1060,"name":"test_bootstrap","nodeType":"Function","startLoc":16,"text":"def 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))"},{"col":0,"comment":"Make a sequential palette from the cubehelix system.\n\n    This produces a colormap with linearly-decreasing (or increasing)\n    brightness. That means that information will be preserved if printed to\n    black and white or viewed by someone who is colorblind.  \"cubehelix\" is\n    also available as a matplotlib-based palette, but this function gives the\n    user more control over the look of the palette and has a different set of\n    defaults.\n\n    In addition to using this function, it is also possible to generate a\n    cubehelix palette generally in seaborn using a string starting with\n    `ch:` and containing other parameters (e.g. `\"ch:s=.25,r=-.5\"`).\n\n    Parameters\n    ----------\n    n_colors : int\n        Number of colors in the palette.\n    start : float, 0 <= start <= 3\n        The hue value at the start of the helix.\n    rot : float\n        Rotations around the hue wheel over the range of the palette.\n    gamma : float 0 <= gamma\n        Nonlinearity to emphasize dark (gamma < 1) or light (gamma > 1) colors.\n    hue : float, 0 <= hue <= 1\n        Saturation of the colors.\n    dark : float 0 <= dark <= 1\n        Intensity of the darkest color in the palette.\n    light : float 0 <= light <= 1\n        Intensity of the lightest color in the palette.\n    reverse : bool\n        If True, the palette will go from dark to light.\n    as_cmap : bool\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    choose_cubehelix_palette : Launch an interactive widget to select cubehelix\n                               palette parameters.\n    dark_palette : Create a sequential palette with dark low values.\n    light_palette : Create a sequential palette with bright low values.\n\n    References\n    ----------\n    Green, D. A. (2011). \"A colour scheme for the display of astronomical\n    intensity images\". Bulletin of the Astromical Society of India, Vol. 39,\n    p. 289-295.\n\n    Examples\n    --------\n    .. include:: ../docstrings/cubehelix_palette.rst\n\n    ","endLoc":761,"header":"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)","id":1061,"name":"cubehelix_palette","nodeType":"Function","startLoc":665,"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 starting with\n    `ch:` and containing other parameters (e.g. `\"ch:s=.25,r=-.5\"`).\n\n    Parameters\n    ----------\n    n_colors : int\n        Number of colors in the palette.\n    start : float, 0 <= start <= 3\n        The hue value at the start of the helix.\n    rot : float\n        Rotations around the hue wheel over the range of the palette.\n    gamma : float 0 <= gamma\n        Nonlinearity to emphasize dark (gamma < 1) or light (gamma > 1) colors.\n    hue : float, 0 <= hue <= 1\n        Saturation of the colors.\n    dark : float 0 <= dark <= 1\n        Intensity of the darkest color in the palette.\n    light : float 0 <= light <= 1\n        Intensity of the lightest color in the palette.\n    reverse : bool\n        If True, the palette will go from dark to light.\n    as_cmap : bool\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    choose_cubehelix_palette : Launch an interactive widget to select cubehelix\n                               palette parameters.\n    dark_palette : Create a sequential palette with dark low values.\n    light_palette : Create a sequential palette with bright low values.\n\n    References\n    ----------\n    Green, D. A. (2011). \"A colour scheme for the display of astronomical\n    intensity images\". Bulletin of the Astromical Society of India, Vol. 39,\n    p. 289-295.\n\n    Examples\n    --------\n    .. include:: ../docstrings/cubehelix_palette.rst\n\n    \"\"\"\n    def get_color_function(p0, p1):\n        # Copied from matplotlib because it lives in private module\n        def color(x):\n            # Apply gamma factor to emphasise low or high intensity values\n            xg = x ** gamma\n\n            # Calculate amplitude and angle of deviation from the black\n            # to white diagonal in the plane of constant\n            # perceived intensity.\n            a = hue * xg * (1 - xg) / 2\n\n            phi = 2 * np.pi * (start / 3 + rot * x)\n\n            return xg + a * (p0 * np.cos(phi) + p1 * np.sin(phi))\n        return color\n\n    cdict = {\n        \"red\": get_color_function(-0.14861, 1.78277),\n        \"green\": get_color_function(-0.29227, -0.90649),\n        \"blue\": get_color_function(1.97294, 0.0),\n    }\n\n    cmap = mpl.colors.LinearSegmentedColormap(\"cubehelix\", cdict)\n\n    x = np.linspace(light, dark, int(n_colors))\n    pal = cmap(x)[:, :3].tolist()\n    if reverse:\n        pal = pal[::-1]\n\n    if as_cmap:\n        x_256 = np.linspace(light, dark, 256)\n        if reverse:\n            x_256 = x_256[::-1]\n        pal_256 = cmap(x_256)\n        cmap = mpl.colors.ListedColormap(pal_256, \"seaborn_cubehelix\")\n        return cmap\n    else:\n        return _ColorPalette(pal)"},{"col":4,"comment":"null","endLoc":69,"header":"def _get_verts(self, data, orient)","id":1062,"name":"_get_verts","nodeType":"Function","startLoc":59,"text":"def _get_verts(self, data, orient):\n\n        dv = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        data = data.sort_values(orient, kind=\"mergesort\")\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"},{"col":4,"comment":"Extract variables from data or use directly.","endLoc":54,"header":"def establish_variables(self, data, **kws)","id":1063,"name":"establish_variables","nodeType":"Function","startLoc":32,"text":"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)"},{"col":4,"comment":"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        ","endLoc":971,"header":"def _assign_variables_longform(self, data=None, **kwargs)","id":1067,"name":"_assign_variables_longform","nodeType":"Function","startLoc":859,"text":"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"},{"col":4,"comment":"Aggregate over `var` column of `data` with estimate and error interval.","endLoc":516,"header":"def __call__(self, data, var)","id":1068,"name":"__call__","nodeType":"Function","startLoc":480,"text":"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})"},{"col":4,"comment":"null","endLoc":1087,"header":"def values(self) -> dict_values[_KT, _VT]","id":1070,"name":"values","nodeType":"Function","startLoc":1087,"text":"def values(self) -> dict_values[_KT, _VT]: ..."},{"col":0,"comment":"\n    Return a new array of given shape and type, filled with ones.\n\n    Parameters\n    ----------\n    shape : int or sequence of ints\n        Shape of the new array, e.g., ``(2, 3)`` or ``2``.\n    dtype : data-type, optional\n        The desired data-type for the array, e.g., `numpy.int8`.  Default is\n        `numpy.float64`.\n    order : {'C', 'F'}, optional\n        Whether to store multidimensional data in C- or Fortran-contiguous\n        (row- or column-wise) order in memory.\n\n    Returns\n    -------\n    out : ndarray\n        Array of ones with the given shape, dtype, and order.\n\n    See Also\n    --------\n    zeros, ones_like\n\n    Examples\n    --------\n    >>> np.ones(5)\n    array([ 1.,  1.,  1.,  1.,  1.])\n\n    >>> np.ones((5,), dtype=np.int)\n    array([1, 1, 1, 1, 1])\n\n    >>> np.ones((2, 1))\n    array([[ 1.],\n           [ 1.]])\n\n    >>> s = (2,2)\n    >>> np.ones(s)\n    array([[ 1.,  1.],\n           [ 1.,  1.]])\n\n    ","endLoc":194,"header":"def ones(shape, dtype=None, order='C')","id":1071,"name":"ones","nodeType":"Function","startLoc":150,"text":"def ones(shape, dtype=None, order='C'):\n    \"\"\"\n    Return a new array of given shape and type, filled with ones.\n\n    Parameters\n    ----------\n    shape : int or sequence of ints\n        Shape of the new array, e.g., ``(2, 3)`` or ``2``.\n    dtype : data-type, optional\n        The desired data-type for the array, e.g., `numpy.int8`.  Default is\n        `numpy.float64`.\n    order : {'C', 'F'}, optional\n        Whether to store multidimensional data in C- or Fortran-contiguous\n        (row- or column-wise) order in memory.\n\n    Returns\n    -------\n    out : ndarray\n        Array of ones with the given shape, dtype, and order.\n\n    See Also\n    --------\n    zeros, ones_like\n\n    Examples\n    --------\n    >>> np.ones(5)\n    array([ 1.,  1.,  1.,  1.,  1.])\n\n    >>> np.ones((5,), dtype=np.int)\n    array([1, 1, 1, 1, 1])\n\n    >>> np.ones((2, 1))\n    array([[ 1.],\n           [ 1.]])\n\n    >>> s = (2,2)\n    >>> np.ones(s)\n    array([[ 1.,  1.],\n           [ 1.,  1.]])\n\n    \"\"\"\n    a = empty(shape, dtype, order)\n    multiarray.copyto(a, 1, casting='unsafe')\n    return a"},{"col":4,"comment":"Convert input specification into a common representation.","endLoc":628,"header":"def establish_variables(self, x=None, y=None, hue=None, data=None,\n                            orient=None, order=None, hue_order=None,\n                            units=None)","id":1075,"name":"establish_variables","nodeType":"Function","startLoc":425,"text":"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.items()\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"},{"attributeType":"null","col":16,"comment":"null","endLoc":2,"id":1078,"name":"np","nodeType":"Attribute","startLoc":2,"text":"np"},{"attributeType":"null","col":17,"comment":"null","endLoc":3,"id":1079,"name":"pd","nodeType":"Attribute","startLoc":3,"text":"pd"},{"fileName":"faceted_histogram.py","filePath":"examples","id":1081,"nodeType":"File","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)\n"},{"col":0,"comment":"\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    ","endLoc":832,"header":"def adjust_legend_subtitles(legend)","id":1082,"name":"adjust_legend_subtitles","nodeType":"Function","startLoc":815,"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)"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":1083,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"col":0,"comment":"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    ","endLoc":99,"header":"def bootstrap(*args, **kwargs)","id":1086,"name":"bootstrap","nodeType":"Function","startLoc":7,"text":"def 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)"},{"col":4,"comment":"null","endLoc":86,"header":"def test_key_usage(self)","id":1087,"name":"test_key_usage","nodeType":"Function","startLoc":82,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":10,"id":1088,"name":"df","nodeType":"Attribute","startLoc":10,"text":"df"},{"col":0,"comment":"","endLoc":6,"header":"faceted_histogram.py#","id":1090,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nFacetting histograms by subsets of data\n=======================================\n\n_thumb: .33, .57\n\"\"\"\n\nsns.set_theme(style=\"darkgrid\")\n\ndf = sns.load_dataset(\"penguins\")\n\nsns.displot(\n    df, x=\"flipper_length_mm\", col=\"species\", row=\"sex\",\n    binwidth=3, height=3, facet_kws=dict(margin_titles=True),\n)"},{"col":0,"comment":"Return a percentile interval from data of a given width.","endLoc":523,"header":"def _percentile_interval(data, width)","id":1091,"name":"_percentile_interval","nodeType":"Function","startLoc":519,"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)"},{"col":0,"comment":"Force draw of a matplotlib figure, accounting for back-compat.","endLoc":85,"header":"def _draw_figure(fig)","id":1092,"name":"_draw_figure","nodeType":"Function","startLoc":77,"text":"def _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"},{"col":0,"comment":"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    ","endLoc":248,"header":"def set_hls_values(color, h=None, l=None, s=None)","id":1093,"name":"set_hls_values","nodeType":"Function","startLoc":224,"text":"def 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"},{"col":0,"comment":"null","endLoc":5,"header":"def rgb_to_hls(r: float, g: float, b: float) -> tuple[float, float, float]","id":1095,"name":"rgb_to_hls","nodeType":"Function","startLoc":5,"text":"def rgb_to_hls(r: float, g: float, b: float) -> tuple[float, float, float]: ..."},{"attributeType":"str | Mappable","col":4,"comment":"null","endLoc":121,"id":1096,"name":"marker","nodeType":"Attribute","startLoc":121,"text":"marker"},{"col":4,"comment":"null","endLoc":53,"header":"def test_establish_variables_from_series(self)","id":1099,"name":"test_establish_variables_from_series","nodeType":"Function","startLoc":47,"text":"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"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":122,"id":1100,"name":"pointsize","nodeType":"Attribute","startLoc":122,"text":"pointsize"},{"col":4,"comment":"Extract the legend data from an axes object and save it.","endLoc":242,"header":"def _update_legend_data(self, ax)","id":1102,"name":"_update_legend_data","nodeType":"Function","startLoc":225,"text":"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"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":123,"id":1103,"name":"stroke","nodeType":"Attribute","startLoc":123,"text":"stroke"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":124,"id":1104,"name":"color","nodeType":"Attribute","startLoc":124,"text":"color"},{"col":4,"comment":"null","endLoc":63,"header":"def test_establish_variables_from_array(self)","id":1105,"name":"test_establish_variables_from_array","nodeType":"Function","startLoc":55,"text":"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"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":125,"id":1106,"name":"alpha","nodeType":"Attribute","startLoc":125,"text":"alpha"},{"attributeType":"bool | Mappable","col":4,"comment":"null","endLoc":126,"id":1107,"name":"fill","nodeType":"Attribute","startLoc":126,"text":"fill"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":127,"id":1108,"name":"edgecolor","nodeType":"Attribute","startLoc":127,"text":"edgecolor"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":128,"id":1109,"name":"edgealpha","nodeType":"Attribute","startLoc":128,"text":"edgealpha"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":129,"id":1111,"name":"edgewidth","nodeType":"Attribute","startLoc":129,"text":"edgewidth"},{"col":4,"comment":"null","endLoc":73,"header":"def test_establish_variables_from_lists(self)","id":1112,"name":"test_establish_variables_from_lists","nodeType":"Function","startLoc":65,"text":"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"},{"attributeType":"str | (float, ...) | (float, (float, ...) | None) | Mappable","col":4,"comment":"null","endLoc":130,"id":1113,"name":"edgestyle","nodeType":"Attribute","startLoc":130,"text":"edgestyle"},{"className":"Dots","col":0,"comment":"\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    ","endLoc":200,"id":1117,"nodeType":"Class","startLoc":160,"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)\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"},{"col":4,"comment":"null","endLoc":200,"header":"def _resolve_properties(self, data, scales)","id":1118,"name":"_resolve_properties","nodeType":"Function","startLoc":185,"text":"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"},{"col":4,"comment":"null","endLoc":57,"header":"def _postprocess_artist(self, artist, ax, orient)","id":1119,"name":"_postprocess_artist","nodeType":"Function","startLoc":56,"text":"def _postprocess_artist(self, artist, ax, orient):\n        pass"},{"attributeType":"list | dict","col":8,"comment":"null","endLoc":47,"id":1123,"name":"order","nodeType":"Attribute","startLoc":47,"text":"self.order"},{"col":0,"comment":"null","endLoc":23,"header":"@pytest.fixture\ndef df()","id":1125,"name":"df","nodeType":"Function","startLoc":11,"text":"@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    )"},{"col":4,"comment":"null","endLoc":91,"header":"def test_bad_style(self)","id":1126,"name":"test_bad_style","nodeType":"Function","startLoc":88,"text":"def test_bad_style(self):\n\n        with pytest.raises(ValueError):\n            rcmod.axes_style(\"i_am_not_a_style\")"},{"col":4,"comment":"null","endLoc":81,"header":"def test_establish_variables_from_mix(self)","id":1127,"name":"test_establish_variables_from_mix","nodeType":"Function","startLoc":75,"text":"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)"},{"col":0,"comment":"null","endLoc":28,"header":"def test_init_from_list()","id":1128,"name":"test_init_from_list","nodeType":"Function","startLoc":26,"text":"def test_init_from_list():\n    g = GroupBy([\"a\", \"c\", \"b\"])\n    assert g.order == {\"a\": None, \"c\": None, \"b\": None}"},{"col":0,"comment":"null","endLoc":34,"header":"def test_init_from_dict()","id":1130,"name":"test_init_from_dict","nodeType":"Function","startLoc":31,"text":"def 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"},{"col":4,"comment":"null","endLoc":98,"header":"def test_rc_override(self)","id":1131,"name":"test_rc_override","nodeType":"Function","startLoc":93,"text":"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"},{"col":4,"comment":"null","endLoc":106,"header":"def test_set_style(self)","id":1132,"name":"test_set_style","nodeType":"Function","startLoc":100,"text":"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)"},{"col":0,"comment":"null","endLoc":40,"header":"def test_init_requires_order()","id":1133,"name":"test_init_requires_order","nodeType":"Function","startLoc":37,"text":"def test_init_requires_order():\n\n    with pytest.raises(ValueError, match=\"GroupBy requires at least one\"):\n        GroupBy([])"},{"attributeType":"Path","col":4,"comment":"null","endLoc":21,"id":1134,"name":"p","nodeType":"Attribute","startLoc":21,"text":"p"},{"col":0,"comment":"null","endLoc":46,"header":"def test_at_least_one_grouping_variable_required(df)","id":1135,"name":"test_at_least_one_grouping_variable_required","nodeType":"Function","startLoc":43,"text":"def 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\")"},{"col":4,"comment":"null","endLoc":87,"header":"def test_establish_variables_from_bad(self)","id":1136,"name":"test_establish_variables_from_bad","nodeType":"Function","startLoc":83,"text":"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)"},{"attributeType":"null","col":0,"comment":"null","endLoc":29,"id":1137,"name":"__all__","nodeType":"Attribute","startLoc":29,"text":"__all__"},{"attributeType":"InfinityType","col":0,"comment":"null","endLoc":63,"id":1138,"name":"Infinity","nodeType":"Attribute","startLoc":63,"text":"Infinity"},{"attributeType":"NegativeInfinityType","col":0,"comment":"null","endLoc":95,"id":1139,"name":"NegativeInfinity","nodeType":"Attribute","startLoc":95,"text":"NegativeInfinity"},{"attributeType":"InfinityType | NegativeInfinityType","col":0,"comment":"null","endLoc":100,"id":1140,"name":"InfiniteTypes","nodeType":"Attribute","startLoc":100,"text":"InfiniteTypes"},{"col":0,"comment":"null","endLoc":55,"header":"def test_agg_one_grouper(df)","id":1142,"name":"test_agg_one_grouper","nodeType":"Function","startLoc":49,"text":"def 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])"},{"attributeType":"InfinityType | NegativeInfinityType | tuple","col":0,"comment":"null","endLoc":101,"id":1143,"name":"PrePostDevType","nodeType":"Attribute","startLoc":101,"text":"PrePostDevType"},{"col":4,"comment":"null","endLoc":99,"header":"def test_dropna(self)","id":1144,"name":"test_dropna","nodeType":"Function","startLoc":89,"text":"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])"},{"col":4,"comment":"null","endLoc":122,"header":"def test_style_context_manager(self)","id":1145,"name":"test_style_context_manager","nodeType":"Function","startLoc":108,"text":"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)"},{"col":0,"comment":"null","endLoc":65,"header":"def test_agg_two_groupers(df)","id":1146,"name":"test_agg_two_groupers","nodeType":"Function","startLoc":58,"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])"},{"attributeType":"InfinityType | NegativeInfinityType | int | str","col":0,"comment":"null","endLoc":102,"id":1149,"name":"SubLocalType","nodeType":"Attribute","startLoc":102,"text":"SubLocalType"},{"col":4,"comment":"Remove observations with missing data.","endLoc":64,"header":"def dropna(self, *vars)","id":1150,"name":"dropna","nodeType":"Function","startLoc":56,"text":"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])"},{"attributeType":"NegativeInfinityType | tuple","col":0,"comment":"null","endLoc":103,"id":1151,"name":"LocalType","nodeType":"Attribute","startLoc":103,"text":"LocalType"},{"col":0,"comment":"null","endLoc":80,"header":"def test_agg_two_groupers_ordered(df)","id":1152,"name":"test_agg_two_groupers_ordered","nodeType":"Function","startLoc":68,"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])"},{"col":51,"endLoc":71,"id":1154,"nodeType":"Lambda","startLoc":71,"text":"lambda x: x.iloc[0]"},{"attributeType":"TextIO","col":21,"comment":"null","endLoc":22,"id":1155,"name":"fid","nodeType":"Attribute","startLoc":22,"text":"fid"},{"col":4,"comment":"Get a list of colors for the hue variable.","endLoc":272,"header":"def _get_palette(self, data, hue, hue_order, palette)","id":1156,"name":"_get_palette","nodeType":"Function","startLoc":244,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":114,"id":1157,"name":"CmpKey","nodeType":"Attribute","startLoc":114,"text":"CmpKey"},{"attributeType":"str | Mappable","col":4,"comment":"null","endLoc":176,"id":1158,"name":"marker","nodeType":"Attribute","startLoc":176,"text":"marker"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":177,"id":1159,"name":"pointsize","nodeType":"Attribute","startLoc":177,"text":"pointsize"},{"attributeType":"null","col":0,"comment":"null","endLoc":117,"id":1160,"name":"LegacyCmpKey","nodeType":"Attribute","startLoc":117,"text":"LegacyCmpKey"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":178,"id":1161,"name":"stroke","nodeType":"Attribute","startLoc":178,"text":"stroke"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":179,"id":1163,"name":"color","nodeType":"Attribute","startLoc":179,"text":"color"},{"className":"Plot","col":0,"comment":"\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    ","endLoc":857,"id":1164,"nodeType":"Class","startLoc":149,"text":"@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\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                # Cast type because we know this isn't a DataSource at this point\n                variables = {name: cast(VariableSpec, var), **variables}\n\n        return data, variables\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\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(v for v in layer[\"vars\"] if v not in variables)\n\n        # Coerce to str in return to appease mypy; we know these will only\n        # ever be strings but I don't think we can type a DataFrame that way yet\n        return [str(v) for v in variables]\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\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\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\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: dict[str, VariableSpec] = {}\n        if col is not None:\n            variables[\"col\"] = col\n        if row is not None:\n            variables[\"row\"] = row\n\n        structure = {}\n        if isinstance(order, dict):\n            for dim in [\"col\", \"row\"]:\n                dim_order = order.get(dim)\n                if dim_order is not None:\n                    structure[dim] = list(dim_order)\n        elif order is not None:\n            if col is not None and row is not None:\n                err = \" \".join([\n                    \"When faceting on both col= and row=, passing `order` as a list\"\n                    \"is ambiguous. Use a dict with 'col' and/or 'row' keys instead.\"\n                ])\n                raise RuntimeError(err)\n            elif col is not None:\n                structure[\"col\"] = list(order)\n            elif row is not None:\n                structure[\"row\"] = list(order)\n\n        spec: FacetSpec = {\n            \"variables\": variables,\n            \"structure\": structure,\n            \"wrap\": wrap,\n        }\n\n        new = self._clone()\n        new._facet_spec.update(spec)\n\n        return new\n\n    # TODO def twin()?\n\n    def scale(self, **scales: Scale) -> Plot:\n        \"\"\"\n        Specify mappings from data units to visual properties.\n\n        Keywords correspond to variables defined in the plot, including coordinate\n        variables (`x`, `y`) and semantic variables (`color`, `pointsize`, etc.).\n\n        A number of \"magic\" arguments are accepted, including:\n            - The name of a transform (e.g., `\"log\"`, `\"sqrt\"`)\n            - The name of a palette (e.g., `\"viridis\"`, `\"muted\"`)\n            - A tuple of values, defining the output range (e.g. `(1, 5)`)\n            - A dict, implying a :class:`Nominal` scale (e.g. `{\"a\": .2, \"b\": .5}`)\n            - A list of values, implying a :class:`Nominal` scale (e.g. `[\"b\", \"r\"]`)\n\n        For more explicit control, pass a scale spec object such as :class:`Continuous`\n        or :class:`Nominal`. Or pass `None` to use an \"identity\" scale, which treats\n        data values as literally encoding visual properties.\n\n        Examples\n        --------\n        .. include:: ../docstrings/objects.Plot.scale.rst\n\n        \"\"\"\n        new = self._clone()\n        new._scales.update(scales)\n        return new\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\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\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\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\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\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\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)\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"},{"col":0,"comment":"null","endLoc":89,"header":"def test_apply_no_grouper(df)","id":1165,"name":"test_apply_no_grouper","nodeType":"Function","startLoc":83,"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\"])"},{"col":0,"comment":"Make a palette that blends between a list of colors.\n\n    Parameters\n    ----------\n    colors : sequence of colors in various formats interpreted by `input`\n        hex code, html color name, or tuple in `input` space.\n    n_colors : int, optional\n        Number of colors in the palette.\n    as_cmap : bool, optional\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    Examples\n    --------\n    .. include: ../docstrings/blend_palette.rst\n\n    ","endLoc":609,"header":"def blend_palette(colors, n_colors=6, as_cmap=False, input=\"rgb\")","id":1166,"name":"blend_palette","nodeType":"Function","startLoc":581,"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.ListedColormap`.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    Examples\n    --------\n    .. include: ../docstrings/blend_palette.rst\n\n    \"\"\"\n    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"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":180,"id":1167,"name":"alpha","nodeType":"Attribute","startLoc":180,"text":"alpha"},{"col":4,"comment":"null","endLoc":126,"header":"def test_style_context_independence(self)","id":1168,"name":"test_style_context_independence","nodeType":"Function","startLoc":124,"text":"def test_style_context_independence(self):\n\n        assert set(rcmod._style_keys) ^ set(rcmod._context_keys)"},{"col":4,"comment":"null","endLoc":232,"header":"def __init__(\n        self,\n        *args: DataSource | VariableSpec,\n        data: DataSource = None,\n        **variables: VariableSpec,\n    )","id":1169,"name":"__init__","nodeType":"Function","startLoc":200,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":118,"id":1170,"name":"VersionComparisonMethod","nodeType":"Attribute","startLoc":118,"text":"VersionComparisonMethod"},{"col":0,"comment":"Add some more flexibility to color choices.","endLoc":430,"header":"def _color_to_rgb(color, input)","id":1171,"name":"_color_to_rgb","nodeType":"Function","startLoc":420,"text":"def _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)"},{"attributeType":"bool | Mappable","col":4,"comment":"null","endLoc":181,"id":1172,"name":"fill","nodeType":"Attribute","startLoc":181,"text":"fill"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":182,"id":1173,"name":"fillcolor","nodeType":"Attribute","startLoc":182,"text":"fillcolor"},{"col":35,"endLoc":86,"id":1174,"nodeType":"Lambda","startLoc":86,"text":"lambda x: x.sort_values(\"x\")"},{"attributeType":"_Version","col":0,"comment":"null","endLoc":122,"id":1175,"name":"_Version","nodeType":"Attribute","startLoc":122,"text":"_Version"},{"attributeType":"str","col":0,"comment":"null","endLoc":182,"id":1176,"name":"VERSION_PATTERN","nodeType":"Attribute","startLoc":182,"text":"VERSION_PATTERN"},{"attributeType":"Pattern","col":0,"comment":"null","endLoc":386,"id":1177,"name":"_local_version_separators","nodeType":"Attribute","startLoc":386,"text":"_local_version_separators"},{"col":0,"comment":"","endLoc":16,"header":"version.py#","id":1178,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"Extract reference documentation from the pypa/packaging source tree.\n\nIn the process of copying, some unused methods / classes were removed.\nThese include:\n\n- parse()\n- anything involving LegacyVersion\n\nThis software is made available under the terms of *either* of the licenses\nfound in LICENSE.APACHE or LICENSE.BSD. Contributions to this software is made\nunder the terms of *both* these licenses.\n\nVendored from:\n- https://github.com/pypa/packaging/\n- commit ba07d8287b4554754ac7178d177033ea3f75d489 (09/09/2021)\n\"\"\"\n\n__all__ = [\"Version\", \"InvalidVersion\", \"VERSION_PATTERN\"]\n\nInfinity = InfinityType()\n\nNegativeInfinity = NegativeInfinityType()\n\nInfiniteTypes = Union[InfinityType, NegativeInfinityType]\n\nPrePostDevType = Union[InfiniteTypes, Tuple[str, int]]\n\nSubLocalType = Union[InfiniteTypes, int, str]\n\nLocalType = Union[\n    NegativeInfinityType,\n    Tuple[\n        Union[\n            SubLocalType,\n            Tuple[SubLocalType, str],\n            Tuple[NegativeInfinityType, SubLocalType],\n        ],\n        ...,\n    ],\n]\n\nCmpKey = Tuple[\n    int, Tuple[int, ...], PrePostDevType, PrePostDevType, PrePostDevType, LocalType\n]\n\nLegacyCmpKey = Tuple[int, Tuple[str, ...]]\n\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\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\"\"\"\n\n_local_version_separators = re.compile(r\"[\\._-]\")"},{"col":0,"comment":"null","endLoc":46,"header":"def namedtuple(\n    typename: str,\n    field_names: str | Iterable[str],\n    *,\n    rename: bool = False,\n    module: str | None = None,\n    defaults: Iterable[Any] | None = None,\n) -> type[tuple[Any, ...]]","id":1179,"name":"namedtuple","nodeType":"Function","startLoc":39,"text":"def namedtuple(\n    typename: str,\n    field_names: str | Iterable[str],\n    *,\n    rename: bool = False,\n    module: str | None = None,\n    defaults: Iterable[Any] | None = None,\n) -> type[tuple[Any, ...]]: ..."},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":183,"id":1180,"name":"fillalpha","nodeType":"Attribute","startLoc":183,"text":"fillalpha"},{"attributeType":"null","col":16,"comment":"null","endLoc":4,"id":1183,"name":"np","nodeType":"Attribute","startLoc":4,"text":"np"},{"attributeType":"null","col":21,"comment":"null","endLoc":5,"id":1184,"name":"mpl","nodeType":"Attribute","startLoc":5,"text":"mpl"},{"col":0,"comment":"","endLoc":1,"header":"dot.py#","id":1185,"name":"","nodeType":"Function","startLoc":1,"text":"if TYPE_CHECKING:\n    from typing import Any\n    from matplotlib.artist import Artist\n    from seaborn._core.scales import Scale"},{"attributeType":"RandomState","col":4,"comment":"null","endLoc":30,"id":1187,"name":"rs","nodeType":"Attribute","startLoc":30,"text":"rs"},{"attributeType":"null","col":4,"comment":"null","endLoc":31,"id":1188,"name":"df","nodeType":"Attribute","startLoc":31,"text":"df"},{"className":"TestRegressionPlotter","col":0,"comment":"null","endLoc":455,"id":1189,"nodeType":"Class","startLoc":102,"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\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\"\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)\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)\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]\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))\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\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)\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()\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)))\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))\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)\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\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 warnings.catch_warnings():\n            warnings.simplefilter(\"ignore\", RuntimeWarning)\n            _, yhat, _ = p.fit_regression(x_range=(-3, 3))\n        assert np.isnan(yhat).all()\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)\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)\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()"},{"col":4,"comment":"null","endLoc":132,"header":"def test_variables_from_frame(self)","id":1190,"name":"test_variables_from_frame","nodeType":"Function","startLoc":125,"text":"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)"},{"col":0,"comment":"\n    Return hues with constant lightness and saturation in the HUSL system.\n\n    The hues are evenly sampled along a circular path. The resulting palette will be\n    appropriate for categorical or cyclical data.\n\n    The `h`, `l`, and `s` values should be between 0 and 1.\n\n    This function is similar to :func:`hls_palette`, but it uses a nonlinear color\n    space that is more perceptually uniform.\n\n    Parameters\n    ----------\n    n_colors : int\n        Number of colors in the palette.\n    h : float\n        The value of the first hue.\n    l : float\n        The lightness value.\n    s : float\n        The saturation intensity.\n    as_cmap : bool\n        If True, return a matplotlib colormap object.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    hls_palette : Make a palette using evenly spaced hues in the HSL system.\n\n    Examples\n    --------\n    .. include:: ../docstrings/husl_palette.rst\n\n    ","endLoc":363,"header":"def husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False)","id":1193,"name":"husl_palette","nodeType":"Function","startLoc":312,"text":"def husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False):  # noqa\n    \"\"\"\n    Return hues with constant lightness and saturation in the HUSL system.\n\n    The hues are evenly sampled along a circular path. The resulting palette will be\n    appropriate for categorical or cyclical data.\n\n    The `h`, `l`, and `s` values should be between 0 and 1.\n\n    This function is similar to :func:`hls_palette`, but it uses a nonlinear color\n    space that is more perceptually uniform.\n\n    Parameters\n    ----------\n    n_colors : int\n        Number of colors in the palette.\n    h : float\n        The value of the first hue.\n    l : float\n        The lightness value.\n    s : float\n        The saturation intensity.\n    as_cmap : bool\n        If True, return a matplotlib colormap object.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    hls_palette : Make a palette using evenly spaced hues in the HSL system.\n\n    Examples\n    --------\n    .. include:: ../docstrings/husl_palette.rst\n\n    \"\"\"\n    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)"},{"id":1194,"name":"v0.5.1.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.5.1 (November 2014)\n----------------------\n\nThis is a bugfix release that includes a workaround for an issue in matplotlib 1.4.2 and fixes for two bugs in functions that were new in 0.5.0.\n\n- Implemented a workaround for a bug in matplotlib 1.4.2 that prevented point markers from being drawn when the seaborn styles had been set. See this `github issue `_ for more information.\n\n- Fixed a bug in :func:`heatmap` where the mask was vertically reversed relative to the data.\n\n- Fixed a bug in :func:`clustermap` when using nested lists of side colors.\n"},{"id":1196,"name":"diverging_palette.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"01295cb6-cc7a-4c6d-94cf-9b0e6cde9fa7\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme()\\n\",\n    \"sns.palettes._patch_colormap_display()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"84880848-0805-4c41-999a-50808b397275\",\n   \"metadata\": {},\n   \"source\": [\n    \"Generate diverging ramps from blue to red through white:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"643b3e07-8365-46e3-b033-af7a2fdcd158\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.diverging_palette(240, 20)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"5ae53941-d9d9-4b5a-8abc-173911ebee74\",\n   \"metadata\": {},\n   \"source\": [\n    \"Change the center color to be dark:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"41f03771-8fb2-46f6-93c5-5a0e28be625c\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.diverging_palette(240, 20, center=\\\"dark\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"0aeb2402-2cbe-4546-a354-f1f501f762ae\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return a continuous colormap rather than a discrete palette:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"64d335a5-f8b2-433f-a83f-5aeff7db583a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.diverging_palette(240, 20, as_cmap=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"77223a07-8492-4056-a0f7-14e133e3ce2c\",\n   \"metadata\": {},\n   \"source\": [\n    \"Increase the amount of separation around the center value:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"82472c1e-4b16-40eb-be1d-480bbd2aa702\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.diverging_palette(240, 20, sep=30, as_cmap=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"966e8594-b458-414c-a7b0-3e804ce407bf\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use a magenta-to-green palette instead:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a03f8ede-b424-4e06-beb6-cf63c94bcd9e\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.diverging_palette(280, 150)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"b3b17689-58e2-4065-9d52-1cf5ebcd4e89\",\n   \"metadata\": {},\n   \"source\": [\n    \"Decrease the saturation of the endpoints:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"02aaa009-f257-4fc7-a2de-40fbb1464490\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.diverging_palette(280, 150, s=50)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"db75ca48-ba72-4ca2-8480-bc72c20a70cc\",\n   \"metadata\": {},\n   \"source\": [\n    \"Decrease the lightness of the endpoints:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"89e3bcb1-a17c-4465-830f-46043cb6c322\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.diverging_palette(280, 150, l=35)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4e42452a-a485-43e7-bbc3-338db58e4637\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e19f523f-c2f7-489a-ba00-326810e31a67\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"fileName":"__init__.py","filePath":"seaborn/_marks","id":1197,"nodeType":"File","text":""},{"col":0,"comment":"\n    zeros(shape, dtype=float, order='C')\n    \n        Return a new array of given shape and type, filled with zeros.\n    \n        Parameters\n        ----------\n        shape : int or sequence of ints\n            Shape of the new array, e.g., ``(2, 3)`` or ``2``.\n        dtype : data-type, optional\n            The desired data-type for the array, e.g., `numpy.int8`.  Default is\n            `numpy.float64`.\n        order : {'C', 'F'}, optional\n            Whether to store multidimensional data in C- or Fortran-contiguous\n            (row- or column-wise) order in memory.\n    \n        Returns\n        -------\n        out : ndarray\n            Array of zeros with the given shape, dtype, and order.\n    \n        See Also\n        --------\n        zeros_like : Return an array of zeros with shape and type of input.\n        ones_like : Return an array of ones with shape and type of input.\n        empty_like : Return an empty array with shape and type of input.\n        ones : Return a new array setting values to one.\n        empty : Return a new uninitialized array.\n    \n        Examples\n        --------\n        >>> np.zeros(5)\n        array([ 0.,  0.,  0.,  0.,  0.])\n    \n        >>> np.zeros((5,), dtype=np.int)\n        array([0, 0, 0, 0, 0])\n    \n        >>> np.zeros((2, 1))\n        array([[ 0.],\n               [ 0.]])\n    \n        >>> s = (2,2)\n        >>> np.zeros(s)\n        array([[ 0.,  0.],\n               [ 0.,  0.]])\n    \n        >>> np.zeros((2,), dtype=[('x', 'i4'), ('y', 'i4')]) # custom dtype\n        array([(0, 0), (0, 0)],\n              dtype=[('x', '>> np.zeros(5)\n        array([ 0.,  0.,  0.,  0.,  0.])\n    \n        >>> np.zeros((5,), dtype=np.int)\n        array([0, 0, 0, 0, 0])\n    \n        >>> np.zeros((2, 1))\n        array([[ 0.],\n               [ 0.]])\n    \n        >>> s = (2,2)\n        >>> np.zeros(s)\n        array([[ 0.,  0.],\n               [ 0.,  0.]])\n    \n        >>> np.zeros((2,), dtype=[('x', 'i4'), ('y', 'i4')]) # custom dtype\n        array([(0, 0), (0, 0)],\n              dtype=[('x', ' 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()"},{"col":4,"comment":"Handle positional arguments, which may contain data / x / y.","endLoc":267,"header":"def _resolve_positionals(\n        self,\n        args: tuple[DataSource | VariableSpec, ...],\n        data: DataSource,\n        variables: dict[str, VariableSpec],\n    ) -> tuple[DataSource, dict[str, VariableSpec]]","id":1215,"name":"_resolve_positionals","nodeType":"Function","startLoc":234,"text":"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                # Cast type because we know this isn't a DataSource at this point\n                variables = {name: cast(VariableSpec, var), **variables}\n\n        return data, variables"},{"attributeType":"str | None","col":4,"comment":"null","endLoc":118,"id":1217,"name":"kernel","nodeType":"Attribute","startLoc":118,"text":"kernel"},{"col":4,"comment":"null","endLoc":86,"header":"def _legend_artist(self, variables, value, scales)","id":1218,"name":"_legend_artist","nodeType":"Function","startLoc":71,"text":"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        )"},{"col":0,"comment":"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    ","endLoc":397,"header":"def despine(fig=None, ax=None, top=True, right=True, left=False,\n            bottom=False, offset=None, trim=False)","id":1219,"name":"despine","nodeType":"Function","startLoc":298,"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\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)"},{"className":"Area","col":0,"comment":"\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    ","endLoc":136,"id":1220,"nodeType":"Class","startLoc":89,"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\"})\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)"},{"col":4,"comment":"null","endLoc":117,"header":"def _standardize_coordinate_parameters(self, data, orient)","id":1221,"name":"_standardize_coordinate_parameters","nodeType":"Function","startLoc":115,"text":"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\"})"},{"col":4,"comment":"null","endLoc":816,"header":"def __init__(self, scale)","id":1222,"name":"__init__","nodeType":"Function","startLoc":803,"text":"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?"},{"col":4,"comment":"null","endLoc":136,"header":"def _postprocess_artist(self, artist, ax, orient)","id":1225,"name":"_postprocess_artist","nodeType":"Function","startLoc":119,"text":"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)"},{"col":4,"comment":"null","endLoc":161,"header":"def test_reset_defaults(self)","id":1226,"name":"test_reset_defaults","nodeType":"Function","startLoc":157,"text":"def test_reset_defaults(self):\n\n        rcmod.reset_defaults()\n        self.assert_rc_params(mpl.rcParamsDefault)\n        rcmod.set_theme()"},{"col":0,"comment":"Restore all RC params to default settings.","endLoc":137,"header":"def reset_defaults()","id":1227,"name":"reset_defaults","nodeType":"Function","startLoc":135,"text":"def reset_defaults():\n    \"\"\"Restore all RC params to default settings.\"\"\"\n    mpl.rcParams.update(mpl.rcParamsDefault)"},{"col":0,"comment":"Turn stringified cubehelix params into args/kwargs.","endLoc":796,"header":"def _parse_cubehelix_args(argstr)","id":1228,"name":"_parse_cubehelix_args","nodeType":"Function","startLoc":764,"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"},{"col":4,"comment":"Regress b from a keeping a's original mean.","endLoc":338,"header":"def regress_out(self, a, b)","id":1229,"name":"regress_out","nodeType":"Function","startLoc":331,"text":"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)"},{"col":4,"comment":"Update figure structure parameters based on facet/pair wrapping.","endLoc":119,"header":"def _handle_wrapping(\n        self, facet_spec: FacetSpec, pair_spec: PairSpec\n    ) -> None","id":1230,"name":"_handle_wrapping","nodeType":"Function","startLoc":102,"text":"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"},{"fileName":"order.py","filePath":"seaborn/_stats","id":1232,"nodeType":"File","text":"\nfrom __future__ import annotations\nfrom dataclasses import dataclass\nfrom typing import ClassVar, cast\ntry:\n    from typing import Literal\nexcept ImportError:\n    from typing_extensions import Literal  # type: ignore\n\nimport numpy as np\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.external.version import Version\n\n\n# From https://github.com/numpy/numpy/blob/main/numpy/lib/function_base.pyi\n_MethodKind = Literal[\n    \"inverted_cdf\",\n    \"averaged_inverted_cdf\",\n    \"closest_observation\",\n    \"interpolated_inverted_cdf\",\n    \"hazen\",\n    \"weibull\",\n    \"linear\",\n    \"median_unbiased\",\n    \"normal_unbiased\",\n    \"lower\",\n    \"higher\",\n    \"midpoint\",\n    \"nearest\",\n]\n\n\n@dataclass\nclass Perc(Stat):\n    \"\"\"\n    Replace observations with percentile values.\n\n    Parameters\n    ----------\n    k : list of numbers or int\n        If a list of numbers, this gives the percentiles (in [0, 100]) to compute.\n        If an integer, compute `k` evenly-spaced percentiles between 0 and 100.\n        For example, `k=5` computes the 0, 25, 50, 75, and 100th percentiles.\n    method : str\n        Method for interpolating percentiles between observed datapoints.\n        See :func:`numpy.percentile` for valid options and more information.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Perc.rst\n\n    \"\"\"\n    k: int | list[float] = 5\n    method: str = \"linear\"\n\n    group_by_orient: ClassVar[bool] = True\n\n    def _percentile(self, data: DataFrame, var: str) -> DataFrame:\n\n        k = list(np.linspace(0, 100, self.k)) if isinstance(self.k, int) else self.k\n        method = cast(_MethodKind, self.method)\n        values = data[var].dropna()\n        if Version(np.__version__) < Version(\"1.22.0\"):\n            res = np.percentile(values, k, interpolation=method)  # type: ignore\n        else:\n            res = np.percentile(data[var].dropna(), k, method=method)\n        return DataFrame({var: res, \"percentile\": k})\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\"}[orient]\n        return groupby.apply(data, self._percentile, var)\n"},{"col":4,"comment":"null","endLoc":167,"header":"def test_reset_orig(self)","id":1233,"name":"test_reset_orig","nodeType":"Function","startLoc":163,"text":"def test_reset_orig(self):\n\n        rcmod.reset_orig()\n        self.assert_rc_params(mpl.rcParamsOrig)\n        rcmod.set_theme()"},{"attributeType":"_SpecialForm","col":4,"comment":"null","endLoc":205,"id":1234,"name":"Literal","nodeType":"Attribute","startLoc":205,"text":"Literal"},{"attributeType":"_SpecialForm","col":0,"comment":"null","endLoc":215,"id":1235,"name":"Literal","nodeType":"Attribute","startLoc":215,"text":"Literal"},{"fileName":"test_plot.py","filePath":"tests/_core","id":1238,"nodeType":"File","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, assert_array_almost_equal\n\nfrom seaborn._core.plot import Plot, Default\nfrom seaborn._core.scales import Continuous, Nominal, Temporal\nfrom seaborn._core.moves import Move, Shift, Dodge\nfrom seaborn._core.rules import categorical_order\nfrom seaborn._core.exceptions import PlotSpecError\nfrom seaborn._marks.base import Mark\nfrom seaborn._stats.base import Stat\nfrom seaborn._marks.dot import Dot\nfrom seaborn._stats.aggregation import Agg\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\n\n\nclass 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\n\n\nclass 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\"]\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\")\n\n\nclass 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])\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            )\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\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\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\"]\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())\n\n\nclass 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])\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])\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])\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)\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)\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)\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])\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.]))\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]))\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]))\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]))\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]))\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]))\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?\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)\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()\n\n    def test_nominal_x_axis_tweaks(self):\n\n        p = Plot(x=[\"a\", \"b\", \"c\"], y=[1, 2, 3])\n        ax1 = p.plot()._figure.axes[0]\n        assert ax1.get_xlim() == (-.5, 2.5)\n        assert not any(x.get_visible() for x in ax1.xaxis.get_gridlines())\n\n        lim = (-1, 2.1)\n        ax2 = p.limit(x=lim).plot()._figure.axes[0]\n        assert ax2.get_xlim() == lim\n\n    def test_nominal_y_axis_tweaks(self):\n\n        p = Plot(x=[1, 2, 3], y=[\"a\", \"b\", \"c\"])\n        ax1 = p.plot()._figure.axes[0]\n        assert ax1.get_ylim() == (2.5, -.5)\n        assert not any(y.get_visible() for y in ax1.yaxis.get_gridlines())\n\n        lim = (-1, 2.1)\n        ax2 = p.limit(y=lim).plot()._figure.axes[0]\n        assert ax2.get_ylim() == lim\n\n\nclass 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().add(m).plot()\n        assert m.n_splits == 0\n        assert not m.passed_data\n\n    def test_no_orient_variance(self):\n\n        x, y = [0, 0], [1, 2]\n        m = MockMark()\n        Plot(x, y).add(m).plot()\n        assert_array_equal(m.passed_data[0][\"x\"], x)\n        assert_array_equal(m.passed_data[0][\"y\"], y)\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])\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])\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])\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        )\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        )\n\n    def test_specified_width(self, long_df):\n\n        m = MockMark()\n        Plot(long_df, x=\"x\", y=\"y\").add(m, width=\"z\").plot()\n        assert_array_almost_equal(m.passed_data[0][\"width\"], long_df[\"z\"])\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        )\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        )\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])\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))\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])\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])\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 = \".888\"\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)\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\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)\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)\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([1], [2]).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([1, 2], [3, 4]).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\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([1, 2], [3, 4]).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\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() == \"\"\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\"\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)\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\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\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\n\n\nclass TestExceptions:\n\n    def test_scale_setup(self):\n\n        x = y = color = [\"a\", \"b\"]\n        bad_palette = \"not_a_palette\"\n        p = Plot(x, y, color=color).add(MockMark()).scale(color=bad_palette)\n\n        msg = \"Scale setup failed for the `color` variable.\"\n        with pytest.raises(PlotSpecError, match=msg) as err:\n            p.plot()\n        assert isinstance(err.value.__cause__, ValueError)\n        assert bad_palette in str(err.value.__cause__)\n\n    def test_coordinate_scaling(self):\n\n        x = [\"a\", \"b\"]\n        y = [1, 2]\n        p = Plot(x, y).add(MockMark()).scale(x=Temporal())\n\n        msg = \"Scaling operation failed for the `x` variable.\"\n        with pytest.raises(PlotSpecError, match=msg) as err:\n            p.plot()\n        # Don't test the cause contents b/c matplotlib owns them here.\n        assert hasattr(err.value, \"__cause__\")\n\n    def test_semantic_scaling(self):\n\n        class ErrorRaising(Continuous):\n\n            def _setup(self, data, prop, axis=None):\n\n                def f(x):\n                    raise ValueError(\"This is a test\")\n\n                new = super()._setup(data, prop, axis)\n                new._pipeline = [f]\n                return new\n\n        x = y = color = [1, 2]\n        p = Plot(x, y, color=color).add(Dot()).scale(color=ErrorRaising())\n        msg = \"Scaling operation failed for the `color` variable.\"\n        with pytest.raises(PlotSpecError, match=msg) as err:\n            p.plot()\n        assert isinstance(err.value.__cause__, ValueError)\n        assert str(err.value.__cause__) == \"This is a test\"\n\n\nclass 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)})\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)\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            )\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)\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\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)\n\n    def test_unshared_spacing(self):\n\n        x = [1, 2, 10, 20]\n        y = [1, 2, 3, 4]\n        col = [1, 1, 2, 2]\n\n        m = MockMark()\n        Plot(x, y).facet(col).add(m).share(x=False).plot()\n        assert_array_almost_equal(m.passed_data[0][\"width\"], [0.8, 0.8])\n        assert_array_equal(m.passed_data[1][\"width\"], [8, 8])\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\n\n\nclass 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)\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)\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\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))\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()\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()\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)\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)\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\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]\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)\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\n\n\nclass 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())\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())\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())\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())\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())\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())\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())\n\n\nclass 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\"]\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)\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)\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]]\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\"]\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]]\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)\n\n    def test_three_layers(self, xy):\n\n        class MockMarkLine(MockMark):\n            def _legend_artist(self, variables, value, scales):\n                return mpl.lines.Line2D([], [])\n\n        s = pd.Series([\"a\", \"b\", \"a\", \"c\"], name=\"s\")\n        p = Plot(**xy, color=s)\n        for _ in range(3):\n            p = p.add(MockMarkLine())\n        p = p.plot()\n        texts = p._figure.legends[0].get_texts()\n        assert len(texts) == len(s.unique())\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    def test_legendless_mark(self, xy):\n\n        class NoLegendMark(MockMark):\n            def _legend_artist(self, variables, value, scales):\n                return None\n\n        p = Plot(**xy, color=[\"a\", \"b\", \"c\", \"d\"]).add(NoLegendMark()).plot()\n        assert not p._figure.legends\n\n    def test_legend_has_no_offset(self, xy):\n\n        color = np.add(xy[\"x\"], 1e8)\n        p = Plot(**xy, color=color).add(MockMark()).plot()\n        legend = p._figure.legends[0]\n        assert legend.texts\n        for text in legend.texts:\n            assert float(text.get_text()) > 1e7\n\n\nclass TestDefaultObject:\n\n    def test_default_repr(self):\n\n        assert repr(Default()) == \"\"\n"},{"col":0,"comment":"null","endLoc":2300,"header":"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)","id":1239,"name":"displot","nodeType":"Function","startLoc":2111,"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\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    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"},{"col":0,"comment":"null","endLoc":1746,"header":"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)","id":1240,"name":"kdeplot","nodeType":"Function","startLoc":1597,"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    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"},{"col":4,"comment":"null","endLoc":180,"header":"def test_set_is_alias(self)","id":1241,"name":"test_set_is_alias","nodeType":"Function","startLoc":169,"text":"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()"},{"className":"Default","col":0,"comment":"null","endLoc":36,"id":1244,"nodeType":"Class","startLoc":34,"text":"class Default:\n    def __repr__(self):\n        return \"\""},{"attributeType":"null","col":8,"comment":"null","endLoc":120,"id":1245,"name":"kernel","nodeType":"Attribute","startLoc":120,"text":"kernel"},{"col":4,"comment":"null","endLoc":36,"header":"def __repr__(self)","id":1248,"name":"__repr__","nodeType":"Function","startLoc":35,"text":"def __repr__(self):\n        return \"\""},{"className":"Continuous","col":0,"comment":"\n    A numeric scale supporting norms and functional transforms.\n    ","endLoc":660,"id":1249,"nodeType":"Class","startLoc":428,"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 | TransFuncs | 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 = 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\n\n    def label(\n        self,\n        formatter: Formatter | None = None, *,\n        like: str | Callable | None = None,\n        base: int | None | Default = default,\n        unit: str | None = None,\n    ) -> Continuous:\n        \"\"\"\n        Configure the appearance of tick labels for the scale's axis or legend.\n\n        Parameters\n        ----------\n        formatter : :class:`matplotlib.ticker.Formatter` subclass\n            Pre-configured formatter to use; other parameters will be ignored.\n        like : str or callable\n            Either a format pattern (e.g., `\".2f\"`), a format string with fields named\n            `x` and/or `pos` (e.g., `\"${x:.2f}\"`), or a callable 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            Set to `None` to override the default formatter with a log transform.\n        unit : str or (str, str) tuple\n            Use  SI prefixes with these units (e.g., with `unit=\"g\"`, a tick value\n            of 5000 will appear as `5 kg`). When a tuple, the first element gives the\n            separator between the number and unit.\n\n        Returns\n        -------\n        scale\n            Copy of self with new label configuration.\n\n        \"\"\"\n        # Input checks\n        if formatter is not None and not isinstance(formatter, Formatter):\n            raise TypeError(\n                f\"Label formatter must be an instance of {Formatter!r}, \"\n                f\"not {type(formatter)!r}\"\n            )\n        if like is not None and not (isinstance(like, str) or callable(like)):\n            msg = f\"`like` must be a string or callable, not {type(like).__name__}.\"\n            raise TypeError(msg)\n\n        new = copy(self)\n        new._label_params = {\n            \"formatter\": formatter,\n            \"like\": like,\n            \"base\": base,\n            \"unit\": unit,\n        }\n        return new\n\n    def _parse_for_log_params(\n        self, trans: str | TransFuncs | None\n    ) -> 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\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\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 default:\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"},{"className":"ContinuousBase","col":0,"comment":"null","endLoc":425,"id":1250,"nodeType":"Class","startLoc":316,"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(str(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            # Avoid having an offset / scientific notation in a legend\n            # as we don't represent that anywhere so it ends up incorrect.\n            # This could become an option (e.g. Continuous.label(offset=True))\n            # in which case we would need to figure out how to show it.\n            if hasattr(axis.major.formatter, \"set_useOffset\"):\n                axis.major.formatter.set_useOffset(False)\n            if hasattr(axis.major.formatter, \"set_scientific\"):\n                axis.major.formatter.set_scientific(False)\n            labels = axis.major.formatter.format_ticks(locs)\n            new._legend = list(locs), list(labels)\n\n        return new\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}\")"},{"attributeType":"str | Mappable","col":4,"comment":"null","endLoc":32,"id":1251,"name":"text","nodeType":"Attribute","startLoc":32,"text":"text"},{"col":4,"comment":"null","endLoc":392,"header":"def _setup(\n        self, data: Series, prop: Property, axis: Axis | None = None,\n    ) -> Scale","id":1253,"name":"_setup","nodeType":"Function","startLoc":322,"text":"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(str(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            # Avoid having an offset / scientific notation in a legend\n            # as we don't represent that anywhere so it ends up incorrect.\n            # This could become an option (e.g. Continuous.label(offset=True))\n            # in which case we would need to figure out how to show it.\n            if hasattr(axis.major.formatter, \"set_useOffset\"):\n                axis.major.formatter.set_useOffset(False)\n            if hasattr(axis.major.formatter, \"set_scientific\"):\n                axis.major.formatter.set_scientific(False)\n            labels = axis.major.formatter.format_ticks(locs)\n            new._legend = list(locs), list(labels)\n\n        return new"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":33,"id":1254,"name":"color","nodeType":"Attribute","startLoc":33,"text":"color"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":34,"id":1263,"name":"alpha","nodeType":"Attribute","startLoc":34,"text":"alpha"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":35,"id":1264,"name":"fontsize","nodeType":"Attribute","startLoc":35,"text":"fontsize"},{"col":20,"endLoc":199,"id":1265,"nodeType":"Lambda","startLoc":199,"text":"lambda row: dot_product(row, rgbl)"},{"attributeType":"null","col":4,"comment":"null","endLoc":121,"id":1267,"name":"ep","nodeType":"Attribute","startLoc":121,"text":"ep"},{"attributeType":"str | Mappable","col":4,"comment":"null","endLoc":36,"id":1268,"name":"halign","nodeType":"Attribute","startLoc":36,"text":"halign"},{"attributeType":"null","col":8,"comment":"null","endLoc":129,"id":1269,"name":"cell","nodeType":"Attribute","startLoc":129,"text":"cell"},{"attributeType":"str | Mappable","col":4,"comment":"null","endLoc":37,"id":1270,"name":"valign","nodeType":"Attribute","startLoc":37,"text":"valign"},{"col":0,"comment":"Make a sequential palette that blends from light to ``color``.\n\n    The ``color`` parameter can be specified in a number of ways, including\n    all options for defining a color in matplotlib and several additional\n    color spaces that are handled by seaborn. You can also use the database\n    of named colors from the XKCD color survey.\n\n    If you are using a Jupyter notebook, you can also choose this palette\n    interactively with the :func:`choose_light_palette` function.\n\n    Parameters\n    ----------\n    color : base color for high values\n        hex code, html color name, or tuple in `input` space.\n    n_colors : int, optional\n        number of colors in the palette\n    reverse : bool, optional\n        if True, reverse the direction of the blend\n    as_cmap : bool, optional\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n    input : {'rgb', 'hls', 'husl', xkcd'}\n        Color space to interpret the input color. The first three options\n        apply to tuple inputs and the latter applies to string inputs.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    dark_palette : Create a sequential palette with dark low values.\n    diverging_palette : Create a diverging palette with two colors.\n\n    Examples\n    --------\n    .. include:: ../docstrings/light_palette.rst\n\n    ","endLoc":529,"header":"def light_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\")","id":1271,"name":"light_palette","nodeType":"Function","startLoc":484,"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    The ``color`` parameter can be specified in a number of ways, including\n    all options for defining a color in matplotlib and several additional\n    color spaces that are handled by seaborn. You can also use the database\n    of named colors from the XKCD color survey.\n\n    If you are using a Jupyter notebook, you can also choose this palette\n    interactively with the :func:`choose_light_palette` function.\n\n    Parameters\n    ----------\n    color : base color for high values\n        hex code, html color name, or tuple in `input` space.\n    n_colors : int, optional\n        number of colors in the palette\n    reverse : bool, optional\n        if True, reverse the direction of the blend\n    as_cmap : bool, optional\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n    input : {'rgb', 'hls', 'husl', xkcd'}\n        Color space to interpret the input color. The first three options\n        apply to tuple inputs and the latter applies to string inputs.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    dark_palette : Create a sequential palette with dark low values.\n    diverging_palette : Create a diverging palette with two colors.\n\n    Examples\n    --------\n    .. include:: ../docstrings/light_palette.rst\n\n    \"\"\"\n    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)"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":38,"id":1272,"name":"offset","nodeType":"Attribute","startLoc":38,"text":"offset"},{"className":"Perc","col":0,"comment":"\n    Replace observations with percentile values.\n\n    Parameters\n    ----------\n    k : list of numbers or int\n        If a list of numbers, this gives the percentiles (in [0, 100]) to compute.\n        If an integer, compute `k` evenly-spaced percentiles between 0 and 100.\n        For example, `k=5` computes the 0, 25, 50, 75, and 100th percentiles.\n    method : str\n        Method for interpolating percentiles between observed datapoints.\n        See :func:`numpy.percentile` for valid options and more information.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Perc.rst\n\n    ","endLoc":78,"id":1273,"nodeType":"Class","startLoc":37,"text":"@dataclass\nclass Perc(Stat):\n    \"\"\"\n    Replace observations with percentile values.\n\n    Parameters\n    ----------\n    k : list of numbers or int\n        If a list of numbers, this gives the percentiles (in [0, 100]) to compute.\n        If an integer, compute `k` evenly-spaced percentiles between 0 and 100.\n        For example, `k=5` computes the 0, 25, 50, 75, and 100th percentiles.\n    method : str\n        Method for interpolating percentiles between observed datapoints.\n        See :func:`numpy.percentile` for valid options and more information.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Perc.rst\n\n    \"\"\"\n    k: int | list[float] = 5\n    method: str = \"linear\"\n\n    group_by_orient: ClassVar[bool] = True\n\n    def _percentile(self, data: DataFrame, var: str) -> DataFrame:\n\n        k = list(np.linspace(0, 100, self.k)) if isinstance(self.k, int) else self.k\n        method = cast(_MethodKind, self.method)\n        values = data[var].dropna()\n        if Version(np.__version__) < Version(\"1.22.0\"):\n            res = np.percentile(values, k, interpolation=method)  # type: ignore\n        else:\n            res = np.percentile(data[var].dropna(), k, method=method)\n        return DataFrame({var: res, \"percentile\": k})\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\"}[orient]\n        return groupby.apply(data, self._percentile, var)"},{"col":4,"comment":"null","endLoc":71,"header":"def _percentile(self, data: DataFrame, var: str) -> DataFrame","id":1276,"name":"_percentile","nodeType":"Function","startLoc":62,"text":"def _percentile(self, data: DataFrame, var: str) -> DataFrame:\n\n        k = list(np.linspace(0, 100, self.k)) if isinstance(self.k, int) else self.k\n        method = cast(_MethodKind, self.method)\n        values = data[var].dropna()\n        if Version(np.__version__) < Version(\"1.22.0\"):\n            res = np.percentile(values, k, interpolation=method)  # type: ignore\n        else:\n            res = np.percentile(data[var].dropna(), k, method=method)\n        return DataFrame({var: res, \"percentile\": k})"},{"attributeType":"null","col":16,"comment":"null","endLoc":5,"id":1277,"name":"np","nodeType":"Attribute","startLoc":5,"text":"np"},{"attributeType":"null","col":21,"comment":"null","endLoc":6,"id":1278,"name":"mpl","nodeType":"Attribute","startLoc":6,"text":"mpl"},{"attributeType":"null","col":8,"comment":"null","endLoc":132,"id":1279,"name":"fields","nodeType":"Attribute","startLoc":132,"text":"fields"},{"fileName":"line.py","filePath":"seaborn/_marks","id":1280,"nodeType":"File","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\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, kind=\"mergesort\")\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)\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\n\n\n@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\"])\n\n    def _plot(self, split_gen, scales, orient):\n\n        line_data = {}\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            segments = self._setup_segments(data, orient)\n            line_data[ax][\"segments\"].extend(segments)\n            n = len(segments)\n\n            vals = resolve_properties(self, keys, scales)\n            vals[\"color\"] = resolve_color(self, keys, scales=scales)\n\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        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            if ax_data[\"segments\"]:\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    def _setup_segments(self, data, orient):\n\n        if self._sort:\n            data = data.sort_values(orient, kind=\"mergesort\")\n\n        # Column stack to avoid block consolidation\n        xy = np.column_stack([data[\"x\"], data[\"y\"]])\n\n        return [xy]\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\n\n\n@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_segments(self, data, orient):\n\n        # TODO better checks on what variables we have\n        # TODO what if only one exist?\n        val = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        if not set(data.columns) & {f\"{val}min\", f\"{val}max\"}:\n            agg = {f\"{val}min\": (val, \"min\"), f\"{val}max\": (val, \"max\")}\n            data = data.groupby(orient).agg(**agg).reset_index()\n\n        cols = [orient, f\"{val}min\", f\"{val}max\"]\n        data = data[cols].melt(orient, value_name=val)[[\"x\", \"y\"]]\n        segments = [d.to_numpy() for _, d in data.groupby(orient)]\n        return segments\n\n\n@document_properties\n@dataclass\nclass Dash(Paths):\n    \"\"\"\n    A line mark drawn as an oriented segment for each datapoint.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Dash.rst\n\n    \"\"\"\n    width: MappableFloat = Mappable(.8, grouping=False)\n\n    def _setup_segments(self, data, orient):\n\n        ori = [\"x\", \"y\"].index(orient)\n        xys = data[[\"x\", \"y\"]].to_numpy().astype(float)\n        segments = np.stack([xys, xys], axis=1)\n        segments[:, 0, ori] -= data[\"width\"] / 2\n        segments[:, 1, ori] += data[\"width\"] / 2\n        return segments\n"},{"attributeType":"list","col":4,"comment":"null","endLoc":75,"id":1282,"name":"styles","nodeType":"Attribute","startLoc":75,"text":"styles"},{"col":0,"comment":"Make a sequential palette that blends from dark to ``color``.\n\n    This kind of palette is good for data that range between relatively\n    uninteresting low values and interesting high values.\n\n    The ``color`` parameter can be specified in a number of ways, including\n    all options for defining a color in matplotlib and several additional\n    color spaces that are handled by seaborn. You can also use the database\n    of named colors from the XKCD color survey.\n\n    If you are using the IPython notebook, you can also choose this palette\n    interactively with the :func:`choose_dark_palette` function.\n\n    Parameters\n    ----------\n    color : base color for high values\n        hex, rgb-tuple, or html color name\n    n_colors : int, optional\n        number of colors in the palette\n    reverse : bool, optional\n        if True, reverse the direction of the blend\n    as_cmap : bool, optional\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n    input : {'rgb', 'hls', 'husl', xkcd'}\n        Color space to interpret the input color. The first three options\n        apply to tuple inputs and the latter applies to string inputs.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    light_palette : Create a sequential palette with bright low values.\n    diverging_palette : Create a diverging palette with two colors.\n\n    Examples\n    --------\n    .. include:: ../docstrings/dark_palette.rst\n\n    ","endLoc":481,"header":"def dark_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\")","id":1283,"name":"dark_palette","nodeType":"Function","startLoc":433,"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.ListedColormap`.\n    input : {'rgb', 'hls', 'husl', xkcd'}\n        Color space to interpret the input color. The first three options\n        apply to tuple inputs and the latter applies to string inputs.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    light_palette : Create a sequential palette with bright low values.\n    diverging_palette : Create a diverging palette with two colors.\n\n    Examples\n    --------\n    .. include:: ../docstrings/dark_palette.rst\n\n    \"\"\"\n    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)"},{"className":"Path","col":0,"comment":"\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    ","endLoc":117,"id":1284,"nodeType":"Class","startLoc":21,"text":"@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\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, kind=\"mergesort\")\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)\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"},{"className":"TestPlottingContext","col":0,"comment":"null","endLoc":249,"id":1285,"nodeType":"Class","startLoc":183,"text":"class TestPlottingContext(RCParamFixtures):\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]\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)"},{"col":4,"comment":"null","endLoc":190,"header":"def test_default_return(self)","id":1286,"name":"test_default_return","nodeType":"Function","startLoc":187,"text":"def test_default_return(self):\n\n        current = rcmod.plotting_context()\n        self.assert_rc_params(current)"},{"id":1287,"name":"objects.Dot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2923956c-f141-4ecb-ab08-e819099f0fa9\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"tips = load_dataset(\\\"tips\\\")\\n\",\n    \"glue = load_dataset(\\\"glue\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"f8e7b343-0301-49b3-8d42-862266d322bb\",\n   \"metadata\": {},\n   \"source\": [\n    \"This mark draws relatively large, filled dots by default:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f92e97d0-b6a5-41ec-8507-dc64e60cb6e0\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p1 = so.Plot(tips, \\\"total_bill\\\", \\\"tip\\\")\\n\",\n    \"p1.add(so.Dot())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"625abe2a-7b0b-42a7-bfbc-dc2bfaf14897\",\n   \"metadata\": {},\n   \"source\": [\n    \"While :class:`Dots` is a better choice for dense scatter plots, adding a thin edge can help to resolve individual points:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a3c7c22d-c7ce-40a9-941b-a8bc30db1e54\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p1.add(so.Dot(edgecolor=\\\"w\\\"))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"398a43e1-4d45-42ea-bc87-41a8602540a4\",\n   \"metadata\": {},\n   \"source\": [\n    \"Dodging and jittering can also help to reduce overplotting, when appropriate:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"1b15e393-35cf-457f-8180-d92d05e2675a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, \\\"total_bill\\\", \\\"day\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Dot(), so.Dodge(), so.Jitter(.2))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"12453ada-40e6-4aad-9f32-ba41fd7b27ca\",\n   \"metadata\": {},\n   \"source\": [\n    \"The larger dot size makes this mark well suited to representing values along a nominal scale:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"bd2edac0-ee6b-4cc9-8201-641b589630b8\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p2 = so.Plot(glue, \\\"Score\\\", \\\"Model\\\").facet(\\\"Task\\\", wrap=4).limit(x=(-5, 105))\\n\",\n    \"p2.add(so.Dot())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"ddd86209-d5cd-4f7a-9274-c578bc6a9f07\",\n   \"metadata\": {},\n   \"source\": [\n    \"A number of properties can be set or mapped:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d00cdc35-4b9c-4f32-a047-8e036e565c4f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    p2\\n\",\n    \"    .add(so.Dot(pointsize=6), color=\\\"Year\\\", marker=\\\"Encoder\\\")\\n\",\n    \"    .scale(marker=[\\\"o\\\", \\\"s\\\"], color=\\\"flare\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"061e22f4-8505-425d-8c80-8ac82c6a3125\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note that the edge properties are parameterized differently for filled and unfilled markers; use `stroke` and `color` rather than `edgewidth` and `edgecolor` if the marker is unfilled:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"964b00be-1c29-4664-838d-0daeead9154a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p2.add(so.Dot(stroke=1.5), fill=\\\"Encoder\\\", color=\\\"Encoder\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"fb5e1383-1460-4389-a67b-09ec7965af90\",\n   \"metadata\": {},\n   \"source\": [\n    \"Combine with :class:`Range` to show error bars:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b2618c22-bc7f-4ddd-9824-346e8d9b2b51\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, x=\\\"total_bill\\\", y=\\\"day\\\")\\n\",\n    \"    .add(so.Dot(pointsize=3), so.Shift(y=.2), so.Jitter(.2))\\n\",\n    \"    .add(so.Dot(), so.Agg())\\n\",\n    \"    .add(so.Range(), so.Est(errorbar=(\\\"se\\\", 2)))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e5dc04fd-dba4-4b86-99a1-31ba00c7650d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"col":4,"comment":"null","endLoc":81,"header":"def _plot(self, split_gen, scales, orient)","id":1288,"name":"_plot","nodeType":"Function","startLoc":49,"text":"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, kind=\"mergesort\")\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)"},{"attributeType":"null","col":12,"comment":"null","endLoc":133,"id":1296,"name":"field","nodeType":"Attribute","startLoc":133,"text":"field"},{"attributeType":"null","col":16,"comment":"null","endLoc":135,"id":1297,"name":"data_keys","nodeType":"Attribute","startLoc":135,"text":"data_keys"},{"attributeType":"null","col":20,"comment":"null","endLoc":136,"id":1298,"name":"key","nodeType":"Attribute","startLoc":136,"text":"key"},{"col":0,"comment":"\n    Return a palette or colormap from the matplotlib registry.\n\n    For continuous palettes, evenly-spaced discrete samples are chosen while\n    excluding the minimum and maximum value in the colormap to provide better\n    contrast at the extremes.\n\n    For qualitative palettes (e.g. those from colorbrewer), exact values are\n    indexed (rather than interpolated), but fewer than `n_colors` can be returned\n    if the palette does not define that many.\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.ListedColormap`\n\n    Examples\n    --------\n    .. include: ../docstrings/mpl_palette.rst\n\n    ","endLoc":417,"header":"def mpl_palette(name, n_colors=6, as_cmap=False)","id":1300,"name":"mpl_palette","nodeType":"Function","startLoc":366,"text":"def mpl_palette(name, n_colors=6, as_cmap=False):\n    \"\"\"\n    Return a palette or colormap from the matplotlib registry.\n\n    For continuous palettes, evenly-spaced discrete samples are chosen while\n    excluding the minimum and maximum value in the colormap to provide better\n    contrast at the extremes.\n\n    For qualitative palettes (e.g. those from colorbrewer), exact values are\n    indexed (rather than interpolated), but fewer than `n_colors` can be returned\n    if the palette does not define that many.\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.ListedColormap`\n\n    Examples\n    --------\n    .. include: ../docstrings/mpl_palette.rst\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)"},{"col":4,"comment":"null","endLoc":197,"header":"def test_key_usage(self)","id":1301,"name":"test_key_usage","nodeType":"Function","startLoc":192,"text":"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"},{"col":0,"comment":"Handle changes to matplotlib colormap interface in 3.6.","endLoc":135,"header":"def get_colormap(name)","id":1305,"name":"get_colormap","nodeType":"Function","startLoc":130,"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)"},{"col":4,"comment":"null","endLoc":1019,"header":"def index(self, __value: _T, __start: SupportsIndex = 0, __stop: SupportsIndex = sys.maxsize) -> int","id":1306,"name":"index","nodeType":"Function","startLoc":1019,"text":"def index(self, __value: _T, __start: SupportsIndex = 0, __stop: SupportsIndex = sys.maxsize) -> int: ..."},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":104,"id":1307,"name":"color","nodeType":"Attribute","startLoc":104,"text":"color"},{"col":4,"comment":"null","endLoc":202,"header":"def test_bad_context(self)","id":1308,"name":"test_bad_context","nodeType":"Function","startLoc":199,"text":"def test_bad_context(self):\n\n        with pytest.raises(ValueError):\n            rcmod.plotting_context(\"i_am_not_a_context\")"},{"col":0,"comment":"null","endLoc":219,"header":"def xyz_to_luv(triple)","id":1309,"name":"xyz_to_luv","nodeType":"Function","startLoc":202,"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]"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":105,"id":1310,"name":"alpha","nodeType":"Attribute","startLoc":105,"text":"alpha"},{"col":0,"comment":"null","endLoc":130,"header":"def f(t)","id":1311,"name":"f","nodeType":"Function","startLoc":126,"text":"def 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)"},{"col":4,"comment":"null","endLoc":217,"header":"def test_font_scale(self)","id":1312,"name":"test_font_scale","nodeType":"Function","startLoc":204,"text":"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]"},{"attributeType":"bool | Mappable","col":4,"comment":"null","endLoc":106,"id":1313,"name":"fill","nodeType":"Attribute","startLoc":106,"text":"fill"},{"col":4,"comment":"Input check when values are provided as a list.","endLoc":140,"header":"def _check_list_length(self, levels: list, values: list) -> list","id":1314,"name":"_check_list_length","nodeType":"Function","startLoc":118,"text":"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"},{"col":4,"comment":"null","endLoc":248,"header":"def __repr__(self) -> str","id":1315,"name":"__repr__","nodeType":"Function","startLoc":247,"text":"def __repr__(self) -> str:\n        return f\"\""},{"col":4,"comment":"null","endLoc":276,"header":"def __str__(self) -> str","id":1316,"name":"__str__","nodeType":"Function","startLoc":250,"text":"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)"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":107,"id":1317,"name":"edgecolor","nodeType":"Attribute","startLoc":107,"text":"edgecolor"},{"attributeType":"null","col":4,"comment":"null","endLoc":143,"id":1318,"name":"exp","nodeType":"Attribute","startLoc":143,"text":"exp"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":108,"id":1319,"name":"edgealpha","nodeType":"Attribute","startLoc":108,"text":"edgealpha"},{"col":4,"comment":"null","endLoc":225,"header":"def test_rc_override(self)","id":1320,"name":"test_rc_override","nodeType":"Function","startLoc":219,"text":"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"},{"attributeType":"null","col":4,"comment":"null","endLoc":145,"id":1321,"name":"c","nodeType":"Attribute","startLoc":145,"text":"c"},{"col":0,"comment":"null","endLoc":247,"header":"def luv_to_lch(triple)","id":1322,"name":"luv_to_lch","nodeType":"Function","startLoc":238,"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]"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":109,"id":1323,"name":"edgewidth","nodeType":"Attribute","startLoc":109,"text":"edgewidth"},{"attributeType":"set","col":4,"comment":"null","endLoc":146,"id":1324,"name":"remove_cell_tags","nodeType":"Attribute","startLoc":146,"text":"c.TagRemovePreprocessor.remove_cell_tags"},{"attributeType":"str | (float, ...) | (float, (float, ...) | None) | Mappable","col":4,"comment":"null","endLoc":110,"id":1325,"name":"edgestyle","nodeType":"Attribute","startLoc":110,"text":"edgestyle"},{"col":4,"comment":"null","endLoc":233,"header":"def test_set_context(self)","id":1326,"name":"test_set_context","nodeType":"Function","startLoc":227,"text":"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)"},{"attributeType":"set","col":4,"comment":"null","endLoc":147,"id":1327,"name":"remove_input_tags","nodeType":"Attribute","startLoc":147,"text":"c.TagRemovePreprocessor.remove_input_tags"},{"attributeType":"set","col":4,"comment":"null","endLoc":148,"id":1328,"name":"remove_all_outputs_tags","nodeType":"Attribute","startLoc":148,"text":"c.TagRemovePreprocessor.remove_all_outputs_tags"},{"attributeType":"str","col":4,"comment":"null","endLoc":149,"id":1329,"name":"output_filename_template","nodeType":"Attribute","startLoc":149,"text":"c.ExtractOutputPreprocessor.output_filename_template"},{"fileName":"density.py","filePath":"seaborn/_stats","id":1331,"nodeType":"File","text":"from __future__ import annotations\nfrom dataclasses import dataclass\nfrom typing import Any, Callable\n\nimport numpy as np\nfrom numpy import ndarray\nimport pandas as pd\nfrom pandas import DataFrame\ntry:\n    from scipy.stats import gaussian_kde\n    _no_scipy = False\nexcept ImportError:\n    from seaborn.external.kde import gaussian_kde\n    _no_scipy = True\n\nfrom seaborn._core.groupby import GroupBy\nfrom seaborn._core.scales import Scale\nfrom seaborn._stats.base import Stat\n\n\n@dataclass\nclass KDE(Stat):\n    \"\"\"\n    Compute a univariate kernel density estimate.\n\n    Parameters\n    ----------\n    bw_adjust : float\n        Factor that multiplicatively scales the value chosen using\n        `bw_method`. Increasing will make the curve smoother. See Notes.\n    bw_method : string, scalar, or callable\n        Method for determining the smoothing bandwidth to use. Passed directly\n        to :class:`scipy.stats.gaussian_kde`; see there for options.\n    common_norm : bool or list of variables\n        If `True`, normalize so that the areas of all curves sums to 1.\n        If `False`, normalize each curve independently. If a list, defines\n        variable(s) to group by and normalize within.\n    common_grid : bool or list of variables\n        If `True`, all curves will share the same evaluation grid.\n        If `False`, each evaluation grid is independent. If a list, defines\n        variable(s) to group by and share a grid within.\n    gridsize : int or None\n        Number of points in the evaluation grid. If None, the density is\n        evaluated at the original datapoints.\n    cut : float\n        Factor, multiplied by the kernel bandwidth, that determines how far\n        the evaluation grid extends past the extreme datapoints. When set to 0,\n        the curve is truncated at the data limits.\n    cumulative : bool\n        If True, estimate a cumulative distribution function. Requires scipy.\n\n    Notes\n    -----\n    The *bandwidth*, or standard deviation of the smoothing kernel, is an\n    important parameter. Much like histogram bin width, using the wrong\n    bandwidth can produce a distorted representation. Over-smoothing can erase\n    true features, while under-smoothing can create false ones. The default\n    uses a rule-of-thumb that works best for distributions that are roughly\n    bell-shaped. It is a good idea to check the default by varying `bw_adjust`.\n\n    Because the smoothing is performed with a Gaussian kernel, the estimated\n    density curve can extend to values that may not make sense. For example, the\n    curve may be drawn over negative values when data that are naturally\n    positive. The `cut` parameter can be used to control the evaluation range,\n    but datasets that have many observations close to a natural boundary may be\n    better served by a different method.\n\n    Similar distortions may arise when a dataset is naturally discrete or \"spiky\"\n    (containing many repeated observations of the same value). KDEs will always\n    produce a smooth curve, which could be misleading.\n\n    The units on the density axis are a common source of confusion. While kernel\n    density estimation produces a probability distribution, the height of the curve\n    at each point gives a density, not a probability. A probability can be obtained\n    only by integrating the density across a range. The curve is normalized so\n    that the integral over all possible values is 1, meaning that the scale of\n    the density axis depends on the data values.\n\n    If scipy is installed, its cython-accelerated implementation will be used.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.KDE.rst\n\n    \"\"\"\n    bw_adjust: float = 1\n    bw_method: str | float | Callable[[gaussian_kde], float] = \"scott\"\n    common_norm: bool | list[str] = True\n    common_grid: bool | list[str] = True\n    gridsize: int | None = 200\n    cut: float = 3\n    cumulative: bool = False\n\n    def __post_init__(self):\n\n        if self.cumulative and _no_scipy:\n            raise RuntimeError(\"Cumulative KDE evaluation requires scipy\")\n\n    def _check_var_list_or_boolean(self, param: str, grouping_vars: Any) -> None:\n        \"\"\"Do input checks on grouping parameters.\"\"\"\n        value = getattr(self, param)\n        if not (\n            isinstance(value, bool)\n            or (isinstance(value, list) and all(isinstance(v, str) for v in value))\n        ):\n            param_name = f\"{self.__class__.__name__}.{param}\"\n            raise TypeError(f\"{param_name} must be a boolean or list of strings.\")\n        self._check_grouping_vars(param, grouping_vars, stacklevel=3)\n\n    def _fit(self, data: DataFrame, orient: str) -> gaussian_kde:\n        \"\"\"Fit and return a KDE object.\"\"\"\n        # TODO need to handle singular data\n\n        fit_kws: dict[str, Any] = {\"bw_method\": self.bw_method}\n        if \"weight\" in data:\n            fit_kws[\"weights\"] = data[\"weight\"]\n        kde = gaussian_kde(data[orient], **fit_kws)\n        kde.set_bandwidth(kde.factor * self.bw_adjust)\n\n        return kde\n\n    def _get_support(self, data: DataFrame, orient: str) -> ndarray:\n        \"\"\"Define the grid that the KDE will be evaluated on.\"\"\"\n        if self.gridsize is None:\n            return data[orient].to_numpy()\n\n        kde = self._fit(data, orient)\n        bw = np.sqrt(kde.covariance.squeeze())\n        gridmin = data[orient].min() - bw * self.cut\n        gridmax = data[orient].max() + bw * self.cut\n        return np.linspace(gridmin, gridmax, self.gridsize)\n\n    def _fit_and_evaluate(\n        self, data: DataFrame, orient: str, support: ndarray\n    ) -> DataFrame:\n        \"\"\"Transform single group by fitting a KDE and evaluating on a support grid.\"\"\"\n        empty = pd.DataFrame(columns=[orient, \"weight\", \"density\"], dtype=float)\n        if len(data) < 2:\n            return empty\n        try:\n            kde = self._fit(data, orient)\n        except np.linalg.LinAlgError:\n            return empty\n\n        if self.cumulative:\n            s_0 = support[0]\n            density = np.array([kde.integrate_box_1d(s_0, s_i) for s_i in support])\n        else:\n            density = kde(support)\n\n        weight = data[\"weight\"].sum()\n        return pd.DataFrame({orient: support, \"weight\": weight, \"density\": density})\n\n    def _transform(\n        self, data: DataFrame, orient: str, grouping_vars: list[str]\n    ) -> DataFrame:\n        \"\"\"Transform multiple groups by fitting KDEs and evaluating.\"\"\"\n        empty = pd.DataFrame(columns=[*data.columns, \"density\"], dtype=float)\n        if len(data) < 2:\n            return empty\n        try:\n            support = self._get_support(data, orient)\n        except np.linalg.LinAlgError:\n            return empty\n\n        grouping_vars = [x for x in grouping_vars if data[x].nunique() > 1]\n        if not grouping_vars:\n            return self._fit_and_evaluate(data, orient, support)\n        groupby = GroupBy(grouping_vars)\n        return groupby.apply(data, self._fit_and_evaluate, orient, support)\n\n    def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n\n        if \"weight\" not in data:\n            data = data.assign(weight=1)\n        data = data.dropna(subset=[orient, \"weight\"])\n\n        # Transform each group separately\n        grouping_vars = [str(v) for v in data if v in groupby.order]\n        if not grouping_vars or self.common_grid is True:\n            res = self._transform(data, orient, grouping_vars)\n        else:\n            if self.common_grid is False:\n                grid_vars = grouping_vars\n            else:\n                self._check_var_list_or_boolean(\"common_grid\", grouping_vars)\n                grid_vars = [v for v in self.common_grid if v in grouping_vars]\n\n            res = (\n                GroupBy(grid_vars)\n                .apply(data, self._transform, orient, grouping_vars)\n            )\n\n        # Normalize, potentially within groups\n        if not grouping_vars or self.common_norm is True:\n            res = res.assign(group_weight=data[\"weight\"].sum())\n        else:\n            if self.common_norm is False:\n                norm_vars = grouping_vars\n            else:\n                self._check_var_list_or_boolean(\"common_norm\", grouping_vars)\n                norm_vars = [v for v in self.common_norm if v in grouping_vars]\n\n            res = res.join(\n                data.groupby(norm_vars)[\"weight\"].sum().rename(\"group_weight\"),\n                on=norm_vars,\n            )\n\n        res[\"density\"] *= res.eval(\"weight / group_weight\")\n        value = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        res[value] = res[\"density\"]\n        return res.drop([\"weight\", \"group_weight\"], axis=1)\n"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":113,"id":1333,"name":"baseline","nodeType":"Attribute","startLoc":113,"text":"baseline"},{"col":4,"comment":"null","endLoc":249,"header":"def test_context_context_manager(self)","id":1334,"name":"test_context_context_manager","nodeType":"Function","startLoc":235,"text":"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)"},{"className":"Band","col":0,"comment":"\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    ","endLoc":170,"id":1335,"nodeType":"Class","startLoc":139,"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        # TODO what if only one exist?\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        if not set(data.columns) & {f\"{other}min\", f\"{other}max\"}:\n            agg = {f\"{other}min\": (other, \"min\"), f\"{other}max\": (other, \"max\")}\n            data = data.groupby(orient).agg(**agg).reset_index()\n        return data"},{"col":4,"comment":"null","endLoc":170,"header":"def _standardize_coordinate_parameters(self, data, orient)","id":1336,"name":"_standardize_coordinate_parameters","nodeType":"Function","startLoc":162,"text":"def _standardize_coordinate_parameters(self, data, orient):\n        # dv = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        # TODO assert that all(ymax >= ymin)?\n        # TODO what if only one exist?\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        if not set(data.columns) & {f\"{other}min\", f\"{other}max\"}:\n            agg = {f\"{other}min\": (other, \"min\"), f\"{other}max\": (other, \"max\")}\n            data = data.groupby(orient).agg(**agg).reset_index()\n        return data"},{"col":4,"comment":"\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        ","endLoc":258,"header":"def tick(self, locator: Locator | None = None)","id":1338,"name":"tick","nodeType":"Function","startLoc":236,"text":"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"},{"col":0,"comment":"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    ","endLoc":142,"header":"def _handle_random_seed(seed=None)","id":1340,"name":"_handle_random_seed","nodeType":"Function","startLoc":121,"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"},{"col":4,"comment":"\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        ","endLoc":283,"header":"def label(self, formatter: Formatter | None = None)","id":1341,"name":"label","nodeType":"Function","startLoc":260,"text":"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"},{"col":4,"comment":"null","endLoc":292,"header":"def _get_locators(self, locator)","id":1342,"name":"_get_locators","nodeType":"Function","startLoc":285,"text":"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"},{"col":4,"comment":"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        ","endLoc":1830,"header":"def plot_joint(self, func, **kwargs)","id":1343,"name":"plot_joint","nodeType":"Function","startLoc":1796,"text":"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"},{"attributeType":"SupportsDunderLT | SupportsDunderGT","col":4,"comment":"null","endLoc":25,"id":1344,"name":"name","nodeType":"Attribute","startLoc":25,"text":"name"},{"col":4,"comment":"null","endLoc":301,"header":"def _get_formatter(self, locator, formatter)","id":1345,"name":"_get_formatter","nodeType":"Function","startLoc":294,"text":"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"},{"attributeType":"tuple | str | list | dict | None","col":4,"comment":"null","endLoc":150,"id":1346,"name":"values","nodeType":"Attribute","startLoc":150,"text":"values"},{"col":0,"comment":"null","endLoc":285,"header":"def lch_to_husl(triple)","id":1348,"name":"lch_to_husl","nodeType":"Function","startLoc":274,"text":"def 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]"},{"col":0,"comment":"null","endLoc":44,"header":"def hex_to_husl(hex)","id":1349,"name":"hex_to_husl","nodeType":"Function","startLoc":43,"text":"def hex_to_husl(hex):\n    return rgb_to_husl(*hex_to_rgb(hex))"},{"col":0,"comment":"null","endLoc":184,"header":"def hex_to_rgb(hex)","id":1350,"name":"hex_to_rgb","nodeType":"Function","startLoc":178,"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]"},{"className":"gaussian_kde","col":0,"comment":"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    ","endLoc":380,"id":1351,"nodeType":"Class","startLoc":81,"text":"class 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    \"\"\"\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)\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\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`.\"\"\"\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()\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))\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"},{"col":4,"comment":"null","endLoc":210,"header":"def __init__(self, dataset, bw_method=None, weights=None)","id":1352,"name":"__init__","nodeType":"Function","startLoc":194,"text":"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)"},{"col":4,"comment":"null","endLoc":37,"header":"def __init__(self, __iterable: Iterable[_T]) -> None","id":1354,"name":"__init__","nodeType":"Function","startLoc":37,"text":"def __init__(self, __iterable: Iterable[_T]) -> None: ..."},{"col":4,"comment":"Group a long-form variable by another with correct order.","endLoc":653,"header":"def _group_longform(self, vals, grouper, order)","id":1355,"name":"_group_longform","nodeType":"Function","startLoc":630,"text":"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"},{"col":4,"comment":"The :class:`matplotlib.legend.Legend` object, if present.","endLoc":280,"header":"@property\n    def legend(self)","id":1356,"name":"legend","nodeType":"Function","startLoc":274,"text":"@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"},{"col":4,"comment":"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        ","endLoc":301,"header":"def tick_params(self, axis='both', **kwargs)","id":1357,"name":"tick_params","nodeType":"Function","startLoc":282,"text":"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"},{"attributeType":"list | None","col":4,"comment":"null","endLoc":151,"id":1358,"name":"order","nodeType":"Attribute","startLoc":151,"text":"order"},{"attributeType":"null","col":4,"comment":"null","endLoc":100,"id":1359,"name":"_margin_titles","nodeType":"Attribute","startLoc":100,"text":"_margin_titles"},{"attributeType":"null","col":4,"comment":"null","endLoc":101,"id":1360,"name":"_legend_out","nodeType":"Attribute","startLoc":101,"text":"_legend_out"},{"attributeType":"null","col":12,"comment":"null","endLoc":183,"id":1361,"name":"_legend","nodeType":"Attribute","startLoc":183,"text":"self._legend"},{"attributeType":"int","col":4,"comment":"null","endLoc":153,"id":1362,"name":"_priority","nodeType":"Attribute","startLoc":153,"text":"_priority"},{"col":0,"comment":"\n    Sum of array elements over a given axis.\n\n    Parameters\n    ----------\n    a : array_like\n        Elements to sum.\n    axis : None or int or tuple of ints, optional\n        Axis or axes along which a sum is performed.  The default,\n        axis=None, will sum all of the elements of the input array.  If\n        axis is negative it counts from the last to the first axis.\n\n        .. versionadded:: 1.7.0\n\n        If axis is a tuple of ints, a sum is performed on all of the axes\n        specified in the tuple instead of a single axis or all the axes as\n        before.\n    dtype : dtype, optional\n        The type of the returned array and of the accumulator in which the\n        elements are summed.  The dtype of `a` is used by default unless `a`\n        has an integer dtype of less precision than the default platform\n        integer.  In that case, if `a` is signed then the platform integer\n        is used while if `a` is unsigned then an unsigned integer of the\n        same precision as the platform integer is used.\n    out : ndarray, optional\n        Alternative output array in which to place the result. It must have\n        the same shape as the expected output, but the type of the output\n        values will be cast if necessary.\n    keepdims : bool, optional\n        If this is set to True, the axes which are reduced are left\n        in the result as dimensions with size one. With this option,\n        the result will broadcast correctly against the input array.\n\n        If the default value is passed, then `keepdims` will not be\n        passed through to the `sum` method of sub-classes of\n        `ndarray`, however any non-default value will be.  If the\n        sub-classes `sum` method does not implement `keepdims` any\n        exceptions will be raised.\n\n    Returns\n    -------\n    sum_along_axis : ndarray\n        An array with the same shape as `a`, with the specified\n        axis removed.   If `a` is a 0-d array, or if `axis` is None, a scalar\n        is returned.  If an output array is specified, a reference to\n        `out` is returned.\n\n    See Also\n    --------\n    ndarray.sum : Equivalent method.\n\n    cumsum : Cumulative sum of array elements.\n\n    trapz : Integration of array values using the composite trapezoidal rule.\n\n    mean, average\n\n    Notes\n    -----\n    Arithmetic is modular when using integer types, and no error is\n    raised on overflow.\n\n    The sum of an empty array is the neutral element 0:\n\n    >>> np.sum([])\n    0.0\n\n    Examples\n    --------\n    >>> np.sum([0.5, 1.5])\n    2.0\n    >>> np.sum([0.5, 0.7, 0.2, 1.5], dtype=np.int32)\n    1\n    >>> np.sum([[0, 1], [0, 5]])\n    6\n    >>> np.sum([[0, 1], [0, 5]], axis=0)\n    array([0, 6])\n    >>> np.sum([[0, 1], [0, 5]], axis=1)\n    array([1, 5])\n\n    If the accumulator is too small, overflow occurs:\n\n    >>> np.ones(128, dtype=np.int8).sum(dtype=np.int8)\n    -128\n\n    ","endLoc":1814,"header":"def sum(a, axis=None, dtype=None, out=None, keepdims=np._NoValue)","id":1363,"name":"sum","nodeType":"Function","startLoc":1710,"text":"def sum(a, axis=None, dtype=None, out=None, keepdims=np._NoValue):\n    \"\"\"\n    Sum of array elements over a given axis.\n\n    Parameters\n    ----------\n    a : array_like\n        Elements to sum.\n    axis : None or int or tuple of ints, optional\n        Axis or axes along which a sum is performed.  The default,\n        axis=None, will sum all of the elements of the input array.  If\n        axis is negative it counts from the last to the first axis.\n\n        .. versionadded:: 1.7.0\n\n        If axis is a tuple of ints, a sum is performed on all of the axes\n        specified in the tuple instead of a single axis or all the axes as\n        before.\n    dtype : dtype, optional\n        The type of the returned array and of the accumulator in which the\n        elements are summed.  The dtype of `a` is used by default unless `a`\n        has an integer dtype of less precision than the default platform\n        integer.  In that case, if `a` is signed then the platform integer\n        is used while if `a` is unsigned then an unsigned integer of the\n        same precision as the platform integer is used.\n    out : ndarray, optional\n        Alternative output array in which to place the result. It must have\n        the same shape as the expected output, but the type of the output\n        values will be cast if necessary.\n    keepdims : bool, optional\n        If this is set to True, the axes which are reduced are left\n        in the result as dimensions with size one. With this option,\n        the result will broadcast correctly against the input array.\n\n        If the default value is passed, then `keepdims` will not be\n        passed through to the `sum` method of sub-classes of\n        `ndarray`, however any non-default value will be.  If the\n        sub-classes `sum` method does not implement `keepdims` any\n        exceptions will be raised.\n\n    Returns\n    -------\n    sum_along_axis : ndarray\n        An array with the same shape as `a`, with the specified\n        axis removed.   If `a` is a 0-d array, or if `axis` is None, a scalar\n        is returned.  If an output array is specified, a reference to\n        `out` is returned.\n\n    See Also\n    --------\n    ndarray.sum : Equivalent method.\n\n    cumsum : Cumulative sum of array elements.\n\n    trapz : Integration of array values using the composite trapezoidal rule.\n\n    mean, average\n\n    Notes\n    -----\n    Arithmetic is modular when using integer types, and no error is\n    raised on overflow.\n\n    The sum of an empty array is the neutral element 0:\n\n    >>> np.sum([])\n    0.0\n\n    Examples\n    --------\n    >>> np.sum([0.5, 1.5])\n    2.0\n    >>> np.sum([0.5, 0.7, 0.2, 1.5], dtype=np.int32)\n    1\n    >>> np.sum([[0, 1], [0, 5]])\n    6\n    >>> np.sum([[0, 1], [0, 5]], axis=0)\n    array([0, 6])\n    >>> np.sum([[0, 1], [0, 5]], axis=1)\n    array([1, 5])\n\n    If the accumulator is too small, overflow occurs:\n\n    >>> np.ones(128, dtype=np.int8).sum(dtype=np.int8)\n    -128\n\n    \"\"\"\n    kwargs = {}\n    if keepdims is not np._NoValue:\n        kwargs['keepdims'] = keepdims\n    if isinstance(a, _gentype):\n        res = _sum_(a)\n        if out is not None:\n            out[...] = res\n            return out\n        return res\n    if type(a) is not mu.ndarray:\n        try:\n            sum = a.sum\n        except AttributeError:\n            pass\n        else:\n            return sum(axis=axis, dtype=dtype, out=out, **kwargs)\n    return _methods._sum(a, axis=axis, dtype=dtype,\n                         out=out, **kwargs)"},{"attributeType":"null","col":8,"comment":"null","endLoc":105,"id":1365,"name":"_tight_layout_rect","nodeType":"Attribute","startLoc":105,"text":"self._tight_layout_rect"},{"col":0,"comment":"\n    View inputs as arrays with at least two dimensions.\n\n    Parameters\n    ----------\n    arys1, arys2, ... : array_like\n        One or more array-like sequences.  Non-array inputs are converted\n        to arrays.  Arrays that already have two or more dimensions are\n        preserved.\n\n    Returns\n    -------\n    res, res2, ... : ndarray\n        An array, or list of arrays, each with ``a.ndim >= 2``.\n        Copies are avoided where possible, and views with two or more\n        dimensions are returned.\n\n    See Also\n    --------\n    atleast_1d, atleast_3d\n\n    Examples\n    --------\n    >>> np.atleast_2d(3.0)\n    array([[ 3.]])\n\n    >>> x = np.arange(3.0)\n    >>> np.atleast_2d(x)\n    array([[ 0.,  1.,  2.]])\n    >>> np.atleast_2d(x).base is x\n    True\n\n    >>> np.atleast_2d(1, [1, 2], [[1, 2]])\n    [array([[1]]), array([[1, 2]]), array([[1, 2]])]\n\n    ","endLoc":111,"header":"def atleast_2d(*arys)","id":1366,"name":"atleast_2d","nodeType":"Function","startLoc":61,"text":"def atleast_2d(*arys):\n    \"\"\"\n    View inputs as arrays with at least two dimensions.\n\n    Parameters\n    ----------\n    arys1, arys2, ... : array_like\n        One or more array-like sequences.  Non-array inputs are converted\n        to arrays.  Arrays that already have two or more dimensions are\n        preserved.\n\n    Returns\n    -------\n    res, res2, ... : ndarray\n        An array, or list of arrays, each with ``a.ndim >= 2``.\n        Copies are avoided where possible, and views with two or more\n        dimensions are returned.\n\n    See Also\n    --------\n    atleast_1d, atleast_3d\n\n    Examples\n    --------\n    >>> np.atleast_2d(3.0)\n    array([[ 3.]])\n\n    >>> x = np.arange(3.0)\n    >>> np.atleast_2d(x)\n    array([[ 0.,  1.,  2.]])\n    >>> np.atleast_2d(x).base is x\n    True\n\n    >>> np.atleast_2d(1, [1, 2], [[1, 2]])\n    [array([[1]]), array([[1, 2]]), array([[1, 2]])]\n\n    \"\"\"\n    res = []\n    for ary in arys:\n        ary = asanyarray(ary)\n        if len(ary.shape) == 0:\n            result = ary.reshape(1, 1)\n        elif len(ary.shape) == 1:\n            result = ary[newaxis,:]\n        else:\n            result = ary\n        res.append(result)\n    if len(res) == 1:\n        return res[0]\n    else:\n        return res"},{"attributeType":"list","col":4,"comment":"null","endLoc":185,"id":1367,"name":"contexts","nodeType":"Attribute","startLoc":185,"text":"contexts"},{"className":"TestPalette","col":0,"comment":"null","endLoc":270,"id":1368,"nodeType":"Class","startLoc":252,"text":"class TestPalette(RCParamFixtures):\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        )"},{"col":4,"comment":"null","endLoc":270,"header":"def test_set_palette(self)","id":1369,"name":"test_set_palette","nodeType":"Function","startLoc":254,"text":"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        )"},{"col":4,"comment":"Update subplot spec with default or specified axis sharing parameters.","endLoc":140,"header":"def _determine_axis_sharing(self, pair_spec: PairSpec) -> None","id":1371,"name":"_determine_axis_sharing","nodeType":"Function","startLoc":121,"text":"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"},{"attributeType":"null","col":8,"comment":"null","endLoc":106,"id":1373,"name":"_tight_layout_pad","nodeType":"Attribute","startLoc":106,"text":"self._tight_layout_pad"},{"className":"Alpha","col":0,"comment":"Opacity of the color values for an arbitrary mark.","endLoc":298,"id":1374,"nodeType":"Class","startLoc":295,"text":"class 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]"},{"attributeType":"null","col":8,"comment":"null","endLoc":110,"id":1375,"name":"_extract_legend_handles","nodeType":"Attribute","startLoc":110,"text":"self._extract_legend_handles"},{"className":"IntervalProperty","col":0,"comment":"A numeric property where scale range can be defined as an interval.","endLoc":256,"id":1376,"nodeType":"Class","startLoc":159,"text":"class 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)\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\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"},{"col":4,"comment":"Initialize matplotlib objects and add seaborn-relevant metadata.","endLoc":261,"header":"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","id":1377,"name":"init_figure","nodeType":"Function","startLoc":142,"text":"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        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"},{"col":4,"comment":"Min and max values used by default for semantic mapping.","endLoc":169,"header":"@property\n    def default_range(self) -> tuple[float, float]","id":1378,"name":"default_range","nodeType":"Function","startLoc":166,"text":"@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"},{"col":4,"comment":"Transform applied to native values before linear mapping into interval.","endLoc":173,"header":"def _forward(self, values: ArrayLike) -> ArrayLike","id":1379,"name":"_forward","nodeType":"Function","startLoc":171,"text":"def _forward(self, values: ArrayLike) -> ArrayLike:\n        \"\"\"Transform applied to native values before linear mapping into interval.\"\"\"\n        return values"},{"col":4,"comment":"Transform applied to results of mapping that returns to native values.","endLoc":177,"header":"def _inverse(self, values: ArrayLike) -> ArrayLike","id":1380,"name":"_inverse","nodeType":"Function","startLoc":175,"text":"def _inverse(self, values: ArrayLike) -> ArrayLike:\n        \"\"\"Transform applied to results of mapping that returns to native values.\"\"\"\n        return values"},{"col":4,"comment":"Given data and a scaling argument, initialize appropriate scale class.","endLoc":192,"header":"def infer_scale(self, arg: Any, data: Series) -> Scale","id":1381,"name":"infer_scale","nodeType":"Function","startLoc":179,"text":"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)"},{"attributeType":"null","col":12,"comment":"null","endLoc":204,"id":1382,"name":"_space_needed","nodeType":"Attribute","startLoc":204,"text":"self._space_needed"},{"col":0,"comment":"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    ","endLoc":667,"header":"def axis_ticklabels_overlap(labels)","id":1383,"name":"axis_ticklabels_overlap","nodeType":"Function","startLoc":646,"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"},{"col":4,"comment":"null","endLoc":281,"header":"@property\n    def epoch(self) -> int","id":1385,"name":"epoch","nodeType":"Function","startLoc":278,"text":"@property\n    def epoch(self) -> int:\n        _epoch: int = self._version.epoch\n        return _epoch"},{"col":4,"comment":"null","endLoc":286,"header":"@property\n    def release(self) -> Tuple[int, ...]","id":1386,"name":"release","nodeType":"Function","startLoc":283,"text":"@property\n    def release(self) -> Tuple[int, ...]:\n        _release: Tuple[int, ...] = self._version.release\n        return _release"},{"col":4,"comment":"null","endLoc":291,"header":"@property\n    def pre(self) -> Optional[Tuple[str, int]]","id":1387,"name":"pre","nodeType":"Function","startLoc":288,"text":"@property\n    def pre(self) -> Optional[Tuple[str, int]]:\n        _pre: Optional[Tuple[str, int]] = self._version.pre\n        return _pre"},{"col":4,"comment":"null","endLoc":295,"header":"@property\n    def post(self) -> Optional[int]","id":1388,"name":"post","nodeType":"Function","startLoc":293,"text":"@property\n    def post(self) -> Optional[int]:\n        return self._version.post[1] if self._version.post else None"},{"col":4,"comment":"null","endLoc":299,"header":"@property\n    def dev(self) -> Optional[int]","id":1389,"name":"dev","nodeType":"Function","startLoc":297,"text":"@property\n    def dev(self) -> Optional[int]:\n        return self._version.dev[1] if self._version.dev else None"},{"col":4,"comment":"null","endLoc":306,"header":"@property\n    def local(self) -> Optional[str]","id":1390,"name":"local","nodeType":"Function","startLoc":301,"text":"@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"},{"col":4,"comment":"Get a list of colors for the main component of the plots.","endLoc":712,"header":"def establish_colors(self, color, palette, saturation)","id":1393,"name":"establish_colors","nodeType":"Function","startLoc":655,"text":"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"},{"col":0,"comment":"null","endLoc":48,"header":"def huslp_to_rgb(h, s, l)","id":1394,"name":"huslp_to_rgb","nodeType":"Function","startLoc":47,"text":"def huslp_to_rgb(h, s, l):\n    return lch_to_rgb(*huslp_to_lch([h, s, l]))"},{"col":0,"comment":"null","endLoc":299,"header":"def huslp_to_lch(triple)","id":1396,"name":"huslp_to_lch","nodeType":"Function","startLoc":288,"text":"def 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]"},{"col":0,"comment":"null","endLoc":119,"header":"def max_chroma_pastel(L)","id":1397,"name":"max_chroma_pastel","nodeType":"Function","startLoc":117,"text":"def max_chroma_pastel(L):\n    H = math.degrees(_hrad_extremum(L))\n    return max_chroma(L, H)"},{"col":0,"comment":"null","endLoc":114,"header":"def _hrad_extremum(L)","id":1399,"name":"_hrad_extremum","nodeType":"Function","startLoc":94,"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"},{"className":"TestFonts","col":0,"comment":"null","endLoc":311,"id":1400,"nodeType":"Class","startLoc":273,"text":"class TestFonts(RCParamFixtures):\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()"},{"col":4,"comment":"Add params to kws if they are accepted by func.","endLoc":1768,"header":"def _inject_kwargs(self, func, kws, params)","id":1401,"name":"_inject_kwargs","nodeType":"Function","startLoc":1763,"text":"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)"},{"col":0,"comment":"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    ","endLoc":736,"header":"def relative_luminance(color)","id":1402,"name":"relative_luminance","nodeType":"Function","startLoc":717,"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"},{"col":4,"comment":"null","endLoc":287,"header":"@pytest.mark.skipif(_no_verdana, reason=\"Verdana font is not present\")\n    def test_set_font(self)","id":1403,"name":"test_set_font","nodeType":"Function","startLoc":277,"text":"@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()"},{"attributeType":"null","col":4,"comment":"null","endLoc":155,"id":1404,"name":"body","nodeType":"Attribute","startLoc":155,"text":"body"},{"col":4,"comment":"null","endLoc":310,"header":"@property\n    def public(self) -> str","id":1405,"name":"public","nodeType":"Function","startLoc":308,"text":"@property\n    def public(self) -> str:\n        return str(self).split(\"+\", 1)[0]"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":154,"id":1406,"name":"color","nodeType":"Attribute","startLoc":154,"text":"color"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":155,"id":1407,"name":"alpha","nodeType":"Attribute","startLoc":155,"text":"alpha"},{"col":0,"comment":"null","endLoc":134,"header":"def test_apply_replace_columns(df)","id":1409,"name":"test_apply_replace_columns","nodeType":"Function","startLoc":121,"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])"},{"col":4,"comment":"null","endLoc":298,"header":"def test_set_serif_font(self)","id":1410,"name":"test_set_serif_font","nodeType":"Function","startLoc":289,"text":"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()"},{"attributeType":"bool | Mappable","col":4,"comment":"null","endLoc":156,"id":1411,"name":"fill","nodeType":"Attribute","startLoc":156,"text":"fill"},{"attributeType":"null","col":10,"comment":"null","endLoc":155,"id":1412,"name":"resources","nodeType":"Attribute","startLoc":155,"text":"resources"},{"attributeType":"{metadata, cells}","col":4,"comment":"null","endLoc":158,"id":1413,"name":"nb","nodeType":"Attribute","startLoc":158,"text":"nb"},{"col":0,"comment":"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    ","endLoc":765,"header":"def to_utf8(obj)","id":1414,"name":"to_utf8","nodeType":"Function","startLoc":739,"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)"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":157,"id":1415,"name":"edgecolor","nodeType":"Attribute","startLoc":157,"text":"edgecolor"},{"col":0,"comment":"null","endLoc":102,"header":"def dedent(text: str) -> str","id":1416,"name":"dedent","nodeType":"Function","startLoc":102,"text":"def dedent(text: str) -> str: ..."},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":158,"id":1417,"name":"edgealpha","nodeType":"Attribute","startLoc":158,"text":"edgealpha"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":159,"id":1418,"name":"edgewidth","nodeType":"Attribute","startLoc":159,"text":"edgewidth"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":160,"id":1420,"name":"edgestyle","nodeType":"Attribute","startLoc":160,"text":"edgestyle"},{"attributeType":"TextIO","col":30,"comment":"null","endLoc":159,"id":1421,"name":"f","nodeType":"Attribute","startLoc":159,"text":"f"},{"col":4,"comment":"null","endLoc":311,"header":"@pytest.mark.skipif(_no_verdana, reason=\"Verdana font is not present\")\n    def test_different_sans_serif(self)","id":1422,"name":"test_different_sans_serif","nodeType":"Function","startLoc":300,"text":"@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()"},{"attributeType":"null","col":16,"comment":"null","endLoc":5,"id":1423,"name":"np","nodeType":"Attribute","startLoc":5,"text":"np"},{"attributeType":"null","col":21,"comment":"null","endLoc":6,"id":1424,"name":"mpl","nodeType":"Attribute","startLoc":6,"text":"mpl"},{"col":4,"comment":"null","endLoc":199,"header":"def _normalize(self, data)","id":1427,"name":"_normalize","nodeType":"Function","startLoc":183,"text":"def _normalize(self, data):\n\n        hist = data[\"count\"]\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(**{self.stat: hist})"},{"col":0,"comment":"null","endLoc":52,"header":"def huslp_to_hex(h, s, l)","id":1428,"name":"huslp_to_hex","nodeType":"Function","startLoc":51,"text":"def huslp_to_hex(h, s, l):\n    return rgb_to_hex(huslp_to_rgb(h, s, l))"},{"attributeType":"bool","col":4,"comment":"null","endLoc":275,"id":1429,"name":"_no_verdana","nodeType":"Attribute","startLoc":275,"text":"_no_verdana"},{"col":0,"comment":"null","endLoc":56,"header":"def rgb_to_huslp(r, g, b)","id":1430,"name":"rgb_to_huslp","nodeType":"Function","startLoc":55,"text":"def rgb_to_huslp(r, g, b):\n    return lch_to_huslp(rgb_to_lch(r, g, b))"},{"col":4,"comment":"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        ","endLoc":1891,"header":"def plot_marginals(self, func, **kwargs)","id":1431,"name":"plot_marginals","nodeType":"Function","startLoc":1832,"text":"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"},{"col":4,"comment":"null","endLoc":323,"header":"@property\n    def base_version(self) -> str","id":1432,"name":"base_version","nodeType":"Function","startLoc":312,"text":"@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)"},{"col":0,"comment":"","endLoc":5,"header":"cache_datasets.py#","id":1433,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nCache test datasets before running tests / building docs.\n\nAvoids race conditions that would arise from parallelization.\n\"\"\"\n\npath = pathlib.Path(\".\")\n\npy_files = path.rglob(\"*.py\")\n\nipynb_files = path.rglob(\"*.ipynb\")\n\ndatasets = []\n\nfor fname in py_files:\n    with open(fname) as fid:\n        datasets += re.findall(r\"load_dataset\\(['\\\"](\\w+)['\\\"]\", fid.read())\n\nfor p in ipynb_files:\n    with p.open() as fid:\n        datasets += re.findall(r\"load_dataset\\(\\\\['\\\"](\\w+)\\\\['\\\"]\", fid.read())\n\nfor name in sorted(set(datasets)):\n    print(f\"Caching {name}\")\n    load_dataset(name)"},{"col":4,"comment":"null","endLoc":96,"header":"def __new__(cls, *args: StrPath, **kwargs: Any) -> Self","id":1434,"name":"__new__","nodeType":"Function","startLoc":96,"text":"def __new__(cls, *args: StrPath, **kwargs: Any) -> Self: ..."},{"col":0,"comment":"null","endLoc":313,"header":"def lch_to_huslp(triple)","id":1435,"name":"lch_to_huslp","nodeType":"Function","startLoc":302,"text":"def 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]"},{"col":4,"comment":"null","endLoc":232,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":1436,"name":"__call__","nodeType":"Function","startLoc":201,"text":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n\n        scale_type = scales[orient].__class__.__name__.lower()\n        grouping_vars = [str(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                self._check_grouping_vars(\"common_bins\", grouping_vars)\n\n            data = bin_groupby.apply(\n                data, self._get_bins_and_eval, orient, groupby, scale_type,\n            )\n\n        if not grouping_vars or self.common_norm is True:\n            data = self._normalize(data)\n        else:\n            if self.common_norm is False:\n                norm_groupby = GroupBy(grouping_vars)\n            else:\n                norm_groupby = GroupBy(self.common_norm)\n                self._check_grouping_vars(\"common_norm\", grouping_vars)\n            data = norm_groupby.apply(data, self._normalize)\n\n        other = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        return data.assign(**{other: data[self.stat]})"},{"col":0,"comment":"null","endLoc":60,"header":"def hex_to_huslp(hex)","id":1438,"name":"hex_to_huslp","nodeType":"Function","startLoc":59,"text":"def hex_to_huslp(hex):\n    return rgb_to_huslp(*hex_to_rgb(hex))"},{"col":0,"comment":"null","endLoc":144,"header":"def from_linear(c)","id":1439,"name":"from_linear","nodeType":"Function","startLoc":140,"text":"def 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)"},{"col":0,"comment":"null","endLoc":153,"header":"def to_linear(c)","id":1440,"name":"to_linear","nodeType":"Function","startLoc":147,"text":"def 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)"},{"attributeType":"str","col":0,"comment":"null","endLoc":4,"id":1441,"name":"__version__","nodeType":"Attribute","startLoc":4,"text":"__version__"},{"attributeType":"list","col":0,"comment":"null","endLoc":7,"id":1442,"name":"m","nodeType":"Attribute","startLoc":7,"text":"m"},{"attributeType":"list","col":0,"comment":"null","endLoc":13,"id":1443,"name":"m_inv","nodeType":"Attribute","startLoc":13,"text":"m_inv"},{"attributeType":"float","col":0,"comment":"null","endLoc":20,"id":1444,"name":"refX","nodeType":"Attribute","startLoc":20,"text":"refX"},{"attributeType":"float","col":0,"comment":"null","endLoc":21,"id":1445,"name":"refY","nodeType":"Attribute","startLoc":21,"text":"refY"},{"attributeType":"float","col":0,"comment":"null","endLoc":22,"id":1446,"name":"refZ","nodeType":"Attribute","startLoc":22,"text":"refZ"},{"col":4,"comment":"null","endLoc":117,"header":"def _handle_capstyle(self, kws, vals)","id":1447,"name":"_handle_capstyle","nodeType":"Function","startLoc":111,"text":"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"},{"attributeType":"float","col":0,"comment":"null","endLoc":23,"id":1448,"name":"refU","nodeType":"Attribute","startLoc":23,"text":"refU"},{"attributeType":"float","col":0,"comment":"null","endLoc":24,"id":1449,"name":"refV","nodeType":"Attribute","startLoc":24,"text":"refV"},{"attributeType":"float","col":0,"comment":"null","endLoc":25,"id":1450,"name":"lab_e","nodeType":"Attribute","startLoc":25,"text":"lab_e"},{"attributeType":"float","col":0,"comment":"null","endLoc":26,"id":1451,"name":"lab_k","nodeType":"Attribute","startLoc":26,"text":"lab_k"},{"col":0,"comment":"","endLoc":1,"header":"husl.py#","id":1452,"name":"","nodeType":"Function","startLoc":1,"text":"__version__ = \"2.1.0\"\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\nrefX = 0.95047\n\nrefY = 1.00000\n\nrefZ = 1.08883\n\nrefU = 0.19784\n\nrefV = 0.46834\n\nlab_e = 0.008856\n\nlab_k = 903.3"},{"attributeType":"null","col":16,"comment":"null","endLoc":2,"id":1453,"name":"np","nodeType":"Attribute","startLoc":2,"text":"np"},{"attributeType":"null","col":17,"comment":"null","endLoc":3,"id":1454,"name":"pd","nodeType":"Attribute","startLoc":3,"text":"pd"},{"col":4,"comment":"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        ","endLoc":336,"header":"def set_bandwidth(self, bw_method=None)","id":1455,"name":"set_bandwidth","nodeType":"Function","startLoc":298,"text":"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()"},{"col":4,"comment":"null","endLoc":113,"header":"def __init__(\n        self,\n        data=None,\n        variables={},\n    )","id":1456,"name":"__init__","nodeType":"Function","startLoc":107,"text":"def __init__(\n        self,\n        data=None,\n        variables={},\n    ):\n\n        super().__init__(data=data, variables=variables)"},{"col":0,"comment":"Helper to verify if Verdana font is present","endLoc":30,"header":"def has_verdana()","id":1457,"name":"has_verdana","nodeType":"Function","startLoc":10,"text":"def 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"},{"attributeType":"null","col":16,"comment":"null","endLoc":2,"id":1458,"name":"np","nodeType":"Attribute","startLoc":2,"text":"np"},{"attributeType":"null","col":21,"comment":"null","endLoc":3,"id":1459,"name":"mpl","nodeType":"Attribute","startLoc":3,"text":"mpl"},{"attributeType":"null","col":28,"comment":"null","endLoc":4,"id":1460,"name":"plt","nodeType":"Attribute","startLoc":4,"text":"plt"},{"attributeType":"null","col":24,"comment":"null","endLoc":5,"id":1461,"name":"npt","nodeType":"Attribute","startLoc":5,"text":"npt"},{"id":1462,"name":"barplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"6a6d582b-08c2-4fed-be56-afa1b986943a\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme(style=\\\"whitegrid\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"a7ef20b6-3bd8-4992-a270-4c3ecc86a0fa\",\n   \"metadata\": {},\n   \"source\": [\n    \"Group by a categorical varaible and plot aggregated values, with confidence intervals:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"0f5c3ece-6295-4933-8a87-e80cd604c089\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"df = sns.load_dataset(\\\"penguins\\\")\\n\",\n    \"sns.barplot(data=df, x=\\\"island\\\", y=\\\"body_mass_g\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"38f7c39e-485d-4b50-ac21-f1b402f26aa4\",\n   \"metadata\": {},\n   \"source\": [\n    \"Add a second layer of grouping:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"ac1a28d1-b3bd-4158-86d0-3defc12f8566\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.barplot(data=df, x=\\\"island\\\", y=\\\"body_mass_g\\\", hue=\\\"sex\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"7f8fa070-a8f4-41fb-be74-c489acbdbcbe\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use the error bars to show the standard deviation rather than a confidence interval:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"10445b78-a74a-4f14-a28b-a9164e592ae4\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.barplot(data=df, x=\\\"island\\\", y=\\\"body_mass_g\\\", errorbar=\\\"sd\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"7f579f70-39a2-4d0c-baa2-9adae11ce2ce\",\n   \"metadata\": {},\n   \"source\": [\n    \"Customize the appearance of the plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d6f9ac1c-a77d-4ee3-bc5e-fec2071b33df\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.barplot(\\n\",\n    \"    data=df, x=\\\"body_mass_g\\\", y=\\\"island\\\",\\n\",\n    \"    errorbar=(\\\"pi\\\", 50), capsize=.4, errcolor=\\\".5\\\",\\n\",\n    \"    linewidth=3, edgecolor=\\\".5\\\", facecolor=(0, 0, 0, 0),\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"faedd6f9-a123-4927-9eff-a2046edf5c72\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"col":4,"comment":"null","endLoc":109,"header":"def _legend_artist(self, variables, value, scales)","id":1463,"name":"_legend_artist","nodeType":"Function","startLoc":83,"text":"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        )"},{"col":8,"comment":"null","endLoc":111,"header":"def rglob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self, None, None]","id":1464,"name":"rglob","nodeType":"Function","startLoc":111,"text":"def rglob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self, None, None]: ..."},{"col":8,"comment":"null","endLoc":115,"header":"def rglob(self, pattern: str) -> Generator[Self, None, None]","id":1465,"name":"rglob","nodeType":"Function","startLoc":115,"text":"def rglob(self, pattern: str) -> Generator[Self, None, None]: ..."},{"id":1466,"name":"lineplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import numpy as np\\n\",\n    \"import pandas as pd\\n\",\n    \"import seaborn as sns\\n\",\n    \"import matplotlib as mpl\\n\",\n    \"import matplotlib.pyplot as plt\\n\",\n    \"sns.set_theme()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The ``flights`` dataset has 10 years of monthly airline passenger data:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"flights = sns.load_dataset(\\\"flights\\\")\\n\",\n    \"flights.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"To draw a line plot using long-form data, assign the ``x`` and ``y`` variables:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"may_flights = flights.query(\\\"month == 'May'\\\")\\n\",\n    \"sns.lineplot(data=may_flights, x=\\\"year\\\", y=\\\"passengers\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Pivot the dataframe to a wide-form representation:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"flights_wide = flights.pivot(\\\"year\\\", \\\"month\\\", \\\"passengers\\\")\\n\",\n    \"flights_wide.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"To plot a single vector, pass it to ``data``. If the vector is a :class:`pandas.Series`, it will be plotted against its index:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(data=flights_wide[\\\"May\\\"])\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Passing the entire wide-form dataset to ``data`` plots a separate line for each column:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(data=flights_wide)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Passing the entire dataset in long-form mode will aggregate over repeated values (each year) to show the mean and 95% confidence interval:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(data=flights, x=\\\"year\\\", y=\\\"passengers\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assign a grouping semantic (``hue``, ``size``, or ``style``) to plot separate lines\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(data=flights, x=\\\"year\\\", y=\\\"passengers\\\", hue=\\\"month\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The same column can be assigned to multiple semantic variables, which can increase the accessibility of the plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(data=flights, x=\\\"year\\\", y=\\\"passengers\\\", hue=\\\"month\\\", style=\\\"month\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use the `orient` parameter to aggregate and sort along the vertical dimension of the plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(data=flights, x=\\\"passengers\\\", y=\\\"year\\\", orient=\\\"y\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Each semantic variable can also represent a different column. For that, we'll need a more complex dataset:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"fmri = sns.load_dataset(\\\"fmri\\\")\\n\",\n    \"fmri.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Repeated observations are aggregated even when semantic grouping is used:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(data=fmri, x=\\\"timepoint\\\", y=\\\"signal\\\", hue=\\\"event\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assign both ``hue`` and ``style`` to represent two different grouping variables:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(data=fmri, x=\\\"timepoint\\\", y=\\\"signal\\\", hue=\\\"region\\\", style=\\\"event\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"When assigning a ``style`` variable, markers can be used instead of (or along with) dashes to distinguish the groups:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(\\n\",\n    \"    data=fmri,\\n\",\n    \"    x=\\\"timepoint\\\", y=\\\"signal\\\", hue=\\\"event\\\", style=\\\"event\\\",\\n\",\n    \"    markers=True, dashes=False\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Show error bars instead of error bands and extend them to two standard error widths:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(\\n\",\n    \"    data=fmri, x=\\\"timepoint\\\", y=\\\"signal\\\", hue=\\\"event\\\", err_style=\\\"bars\\\", errorbar=(\\\"se\\\", 2),\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assigning the ``units`` variable will plot multiple lines without applying a semantic mapping:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(\\n\",\n    \"    data=fmri.query(\\\"region == 'frontal'\\\"),\\n\",\n    \"    x=\\\"timepoint\\\", y=\\\"signal\\\", hue=\\\"event\\\", units=\\\"subject\\\",\\n\",\n    \"    estimator=None, lw=1,\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Load another dataset with a numeric grouping variable:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"dots = sns.load_dataset(\\\"dots\\\").query(\\\"align == 'dots'\\\")\\n\",\n    \"dots.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assigning a numeric variable to ``hue`` maps it differently, using a different default palette and a quantitative color mapping:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(\\n\",\n    \"    data=dots, x=\\\"time\\\", y=\\\"firing_rate\\\", hue=\\\"coherence\\\", style=\\\"choice\\\",\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Control the color mapping by setting the ``palette`` and passing a :class:`matplotlib.colors.Normalize` object:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(\\n\",\n    \"    data=dots.query(\\\"coherence > 0\\\"),\\n\",\n    \"    x=\\\"time\\\", y=\\\"firing_rate\\\", hue=\\\"coherence\\\", style=\\\"choice\\\",\\n\",\n    \"     palette=\\\"flare\\\", hue_norm=mpl.colors.LogNorm(),\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Or pass specific colors, either as a Python list or dictionary:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"palette = sns.color_palette(\\\"mako_r\\\", 6)\\n\",\n    \"sns.lineplot(\\n\",\n    \"    data=dots, x=\\\"time\\\", y=\\\"firing_rate\\\",\\n\",\n    \"    hue=\\\"coherence\\\", style=\\\"choice\\\",\\n\",\n    \"    palette=palette\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assign the ``size`` semantic to map the width of the lines with a numeric variable:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(\\n\",\n    \"    data=dots, x=\\\"time\\\", y=\\\"firing_rate\\\",\\n\",\n    \"    size=\\\"coherence\\\", hue=\\\"choice\\\",\\n\",\n    \"    legend=\\\"full\\\"\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Pass a a tuple, ``sizes=(smallest, largest)``, to control the range of linewidths used to map the ``size`` semantic:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lineplot(\\n\",\n    \"    data=dots, x=\\\"time\\\", y=\\\"firing_rate\\\",\\n\",\n    \"    size=\\\"coherence\\\", hue=\\\"choice\\\",\\n\",\n    \"    sizes=(.25, 2.5)\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"By default, the observations are sorted by ``x``. Disable this to plot a line with the order that observations appear in the dataset:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"x, y = np.random.normal(size=(2, 5000)).cumsum(axis=1)\\n\",\n    \"sns.lineplot(x=x, y=y, sort=False, lw=1)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use :func:`relplot` to combine :func:`lineplot` and :class:`FacetGrid`. This allows grouping within additional categorical variables. Using :func:`relplot` is safer than using :class:`FacetGrid` directly, as it ensures synchronization of the semantic mappings across facets:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.relplot(\\n\",\n    \"    data=fmri, x=\\\"timepoint\\\", y=\\\"signal\\\",\\n\",\n    \"    col=\\\"region\\\", hue=\\\"event\\\", style=\\\"event\\\",\\n\",\n    \"    kind=\\\"line\\\"\\n\",\n    \")\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"interpreter\": {\n   \"hash\": \"8bdfc9d9da1e36addfcfc8a3409187c45d33387af0f87d0d91e99e8d6403f1c3\"\n  },\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"col":4,"comment":"null","endLoc":142,"header":"@overload\n    def open(\n        self,\n        mode: OpenTextMode = \"r\",\n        buffering: int = -1,\n        encoding: str | None = None,\n        errors: str | None = None,\n        newline: str | None = None,\n    ) -> TextIOWrapper","id":1467,"name":"open","nodeType":"Function","startLoc":134,"text":"@overload\n    def open(\n        self,\n        mode: OpenTextMode = \"r\",\n        buffering: int = -1,\n        encoding: str | None = None,\n        errors: str | None = None,\n        newline: str | None = None,\n    ) -> TextIOWrapper: ..."},{"col":4,"comment":"null","endLoc":147,"header":"@overload\n    def open(\n        self, mode: OpenBinaryMode, buffering: Literal[0], encoding: None = None, errors: None = None, newline: None = None\n    ) -> FileIO","id":1468,"name":"open","nodeType":"Function","startLoc":144,"text":"@overload\n    def open(\n        self, mode: OpenBinaryMode, buffering: Literal[0], encoding: None = None, errors: None = None, newline: None = None\n    ) -> FileIO: ..."},{"col":4,"comment":"null","endLoc":157,"header":"@overload\n    def open(\n        self,\n        mode: OpenBinaryModeUpdating,\n        buffering: Literal[-1, 1] = -1,\n        encoding: None = None,\n        errors: None = None,\n        newline: None = None,\n    ) -> BufferedRandom","id":1469,"name":"open","nodeType":"Function","startLoc":149,"text":"@overload\n    def open(\n        self,\n        mode: OpenBinaryModeUpdating,\n        buffering: Literal[-1, 1] = -1,\n        encoding: None = None,\n        errors: None = None,\n        newline: None = None,\n    ) -> BufferedRandom: ..."},{"col":4,"comment":"null","endLoc":166,"header":"@overload\n    def open(\n        self,\n        mode: OpenBinaryModeWriting,\n        buffering: Literal[-1, 1] = -1,\n        encoding: None = None,\n        errors: None = None,\n        newline: None = None,\n    ) -> BufferedWriter","id":1470,"name":"open","nodeType":"Function","startLoc":158,"text":"@overload\n    def open(\n        self,\n        mode: OpenBinaryModeWriting,\n        buffering: Literal[-1, 1] = -1,\n        encoding: None = None,\n        errors: None = None,\n        newline: None = None,\n    ) -> BufferedWriter: ..."},{"col":4,"comment":"null","endLoc":175,"header":"@overload\n    def open(\n        self,\n        mode: OpenBinaryModeReading,\n        buffering: Literal[-1, 1] = -1,\n        encoding: None = None,\n        errors: None = None,\n        newline: None = None,\n    ) -> BufferedReader","id":1471,"name":"open","nodeType":"Function","startLoc":167,"text":"@overload\n    def open(\n        self,\n        mode: OpenBinaryModeReading,\n        buffering: Literal[-1, 1] = -1,\n        encoding: None = None,\n        errors: None = None,\n        newline: None = None,\n    ) -> BufferedReader: ..."},{"col":4,"comment":"null","endLoc":180,"header":"@overload\n    def open(\n        self, mode: OpenBinaryMode, buffering: int = -1, encoding: None = None, errors: None = None, newline: None = None\n    ) -> BinaryIO","id":1472,"name":"open","nodeType":"Function","startLoc":177,"text":"@overload\n    def open(\n        self, mode: OpenBinaryMode, buffering: int = -1, encoding: None = None, errors: None = None, newline: None = None\n    ) -> BinaryIO: ..."},{"col":4,"comment":"null","endLoc":185,"header":"@overload\n    def open(\n        self, mode: str, buffering: int = -1, encoding: str | None = None, errors: str | None = None, newline: str | None = None\n    ) -> IO[Any]","id":1473,"name":"open","nodeType":"Function","startLoc":182,"text":"@overload\n    def open(\n        self, mode: str, buffering: int = -1, encoding: str | None = None, errors: str | None = None, newline: str | None = None\n    ) -> IO[Any]: ..."},{"id":1474,"name":"objects.Bar.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2923956c-f141-4ecb-ab08-e819099f0fa9\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"penguins = load_dataset(\\\"penguins\\\")\\n\",\n    \"flights = load_dataset(\\\"flights\\\").query(\\\"year == 1960\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"4e817cdd-09a3-4cf6-8602-e9665607bfe1\",\n   \"metadata\": {},\n   \"source\": [\n    \"The mark draws discrete bars from a baseline to provided values:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"5a4e5ba1-50ce-4060-8eb7-f17fee9080c0\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"so.Plot(flights[\\\"month\\\"], flights[\\\"passengers\\\"]).add(so.Bar())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"252cf7b2-7fc8-4085-8174-0126743d8a08\",\n   \"metadata\": {},\n   \"source\": [\n    \"The bars are oriented depending on the x/y variable types and the `orient` parameter:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"81dbbc81-178a-46dd-9acf-2c57d2a7e315\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"so.Plot(flights[\\\"passengers\\\"], flights[\\\"month\\\"]).add(so.Bar())\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"6fddeceb-25b9-4fc1-bae0-4cc4cb612674\",\n   \"metadata\": {},\n   \"source\": [\n    \"A common usecase will be drawing histograms on a variable with a nominal scale:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"08604543-c681-4cd3-943e-b57c0f863b2e\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"so.Plot(penguins, x=\\\"species\\\").add(so.Bar(), so.Hist())\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"8b9af978-fdb0-46aa-9cf9-d3e49e38b344\",\n   \"metadata\": {},\n   \"source\": [\n    \"When mapping additional variables, the bars will overlap by default:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"297f7fef-7c31-40dd-ac68-e0ce7f131528\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"so.Plot(penguins, x=\\\"species\\\", color=\\\"sex\\\").add(so.Bar(), so.Hist())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"cd9b7b4a-3150-42b5-b1a8-1c5950ca8703\",\n   \"metadata\": {},\n   \"source\": [\n    \"Apply a move transform, such as a :class:`Dodge` or :class:`Stack` to resolve them:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a13c7594-737c-4215-b2a2-e59fc2d033c3\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"so.Plot(penguins, x=\\\"species\\\", color=\\\"sex\\\").add(so.Bar(), so.Hist(), so.Dodge())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"f5f44a6b-610a-4523-a7c2-39c804a60520\",\n   \"metadata\": {},\n   \"source\": [\n    \"A number of properties can be mapped or set:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e5cbf5a9-effb-4550-bdaf-c266dc69d3f0\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(\\n\",\n    \"        penguins, x=\\\"species\\\",\\n\",\n    \"        color=\\\"sex\\\", alpha=\\\"sex\\\", edgestyle=\\\"sex\\\",\\n\",\n    \"    )\\n\",\n    \"    .add(so.Bar(edgewidth=2), so.Hist(), so.Dodge(\\\"fill\\\"))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"539144d9-75bc-4eb0-8fed-ca57b516b6d3\",\n   \"metadata\": {},\n   \"source\": [\n    \"Combine with :class:`Range` to plot an estimate with errorbars:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"89233c4a-38e7-4807-b3b4-3b4540ffcf56\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, \\\"body_mass_g\\\", \\\"species\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Bar(alpha=.5), so.Agg(), so.Dodge())\\n\",\n    \"    .add(so.Range(), so.Est(errorbar=\\\"sd\\\"), so.Dodge())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4f6a97a0-2d92-4fd5-ad98-b4299bda1b6b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"attributeType":"str","col":4,"comment":"null","endLoc":163,"id":1475,"name":"rst_path","nodeType":"Attribute","startLoc":163,"text":"rst_path"},{"col":37,"endLoc":327,"id":1477,"nodeType":"Lambda","startLoc":327,"text":"lambda: bw_method"},{"col":0,"comment":"Resample units instead of datapoints.","endLoc":118,"header":"def _structured_bootstrap(args, n_boot, units, func, func_kwargs, integers)","id":1478,"name":"_structured_bootstrap","nodeType":"Function","startLoc":102,"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)"},{"col":4,"comment":"null","endLoc":327,"header":"@property\n    def is_prerelease(self) -> bool","id":1479,"name":"is_prerelease","nodeType":"Function","startLoc":325,"text":"@property\n    def is_prerelease(self) -> bool:\n        return self.dev is not None or self.pre is not None"},{"col":4,"comment":"null","endLoc":331,"header":"@property\n    def is_postrelease(self) -> bool","id":1480,"name":"is_postrelease","nodeType":"Function","startLoc":329,"text":"@property\n    def is_postrelease(self) -> bool:\n        return self.post is not None"},{"col":4,"comment":"null","endLoc":335,"header":"@property\n    def is_devrelease(self) -> bool","id":1481,"name":"is_devrelease","nodeType":"Function","startLoc":333,"text":"@property\n    def is_devrelease(self) -> bool:\n        return self.dev is not None"},{"col":4,"comment":"null","endLoc":339,"header":"@property\n    def major(self) -> int","id":1482,"name":"major","nodeType":"Function","startLoc":337,"text":"@property\n    def major(self) -> int:\n        return self.release[0] if len(self.release) >= 1 else 0"},{"fileName":"structured_heatmap.py","filePath":"examples","id":1483,"nodeType":"File","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()\n"},{"attributeType":"null","col":17,"comment":"null","endLoc":7,"id":1484,"name":"pd","nodeType":"Attribute","startLoc":7,"text":"pd"},{"col":4,"comment":"null","endLoc":343,"header":"@property\n    def minor(self) -> int","id":1485,"name":"minor","nodeType":"Function","startLoc":341,"text":"@property\n    def minor(self) -> int:\n        return self.release[1] if len(self.release) >= 2 else 0"},{"col":4,"comment":"null","endLoc":347,"header":"@property\n    def micro(self) -> int","id":1486,"name":"micro","nodeType":"Function","startLoc":345,"text":"@property\n    def micro(self) -> int:\n        return self.release[2] if len(self.release) >= 3 else 0"},{"attributeType":"null","col":4,"comment":"null","endLoc":216,"id":1487,"name":"_regex","nodeType":"Attribute","startLoc":216,"text":"_regex"},{"attributeType":"(int, (int, ...), InfinityType | NegativeInfinityType | (str, int), InfinityType | NegativeInfinityType | (str, int), InfinityType | NegativeInfinityType | (str, int), NegativeInfinityType | (InfinityType | NegativeInfinityType | int | str | (InfinityType | NegativeInfinityType | int | str, str) | (NegativeInfinityType, InfinityType | NegativeInfinityType | int | str), ...)) | (int, (str, ...))","col":8,"comment":"null","endLoc":238,"id":1488,"name":"_key","nodeType":"Attribute","startLoc":238,"text":"self._key"},{"attributeType":"null","col":18,"comment":"null","endLoc":8,"id":1490,"name":"sns","nodeType":"Attribute","startLoc":8,"text":"sns"},{"attributeType":"null","col":0,"comment":"null","endLoc":12,"id":1491,"name":"df","nodeType":"Attribute","startLoc":12,"text":"df"},{"attributeType":"list","col":0,"comment":"null","endLoc":15,"id":1494,"name":"used_networks","nodeType":"Attribute","startLoc":15,"text":"used_networks"},{"fileName":"miscplot.py","filePath":"seaborn","id":1495,"nodeType":"File","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())\n\n\ndef 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()\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":16,"id":1496,"name":"used_columns","nodeType":"Attribute","startLoc":16,"text":"used_columns"},{"fileName":"test_text.py","filePath":"tests/_marks","id":1497,"nodeType":"File","text":"\nimport numpy as np\nfrom matplotlib.colors import to_rgba\nfrom matplotlib.text import Text as MPLText\n\nfrom numpy.testing import assert_array_almost_equal\n\nfrom seaborn._core.plot import Plot\nfrom seaborn._marks.text import Text\n\n\nclass TestText:\n\n    def get_texts(self, ax):\n        if ax.texts:\n            return list(ax.texts)\n        else:\n            # Compatibility with matplotlib < 3.5 (I think)\n            return [a for a in ax.artists if isinstance(a, MPLText)]\n\n    def test_simple(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n\n        p = Plot(x, y, text=s).add(Text()).plot()\n        ax = p._figure.axes[0]\n        for i, text in enumerate(self.get_texts(ax)):\n            x_, y_ = text.get_position()\n            assert x_ == x[i]\n            assert y_ == y[i]\n            assert text.get_text() == s[i]\n            assert text.get_horizontalalignment() == \"center\"\n            assert text.get_verticalalignment() == \"center_baseline\"\n\n    def test_set_properties(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        color = \"red\"\n        alpha = .6\n        fontsize = 6\n        valign = \"bottom\"\n\n        m = Text(color=color, alpha=alpha, fontsize=fontsize, valign=valign)\n        p = Plot(x, y, text=s).add(m).plot()\n        ax = p._figure.axes[0]\n        for i, text in enumerate(self.get_texts(ax)):\n            assert text.get_text() == s[i]\n            assert text.get_color() == to_rgba(m.color, m.alpha)\n            assert text.get_fontsize() == m.fontsize\n            assert text.get_verticalalignment() == m.valign\n\n    def test_mapped_properties(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        color = list(\"aab\")\n        fontsize = [1, 2, 4]\n\n        p = Plot(x, y, color=color, fontsize=fontsize, text=s).add(Text()).plot()\n        ax = p._figure.axes[0]\n        texts = self.get_texts(ax)\n        assert texts[0].get_color() == texts[1].get_color()\n        assert texts[0].get_color() != texts[2].get_color()\n        assert (\n            texts[0].get_fontsize()\n            < texts[1].get_fontsize()\n            < texts[2].get_fontsize()\n        )\n\n    def test_mapped_alignment(self):\n\n        x = [1, 2]\n        p = Plot(x=x, y=x, halign=x, valign=x, text=x).add(Text()).plot()\n        ax = p._figure.axes[0]\n        t1, t2 = self.get_texts(ax)\n        assert t1.get_horizontalalignment() == \"left\"\n        assert t2.get_horizontalalignment() == \"right\"\n        assert t1.get_verticalalignment() == \"top\"\n        assert t2.get_verticalalignment() == \"bottom\"\n\n    def test_identity_fontsize(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        fs = [5, 8, 12]\n        p = Plot(x, y, text=s, fontsize=fs).add(Text()).scale(fontsize=None).plot()\n        ax = p._figure.axes[0]\n        for i, text in enumerate(self.get_texts(ax)):\n            assert text.get_fontsize() == fs[i]\n\n    def test_offset_centered(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        p = Plot(x, y, text=s).add(Text()).plot()\n        ax = p._figure.axes[0]\n        ax_trans = ax.transData.get_matrix()\n        for text in self.get_texts(ax):\n            assert_array_almost_equal(text.get_transform().get_matrix(), ax_trans)\n\n    def test_offset_valign(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        m = Text(valign=\"bottom\", fontsize=5, offset=.1)\n        p = Plot(x, y, text=s).add(m).plot()\n        ax = p._figure.axes[0]\n        expected_shift_matrix = np.zeros((3, 3))\n        expected_shift_matrix[1, -1] = m.offset * ax.figure.dpi / 72\n        ax_trans = ax.transData.get_matrix()\n        for text in self.get_texts(ax):\n            shift_matrix = text.get_transform().get_matrix() - ax_trans\n            assert_array_almost_equal(shift_matrix, expected_shift_matrix)\n\n    def test_offset_halign(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        m = Text(halign=\"right\", fontsize=10, offset=.5)\n        p = Plot(x, y, text=s).add(m).plot()\n        ax = p._figure.axes[0]\n        expected_shift_matrix = np.zeros((3, 3))\n        expected_shift_matrix[0, -1] = -m.offset * ax.figure.dpi / 72\n        ax_trans = ax.transData.get_matrix()\n        for text in self.get_texts(ax):\n            shift_matrix = text.get_transform().get_matrix() - ax_trans\n            assert_array_almost_equal(shift_matrix, expected_shift_matrix)\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":19,"id":1498,"name":"df","nodeType":"Attribute","startLoc":19,"text":"df"},{"attributeType":"null","col":8,"comment":"null","endLoc":226,"id":1499,"name":"_version","nodeType":"Attribute","startLoc":226,"text":"self._version"},{"attributeType":"null","col":0,"comment":"null","endLoc":22,"id":1500,"name":"network_pal","nodeType":"Attribute","startLoc":22,"text":"network_pal"},{"col":4,"comment":"Return a function that maps from data domain to property range.","endLoc":220,"header":"def get_mapping(\n        self, scale: Scale, data: ArrayLike\n    ) -> Callable[[ArrayLike], ArrayLike]","id":1501,"name":"get_mapping","nodeType":"Function","startLoc":194,"text":"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"},{"id":1503,"name":"countplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2fdf0f63-d515-4cb8-b3e0-62cac7852b12\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme(style=\\\"whitegrid\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"5adcc785-6643-4c55-ba38-ac9b65857932\",\n   \"metadata\": {},\n   \"source\": [\n    \"Show the number of datapoints with each value of a categorical variable:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"6e9d0485-870d-4841-9c84-6e0bacbde7db\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"df = sns.load_dataset(\\\"titanic\\\")\\n\",\n    \"sns.countplot(x=df[\\\"class\\\"])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"c2e36b42-5453-4478-918b-3699ac1fbc0e\",\n   \"metadata\": {},\n   \"source\": [\n    \"Group by a second variable:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"26f73c00-a2b3-45c3-b3cd-2babe0a81894\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.countplot(data=df, x=\\\"class\\\", hue=\\\"alive\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"eac30be1-c9d8-472c-afa9-16119afab86e\",\n   \"metadata\": {},\n   \"source\": [\n    \"Plot horizontally to make more space for category labels:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"31758c56-106e-4a9c-bcee-ef1f93f472e8\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.countplot(data=df, y=\\\"deck\\\", hue=\\\"alive\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"5c049d0c-d91b-4675-a9aa-7deea1421d68\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":58,"id":1504,"name":"QUAL_PALETTES","nodeType":"Attribute","startLoc":58,"text":"QUAL_PALETTES"},{"col":0,"comment":"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    ","endLoc":30,"header":"def palplot(pal, size=1)","id":1505,"name":"palplot","nodeType":"Function","startLoc":9,"text":"def 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())"},{"col":0,"comment":"If needed, get a default color by using the matplotlib property cycle.","endLoc":169,"header":"def _default_color(method, hue, color, kws)","id":1506,"name":"_default_color","nodeType":"Function","startLoc":88,"text":"def _default_color(method, hue, color, kws):\n    \"\"\"If needed, get a default color by using the matplotlib property cycle.\"\"\"\n\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    kws = kws.copy()\n    kws.pop(\"label\", None)\n\n    if color is not None:\n        return color\n\n    elif method.__name__ == \"plot\":\n\n        color = _normalize_kwargs(kws, mpl.lines.Line2D).get(\"color\")\n        scout, = method([], [], scalex=False, scaley=False, color=color)\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"},{"attributeType":"dict","col":0,"comment":"null","endLoc":23,"id":1507,"name":"network_lut","nodeType":"Attribute","startLoc":23,"text":"network_lut"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":37,"id":1508,"name":"color","nodeType":"Attribute","startLoc":37,"text":"color"},{"col":0,"comment":"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    ","endLoc":278,"header":"def remove_na(vector)","id":1509,"name":"remove_na","nodeType":"Function","startLoc":264,"text":"def 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)]"},{"className":"_HeatMapper","col":0,"comment":"Draw a heatmap plot of a matrix with nice labels and colormaps.","endLoc":352,"id":1510,"nodeType":"Class","startLoc":97,"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()\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)\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)\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\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\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)"},{"col":4,"comment":"Initialize the plotting object.","endLoc":190,"header":"def __init__(self, data, vmin, vmax, cmap, center, robust, annot, fmt,\n                 annot_kws, cbar, cbar_kws,\n                 xticklabels=True, yticklabels=True, mask=None)","id":1511,"name":"__init__","nodeType":"Function","startLoc":100,"text":"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()"},{"className":"SemanticMapping","col":0,"comment":"Base class for mapping data values to plot attributes.","endLoc":91,"id":1512,"nodeType":"Class","startLoc":29,"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\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)"},{"col":4,"comment":"null","endLoc":50,"header":"def __init__(self, plotter)","id":1513,"name":"__init__","nodeType":"Function","startLoc":43,"text":"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"},{"col":4,"comment":"null","endLoc":56,"header":"def map(cls, plotter, *args, **kwargs)","id":1514,"name":"map","nodeType":"Function","startLoc":52,"text":"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"},{"className":"TestText","col":0,"comment":"null","endLoc":129,"id":1515,"nodeType":"Class","startLoc":12,"text":"class TestText:\n\n    def get_texts(self, ax):\n        if ax.texts:\n            return list(ax.texts)\n        else:\n            # Compatibility with matplotlib < 3.5 (I think)\n            return [a for a in ax.artists if isinstance(a, MPLText)]\n\n    def test_simple(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n\n        p = Plot(x, y, text=s).add(Text()).plot()\n        ax = p._figure.axes[0]\n        for i, text in enumerate(self.get_texts(ax)):\n            x_, y_ = text.get_position()\n            assert x_ == x[i]\n            assert y_ == y[i]\n            assert text.get_text() == s[i]\n            assert text.get_horizontalalignment() == \"center\"\n            assert text.get_verticalalignment() == \"center_baseline\"\n\n    def test_set_properties(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        color = \"red\"\n        alpha = .6\n        fontsize = 6\n        valign = \"bottom\"\n\n        m = Text(color=color, alpha=alpha, fontsize=fontsize, valign=valign)\n        p = Plot(x, y, text=s).add(m).plot()\n        ax = p._figure.axes[0]\n        for i, text in enumerate(self.get_texts(ax)):\n            assert text.get_text() == s[i]\n            assert text.get_color() == to_rgba(m.color, m.alpha)\n            assert text.get_fontsize() == m.fontsize\n            assert text.get_verticalalignment() == m.valign\n\n    def test_mapped_properties(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        color = list(\"aab\")\n        fontsize = [1, 2, 4]\n\n        p = Plot(x, y, color=color, fontsize=fontsize, text=s).add(Text()).plot()\n        ax = p._figure.axes[0]\n        texts = self.get_texts(ax)\n        assert texts[0].get_color() == texts[1].get_color()\n        assert texts[0].get_color() != texts[2].get_color()\n        assert (\n            texts[0].get_fontsize()\n            < texts[1].get_fontsize()\n            < texts[2].get_fontsize()\n        )\n\n    def test_mapped_alignment(self):\n\n        x = [1, 2]\n        p = Plot(x=x, y=x, halign=x, valign=x, text=x).add(Text()).plot()\n        ax = p._figure.axes[0]\n        t1, t2 = self.get_texts(ax)\n        assert t1.get_horizontalalignment() == \"left\"\n        assert t2.get_horizontalalignment() == \"right\"\n        assert t1.get_verticalalignment() == \"top\"\n        assert t2.get_verticalalignment() == \"bottom\"\n\n    def test_identity_fontsize(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        fs = [5, 8, 12]\n        p = Plot(x, y, text=s, fontsize=fs).add(Text()).scale(fontsize=None).plot()\n        ax = p._figure.axes[0]\n        for i, text in enumerate(self.get_texts(ax)):\n            assert text.get_fontsize() == fs[i]\n\n    def test_offset_centered(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        p = Plot(x, y, text=s).add(Text()).plot()\n        ax = p._figure.axes[0]\n        ax_trans = ax.transData.get_matrix()\n        for text in self.get_texts(ax):\n            assert_array_almost_equal(text.get_transform().get_matrix(), ax_trans)\n\n    def test_offset_valign(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        m = Text(valign=\"bottom\", fontsize=5, offset=.1)\n        p = Plot(x, y, text=s).add(m).plot()\n        ax = p._figure.axes[0]\n        expected_shift_matrix = np.zeros((3, 3))\n        expected_shift_matrix[1, -1] = m.offset * ax.figure.dpi / 72\n        ax_trans = ax.transData.get_matrix()\n        for text in self.get_texts(ax):\n            shift_matrix = text.get_transform().get_matrix() - ax_trans\n            assert_array_almost_equal(shift_matrix, expected_shift_matrix)\n\n    def test_offset_halign(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        m = Text(halign=\"right\", fontsize=10, offset=.5)\n        p = Plot(x, y, text=s).add(m).plot()\n        ax = p._figure.axes[0]\n        expected_shift_matrix = np.zeros((3, 3))\n        expected_shift_matrix[0, -1] = -m.offset * ax.figure.dpi / 72\n        ax_trans = ax.transData.get_matrix()\n        for text in self.get_texts(ax):\n            shift_matrix = text.get_transform().get_matrix() - ax_trans\n            assert_array_almost_equal(shift_matrix, expected_shift_matrix)"},{"col":4,"comment":"null","endLoc":19,"header":"def get_texts(self, ax)","id":1516,"name":"get_texts","nodeType":"Function","startLoc":14,"text":"def get_texts(self, ax):\n        if ax.texts:\n            return list(ax.texts)\n        else:\n            # Compatibility with matplotlib < 3.5 (I think)\n            return [a for a in ax.artists if isinstance(a, MPLText)]"},{"fileName":"generate_logos.py","filePath":"doc/tools","id":1517,"nodeType":"File","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\n\n\ndef 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    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)\n\n\ndef 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)\n"},{"fileName":"widgets.py","filePath":"seaborn","id":1518,"nodeType":"File","text":"import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import LinearSegmentedColormap\n\ntry:\n    from ipywidgets import interact, FloatSlider, IntSlider\nexcept ImportError:\n    def interact(f):\n        msg = \"Interactive palettes require `ipywidgets`, which is not installed.\"\n        raise ImportError(msg)\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)\n\n\ndef 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\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\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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\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\n\n\ndef 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\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\n"},{"col":4,"comment":"null","endLoc":78,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":1519,"name":"__call__","nodeType":"Function","startLoc":73,"text":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n\n        var = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        return groupby.apply(data, self._percentile, var)"},{"col":0,"comment":"Wrapper for mpl.cbook.normalize_kwargs that supports <= 3.2.1.","endLoc":785,"header":"def _normalize_kwargs(kws, artist)","id":1520,"name":"_normalize_kwargs","nodeType":"Function","startLoc":768,"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"},{"col":4,"comment":"Get the attribute(s) values for the data key.","endLoc":91,"header":"def __call__(self, key, *args, **kwargs)","id":1521,"name":"__call__","nodeType":"Function","startLoc":86,"text":"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)"},{"col":37,"endLoc":330,"id":1522,"nodeType":"Lambda","startLoc":330,"text":"lambda: self._bw_method(self)"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":38,"id":1523,"name":"alpha","nodeType":"Attribute","startLoc":38,"text":"alpha"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":39,"id":1524,"name":"linewidth","nodeType":"Attribute","startLoc":39,"text":"linewidth"},{"col":4,"comment":"Identify evenly-spaced values using interval or explicit mapping.","endLoc":256,"header":"def _get_categorical_mapping(\n        self, scale: Nominal, data: ArrayLike\n    ) -> Callable[[ArrayLike], ArrayLike]","id":1525,"name":"_get_categorical_mapping","nodeType":"Function","startLoc":222,"text":"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"},{"id":1526,"name":"v0.3.0.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.3.0 (March 2014)\n-------------------\n\nThis is a major release from 0.2 with a number of enhancements to the plotting capabilities and styles. Highlights include :class:`FacetGrid`, ``factorplot``, :func:`jointplot`, and an overhaul to :ref:`style management `. There is also lots of new documentation, including an :ref:`example gallery ` and reorganized :ref:`tutorial `.\n\nNew plotting functions\n~~~~~~~~~~~~~~~~~~~~~~\n\n- The :class:`FacetGrid` class adds a new form of functionality to seaborn, providing a way to abstractly structure a grid of plots corresponding to subsets of a dataset. It can be used with a wide variety of plotting functions (including most of the matplotlib and seaborn APIs. See the :ref:`tutorial ` for more information.\n\n- Version 0.3 introduces the ``factorplot`` function, which is similar in spirit to :func:`lmplot` but intended for use when the main independent variable is categorical instead of quantitative. ``factorplot`` can draw a plot in either a point or bar representation using the corresponding Axes-level functions :func:`pointplot` and :func:`barplot` (which are also new). Additionally, the ``factorplot`` function can be used to draw box plots on a faceted grid. For examples of how to use these functions, you can refer to the tutorial.\n\n- Another new function is :func:`jointplot`, which is built using the new :class:`JointGrid` object. :func:`jointplot` generalizes the behavior of :func:`regplot` in previous versions of seaborn (:func:`regplot` has changed somewhat in 0.3; see below for details) by drawing a bivariate plot of the relationship between two variables with their marginal distributions drawn on the side of the plot. With :func:`jointplot`, you can draw a scatterplot or regression plot as before, but you can now also draw bivariate kernel densities or hexbin plots with appropriate univariate graphs for the marginal distributions. Additionally, it's easy to use :class:`JointGrid` directly to build up more complex plots when the default methods offered by :func:`jointplot` are not suitable for your visualization problem. The tutorial for :class:`JointGrid` has more examples of how this object can be useful.\n\n- The :func:`residplot` function complements :func:`regplot` and can be quickly used to diagnose problems with a linear model by calculating and plotting the residuals of a simple regression. There is also a ``\"resid\"`` kind for :func:`jointplot`.\n\nAPI changes\n~~~~~~~~~~~\n\n- The most noticeable change will be that :func:`regplot` no longer produces a multi-component plot with distributions in marginal axes. Instead. :func:`regplot` is now an \"Axes-level\" function that can be plotted into any existing figure on a specific set of axes. :func:`regplot` and :func:`lmplot` have also been unified (the latter uses the former behind the scenes), so all options for how to fit and represent the regression model can be used for both functions. To get the old behavior of :func:`regplot`, use :func:`jointplot` with ``kind=\"reg\"``.\n\n- As noted above, :func:`lmplot` has been rewritten to exploit the :class:`FacetGrid` machinery. This involves a few changes. The ``color`` keyword argument has been replaced with ``hue``, for better consistency across the package. The ``hue`` parameter will always take a variable *name*, while ``color`` will take a color name or (in some cases) a palette. The :func:`lmplot` function now returns the :class:`FacetGrid` used to draw the plot instance.\n\n- The functions that interact with matplotlib rc parameters have been updated and standardized. There are now three pairs of functions, :func:`axes_style` and :func:`set_style`, :func:`plotting_context` and :func:`set_context`, and :func:`color_palette` and :func:`set_palette`. In each case, the pairs take the exact same arguments. The first function defines and returns the parameters, and the second sets the matplotlib defaults. Additionally, the first function in each pair can be used in a ``with`` statement to temporarily change the defaults. Both the style and context functions also now accept a dictionary of matplotlib rc parameters to override the seaborn defaults, and :func:`set` now also takes a dictionary to update any of the matplotlib defaults. See the :ref:`tutorial ` for more information.\n\n- The ``nogrid`` style has been deprecated and changed to ``white`` for more uniformity (i.e. there are now ``darkgrid``, ``dark``, ``whitegrid``, and ``white`` styles).\n\n\nOther changes\n~~~~~~~~~~~~~\n\nUsing the package\n^^^^^^^^^^^^^^^^^\n\n- If you want to use plotting functions provided by the package without setting the matplotlib style to a seaborn theme, you can now do ``import seaborn.apionly as sns`` or ``from seaborn.apionly import lmplot``, etc. This is using the (also new) :func:`reset_orig` function, which returns the rc parameters to what they are at matplotlib import time — i.e. they will respect any custom `matplotlibrc` settings on top of the matplotlib defaults.\n\n- The dependency load of the package has been reduced. It can now be installed and used with only ``numpy``, ``scipy``, ``matplotlib``, and ``pandas``. Although ``statsmodels`` is still recommended for full functionality, it is not required.\n\nPlotting functions\n^^^^^^^^^^^^^^^^^^\n\n- :func:`lmplot` (and :func:`regplot`) have two new options for fitting regression models: ``lowess`` and ``robust``. The former fits a nonparametric smoother, while the latter fits a regression using methods that are less sensitive to outliers.\n\n- The regression uncertainty in :func:`lmplot` and :func:`regplot` is now estimated with fewer bootstrap iterations, so plotting should be faster.\n\n- The univariate :func:`kdeplot` can now be drawn as a *cumulative* density plot.\n\n- Changed :func:`interactplot` to use a robust calculation of the data range when finding default limits for the contour colormap to work better when there are outliers in the data.\n\nStyle\n^^^^^\n\n- There is a new style, ``dark``, which shares most features with ``darkgrid`` but does not draw a grid by default.\n\n- There is a new function, :func:`offset_spines`, and a corresponding option in :func:`despine` called ``trim``. Together, these can be used to make plots where the axis spines are offset from the main part of the figure and limited within the range of the ticks. This is recommended for use with the ``ticks`` style.\n\n- Other aspects of the seaborn styles have been tweaked for more attractive plots.\n"},{"attributeType":"str | Mappable","col":4,"comment":"null","endLoc":40,"id":1527,"name":"linestyle","nodeType":"Attribute","startLoc":40,"text":"linestyle"},{"attributeType":"str | Mappable","col":4,"comment":"null","endLoc":41,"id":1528,"name":"marker","nodeType":"Attribute","startLoc":41,"text":"marker"},{"col":4,"comment":"Computes the covariance matrix for each Gaussian kernel using\n        covariance_factor().\n        ","endLoc":352,"header":"def _compute_covariance(self)","id":1529,"name":"_compute_covariance","nodeType":"Function","startLoc":338,"text":"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))"},{"id":1530,"name":"pointplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"43f842ee-44c9-476b-ab08-112d23e2effb\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme(style=\\\"whitegrid\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"9aa5bc8a-03cd-4792-906d-7e7318c2cecc\",\n   \"metadata\": {},\n   \"source\": [\n    \"Group by a categorical varaible and plot aggregated values, with confidence intervals:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"9a865fec-c034-4000-938d-b7cd89157495\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"df = sns.load_dataset(\\\"penguins\\\")\\n\",\n    \"sns.pointplot(data=df, x=\\\"island\\\", y=\\\"body_mass_g\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"a0002e29-0ad6-41c7-b66d-c80bb1844924\",\n   \"metadata\": {},\n   \"source\": [\n    \"Add a second layer of grouping:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f27011f1-0e3c-4dc4-818e-4a77930977b9\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pointplot(data=df, x=\\\"island\\\", y=\\\"body_mass_g\\\", hue=\\\"sex\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"a63681f6-e692-400f-b9fe-0d9fd0521398\",\n   \"metadata\": {},\n   \"source\": [\n    \"Adjust the artists along the categorical axis to reduce overplotting:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"8f94d069-c5f4-4579-a4bf-6d755962d48d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pointplot(data=df, x=\\\"sex\\\", y=\\\"bill_depth_mm\\\", hue=\\\"island\\\", dodge=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"51523904-3b42-4818-9de6-52dc30090e56\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use the error bars to show the standard deviation rather than a confidence interval:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"386b25eb-7ab7-4a1d-9498-cef3e4fd3e6b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pointplot(data=df, x=\\\"island\\\", y=\\\"body_mass_g\\\", errorbar=\\\"sd\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"41253d65-b3be-4aab-87a2-be34e66a2d7c\",\n   \"metadata\": {},\n   \"source\": [\n    \"Customize the appearance of the plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"50b14810-2299-479c-b6c5-0fd10c4ed3de\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pointplot(\\n\",\n    \"    data=df, x=\\\"body_mass_g\\\", y=\\\"island\\\",\\n\",\n    \"    errorbar=(\\\"pi\\\", 100), capsize=.4, join=False, color=\\\".5\\\",\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"94d6718d-2cfe-44f4-88e5-f47461d7d51f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"col":0,"comment":"Make a diverging palette between two HUSL colors.\n\n    If you are using the IPython notebook, you can also choose this palette\n    interactively with the :func:`choose_diverging_palette` function.\n\n    Parameters\n    ----------\n    h_neg, h_pos : float in [0, 359]\n        Anchor hues for negative and positive extents of the map.\n    s : float in [0, 100], optional\n        Anchor saturation for both extents of the map.\n    l : float in [0, 100], optional\n        Anchor lightness for both extents of the map.\n    sep : int, optional\n        Size of the intermediate region.\n    n : int, optional\n        Number of colors in the palette (if not returning a cmap)\n    center : {\"light\", \"dark\"}, optional\n        Whether the center of the palette is light or dark\n    as_cmap : bool, optional\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    dark_palette : Create a sequential palette with dark values.\n    light_palette : Create a sequential palette with light values.\n\n    Examples\n    --------\n    .. include: ../docstrings/diverging_palette.rst\n\n    ","endLoc":578,"header":"def diverging_palette(h_neg, h_pos, s=75, l=50, sep=1, n=6,  # noqa\n                      center=\"light\", as_cmap=False)","id":1531,"name":"diverging_palette","nodeType":"Function","startLoc":532,"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.ListedColormap`.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    dark_palette : Create a sequential palette with dark values.\n    light_palette : Create a sequential palette with light values.\n\n    Examples\n    --------\n    .. include: ../docstrings/diverging_palette.rst\n\n    \"\"\"\n    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"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":42,"id":1532,"name":"pointsize","nodeType":"Attribute","startLoc":42,"text":"pointsize"},{"attributeType":"int | list","col":4,"comment":"null","endLoc":57,"id":1533,"name":"k","nodeType":"Attribute","startLoc":57,"text":"k"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":43,"id":1534,"name":"fillcolor","nodeType":"Attribute","startLoc":43,"text":"fillcolor"},{"id":1535,"name":"v0.12.2.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.12.2 (Unreleased)\n--------------------\n\n- |Feature| Added the :class:`objects.KDE` stat (:pr:`3111`).\n\n- |Enhancement| Automatic mark widths are now calculated separately for unshared facet axes (:pr:`3119`).\n\n- |Enhancement| Improved user feedback for failures during plot compilation by catching exceptions an reraising with a `PlotSpecError` that provides additional context (:pr:`3203`).\n\n- |Fix| Fixed a bug where legends for numeric variables with large values with be incorrectly shown (i.e. with a missing offset or exponent; :pr:`3187`).\n\n- |Fix| Improved robustness to empty data in several components of the objects interface (:pr:`3202`).\n\n- |Fix| Fixed a regression in v0.12.0 where manually-added labels could have duplicate legend entries (:pr:`3116`).\n\n- |Fix| Fixed a bug in :func:`histplot` with `kde=True` and `log_scale=True` where the curve was not scaled properly (:pr:`3173`).\n\n- |Fix| Fixed a bug in :func:`relplot` where inner axis labels would be shown when axis sharing was disabled (:pr:`3180`).\n"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":44,"id":1536,"name":"edgecolor","nodeType":"Attribute","startLoc":44,"text":"edgecolor"},{"col":4,"comment":"null","endLoc":425,"header":"def _get_transform(self)","id":1537,"name":"_get_transform","nodeType":"Function","startLoc":394,"text":"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}\")"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":45,"id":1538,"name":"edgewidth","nodeType":"Attribute","startLoc":45,"text":"edgewidth"},{"attributeType":"bool","col":4,"comment":"null","endLoc":47,"id":1539,"name":"_sort","nodeType":"Attribute","startLoc":47,"text":"_sort"},{"className":"Line","col":0,"comment":"\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    ","endLoc":136,"id":1540,"nodeType":"Class","startLoc":120,"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"},{"attributeType":"bool","col":4,"comment":"null","endLoc":136,"id":1541,"name":"_sort","nodeType":"Attribute","startLoc":136,"text":"_sort"},{"fileName":"horizontal_boxplot.py","filePath":"examples","id":1542,"nodeType":"File","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)\n"},{"col":0,"comment":"Find positions using poisson-disc sampling.","endLoc":58,"header":"def poisson_disc_sample(array_radius, pad_radius, candidates=100, d=2, seed=None)","id":1543,"name":"poisson_disc_sample","nodeType":"Function","startLoc":15,"text":"def 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"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":1544,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"col":4,"comment":"Compute Scott's factor.\n\n        Returns\n        -------\n        s : float\n            Scott's factor.\n        ","endLoc":278,"header":"def scotts_factor(self)","id":1545,"name":"scotts_factor","nodeType":"Function","startLoc":270,"text":"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))"},{"className":"Paths","col":0,"comment":"\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    ","endLoc":227,"id":1546,"nodeType":"Class","startLoc":139,"text":"@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\"])\n\n    def _plot(self, split_gen, scales, orient):\n\n        line_data = {}\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            segments = self._setup_segments(data, orient)\n            line_data[ax][\"segments\"].extend(segments)\n            n = len(segments)\n\n            vals = resolve_properties(self, keys, scales)\n            vals[\"color\"] = resolve_color(self, keys, scales=scales)\n\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        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            if ax_data[\"segments\"]:\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    def _setup_segments(self, data, orient):\n\n        if self._sort:\n            data = data.sort_values(orient, kind=\"mergesort\")\n\n        # Column stack to avoid block consolidation\n        xy = np.column_stack([data[\"x\"], data[\"y\"]])\n\n        return [xy]"},{"attributeType":"null","col":28,"comment":"null","endLoc":8,"id":1547,"name":"plt","nodeType":"Attribute","startLoc":8,"text":"plt"},{"col":4,"comment":"null","endLoc":167,"header":"def __post_init__(self)","id":1548,"name":"__post_init__","nodeType":"Function","startLoc":161,"text":"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\"])"},{"attributeType":"null","col":0,"comment":"null","endLoc":13,"id":1549,"name":"f","nodeType":"Attribute","startLoc":13,"text":"f"},{"col":0,"comment":"\n    power(x1, x2[, out])\n    \n    First array elements raised to powers from second array, element-wise.\n    \n    Raise each base in `x1` to the positionally-corresponding power in\n    `x2`.  `x1` and `x2` must be broadcastable to the same shape. Note that an\n    integer type raised to a negative integer power will raise a ValueError.\n    \n    Parameters\n    ----------\n    x1 : array_like\n        The bases.\n    x2 : array_like\n        The exponents.\n    \n    Returns\n    -------\n    y : ndarray\n        The bases in `x1` raised to the exponents in `x2`.\n    \n    See Also\n    --------\n    float_power : power function that promotes integers to float\n    \n    Examples\n    --------\n    Cube each element in a list.\n    \n    >>> x1 = range(6)\n    >>> x1\n    [0, 1, 2, 3, 4, 5]\n    >>> np.power(x1, 3)\n    array([  0,   1,   8,  27,  64, 125])\n    \n    Raise the bases to different exponents.\n    \n    >>> x2 = [1.0, 2.0, 3.0, 3.0, 2.0, 1.0]\n    >>> np.power(x1, x2)\n    array([  0.,   1.,   8.,  27.,  16.,   5.])\n    \n    The effect of broadcasting.\n    \n    >>> x2 = np.array([[1, 2, 3, 3, 2, 1], [1, 2, 3, 3, 2, 1]])\n    >>> x2\n    array([[1, 2, 3, 3, 2, 1],\n           [1, 2, 3, 3, 2, 1]])\n    >>> np.power(x1, x2)\n    array([[ 0,  1,  8, 27, 16,  5],\n           [ 0,  1,  8, 27, 16,  5]])\n    ","endLoc":3096,"header":"def power(x1, x2, out=None)","id":1550,"name":"power","nodeType":"Function","startLoc":3044,"text":"def power(x1, x2, out=None): # real signature unknown; restored from __doc__\n    \"\"\"\n    power(x1, x2[, out])\n    \n    First array elements raised to powers from second array, element-wise.\n    \n    Raise each base in `x1` to the positionally-corresponding power in\n    `x2`.  `x1` and `x2` must be broadcastable to the same shape. Note that an\n    integer type raised to a negative integer power will raise a ValueError.\n    \n    Parameters\n    ----------\n    x1 : array_like\n        The bases.\n    x2 : array_like\n        The exponents.\n    \n    Returns\n    -------\n    y : ndarray\n        The bases in `x1` raised to the exponents in `x2`.\n    \n    See Also\n    --------\n    float_power : power function that promotes integers to float\n    \n    Examples\n    --------\n    Cube each element in a list.\n    \n    >>> x1 = range(6)\n    >>> x1\n    [0, 1, 2, 3, 4, 5]\n    >>> np.power(x1, 3)\n    array([  0,   1,   8,  27,  64, 125])\n    \n    Raise the bases to different exponents.\n    \n    >>> x2 = [1.0, 2.0, 3.0, 3.0, 2.0, 1.0]\n    >>> np.power(x1, x2)\n    array([  0.,   1.,   8.,  27.,  16.,   5.])\n    \n    The effect of broadcasting.\n    \n    >>> x2 = np.array([[1, 2, 3, 3, 2, 1], [1, 2, 3, 3, 2, 1]])\n    >>> x2\n    array([[1, 2, 3, 3, 2, 1],\n           [1, 2, 3, 3, 2, 1]])\n    >>> np.power(x1, x2)\n    array([[ 0,  1,  8, 27, 16,  5],\n           [ 0,  1,  8, 27, 16,  5]])\n    \"\"\"\n    pass"},{"attributeType":"null","col":3,"comment":"null","endLoc":13,"id":1551,"name":"ax","nodeType":"Attribute","startLoc":13,"text":"ax"},{"col":0,"comment":"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    ","endLoc":94,"header":"def _matrix_mask(data, mask)","id":1552,"name":"_matrix_mask","nodeType":"Function","startLoc":60,"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":17,"id":1553,"name":"planets","nodeType":"Attribute","startLoc":17,"text":"planets"},{"attributeType":"str","col":4,"comment":"null","endLoc":58,"id":1554,"name":"method","nodeType":"Attribute","startLoc":58,"text":"method"},{"attributeType":"bool","col":4,"comment":"null","endLoc":60,"id":1555,"name":"group_by_orient","nodeType":"Attribute","startLoc":60,"text":"group_by_orient"},{"attributeType":"TextIO","col":32,"comment":"null","endLoc":164,"id":1556,"name":"f","nodeType":"Attribute","startLoc":164,"text":"f"},{"col":0,"comment":"Assign default kwargs for call_func using values from source_func.","endLoc":812,"header":"def _assign_default_kwargs(kws, call_func, source_func)","id":1557,"name":"_assign_default_kwargs","nodeType":"Function","startLoc":796,"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"},{"col":0,"comment":"","endLoc":6,"header":"horizontal_boxplot.py#","id":1558,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nHorizontal boxplot with observations\n====================================\n\n_thumb: .7, .37\n\"\"\"\n\nsns.set_theme(style=\"ticks\")\n\nf, ax = plt.subplots(figsize=(7, 6))\n\nax.set_xscale(\"log\")\n\nplanets = sns.load_dataset(\"planets\")\n\nsns.boxplot(x=\"distance\", y=\"method\", data=planets,\n            whis=[0, 100], width=.6, palette=\"vlag\")\n\nsns.stripplot(x=\"distance\", y=\"method\", data=planets,\n              size=4, color=\".3\", linewidth=0)\n\nax.xaxis.grid(True)\n\nax.set(ylabel=\"\")\n\nsns.despine(trim=True, left=True)"},{"attributeType":"null","col":16,"comment":"null","endLoc":10,"id":1559,"name":"np","nodeType":"Attribute","startLoc":10,"text":"np"},{"attributeType":"str","col":0,"comment":"null","endLoc":20,"id":1560,"name":"_MethodKind","nodeType":"Attribute","startLoc":20,"text":"_MethodKind"},{"fileName":"test_moves.py","filePath":"tests/_core","id":1561,"nodeType":"File","text":"\nfrom 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)\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\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)\n\n\nclass 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_default(self, df):\n\n        orient = \"x\"\n        groupby = self.get_groupby(df, orient)\n        res = Jitter()(df, groupby, orient, {})\n        self.check_same(res, df, \"y\", \"grp2\", \"width\")\n        self.check_pos(res, df, \"x\", 0.2 * df[\"width\"])\n        assert (res[\"x\"] - df[\"x\"]).abs().min() > 0\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])\n\n\nclass 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])\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)\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])\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)\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\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)\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)\n\n\nclass 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])\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\", {})\n\n\nclass 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)\n\n\nclass 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)\n"},{"className":"product","col":0,"comment":"null","endLoc":242,"id":1562,"nodeType":"Class","startLoc":195,"text":"class product(Iterator[_T_co], Generic[_T_co]):\n    @overload\n    def __new__(cls, __iter1: Iterable[_T1]) -> product[tuple[_T1]]: ...\n    @overload\n    def __new__(cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> product[tuple[_T1, _T2]]: ...\n    @overload\n    def __new__(cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> product[tuple[_T1, _T2, _T3]]: ...\n    @overload\n    def __new__(\n        cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]\n    ) -> product[tuple[_T1, _T2, _T3, _T4]]: ...\n    @overload\n    def __new__(\n        cls,\n        __iter1: Iterable[_T1],\n        __iter2: Iterable[_T2],\n        __iter3: Iterable[_T3],\n        __iter4: Iterable[_T4],\n        __iter5: Iterable[_T5],\n    ) -> product[tuple[_T1, _T2, _T3, _T4, _T5]]: ...\n    @overload\n    def __new__(\n        cls,\n        __iter1: Iterable[_T1],\n        __iter2: Iterable[_T2],\n        __iter3: Iterable[_T3],\n        __iter4: Iterable[_T4],\n        __iter5: Iterable[_T5],\n        __iter6: Iterable[_T6],\n    ) -> product[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]: ...\n    @overload\n    def __new__(\n        cls,\n        __iter1: Iterable[Any],\n        __iter2: Iterable[Any],\n        __iter3: Iterable[Any],\n        __iter4: Iterable[Any],\n        __iter5: Iterable[Any],\n        __iter6: Iterable[Any],\n        __iter7: Iterable[Any],\n        *iterables: Iterable[Any],\n    ) -> product[tuple[Any, ...]]: ...\n    @overload\n    def __new__(cls, *iterables: Iterable[_T1], repeat: int) -> product[tuple[_T1, ...]]: ...\n    @overload\n    def __new__(cls, *iterables: Iterable[Any], repeat: int = ...) -> product[tuple[Any, ...]]: ...\n    def __iter__(self) -> Self: ...\n    def __next__(self) -> _T_co: ..."},{"col":0,"comment":"\n    Estimate a covariance matrix, given data and weights.\n\n    Covariance indicates the level to which two variables vary together.\n    If we examine N-dimensional samples, :math:`X = [x_1, x_2, ... x_N]^T`,\n    then the covariance matrix element :math:`C_{ij}` is the covariance of\n    :math:`x_i` and :math:`x_j`. The element :math:`C_{ii}` is the variance\n    of :math:`x_i`.\n\n    See the notes for an outline of the algorithm.\n\n    Parameters\n    ----------\n    m : array_like\n        A 1-D or 2-D array containing multiple variables and observations.\n        Each row of `m` represents a variable, and each column a single\n        observation of all those variables. Also see `rowvar` below.\n    y : array_like, optional\n        An additional set of variables and observations. `y` has the same form\n        as that of `m`.\n    rowvar : bool, optional\n        If `rowvar` is True (default), then each row represents a\n        variable, with observations in the columns. Otherwise, the relationship\n        is transposed: each column represents a variable, while the rows\n        contain observations.\n    bias : bool, optional\n        Default normalization (False) is by ``(N - 1)``, where ``N`` is the\n        number of observations given (unbiased estimate). If `bias` is True, then\n        normalization is by ``N``. These values can be overridden by using the\n        keyword ``ddof`` in numpy versions >= 1.5.\n    ddof : int, optional\n        If not ``None`` the default value implied by `bias` is overridden.\n        Note that ``ddof=1`` will return the unbiased estimate, even if both\n        `fweights` and `aweights` are specified, and ``ddof=0`` will return\n        the simple average. See the notes for the details. The default value\n        is ``None``.\n\n        .. versionadded:: 1.5\n    fweights : array_like, int, optional\n        1-D array of integer freguency weights; the number of times each\n        observation vector should be repeated.\n\n        .. versionadded:: 1.10\n    aweights : array_like, optional\n        1-D array of observation vector weights. These relative weights are\n        typically large for observations considered \"important\" and smaller for\n        observations considered less \"important\". If ``ddof=0`` the array of\n        weights can be used to assign probabilities to observation vectors.\n\n        .. versionadded:: 1.10\n\n    Returns\n    -------\n    out : ndarray\n        The covariance matrix of the variables.\n\n    See Also\n    --------\n    corrcoef : Normalized covariance matrix\n\n    Notes\n    -----\n    Assume that the observations are in the columns of the observation\n    array `m` and let ``f = fweights`` and ``a = aweights`` for brevity. The\n    steps to compute the weighted covariance are as follows::\n\n        >>> w = f * a\n        >>> v1 = np.sum(w)\n        >>> v2 = np.sum(w * a)\n        >>> m -= np.sum(m * w, axis=1, keepdims=True) / v1\n        >>> cov = np.dot(m * w, m.T) * v1 / (v1**2 - ddof * v2)\n\n    Note that when ``a == 1``, the normalization factor\n    ``v1 / (v1**2 - ddof * v2)`` goes over to ``1 / (np.sum(f) - ddof)``\n    as it should.\n\n    Examples\n    --------\n    Consider two variables, :math:`x_0` and :math:`x_1`, which\n    correlate perfectly, but in opposite directions:\n\n    >>> x = np.array([[0, 2], [1, 1], [2, 0]]).T\n    >>> x\n    array([[0, 1, 2],\n           [2, 1, 0]])\n\n    Note how :math:`x_0` increases while :math:`x_1` decreases. The covariance\n    matrix shows this clearly:\n\n    >>> np.cov(x)\n    array([[ 1., -1.],\n           [-1.,  1.]])\n\n    Note that element :math:`C_{0,1}`, which shows the correlation between\n    :math:`x_0` and :math:`x_1`, is negative.\n\n    Further, note how `x` and `y` are combined:\n\n    >>> x = [-2.1, -1,  4.3]\n    >>> y = [3,  1.1,  0.12]\n    >>> X = np.vstack((x,y))\n    >>> print(np.cov(X))\n    [[ 11.71        -4.286     ]\n     [ -4.286        2.14413333]]\n    >>> print(np.cov(x, y))\n    [[ 11.71        -4.286     ]\n     [ -4.286        2.14413333]]\n    >>> print(np.cov(x))\n    11.71\n\n    ","endLoc":2930,"header":"def cov(m, y=None, rowvar=True, bias=False, ddof=None, fweights=None,\n        aweights=None)","id":1563,"name":"cov","nodeType":"Function","startLoc":2725,"text":"def cov(m, y=None, rowvar=True, bias=False, ddof=None, fweights=None,\n        aweights=None):\n    \"\"\"\n    Estimate a covariance matrix, given data and weights.\n\n    Covariance indicates the level to which two variables vary together.\n    If we examine N-dimensional samples, :math:`X = [x_1, x_2, ... x_N]^T`,\n    then the covariance matrix element :math:`C_{ij}` is the covariance of\n    :math:`x_i` and :math:`x_j`. The element :math:`C_{ii}` is the variance\n    of :math:`x_i`.\n\n    See the notes for an outline of the algorithm.\n\n    Parameters\n    ----------\n    m : array_like\n        A 1-D or 2-D array containing multiple variables and observations.\n        Each row of `m` represents a variable, and each column a single\n        observation of all those variables. Also see `rowvar` below.\n    y : array_like, optional\n        An additional set of variables and observations. `y` has the same form\n        as that of `m`.\n    rowvar : bool, optional\n        If `rowvar` is True (default), then each row represents a\n        variable, with observations in the columns. Otherwise, the relationship\n        is transposed: each column represents a variable, while the rows\n        contain observations.\n    bias : bool, optional\n        Default normalization (False) is by ``(N - 1)``, where ``N`` is the\n        number of observations given (unbiased estimate). If `bias` is True, then\n        normalization is by ``N``. These values can be overridden by using the\n        keyword ``ddof`` in numpy versions >= 1.5.\n    ddof : int, optional\n        If not ``None`` the default value implied by `bias` is overridden.\n        Note that ``ddof=1`` will return the unbiased estimate, even if both\n        `fweights` and `aweights` are specified, and ``ddof=0`` will return\n        the simple average. See the notes for the details. The default value\n        is ``None``.\n\n        .. versionadded:: 1.5\n    fweights : array_like, int, optional\n        1-D array of integer freguency weights; the number of times each\n        observation vector should be repeated.\n\n        .. versionadded:: 1.10\n    aweights : array_like, optional\n        1-D array of observation vector weights. These relative weights are\n        typically large for observations considered \"important\" and smaller for\n        observations considered less \"important\". If ``ddof=0`` the array of\n        weights can be used to assign probabilities to observation vectors.\n\n        .. versionadded:: 1.10\n\n    Returns\n    -------\n    out : ndarray\n        The covariance matrix of the variables.\n\n    See Also\n    --------\n    corrcoef : Normalized covariance matrix\n\n    Notes\n    -----\n    Assume that the observations are in the columns of the observation\n    array `m` and let ``f = fweights`` and ``a = aweights`` for brevity. The\n    steps to compute the weighted covariance are as follows::\n\n        >>> w = f * a\n        >>> v1 = np.sum(w)\n        >>> v2 = np.sum(w * a)\n        >>> m -= np.sum(m * w, axis=1, keepdims=True) / v1\n        >>> cov = np.dot(m * w, m.T) * v1 / (v1**2 - ddof * v2)\n\n    Note that when ``a == 1``, the normalization factor\n    ``v1 / (v1**2 - ddof * v2)`` goes over to ``1 / (np.sum(f) - ddof)``\n    as it should.\n\n    Examples\n    --------\n    Consider two variables, :math:`x_0` and :math:`x_1`, which\n    correlate perfectly, but in opposite directions:\n\n    >>> x = np.array([[0, 2], [1, 1], [2, 0]]).T\n    >>> x\n    array([[0, 1, 2],\n           [2, 1, 0]])\n\n    Note how :math:`x_0` increases while :math:`x_1` decreases. The covariance\n    matrix shows this clearly:\n\n    >>> np.cov(x)\n    array([[ 1., -1.],\n           [-1.,  1.]])\n\n    Note that element :math:`C_{0,1}`, which shows the correlation between\n    :math:`x_0` and :math:`x_1`, is negative.\n\n    Further, note how `x` and `y` are combined:\n\n    >>> x = [-2.1, -1,  4.3]\n    >>> y = [3,  1.1,  0.12]\n    >>> X = np.vstack((x,y))\n    >>> print(np.cov(X))\n    [[ 11.71        -4.286     ]\n     [ -4.286        2.14413333]]\n    >>> print(np.cov(x, y))\n    [[ 11.71        -4.286     ]\n     [ -4.286        2.14413333]]\n    >>> print(np.cov(x))\n    11.71\n\n    \"\"\"\n    # Check inputs\n    if ddof is not None and ddof != int(ddof):\n        raise ValueError(\n            \"ddof must be integer\")\n\n    # Handles complex arrays too\n    m = np.asarray(m)\n    if m.ndim > 2:\n        raise ValueError(\"m has more than 2 dimensions\")\n\n    if y is None:\n        dtype = np.result_type(m, np.float64)\n    else:\n        y = np.asarray(y)\n        if y.ndim > 2:\n            raise ValueError(\"y has more than 2 dimensions\")\n        dtype = np.result_type(m, y, np.float64)\n\n    X = array(m, ndmin=2, dtype=dtype)\n    if rowvar == 0 and X.shape[0] != 1:\n        X = X.T\n    if X.shape[0] == 0:\n        return np.array([]).reshape(0, 0)\n    if y is not None:\n        y = array(y, copy=False, ndmin=2, dtype=dtype)\n        if rowvar == 0 and y.shape[0] != 1:\n            y = y.T\n        X = np.vstack((X, y))\n\n    if ddof is None:\n        if bias == 0:\n            ddof = 1\n        else:\n            ddof = 0\n\n    # Get the product of frequencies and weights\n    w = None\n    if fweights is not None:\n        fweights = np.asarray(fweights, dtype=np.float)\n        if not np.all(fweights == np.around(fweights)):\n            raise TypeError(\n                \"fweights must be integer\")\n        if fweights.ndim > 1:\n            raise RuntimeError(\n                \"cannot handle multidimensional fweights\")\n        if fweights.shape[0] != X.shape[1]:\n            raise RuntimeError(\n                \"incompatible numbers of samples and fweights\")\n        if any(fweights < 0):\n            raise ValueError(\n                \"fweights cannot be negative\")\n        w = fweights\n    if aweights is not None:\n        aweights = np.asarray(aweights, dtype=np.float)\n        if aweights.ndim > 1:\n            raise RuntimeError(\n                \"cannot handle multidimensional aweights\")\n        if aweights.shape[0] != X.shape[1]:\n            raise RuntimeError(\n                \"incompatible numbers of samples and aweights\")\n        if any(aweights < 0):\n            raise ValueError(\n                \"aweights cannot be negative\")\n        if w is None:\n            w = aweights\n        else:\n            w *= aweights\n\n    avg, w_sum = average(X, axis=1, weights=w, returned=True)\n    w_sum = w_sum[0]\n\n    # Determine the normalization\n    if w is None:\n        fact = X.shape[1] - ddof\n    elif ddof == 0:\n        fact = w_sum\n    elif aweights is None:\n        fact = w_sum - ddof\n    else:\n        fact = w_sum - ddof*sum(w*aweights)/w_sum\n\n    if fact <= 0:\n        warnings.warn(\"Degrees of freedom <= 0 for slice\", RuntimeWarning, stacklevel=2)\n        fact = 0.0\n\n    X -= avg[:, None]\n    if w is None:\n        X_T = X.T\n    else:\n        X_T = (X*w).T\n    c = dot(X, X_T.conj())\n    c *= 1. / np.float64(fact)\n    return c.squeeze()"},{"col":0,"comment":"null","endLoc":2240,"header":"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)","id":1564,"name":"boxplot","nodeType":"Function","startLoc":2224,"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"},{"col":0,"comment":"","endLoc":2,"header":"order.py#","id":1567,"name":"","nodeType":"Function","startLoc":2,"text":"try:\n    from typing import Literal\nexcept ImportError:\n    from typing_extensions import Literal  # type: ignore\n\n_MethodKind = Literal[\n    \"inverted_cdf\",\n    \"averaged_inverted_cdf\",\n    \"closest_observation\",\n    \"interpolated_inverted_cdf\",\n    \"hazen\",\n    \"weibull\",\n    \"linear\",\n    \"median_unbiased\",\n    \"normal_unbiased\",\n    \"lower\",\n    \"higher\",\n    \"midpoint\",\n    \"nearest\",\n]"},{"col":4,"comment":"null","endLoc":197,"header":"@overload\n    def __new__(cls, __iter1: Iterable[_T1]) -> product[tuple[_T1]]","id":1568,"name":"__new__","nodeType":"Function","startLoc":196,"text":"@overload\n    def __new__(cls, __iter1: Iterable[_T1]) -> product[tuple[_T1]]: ..."},{"col":4,"comment":"null","endLoc":199,"header":"@overload\n    def __new__(cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> product[tuple[_T1, _T2]]","id":1569,"name":"__new__","nodeType":"Function","startLoc":198,"text":"@overload\n    def __new__(cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2]) -> product[tuple[_T1, _T2]]: ..."},{"col":4,"comment":"null","endLoc":201,"header":"@overload\n    def __new__(cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> product[tuple[_T1, _T2, _T3]]","id":1570,"name":"__new__","nodeType":"Function","startLoc":200,"text":"@overload\n    def __new__(cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]) -> product[tuple[_T1, _T2, _T3]]: ..."},{"col":4,"comment":"null","endLoc":205,"header":"@overload\n    def __new__(\n        cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]\n    ) -> product[tuple[_T1, _T2, _T3, _T4]]","id":1571,"name":"__new__","nodeType":"Function","startLoc":202,"text":"@overload\n    def __new__(\n        cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3], __iter4: Iterable[_T4]\n    ) -> product[tuple[_T1, _T2, _T3, _T4]]: ..."},{"col":4,"comment":"null","endLoc":214,"header":"@overload\n    def __new__(\n        cls,\n        __iter1: Iterable[_T1],\n        __iter2: Iterable[_T2],\n        __iter3: Iterable[_T3],\n        __iter4: Iterable[_T4],\n        __iter5: Iterable[_T5],\n    ) -> product[tuple[_T1, _T2, _T3, _T4, _T5]]","id":1572,"name":"__new__","nodeType":"Function","startLoc":206,"text":"@overload\n    def __new__(\n        cls,\n        __iter1: Iterable[_T1],\n        __iter2: Iterable[_T2],\n        __iter3: Iterable[_T3],\n        __iter4: Iterable[_T4],\n        __iter5: Iterable[_T5],\n    ) -> product[tuple[_T1, _T2, _T3, _T4, _T5]]: ..."},{"col":4,"comment":"null","endLoc":224,"header":"@overload\n    def __new__(\n        cls,\n        __iter1: Iterable[_T1],\n        __iter2: Iterable[_T2],\n        __iter3: Iterable[_T3],\n        __iter4: Iterable[_T4],\n        __iter5: Iterable[_T5],\n        __iter6: Iterable[_T6],\n    ) -> product[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]","id":1573,"name":"__new__","nodeType":"Function","startLoc":215,"text":"@overload\n    def __new__(\n        cls,\n        __iter1: Iterable[_T1],\n        __iter2: Iterable[_T2],\n        __iter3: Iterable[_T3],\n        __iter4: Iterable[_T4],\n        __iter5: Iterable[_T5],\n        __iter6: Iterable[_T6],\n    ) -> product[tuple[_T1, _T2, _T3, _T4, _T5, _T6]]: ..."},{"col":0,"comment":"null","endLoc":1465,"header":"def 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)","id":1574,"name":"histplot","nodeType":"Function","startLoc":1374,"text":"def 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"},{"col":0,"comment":"null","endLoc":906,"header":"def _make_identity_transforms() -> TransFuncs","id":1575,"name":"_make_identity_transforms","nodeType":"Function","startLoc":901,"text":"def _make_identity_transforms() -> TransFuncs:\n\n    def identity(x):\n        return x\n\n    return identity, identity"},{"col":4,"comment":"null","endLoc":236,"header":"@overload\n    def __new__(\n        cls,\n        __iter1: Iterable[Any],\n        __iter2: Iterable[Any],\n        __iter3: Iterable[Any],\n        __iter4: Iterable[Any],\n        __iter5: Iterable[Any],\n        __iter6: Iterable[Any],\n        __iter7: Iterable[Any],\n        *iterables: Iterable[Any],\n    ) -> product[tuple[Any, ...]]","id":1576,"name":"__new__","nodeType":"Function","startLoc":225,"text":"@overload\n    def __new__(\n        cls,\n        __iter1: Iterable[Any],\n        __iter2: Iterable[Any],\n        __iter3: Iterable[Any],\n        __iter4: Iterable[Any],\n        __iter5: Iterable[Any],\n        __iter6: Iterable[Any],\n        __iter7: Iterable[Any],\n        *iterables: Iterable[Any],\n    ) -> product[tuple[Any, ...]]: ..."},{"col":4,"comment":"null","endLoc":238,"header":"@overload\n    def __new__(cls, *iterables: Iterable[_T1], repeat: int) -> product[tuple[_T1, ...]]","id":1577,"name":"__new__","nodeType":"Function","startLoc":237,"text":"@overload\n    def __new__(cls, *iterables: Iterable[_T1], repeat: int) -> product[tuple[_T1, ...]]: ..."},{"col":4,"comment":"null","endLoc":240,"header":"@overload\n    def __new__(cls, *iterables: Iterable[Any], repeat: int = ...) -> product[tuple[Any, ...]]","id":1578,"name":"__new__","nodeType":"Function","startLoc":239,"text":"@overload\n    def __new__(cls, *iterables: Iterable[Any], repeat: int = ...) -> product[tuple[Any, ...]]: ..."},{"col":4,"comment":"null","endLoc":241,"header":"def __iter__(self) -> Self","id":1579,"name":"__iter__","nodeType":"Function","startLoc":241,"text":"def __iter__(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":242,"header":"def __next__(self) -> _T_co","id":1580,"name":"__next__","nodeType":"Function","startLoc":242,"text":"def __next__(self) -> _T_co: ..."},{"className":"product","col":0,"comment":"\n    product(*iterables, repeat=1) --> product object\n    \n    Cartesian product of input iterables.  Equivalent to nested for-loops.\n    \n    For example, product(A, B) returns the same as:  ((x,y) for x in A for y in B).\n    The leftmost iterators are in the outermost for-loop, so the output tuples\n    cycle in a manner similar to an odometer (with the rightmost element changing\n    on every iteration).\n    \n    To compute the product of an iterable with itself, specify the number\n    of repetitions with the optional repeat keyword argument. For example,\n    product(A, repeat=4) means the same as product(A, A, A, A).\n    \n    product('ab', range(3)) --> ('a',0) ('a',1) ('a',2) ('b',0) ('b',1) ('b',2)\n    product((0,1), (0,1), (0,1)) --> (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ...\n    ","endLoc":554,"id":1581,"nodeType":"Class","startLoc":505,"text":"class product(object):\n    \"\"\"\n    product(*iterables, repeat=1) --> product object\n    \n    Cartesian product of input iterables.  Equivalent to nested for-loops.\n    \n    For example, product(A, B) returns the same as:  ((x,y) for x in A for y in B).\n    The leftmost iterators are in the outermost for-loop, so the output tuples\n    cycle in a manner similar to an odometer (with the rightmost element changing\n    on every iteration).\n    \n    To compute the product of an iterable with itself, specify the number\n    of repetitions with the optional repeat keyword argument. For example,\n    product(A, repeat=4) means the same as product(A, A, A, A).\n    \n    product('ab', range(3)) --> ('a',0) ('a',1) ('a',2) ('b',0) ('b',1) ('b',2)\n    product((0,1), (0,1), (0,1)) --> (0,0,0) (0,0,1) (0,1,0) (0,1,1) (1,0,0) ...\n    \"\"\"\n    def __getattribute__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Return getattr(self, name). \"\"\"\n        pass\n\n    def __init__(self, *iterables, repeat=1): # known case of itertools.product.__init__\n        \"\"\" Initialize self.  See help(type(self)) for accurate signature. \"\"\"\n        return []\n\n    def __iter__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Implement iter(self). \"\"\"\n        pass\n\n    @staticmethod # known case of __new__\n    def __new__(*args, **kwargs): # real signature unknown\n        \"\"\" Create and return a new object.  See help(type) for accurate signature. \"\"\"\n        pass\n\n    def __next__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Implement next(self). \"\"\"\n        pass\n\n    def __reduce__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Return state information for pickling. \"\"\"\n        pass\n\n    def __setstate__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Set state information for unpickling. \"\"\"\n        pass\n\n    def __sizeof__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Returns size in memory, in bytes. \"\"\"\n        pass"},{"col":4,"comment":"null","endLoc":794,"header":"def __init__(self, x, y, hue, data, order, hue_order,\n                 orient, color, palette, saturation,\n                 width, dodge, fliersize, linewidth)","id":1582,"name":"__init__","nodeType":"Function","startLoc":781,"text":"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"},{"col":4,"comment":"null","endLoc":200,"header":"def _plot(self, split_gen, scales, orient)","id":1583,"name":"_plot","nodeType":"Function","startLoc":169,"text":"def _plot(self, split_gen, scales, orient):\n\n        line_data = {}\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            segments = self._setup_segments(data, orient)\n            line_data[ax][\"segments\"].extend(segments)\n            n = len(segments)\n\n            vals = resolve_properties(self, keys, scales)\n            vals[\"color\"] = resolve_color(self, keys, scales=scales)\n\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        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            if ax_data[\"segments\"]:\n                xy = np.concatenate(ax_data[\"segments\"])\n                ax.update_datalim(xy)"},{"col":0,"comment":"null","endLoc":946,"header":"def _make_log_transforms(base: float | None = None) -> TransFuncs","id":1585,"name":"_make_log_transforms","nodeType":"Function","startLoc":924,"text":"def _make_log_transforms(base: float | None = None) -> TransFuncs:\n\n    fs: TransFuncs\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: ArrayLike) -> ArrayLike:\n        with np.errstate(invalid=\"ignore\", divide=\"ignore\"):\n            return fs[0](x)\n\n    def exp(x: ArrayLike) -> ArrayLike:\n        with np.errstate(invalid=\"ignore\", divide=\"ignore\"):\n            return fs[1](x)\n\n    return log, exp"},{"attributeType":"str","col":4,"comment":"null","endLoc":168,"id":1587,"name":"imdir","nodeType":"Attribute","startLoc":168,"text":"imdir"},{"fileName":"cm.py","filePath":"seaborn","id":1588,"nodeType":"File","text":"from matplotlib import colors\nfrom seaborn._compat import register_colormap\n\n\n_rocket_lut = [\n    [ 0.01060815, 0.01808215, 0.10018654],\n    [ 0.01428972, 0.02048237, 0.10374486],\n    [ 0.01831941, 0.0229766 , 0.10738511],\n    [ 0.02275049, 0.02554464, 0.11108639],\n    [ 0.02759119, 0.02818316, 0.11483751],\n    [ 0.03285175, 0.03088792, 0.11863035],\n    [ 0.03853466, 0.03365771, 0.12245873],\n    [ 0.04447016, 0.03648425, 0.12631831],\n    [ 0.05032105, 0.03936808, 0.13020508],\n    [ 0.05611171, 0.04224835, 0.13411624],\n    [ 0.0618531 , 0.04504866, 0.13804929],\n    [ 0.06755457, 0.04778179, 0.14200206],\n    [ 0.0732236 , 0.05045047, 0.14597263],\n    [ 0.0788708 , 0.05305461, 0.14995981],\n    [ 0.08450105, 0.05559631, 0.15396203],\n    [ 0.09011319, 0.05808059, 0.15797687],\n    [ 0.09572396, 0.06050127, 0.16200507],\n    [ 0.10132312, 0.06286782, 0.16604287],\n    [ 0.10692823, 0.06517224, 0.17009175],\n    [ 0.1125315 , 0.06742194, 0.17414848],\n    [ 0.11813947, 0.06961499, 0.17821272],\n    [ 0.12375803, 0.07174938, 0.18228425],\n    [ 0.12938228, 0.07383015, 0.18636053],\n    [ 0.13501631, 0.07585609, 0.19044109],\n    [ 0.14066867, 0.0778224 , 0.19452676],\n    [ 0.14633406, 0.07973393, 0.1986151 ],\n    [ 0.15201338, 0.08159108, 0.20270523],\n    [ 0.15770877, 0.08339312, 0.20679668],\n    [ 0.16342174, 0.0851396 , 0.21088893],\n    [ 0.16915387, 0.08682996, 0.21498104],\n    [ 0.17489524, 0.08848235, 0.2190294 ],\n    [ 0.18065495, 0.09009031, 0.22303512],\n    [ 0.18643324, 0.09165431, 0.22699705],\n    [ 0.19223028, 0.09317479, 0.23091409],\n    [ 0.19804623, 0.09465217, 0.23478512],\n    [ 0.20388117, 0.09608689, 0.23860907],\n    [ 0.20973515, 0.09747934, 0.24238489],\n    [ 0.21560818, 0.09882993, 0.24611154],\n    [ 0.22150014, 0.10013944, 0.2497868 ],\n    [ 0.22741085, 0.10140876, 0.25340813],\n    [ 0.23334047, 0.10263737, 0.25697736],\n    [ 0.23928891, 0.10382562, 0.2604936 ],\n    [ 0.24525608, 0.10497384, 0.26395596],\n    [ 0.25124182, 0.10608236, 0.26736359],\n    [ 0.25724602, 0.10715148, 0.27071569],\n    [ 0.26326851, 0.1081815 , 0.27401148],\n    [ 0.26930915, 0.1091727 , 0.2772502 ],\n    [ 0.27536766, 0.11012568, 0.28043021],\n    [ 0.28144375, 0.11104133, 0.2835489 ],\n    [ 0.2875374 , 0.11191896, 0.28660853],\n    [ 0.29364846, 0.11275876, 0.2896085 ],\n    [ 0.29977678, 0.11356089, 0.29254823],\n    [ 0.30592213, 0.11432553, 0.29542718],\n    [ 0.31208435, 0.11505284, 0.29824485],\n    [ 0.31826327, 0.1157429 , 0.30100076],\n    [ 0.32445869, 0.11639585, 0.30369448],\n    [ 0.33067031, 0.11701189, 0.30632563],\n    [ 0.33689808, 0.11759095, 0.3088938 ],\n    [ 0.34314168, 0.11813362, 0.31139721],\n    [ 0.34940101, 0.11863987, 0.3138355 ],\n    [ 0.355676  , 0.11910909, 0.31620996],\n    [ 0.36196644, 0.1195413 , 0.31852037],\n    [ 0.36827206, 0.11993653, 0.32076656],\n    [ 0.37459292, 0.12029443, 0.32294825],\n    [ 0.38092887, 0.12061482, 0.32506528],\n    [ 0.38727975, 0.12089756, 0.3271175 ],\n    [ 0.39364518, 0.12114272, 0.32910494],\n    [ 0.40002537, 0.12134964, 0.33102734],\n    [ 0.40642019, 0.12151801, 0.33288464],\n    [ 0.41282936, 0.12164769, 0.33467689],\n    [ 0.41925278, 0.12173833, 0.33640407],\n    [ 0.42569057, 0.12178916, 0.33806605],\n    [ 0.43214263, 0.12179973, 0.33966284],\n    [ 0.43860848, 0.12177004, 0.34119475],\n    [ 0.44508855, 0.12169883, 0.34266151],\n    [ 0.45158266, 0.12158557, 0.34406324],\n    [ 0.45809049, 0.12142996, 0.34540024],\n    [ 0.46461238, 0.12123063, 0.34667231],\n    [ 0.47114798, 0.12098721, 0.34787978],\n    [ 0.47769736, 0.12069864, 0.34902273],\n    [ 0.48426077, 0.12036349, 0.35010104],\n    [ 0.49083761, 0.11998161, 0.35111537],\n    [ 0.49742847, 0.11955087, 0.35206533],\n    [ 0.50403286, 0.11907081, 0.35295152],\n    [ 0.51065109, 0.11853959, 0.35377385],\n    [ 0.51728314, 0.1179558 , 0.35453252],\n    [ 0.52392883, 0.11731817, 0.35522789],\n    [ 0.53058853, 0.11662445, 0.35585982],\n    [ 0.53726173, 0.11587369, 0.35642903],\n    [ 0.54394898, 0.11506307, 0.35693521],\n    [ 0.5506426 , 0.11420757, 0.35737863],\n    [ 0.55734473, 0.11330456, 0.35775059],\n    [ 0.56405586, 0.11235265, 0.35804813],\n    [ 0.57077365, 0.11135597, 0.35827146],\n    [ 0.5774991 , 0.11031233, 0.35841679],\n    [ 0.58422945, 0.10922707, 0.35848469],\n    [ 0.59096382, 0.10810205, 0.35847347],\n    [ 0.59770215, 0.10693774, 0.35838029],\n    [ 0.60444226, 0.10573912, 0.35820487],\n    [ 0.61118304, 0.10450943, 0.35794557],\n    [ 0.61792306, 0.10325288, 0.35760108],\n    [ 0.62466162, 0.10197244, 0.35716891],\n    [ 0.63139686, 0.10067417, 0.35664819],\n    [ 0.63812122, 0.09938212, 0.35603757],\n    [ 0.64483795, 0.0980891 , 0.35533555],\n    [ 0.65154562, 0.09680192, 0.35454107],\n    [ 0.65824241, 0.09552918, 0.3536529 ],\n    [ 0.66492652, 0.09428017, 0.3526697 ],\n    [ 0.67159578, 0.09306598, 0.35159077],\n    [ 0.67824099, 0.09192342, 0.3504148 ],\n    [ 0.684863  , 0.09085633, 0.34914061],\n    [ 0.69146268, 0.0898675 , 0.34776864],\n    [ 0.69803757, 0.08897226, 0.3462986 ],\n    [ 0.70457834, 0.0882129 , 0.34473046],\n    [ 0.71108138, 0.08761223, 0.3430635 ],\n    [ 0.7175507 , 0.08716212, 0.34129974],\n    [ 0.72398193, 0.08688725, 0.33943958],\n    [ 0.73035829, 0.0868623 , 0.33748452],\n    [ 0.73669146, 0.08704683, 0.33543669],\n    [ 0.74297501, 0.08747196, 0.33329799],\n    [ 0.74919318, 0.08820542, 0.33107204],\n    [ 0.75535825, 0.08919792, 0.32876184],\n    [ 0.76145589, 0.09050716, 0.32637117],\n    [ 0.76748424, 0.09213602, 0.32390525],\n    [ 0.77344838, 0.09405684, 0.32136808],\n    [ 0.77932641, 0.09634794, 0.31876642],\n    [ 0.78513609, 0.09892473, 0.31610488],\n    [ 0.79085854, 0.10184672, 0.313391  ],\n    [ 0.7965014 , 0.10506637, 0.31063031],\n    [ 0.80205987, 0.10858333, 0.30783   ],\n    [ 0.80752799, 0.11239964, 0.30499738],\n    [ 0.81291606, 0.11645784, 0.30213802],\n    [ 0.81820481, 0.12080606, 0.29926105],\n    [ 0.82341472, 0.12535343, 0.2963705 ],\n    [ 0.82852822, 0.13014118, 0.29347474],\n    [ 0.83355779, 0.13511035, 0.29057852],\n    [ 0.83850183, 0.14025098, 0.2876878 ],\n    [ 0.84335441, 0.14556683, 0.28480819],\n    [ 0.84813096, 0.15099892, 0.281943  ],\n    [ 0.85281737, 0.15657772, 0.27909826],\n    [ 0.85742602, 0.1622583 , 0.27627462],\n    [ 0.86196552, 0.16801239, 0.27346473],\n    [ 0.86641628, 0.17387796, 0.27070818],\n    [ 0.87079129, 0.17982114, 0.26797378],\n    [ 0.87507281, 0.18587368, 0.26529697],\n    [ 0.87925878, 0.19203259, 0.26268136],\n    [ 0.8833417 , 0.19830556, 0.26014181],\n    [ 0.88731387, 0.20469941, 0.25769539],\n    [ 0.89116859, 0.21121788, 0.2553592 ],\n    [ 0.89490337, 0.21785614, 0.25314362],\n    [ 0.8985026 , 0.22463251, 0.25108745],\n    [ 0.90197527, 0.23152063, 0.24918223],\n    [ 0.90530097, 0.23854541, 0.24748098],\n    [ 0.90848638, 0.24568473, 0.24598324],\n    [ 0.911533  , 0.25292623, 0.24470258],\n    [ 0.9144225 , 0.26028902, 0.24369359],\n    [ 0.91717106, 0.26773821, 0.24294137],\n    [ 0.91978131, 0.27526191, 0.24245973],\n    [ 0.92223947, 0.28287251, 0.24229568],\n    [ 0.92456587, 0.29053388, 0.24242622],\n    [ 0.92676657, 0.29823282, 0.24285536],\n    [ 0.92882964, 0.30598085, 0.24362274],\n    [ 0.93078135, 0.31373977, 0.24468803],\n    [ 0.93262051, 0.3215093 , 0.24606461],\n    [ 0.93435067, 0.32928362, 0.24775328],\n    [ 0.93599076, 0.33703942, 0.24972157],\n    [ 0.93752831, 0.34479177, 0.25199928],\n    [ 0.93899289, 0.35250734, 0.25452808],\n    [ 0.94036561, 0.36020899, 0.25734661],\n    [ 0.94167588, 0.36786594, 0.2603949 ],\n    [ 0.94291042, 0.37549479, 0.26369821],\n    [ 0.94408513, 0.3830811 , 0.26722004],\n    [ 0.94520419, 0.39062329, 0.27094924],\n    [ 0.94625977, 0.39813168, 0.27489742],\n    [ 0.94727016, 0.4055909 , 0.27902322],\n    [ 0.94823505, 0.41300424, 0.28332283],\n    [ 0.94914549, 0.42038251, 0.28780969],\n    [ 0.95001704, 0.42771398, 0.29244728],\n    [ 0.95085121, 0.43500005, 0.29722817],\n    [ 0.95165009, 0.44224144, 0.30214494],\n    [ 0.9524044 , 0.44944853, 0.3072105 ],\n    [ 0.95312556, 0.45661389, 0.31239776],\n    [ 0.95381595, 0.46373781, 0.31769923],\n    [ 0.95447591, 0.47082238, 0.32310953],\n    [ 0.95510255, 0.47787236, 0.32862553],\n    [ 0.95569679, 0.48489115, 0.33421404],\n    [ 0.95626788, 0.49187351, 0.33985601],\n    [ 0.95681685, 0.49882008, 0.34555431],\n    [ 0.9573439 , 0.50573243, 0.35130912],\n    [ 0.95784842, 0.51261283, 0.35711942],\n    [ 0.95833051, 0.51946267, 0.36298589],\n    [ 0.95879054, 0.52628305, 0.36890904],\n    [ 0.95922872, 0.53307513, 0.3748895 ],\n    [ 0.95964538, 0.53983991, 0.38092784],\n    [ 0.96004345, 0.54657593, 0.3870292 ],\n    [ 0.96042097, 0.55328624, 0.39319057],\n    [ 0.96077819, 0.55997184, 0.39941173],\n    [ 0.9611152 , 0.5666337 , 0.40569343],\n    [ 0.96143273, 0.57327231, 0.41203603],\n    [ 0.96173392, 0.57988594, 0.41844491],\n    [ 0.96201757, 0.58647675, 0.42491751],\n    [ 0.96228344, 0.59304598, 0.43145271],\n    [ 0.96253168, 0.5995944 , 0.43805131],\n    [ 0.96276513, 0.60612062, 0.44471698],\n    [ 0.96298491, 0.6126247 , 0.45145074],\n    [ 0.96318967, 0.61910879, 0.45824902],\n    [ 0.96337949, 0.6255736 , 0.46511271],\n    [ 0.96355923, 0.63201624, 0.47204746],\n    [ 0.96372785, 0.63843852, 0.47905028],\n    [ 0.96388426, 0.64484214, 0.4861196 ],\n    [ 0.96403203, 0.65122535, 0.4932578 ],\n    [ 0.96417332, 0.65758729, 0.50046894],\n    [ 0.9643063 , 0.66393045, 0.5077467 ],\n    [ 0.96443322, 0.67025402, 0.51509334],\n    [ 0.96455845, 0.67655564, 0.52251447],\n    [ 0.96467922, 0.68283846, 0.53000231],\n    [ 0.96479861, 0.68910113, 0.53756026],\n    [ 0.96492035, 0.69534192, 0.5451917 ],\n    [ 0.96504223, 0.7015636 , 0.5528892 ],\n    [ 0.96516917, 0.70776351, 0.5606593 ],\n    [ 0.96530224, 0.71394212, 0.56849894],\n    [ 0.96544032, 0.72010124, 0.57640375],\n    [ 0.96559206, 0.72623592, 0.58438387],\n    [ 0.96575293, 0.73235058, 0.59242739],\n    [ 0.96592829, 0.73844258, 0.60053991],\n    [ 0.96612013, 0.74451182, 0.60871954],\n    [ 0.96632832, 0.75055966, 0.61696136],\n    [ 0.96656022, 0.75658231, 0.62527295],\n    [ 0.96681185, 0.76258381, 0.63364277],\n    [ 0.96709183, 0.76855969, 0.64207921],\n    [ 0.96739773, 0.77451297, 0.65057302],\n    [ 0.96773482, 0.78044149, 0.65912731],\n    [ 0.96810471, 0.78634563, 0.66773889],\n    [ 0.96850919, 0.79222565, 0.6764046 ],\n    [ 0.96893132, 0.79809112, 0.68512266],\n    [ 0.96935926, 0.80395415, 0.69383201],\n    [ 0.9698028 , 0.80981139, 0.70252255],\n    [ 0.97025511, 0.81566605, 0.71120296],\n    [ 0.97071849, 0.82151775, 0.71987163],\n    [ 0.97120159, 0.82736371, 0.72851999],\n    [ 0.97169389, 0.83320847, 0.73716071],\n    [ 0.97220061, 0.83905052, 0.74578903],\n    [ 0.97272597, 0.84488881, 0.75440141],\n    [ 0.97327085, 0.85072354, 0.76299805],\n    [ 0.97383206, 0.85655639, 0.77158353],\n    [ 0.97441222, 0.86238689, 0.78015619],\n    [ 0.97501782, 0.86821321, 0.78871034],\n    [ 0.97564391, 0.87403763, 0.79725261],\n    [ 0.97628674, 0.87986189, 0.8057883 ],\n    [ 0.97696114, 0.88568129, 0.81430324],\n    [ 0.97765722, 0.89149971, 0.82280948],\n    [ 0.97837585, 0.89731727, 0.83130786],\n    [ 0.97912374, 0.90313207, 0.83979337],\n    [ 0.979891  , 0.90894778, 0.84827858],\n    [ 0.98067764, 0.91476465, 0.85676611],\n    [ 0.98137749, 0.92061729, 0.86536915]\n]\n\n\n_mako_lut = [\n    [ 0.04503935, 0.01482344, 0.02092227],\n    [ 0.04933018, 0.01709292, 0.02535719],\n    [ 0.05356262, 0.01950702, 0.03018802],\n    [ 0.05774337, 0.02205989, 0.03545515],\n    [ 0.06188095, 0.02474764, 0.04115287],\n    [ 0.06598247, 0.0275665 , 0.04691409],\n    [ 0.07005374, 0.03051278, 0.05264306],\n    [ 0.07409947, 0.03358324, 0.05834631],\n    [ 0.07812339, 0.03677446, 0.06403249],\n    [ 0.08212852, 0.0400833 , 0.06970862],\n    [ 0.08611731, 0.04339148, 0.07538208],\n    [ 0.09009161, 0.04664706, 0.08105568],\n    [ 0.09405308, 0.04985685, 0.08673591],\n    [ 0.09800301, 0.05302279, 0.09242646],\n    [ 0.10194255, 0.05614641, 0.09813162],\n    [ 0.10587261, 0.05922941, 0.103854  ],\n    [ 0.1097942 , 0.06227277, 0.10959847],\n    [ 0.11370826, 0.06527747, 0.11536893],\n    [ 0.11761516, 0.06824548, 0.12116393],\n    [ 0.12151575, 0.07117741, 0.12698763],\n    [ 0.12541095, 0.07407363, 0.1328442 ],\n    [ 0.12930083, 0.07693611, 0.13873064],\n    [ 0.13317849, 0.07976988, 0.14465095],\n    [ 0.13701138, 0.08259683, 0.15060265],\n    [ 0.14079223, 0.08542126, 0.15659379],\n    [ 0.14452486, 0.08824175, 0.16262484],\n    [ 0.14820351, 0.09106304, 0.16869476],\n    [ 0.15183185, 0.09388372, 0.17480366],\n    [ 0.15540398, 0.09670855, 0.18094993],\n    [ 0.15892417, 0.09953561, 0.18713384],\n    [ 0.16238588, 0.10236998, 0.19335329],\n    [ 0.16579435, 0.10520905, 0.19960847],\n    [ 0.16914226, 0.10805832, 0.20589698],\n    [ 0.17243586, 0.11091443, 0.21221911],\n    [ 0.17566717, 0.11378321, 0.21857219],\n    [ 0.17884322, 0.11666074, 0.2249565 ],\n    [ 0.18195582, 0.11955283, 0.23136943],\n    [ 0.18501213, 0.12245547, 0.23781116],\n    [ 0.18800459, 0.12537395, 0.24427914],\n    [ 0.19093944, 0.1283047 , 0.25077369],\n    [ 0.19381092, 0.13125179, 0.25729255],\n    [ 0.19662307, 0.13421303, 0.26383543],\n    [ 0.19937337, 0.13719028, 0.27040111],\n    [ 0.20206187, 0.14018372, 0.27698891],\n    [ 0.20469116, 0.14319196, 0.28359861],\n    [ 0.20725547, 0.14621882, 0.29022775],\n    [ 0.20976258, 0.14925954, 0.29687795],\n    [ 0.21220409, 0.15231929, 0.30354703],\n    [ 0.21458611, 0.15539445, 0.31023563],\n    [ 0.21690827, 0.15848519, 0.31694355],\n    [ 0.21916481, 0.16159489, 0.32366939],\n    [ 0.2213631 , 0.16471913, 0.33041431],\n    [ 0.22349947, 0.1678599 , 0.33717781],\n    [ 0.2255714 , 0.1710185 , 0.34395925],\n    [ 0.22758415, 0.17419169, 0.35075983],\n    [ 0.22953569, 0.17738041, 0.35757941],\n    [ 0.23142077, 0.18058733, 0.3644173 ],\n    [ 0.2332454 , 0.18380872, 0.37127514],\n    [ 0.2350092 , 0.18704459, 0.3781528 ],\n    [ 0.23670785, 0.190297  , 0.38504973],\n    [ 0.23834119, 0.19356547, 0.39196711],\n    [ 0.23991189, 0.19684817, 0.39890581],\n    [ 0.24141903, 0.20014508, 0.4058667 ],\n    [ 0.24286214, 0.20345642, 0.4128484 ],\n    [ 0.24423453, 0.20678459, 0.41985299],\n    [ 0.24554109, 0.21012669, 0.42688124],\n    [ 0.2467815 , 0.21348266, 0.43393244],\n    [ 0.24795393, 0.21685249, 0.4410088 ],\n    [ 0.24905614, 0.22023618, 0.448113  ],\n    [ 0.25007383, 0.22365053, 0.45519562],\n    [ 0.25098926, 0.22710664, 0.46223892],\n    [ 0.25179696, 0.23060342, 0.46925447],\n    [ 0.25249346, 0.23414353, 0.47623196],\n    [ 0.25307401, 0.23772973, 0.48316271],\n    [ 0.25353152, 0.24136961, 0.49001976],\n    [ 0.25386167, 0.24506548, 0.49679407],\n    [ 0.25406082, 0.2488164 , 0.50348932],\n    [ 0.25412435, 0.25262843, 0.51007843],\n    [ 0.25404842, 0.25650743, 0.51653282],\n    [ 0.25383134, 0.26044852, 0.52286845],\n    [ 0.2534705 , 0.26446165, 0.52903422],\n    [ 0.25296722, 0.2685428 , 0.53503572],\n    [ 0.2523226 , 0.27269346, 0.54085315],\n    [ 0.25153974, 0.27691629, 0.54645752],\n    [ 0.25062402, 0.28120467, 0.55185939],\n    [ 0.24958205, 0.28556371, 0.55701246],\n    [ 0.24842386, 0.28998148, 0.56194601],\n    [ 0.24715928, 0.29446327, 0.56660884],\n    [ 0.24580099, 0.29899398, 0.57104399],\n    [ 0.24436202, 0.30357852, 0.57519929],\n    [ 0.24285591, 0.30819938, 0.57913247],\n    [ 0.24129828, 0.31286235, 0.58278615],\n    [ 0.23970131, 0.3175495 , 0.5862272 ],\n    [ 0.23807973, 0.32226344, 0.58941872],\n    [ 0.23644557, 0.32699241, 0.59240198],\n    [ 0.2348113 , 0.33173196, 0.59518282],\n    [ 0.23318874, 0.33648036, 0.59775543],\n    [ 0.2315855 , 0.34122763, 0.60016456],\n    [ 0.23001121, 0.34597357, 0.60240251],\n    [ 0.2284748 , 0.35071512, 0.6044784 ],\n    [ 0.22698081, 0.35544612, 0.60642528],\n    [ 0.22553305, 0.36016515, 0.60825252],\n    [ 0.22413977, 0.36487341, 0.60994938],\n    [ 0.22280246, 0.36956728, 0.61154118],\n    [ 0.22152555, 0.37424409, 0.61304472],\n    [ 0.22030752, 0.37890437, 0.61446646],\n    [ 0.2191538 , 0.38354668, 0.61581561],\n    [ 0.21806257, 0.38817169, 0.61709794],\n    [ 0.21703799, 0.39277882, 0.61831922],\n    [ 0.21607792, 0.39736958, 0.61948028],\n    [ 0.21518463, 0.40194196, 0.62059763],\n    [ 0.21435467, 0.40649717, 0.62167507],\n    [ 0.21358663, 0.41103579, 0.62271724],\n    [ 0.21288172, 0.41555771, 0.62373011],\n    [ 0.21223835, 0.42006355, 0.62471794],\n    [ 0.21165312, 0.42455441, 0.62568371],\n    [ 0.21112526, 0.42903064, 0.6266318 ],\n    [ 0.21065161, 0.43349321, 0.62756504],\n    [ 0.21023306, 0.43794288, 0.62848279],\n    [ 0.20985996, 0.44238227, 0.62938329],\n    [ 0.20951045, 0.44680966, 0.63030696],\n    [ 0.20916709, 0.45122981, 0.63124483],\n    [ 0.20882976, 0.45564335, 0.63219599],\n    [ 0.20849798, 0.46005094, 0.63315928],\n    [ 0.20817199, 0.46445309, 0.63413391],\n    [ 0.20785149, 0.46885041, 0.63511876],\n    [ 0.20753716, 0.47324327, 0.63611321],\n    [ 0.20722876, 0.47763224, 0.63711608],\n    [ 0.20692679, 0.48201774, 0.63812656],\n    [ 0.20663156, 0.48640018, 0.63914367],\n    [ 0.20634336, 0.49078002, 0.64016638],\n    [ 0.20606303, 0.49515755, 0.6411939 ],\n    [ 0.20578999, 0.49953341, 0.64222457],\n    [ 0.20552612, 0.50390766, 0.64325811],\n    [ 0.20527189, 0.50828072, 0.64429331],\n    [ 0.20502868, 0.51265277, 0.64532947],\n    [ 0.20479718, 0.51702417, 0.64636539],\n    [ 0.20457804, 0.52139527, 0.64739979],\n    [ 0.20437304, 0.52576622, 0.64843198],\n    [ 0.20418396, 0.53013715, 0.64946117],\n    [ 0.20401238, 0.53450825, 0.65048638],\n    [ 0.20385896, 0.53887991, 0.65150606],\n    [ 0.20372653, 0.54325208, 0.65251978],\n    [ 0.20361709, 0.5476249 , 0.6535266 ],\n    [ 0.20353258, 0.55199854, 0.65452542],\n    [ 0.20347472, 0.55637318, 0.655515  ],\n    [ 0.20344718, 0.56074869, 0.65649508],\n    [ 0.20345161, 0.56512531, 0.65746419],\n    [ 0.20349089, 0.56950304, 0.65842151],\n    [ 0.20356842, 0.57388184, 0.65936642],\n    [ 0.20368663, 0.57826181, 0.66029768],\n    [ 0.20384884, 0.58264293, 0.6612145 ],\n    [ 0.20405904, 0.58702506, 0.66211645],\n    [ 0.20431921, 0.59140842, 0.66300179],\n    [ 0.20463464, 0.59579264, 0.66387079],\n    [ 0.20500731, 0.60017798, 0.66472159],\n    [ 0.20544449, 0.60456387, 0.66555409],\n    [ 0.20596097, 0.60894927, 0.66636568],\n    [ 0.20654832, 0.61333521, 0.66715744],\n    [ 0.20721003, 0.61772167, 0.66792838],\n    [ 0.20795035, 0.62210845, 0.66867802],\n    [ 0.20877302, 0.62649546, 0.66940555],\n    [ 0.20968223, 0.63088252, 0.6701105 ],\n    [ 0.21068163, 0.63526951, 0.67079211],\n    [ 0.21177544, 0.63965621, 0.67145005],\n    [ 0.21298582, 0.64404072, 0.67208182],\n    [ 0.21430361, 0.64842404, 0.67268861],\n    [ 0.21572716, 0.65280655, 0.67326978],\n    [ 0.21726052, 0.65718791, 0.6738255 ],\n    [ 0.21890636, 0.66156803, 0.67435491],\n    [ 0.220668  , 0.66594665, 0.67485792],\n    [ 0.22255447, 0.67032297, 0.67533374],\n    [ 0.22458372, 0.67469531, 0.67578061],\n    [ 0.22673713, 0.67906542, 0.67620044],\n    [ 0.22901625, 0.6834332 , 0.67659251],\n    [ 0.23142316, 0.68779836, 0.67695703],\n    [ 0.23395924, 0.69216072, 0.67729378],\n    [ 0.23663857, 0.69651881, 0.67760151],\n    [ 0.23946645, 0.70087194, 0.67788018],\n    [ 0.24242624, 0.70522162, 0.67813088],\n    [ 0.24549008, 0.70957083, 0.67835215],\n    [ 0.24863372, 0.71392166, 0.67854868],\n    [ 0.25187832, 0.71827158, 0.67872193],\n    [ 0.25524083, 0.72261873, 0.67887024],\n    [ 0.25870947, 0.72696469, 0.67898912],\n    [ 0.26229238, 0.73130855, 0.67907645],\n    [ 0.26604085, 0.73564353, 0.67914062],\n    [ 0.26993099, 0.73997282, 0.67917264],\n    [ 0.27397488, 0.74429484, 0.67917096],\n    [ 0.27822463, 0.74860229, 0.67914468],\n    [ 0.28264201, 0.75290034, 0.67907959],\n    [ 0.2873016 , 0.75717817, 0.67899164],\n    [ 0.29215894, 0.76144162, 0.67886578],\n    [ 0.29729823, 0.76567816, 0.67871894],\n    [ 0.30268199, 0.76989232, 0.67853896],\n    [ 0.30835665, 0.77407636, 0.67833512],\n    [ 0.31435139, 0.77822478, 0.67811118],\n    [ 0.3206671 , 0.78233575, 0.67786729],\n    [ 0.32733158, 0.78640315, 0.67761027],\n    [ 0.33437168, 0.79042043, 0.67734882],\n    [ 0.34182112, 0.79437948, 0.67709394],\n    [ 0.34968889, 0.79827511, 0.67685638],\n    [ 0.35799244, 0.80210037, 0.67664969],\n    [ 0.36675371, 0.80584651, 0.67649539],\n    [ 0.3759816 , 0.80950627, 0.67641393],\n    [ 0.38566792, 0.81307432, 0.67642947],\n    [ 0.39579804, 0.81654592, 0.67656899],\n    [ 0.40634556, 0.81991799, 0.67686215],\n    [ 0.41730243, 0.82318339, 0.67735255],\n    [ 0.4285828 , 0.82635051, 0.6780564 ],\n    [ 0.44012728, 0.82942353, 0.67900049],\n    [ 0.45189421, 0.83240398, 0.68021733],\n    [ 0.46378379, 0.83530763, 0.6817062 ],\n    [ 0.47573199, 0.83814472, 0.68347352],\n    [ 0.48769865, 0.84092197, 0.68552698],\n    [ 0.49962354, 0.84365379, 0.68783929],\n    [ 0.5114027 , 0.8463718 , 0.69029789],\n    [ 0.52301693, 0.84908401, 0.69288545],\n    [ 0.53447549, 0.85179048, 0.69561066],\n    [ 0.54578602, 0.8544913 , 0.69848331],\n    [ 0.55695565, 0.85718723, 0.70150427],\n    [ 0.56798832, 0.85987893, 0.70468261],\n    [ 0.57888639, 0.86256715, 0.70802931],\n    [ 0.5896541 , 0.8652532 , 0.71154204],\n    [ 0.60028928, 0.86793835, 0.71523675],\n    [ 0.61079441, 0.87062438, 0.71910895],\n    [ 0.62116633, 0.87331311, 0.72317003],\n    [ 0.63140509, 0.87600675, 0.72741689],\n    [ 0.64150735, 0.87870746, 0.73185717],\n    [ 0.65147219, 0.8814179 , 0.73648495],\n    [ 0.66129632, 0.8841403 , 0.74130658],\n    [ 0.67097934, 0.88687758, 0.74631123],\n    [ 0.68051833, 0.88963189, 0.75150483],\n    [ 0.68991419, 0.89240612, 0.75687187],\n    [ 0.69916533, 0.89520211, 0.76241714],\n    [ 0.70827373, 0.89802257, 0.76812286],\n    [ 0.71723995, 0.90086891, 0.77399039],\n    [ 0.72606665, 0.90374337, 0.7800041 ],\n    [ 0.73475675, 0.90664718, 0.78615802],\n    [ 0.74331358, 0.90958151, 0.79244474],\n    [ 0.75174143, 0.91254787, 0.79884925],\n    [ 0.76004473, 0.91554656, 0.80536823],\n    [ 0.76827704, 0.91856549, 0.81196513],\n    [ 0.77647029, 0.921603  , 0.81855729],\n    [ 0.78462009, 0.92466151, 0.82514119],\n    [ 0.79273542, 0.92773848, 0.83172131],\n    [ 0.8008109 , 0.93083672, 0.83829355],\n    [ 0.80885107, 0.93395528, 0.84485982],\n    [ 0.81685878, 0.9370938 , 0.85142101],\n    [ 0.82483206, 0.94025378, 0.8579751 ],\n    [ 0.83277661, 0.94343371, 0.86452477],\n    [ 0.84069127, 0.94663473, 0.87106853],\n    [ 0.84857662, 0.9498573 , 0.8776059 ],\n    [ 0.8564431 , 0.95309792, 0.88414253],\n    [ 0.86429066, 0.95635719, 0.89067759],\n    [ 0.87218969, 0.95960708, 0.89725384]\n]\n\n\n_vlag_lut = [\n    [ 0.13850039, 0.41331206, 0.74052025],\n    [ 0.15077609, 0.41762684, 0.73970427],\n    [ 0.16235219, 0.4219191 , 0.7389667 ],\n    [ 0.1733322 , 0.42619024, 0.73832537],\n    [ 0.18382538, 0.43044226, 0.73776764],\n    [ 0.19394034, 0.4346772 , 0.73725867],\n    [ 0.20367115, 0.43889576, 0.73685314],\n    [ 0.21313625, 0.44310003, 0.73648045],\n    [ 0.22231173, 0.44729079, 0.73619681],\n    [ 0.23125148, 0.45146945, 0.73597803],\n    [ 0.23998101, 0.45563715, 0.7358223 ],\n    [ 0.24853358, 0.45979489, 0.73571524],\n    [ 0.25691416, 0.4639437 , 0.73566943],\n    [ 0.26513894, 0.46808455, 0.73568319],\n    [ 0.27322194, 0.47221835, 0.73575497],\n    [ 0.28117543, 0.47634598, 0.73588332],\n    [ 0.28901021, 0.48046826, 0.73606686],\n    [ 0.2967358 , 0.48458597, 0.73630433],\n    [ 0.30436071, 0.48869986, 0.73659451],\n    [ 0.3118955 , 0.49281055, 0.73693255],\n    [ 0.31935389, 0.49691847, 0.73730851],\n    [ 0.32672701, 0.5010247 , 0.73774013],\n    [ 0.33402607, 0.50512971, 0.73821941],\n    [ 0.34125337, 0.50923419, 0.73874905],\n    [ 0.34840921, 0.51333892, 0.73933402],\n    [ 0.35551826, 0.51744353, 0.73994642],\n    [ 0.3625676 , 0.52154929, 0.74060763],\n    [ 0.36956356, 0.52565656, 0.74131327],\n    [ 0.37649902, 0.52976642, 0.74207698],\n    [ 0.38340273, 0.53387791, 0.74286286],\n    [ 0.39025859, 0.53799253, 0.7436962 ],\n    [ 0.39706821, 0.54211081, 0.744578  ],\n    [ 0.40384046, 0.54623277, 0.74549872],\n    [ 0.41058241, 0.55035849, 0.74645094],\n    [ 0.41728385, 0.55448919, 0.74745174],\n    [ 0.42395178, 0.55862494, 0.74849357],\n    [ 0.4305964 , 0.56276546, 0.74956387],\n    [ 0.4372044 , 0.56691228, 0.75068412],\n    [ 0.4437909 , 0.57106468, 0.75183427],\n    [ 0.45035117, 0.5752235 , 0.75302312],\n    [ 0.45687824, 0.57938983, 0.75426297],\n    [ 0.46339713, 0.58356191, 0.75551816],\n    [ 0.46988778, 0.58774195, 0.75682037],\n    [ 0.47635605, 0.59192986, 0.75816245],\n    [ 0.48281101, 0.5961252 , 0.75953212],\n    [ 0.4892374 , 0.60032986, 0.76095418],\n    [ 0.49566225, 0.60454154, 0.76238852],\n    [ 0.50206137, 0.60876307, 0.76387371],\n    [ 0.50845128, 0.61299312, 0.76538551],\n    [ 0.5148258 , 0.61723272, 0.76693475],\n    [ 0.52118385, 0.62148236, 0.76852436],\n    [ 0.52753571, 0.62574126, 0.77013939],\n    [ 0.53386831, 0.63001125, 0.77180152],\n    [ 0.54020159, 0.63429038, 0.7734803 ],\n    [ 0.54651272, 0.63858165, 0.77521306],\n    [ 0.55282975, 0.64288207, 0.77695608],\n    [ 0.55912585, 0.64719519, 0.77875327],\n    [ 0.56542599, 0.65151828, 0.78056551],\n    [ 0.57170924, 0.65585426, 0.78242747],\n    [ 0.57799572, 0.6602009 , 0.78430751],\n    [ 0.58426817, 0.66456073, 0.78623458],\n    [ 0.590544  , 0.66893178, 0.78818117],\n    [ 0.59680758, 0.67331643, 0.79017369],\n    [ 0.60307553, 0.67771273, 0.79218572],\n    [ 0.60934065, 0.68212194, 0.79422987],\n    [ 0.61559495, 0.68654548, 0.7963202 ],\n    [ 0.62185554, 0.69098125, 0.79842918],\n    [ 0.62810662, 0.69543176, 0.80058381],\n    [ 0.63436425, 0.69989499, 0.80275812],\n    [ 0.64061445, 0.70437326, 0.80497621],\n    [ 0.6468706 , 0.70886488, 0.80721641],\n    [ 0.65312213, 0.7133717 , 0.80949719],\n    [ 0.65937818, 0.71789261, 0.81180392],\n    [ 0.66563334, 0.72242871, 0.81414642],\n    [ 0.67189155, 0.72697967, 0.81651872],\n    [ 0.67815314, 0.73154569, 0.81892097],\n    [ 0.68441395, 0.73612771, 0.82136094],\n    [ 0.69068321, 0.74072452, 0.82382353],\n    [ 0.69694776, 0.7453385 , 0.82633199],\n    [ 0.70322431, 0.74996721, 0.8288583 ],\n    [ 0.70949595, 0.75461368, 0.83143221],\n    [ 0.7157774 , 0.75927574, 0.83402904],\n    [ 0.72206299, 0.76395461, 0.83665922],\n    [ 0.72835227, 0.76865061, 0.8393242 ],\n    [ 0.73465238, 0.7733628 , 0.84201224],\n    [ 0.74094862, 0.77809393, 0.84474951],\n    [ 0.74725683, 0.78284158, 0.84750915],\n    [ 0.75357103, 0.78760701, 0.85030217],\n    [ 0.75988961, 0.79239077, 0.85313207],\n    [ 0.76621987, 0.79719185, 0.85598668],\n    [ 0.77255045, 0.8020125 , 0.85888658],\n    [ 0.77889241, 0.80685102, 0.86181298],\n    [ 0.78524572, 0.81170768, 0.86476656],\n    [ 0.79159841, 0.81658489, 0.86776906],\n    [ 0.79796459, 0.82148036, 0.8707962 ],\n    [ 0.80434168, 0.82639479, 0.87385315],\n    [ 0.8107221 , 0.83132983, 0.87695392],\n    [ 0.81711301, 0.8362844 , 0.88008641],\n    [ 0.82351479, 0.84125863, 0.88325045],\n    [ 0.82992772, 0.84625263, 0.88644594],\n    [ 0.83634359, 0.85126806, 0.8896878 ],\n    [ 0.84277295, 0.85630293, 0.89295721],\n    [ 0.84921192, 0.86135782, 0.89626076],\n    [ 0.85566206, 0.866432  , 0.89959467],\n    [ 0.86211514, 0.87152627, 0.90297183],\n    [ 0.86857483, 0.87663856, 0.90638248],\n    [ 0.87504231, 0.88176648, 0.90981938],\n    [ 0.88151194, 0.88690782, 0.91328493],\n    [ 0.88797938, 0.89205857, 0.91677544],\n    [ 0.89443865, 0.89721298, 0.9202854 ],\n    [ 0.90088204, 0.90236294, 0.92380601],\n    [ 0.90729768, 0.90749778, 0.92732797],\n    [ 0.91367037, 0.91260329, 0.93083814],\n    [ 0.91998105, 0.91766106, 0.93431861],\n    [ 0.92620596, 0.92264789, 0.93774647],\n    [ 0.93231683, 0.9275351 , 0.94109192],\n    [ 0.93827772, 0.9322888 , 0.94432312],\n    [ 0.94404755, 0.93686925, 0.94740137],\n    [ 0.94958284, 0.94123072, 0.95027696],\n    [ 0.95482682, 0.9453245 , 0.95291103],\n    [ 0.9597248 , 0.94909728, 0.95525103],\n    [ 0.96422552, 0.95249273, 0.95723271],\n    [ 0.96826161, 0.95545812, 0.95882188],\n    [ 0.97178458, 0.95793984, 0.95995705],\n    [ 0.97474105, 0.95989142, 0.96059997],\n    [ 0.97708604, 0.96127366, 0.96071853],\n    [ 0.97877855, 0.96205832, 0.96030095],\n    [ 0.97978484, 0.96222949, 0.95935496],\n    [ 0.9805997 , 0.96155216, 0.95813083],\n    [ 0.98152619, 0.95993719, 0.95639322],\n    [ 0.9819726 , 0.95766608, 0.95399269],\n    [ 0.98191855, 0.9547873 , 0.95098107],\n    [ 0.98138514, 0.95134771, 0.94740644],\n    [ 0.98040845, 0.94739906, 0.94332125],\n    [ 0.97902107, 0.94300131, 0.93878672],\n    [ 0.97729348, 0.93820409, 0.93385135],\n    [ 0.9752533 , 0.933073  , 0.92858252],\n    [ 0.97297834, 0.92765261, 0.92302309],\n    [ 0.97049104, 0.92200317, 0.91723505],\n    [ 0.96784372, 0.91616744, 0.91126063],\n    [ 0.96507281, 0.91018664, 0.90514124],\n    [ 0.96222034, 0.90409203, 0.89890756],\n    [ 0.9593079 , 0.89791478, 0.89259122],\n    [ 0.95635626, 0.89167908, 0.88621654],\n    [ 0.95338303, 0.88540373, 0.87980238],\n    [ 0.95040174, 0.87910333, 0.87336339],\n    [ 0.94742246, 0.87278899, 0.86691076],\n    [ 0.94445249, 0.86646893, 0.86045277],\n    [ 0.94150476, 0.86014606, 0.85399191],\n    [ 0.93857394, 0.85382798, 0.84753642],\n    [ 0.93566206, 0.84751766, 0.84108935],\n    [ 0.93277194, 0.8412164 , 0.83465197],\n    [ 0.92990106, 0.83492672, 0.82822708],\n    [ 0.92704736, 0.82865028, 0.82181656],\n    [ 0.92422703, 0.82238092, 0.81541333],\n    [ 0.92142581, 0.81612448, 0.80902415],\n    [ 0.91864501, 0.80988032, 0.80264838],\n    [ 0.91587578, 0.80365187, 0.79629001],\n    [ 0.9131367 , 0.79743115, 0.78994   ],\n    [ 0.91041602, 0.79122265, 0.78360361],\n    [ 0.90771071, 0.78502727, 0.77728196],\n    [ 0.90501581, 0.77884674, 0.7709771 ],\n    [ 0.90235365, 0.77267117, 0.76467793],\n    [ 0.8997019 , 0.76650962, 0.75839484],\n    [ 0.89705346, 0.76036481, 0.752131  ],\n    [ 0.89444021, 0.75422253, 0.74587047],\n    [ 0.89183355, 0.74809474, 0.73962689],\n    [ 0.88923216, 0.74198168, 0.73340061],\n    [ 0.88665892, 0.73587283, 0.72717995],\n    [ 0.88408839, 0.72977904, 0.72097718],\n    [ 0.88153537, 0.72369332, 0.71478461],\n    [ 0.87899389, 0.7176179 , 0.70860487],\n    [ 0.87645157, 0.71155805, 0.7024439 ],\n    [ 0.8739399 , 0.70549893, 0.6962854 ],\n    [ 0.87142626, 0.6994551 , 0.69014561],\n    [ 0.8689268 , 0.69341868, 0.68401597],\n    [ 0.86643562, 0.687392  , 0.67789917],\n    [ 0.86394434, 0.68137863, 0.67179927],\n    [ 0.86147586, 0.67536728, 0.665704  ],\n    [ 0.85899928, 0.66937226, 0.6596292 ],\n    [ 0.85654668, 0.66337773, 0.6535577 ],\n    [ 0.85408818, 0.65739772, 0.64750494],\n    [ 0.85164413, 0.65142189, 0.64145983],\n    [ 0.84920091, 0.6454565 , 0.63542932],\n    [ 0.84676427, 0.63949827, 0.62941   ],\n    [ 0.84433231, 0.63354773, 0.62340261],\n    [ 0.84190106, 0.62760645, 0.61740899],\n    [ 0.83947935, 0.62166951, 0.61142404],\n    [ 0.8370538 , 0.61574332, 0.60545478],\n    [ 0.83463975, 0.60981951, 0.59949247],\n    [ 0.83221877, 0.60390724, 0.593547  ],\n    [ 0.82980985, 0.59799607, 0.58760751],\n    [ 0.82740268, 0.59209095, 0.58167944],\n    [ 0.82498638, 0.5861973 , 0.57576866],\n    [ 0.82258181, 0.5803034 , 0.56986307],\n    [ 0.82016611, 0.57442123, 0.56397539],\n    [ 0.81776305, 0.56853725, 0.55809173],\n    [ 0.81534551, 0.56266602, 0.55222741],\n    [ 0.81294293, 0.55679056, 0.5463651 ],\n    [ 0.81052113, 0.55092973, 0.54052443],\n    [ 0.80811509, 0.54506305, 0.53468464],\n    [ 0.80568952, 0.53921036, 0.52886622],\n    [ 0.80327506, 0.53335335, 0.52305077],\n    [ 0.80084727, 0.52750583, 0.51725256],\n    [ 0.79842217, 0.5216578 , 0.51146173],\n    [ 0.79599382, 0.51581223, 0.50568155],\n    [ 0.79355781, 0.50997127, 0.49991444],\n    [ 0.79112596, 0.50412707, 0.49415289],\n    [ 0.78867442, 0.49829386, 0.48841129],\n    [ 0.7862306 , 0.49245398, 0.48267247],\n    [ 0.7837687 , 0.48662309, 0.47695216],\n    [ 0.78130809, 0.4807883 , 0.47123805],\n    [ 0.77884467, 0.47495151, 0.46553236],\n    [ 0.77636283, 0.46912235, 0.45984473],\n    [ 0.77388383, 0.46328617, 0.45416141],\n    [ 0.77138912, 0.45745466, 0.44849398],\n    [ 0.76888874, 0.45162042, 0.44283573],\n    [ 0.76638802, 0.44577901, 0.43718292],\n    [ 0.76386116, 0.43994762, 0.43155211],\n    [ 0.76133542, 0.43410655, 0.42592523],\n    [ 0.75880631, 0.42825801, 0.42030488],\n    [ 0.75624913, 0.42241905, 0.41470727],\n    [ 0.7536919 , 0.41656866, 0.40911347],\n    [ 0.75112748, 0.41071104, 0.40352792],\n    [ 0.74854331, 0.40485474, 0.3979589 ],\n    [ 0.74594723, 0.39899309, 0.39240088],\n    [ 0.74334332, 0.39312199, 0.38685075],\n    [ 0.74073277, 0.38723941, 0.3813074 ],\n    [ 0.73809409, 0.38136133, 0.37578553],\n    [ 0.73544692, 0.37547129, 0.37027123],\n    [ 0.73278943, 0.36956954, 0.36476549],\n    [ 0.73011829, 0.36365761, 0.35927038],\n    [ 0.72743485, 0.35773314, 0.35378465],\n    [ 0.72472722, 0.35180504, 0.34831662],\n    [ 0.72200473, 0.34586421, 0.34285937],\n    [ 0.71927052, 0.33990649, 0.33741033],\n    [ 0.71652049, 0.33393396, 0.33197219],\n    [ 0.71375362, 0.32794602, 0.32654545],\n    [ 0.71096951, 0.32194148, 0.32113016],\n    [ 0.70816772, 0.31591904, 0.31572637],\n    [ 0.70534784, 0.30987734, 0.31033414],\n    [ 0.70250944, 0.30381489, 0.30495353],\n    [ 0.69965211, 0.2977301 , 0.2995846 ],\n    [ 0.6967754 , 0.29162126, 0.29422741],\n    [ 0.69388446, 0.28548074, 0.28887769],\n    [ 0.69097561, 0.2793096 , 0.28353795],\n    [ 0.68803513, 0.27311993, 0.27821876],\n    [ 0.6850794 , 0.26689144, 0.27290694],\n    [ 0.682108  , 0.26062114, 0.26760246],\n    [ 0.67911013, 0.2543177 , 0.26231367],\n    [ 0.67609393, 0.24796818, 0.25703372],\n    [ 0.67305921, 0.24156846, 0.25176238],\n    [ 0.67000176, 0.23511902, 0.24650278],\n    [ 0.66693423, 0.22859879, 0.24124404],\n    [ 0.6638441 , 0.22201742, 0.2359961 ],\n    [ 0.66080672, 0.21526712, 0.23069468]\n]\n\n\n_icefire_lut = [\n    [ 0.73936227, 0.90443867, 0.85757238],\n    [ 0.72888063, 0.89639109, 0.85488394],\n    [ 0.71834255, 0.88842162, 0.8521605 ],\n    [ 0.70773866, 0.88052939, 0.849422  ],\n    [ 0.69706215, 0.87271313, 0.84668315],\n    [ 0.68629021, 0.86497329, 0.84398721],\n    [ 0.67543654, 0.85730617, 0.84130969],\n    [ 0.66448539, 0.84971123, 0.83868005],\n    [ 0.65342679, 0.84218728, 0.83611512],\n    [ 0.64231804, 0.83471867, 0.83358584],\n    [ 0.63117745, 0.827294  , 0.83113431],\n    [ 0.62000484, 0.81991069, 0.82876741],\n    [ 0.60879435, 0.81256797, 0.82648905],\n    [ 0.59754118, 0.80526458, 0.82430414],\n    [ 0.58624247, 0.79799884, 0.82221573],\n    [ 0.57489525, 0.7907688 , 0.82022901],\n    [ 0.56349779, 0.78357215, 0.81834861],\n    [ 0.55204294, 0.77640827, 0.81657563],\n    [ 0.54052516, 0.76927562, 0.81491462],\n    [ 0.52894085, 0.76217215, 0.81336913],\n    [ 0.51728854, 0.75509528, 0.81194156],\n    [ 0.50555676, 0.74804469, 0.81063503],\n    [ 0.49373871, 0.7410187 , 0.80945242],\n    [ 0.48183174, 0.73401449, 0.80839675],\n    [ 0.46982587, 0.72703075, 0.80747097],\n    [ 0.45770893, 0.72006648, 0.80667756],\n    [ 0.44547249, 0.71311941, 0.80601991],\n    [ 0.43318643, 0.70617126, 0.80549278],\n    [ 0.42110294, 0.69916972, 0.80506683],\n    [ 0.40925101, 0.69211059, 0.80473246],\n    [ 0.3976693 , 0.68498786, 0.80448272],\n    [ 0.38632002, 0.67781125, 0.80431024],\n    [ 0.37523981, 0.67057537, 0.80420832],\n    [ 0.36442578, 0.66328229, 0.80417474],\n    [ 0.35385939, 0.65593699, 0.80420591],\n    [ 0.34358916, 0.64853177, 0.8043    ],\n    [ 0.33355526, 0.64107876, 0.80445484],\n    [ 0.32383062, 0.63356578, 0.80467091],\n    [ 0.31434372, 0.62600624, 0.8049475 ],\n    [ 0.30516161, 0.618389  , 0.80528692],\n    [ 0.29623491, 0.61072284, 0.80569021],\n    [ 0.28759072, 0.60300319, 0.80616055],\n    [ 0.27923924, 0.59522877, 0.80669803],\n    [ 0.27114651, 0.5874047 , 0.80730545],\n    [ 0.26337153, 0.57952055, 0.80799113],\n    [ 0.25588696, 0.57157984, 0.80875922],\n    [ 0.248686  , 0.56358255, 0.80961366],\n    [ 0.24180668, 0.55552289, 0.81055123],\n    [ 0.23526251, 0.54739477, 0.8115939 ],\n    [ 0.22921445, 0.53918506, 0.81267292],\n    [ 0.22397687, 0.53086094, 0.8137141 ],\n    [ 0.21977058, 0.52241482, 0.81457651],\n    [ 0.21658989, 0.51384321, 0.81528511],\n    [ 0.21452772, 0.50514155, 0.81577278],\n    [ 0.21372783, 0.49630865, 0.81589566],\n    [ 0.21409503, 0.48734861, 0.81566163],\n    [ 0.2157176 , 0.47827123, 0.81487615],\n    [ 0.21842857, 0.46909168, 0.81351614],\n    [ 0.22211705, 0.45983212, 0.81146983],\n    [ 0.22665681, 0.45052233, 0.80860217],\n    [ 0.23176013, 0.44119137, 0.80494325],\n    [ 0.23727775, 0.43187704, 0.80038017],\n    [ 0.24298285, 0.42261123, 0.79493267],\n    [ 0.24865068, 0.41341842, 0.78869164],\n    [ 0.25423116, 0.40433127, 0.78155831],\n    [ 0.25950239, 0.39535521, 0.77376848],\n    [ 0.2644736 , 0.38651212, 0.76524809],\n    [ 0.26901584, 0.37779582, 0.75621942],\n    [ 0.27318141, 0.36922056, 0.746605  ],\n    [ 0.27690355, 0.3607736 , 0.73659374],\n    [ 0.28023585, 0.35244234, 0.72622103],\n    [ 0.28306009, 0.34438449, 0.71500731],\n    [ 0.28535896, 0.33660243, 0.70303975],\n    [ 0.28708711, 0.32912157, 0.69034504],\n    [ 0.28816354, 0.32200604, 0.67684067],\n    [ 0.28862749, 0.31519824, 0.66278813],\n    [ 0.28847904, 0.30869064, 0.6482815 ],\n    [ 0.28770912, 0.30250126, 0.63331265],\n    [ 0.28640325, 0.29655509, 0.61811374],\n    [ 0.28458943, 0.29082155, 0.60280913],\n    [ 0.28233561, 0.28527482, 0.58742866],\n    [ 0.27967038, 0.2798938 , 0.57204225],\n    [ 0.27665361, 0.27465357, 0.55667809],\n    [ 0.27332564, 0.2695165 , 0.54145387],\n    [ 0.26973851, 0.26447054, 0.52634916],\n    [ 0.2659204 , 0.25949691, 0.511417  ],\n    [ 0.26190145, 0.25458123, 0.49668768],\n    [ 0.2577151 , 0.24971691, 0.48214874],\n    [ 0.25337618, 0.24490494, 0.46778758],\n    [ 0.24890842, 0.24013332, 0.45363816],\n    [ 0.24433654, 0.23539226, 0.4397245 ],\n    [ 0.23967922, 0.23067729, 0.4260591 ],\n    [ 0.23495608, 0.22598894, 0.41262952],\n    [ 0.23018113, 0.22132414, 0.39945577],\n    [ 0.22534609, 0.21670847, 0.38645794],\n    [ 0.22048761, 0.21211723, 0.37372555],\n    [ 0.2156198 , 0.20755389, 0.36125301],\n    [ 0.21074637, 0.20302717, 0.34903192],\n    [ 0.20586893, 0.19855368, 0.33701661],\n    [ 0.20101757, 0.19411573, 0.32529173],\n    [ 0.19619947, 0.18972425, 0.31383846],\n    [ 0.19140726, 0.18540157, 0.30260777],\n    [ 0.1866769 , 0.1811332 , 0.29166583],\n    [ 0.18201285, 0.17694992, 0.28088776],\n    [ 0.17745228, 0.17282141, 0.27044211],\n    [ 0.17300684, 0.16876921, 0.26024893],\n    [ 0.16868273, 0.16479861, 0.25034479],\n    [ 0.16448691, 0.16091728, 0.24075373],\n    [ 0.16043195, 0.15714351, 0.23141745],\n    [ 0.15652427, 0.15348248, 0.22238175],\n    [ 0.15277065, 0.14994111, 0.21368395],\n    [ 0.14918274, 0.14653431, 0.20529486],\n    [ 0.14577095, 0.14327403, 0.19720829],\n    [ 0.14254381, 0.14016944, 0.18944326],\n    [ 0.13951035, 0.13723063, 0.18201072],\n    [ 0.13667798, 0.13446606, 0.17493774],\n    [ 0.13405762, 0.13188822, 0.16820842],\n    [ 0.13165767, 0.12950667, 0.16183275],\n    [ 0.12948748, 0.12733187, 0.15580631],\n    [ 0.12755435, 0.1253723 , 0.15014098],\n    [ 0.12586516, 0.12363617, 0.1448459 ],\n    [ 0.12442647, 0.12213143, 0.13992571],\n    [ 0.12324241, 0.12086419, 0.13539995],\n    [ 0.12232067, 0.11984278, 0.13124644],\n    [ 0.12166209, 0.11907077, 0.12749671],\n    [ 0.12126982, 0.11855309, 0.12415079],\n    [ 0.12114244, 0.11829179, 0.1212385 ],\n    [ 0.12127766, 0.11828837, 0.11878534],\n    [ 0.12284806, 0.1179729 , 0.11772022],\n    [ 0.12619498, 0.11721796, 0.11770203],\n    [ 0.129968  , 0.11663788, 0.11792377],\n    [ 0.13410011, 0.11625146, 0.11839138],\n    [ 0.13855459, 0.11606618, 0.11910584],\n    [ 0.14333775, 0.11607038, 0.1200606 ],\n    [ 0.148417  , 0.11626929, 0.12125453],\n    [ 0.15377389, 0.11666192, 0.12268364],\n    [ 0.15941427, 0.11723486, 0.12433911],\n    [ 0.16533376, 0.11797856, 0.12621303],\n    [ 0.17152547, 0.11888403, 0.12829735],\n    [ 0.17797765, 0.11994436, 0.13058435],\n    [ 0.18468769, 0.12114722, 0.13306426],\n    [ 0.19165663, 0.12247737, 0.13572616],\n    [ 0.19884415, 0.12394381, 0.1385669 ],\n    [ 0.20627181, 0.12551883, 0.14157124],\n    [ 0.21394877, 0.12718055, 0.14472604],\n    [ 0.22184572, 0.12893119, 0.14802579],\n    [ 0.22994394, 0.13076731, 0.15146314],\n    [ 0.23823937, 0.13267611, 0.15502793],\n    [ 0.24676041, 0.13462172, 0.15870321],\n    [ 0.25546457, 0.13661751, 0.16248722],\n    [ 0.26433628, 0.13865956, 0.16637301],\n    [ 0.27341345, 0.14070412, 0.17034221],\n    [ 0.28264773, 0.14277192, 0.1743957 ],\n    [ 0.29202272, 0.14486161, 0.17852793],\n    [ 0.30159648, 0.14691224, 0.1827169 ],\n    [ 0.31129002, 0.14897583, 0.18695213],\n    [ 0.32111555, 0.15103351, 0.19119629],\n    [ 0.33107961, 0.1530674 , 0.19543758],\n    [ 0.34119892, 0.15504762, 0.1996803 ],\n    [ 0.35142388, 0.15701131, 0.20389086],\n    [ 0.36178937, 0.1589124 , 0.20807639],\n    [ 0.37229381, 0.16073993, 0.21223189],\n    [ 0.38288348, 0.16254006, 0.2163249 ],\n    [ 0.39359592, 0.16426336, 0.22036577],\n    [ 0.40444332, 0.16588767, 0.22434027],\n    [ 0.41537995, 0.16745325, 0.2282297 ],\n    [ 0.42640867, 0.16894939, 0.23202755],\n    [ 0.43754706, 0.17034847, 0.23572899],\n    [ 0.44878564, 0.1716535 , 0.23932344],\n    [ 0.4601126 , 0.17287365, 0.24278607],\n    [ 0.47151732, 0.17401641, 0.24610337],\n    [ 0.48300689, 0.17506676, 0.2492737 ],\n    [ 0.49458302, 0.17601892, 0.25227688],\n    [ 0.50623876, 0.17687777, 0.255096  ],\n    [ 0.5179623 , 0.17765528, 0.2577162 ],\n    [ 0.52975234, 0.17835232, 0.2601134 ],\n    [ 0.54159776, 0.17898292, 0.26226847],\n    [ 0.55348804, 0.17956232, 0.26416003],\n    [ 0.56541729, 0.18010175, 0.26575971],\n    [ 0.57736669, 0.180631  , 0.26704888],\n    [ 0.58932081, 0.18117827, 0.26800409],\n    [ 0.60127582, 0.18175888, 0.26858488],\n    [ 0.61319563, 0.1824336 , 0.2687872 ],\n    [ 0.62506376, 0.18324015, 0.26858301],\n    [ 0.63681202, 0.18430173, 0.26795276],\n    [ 0.64842603, 0.18565472, 0.26689463],\n    [ 0.65988195, 0.18734638, 0.26543435],\n    [ 0.67111966, 0.18948885, 0.26357955],\n    [ 0.68209194, 0.19216636, 0.26137175],\n    [ 0.69281185, 0.19535326, 0.25887063],\n    [ 0.70335022, 0.19891271, 0.25617971],\n    [ 0.71375229, 0.20276438, 0.25331365],\n    [ 0.72401436, 0.20691287, 0.25027366],\n    [ 0.73407638, 0.21145051, 0.24710661],\n    [ 0.74396983, 0.21631913, 0.24380715],\n    [ 0.75361506, 0.22163653, 0.24043996],\n    [ 0.7630579 , 0.22731637, 0.23700095],\n    [ 0.77222228, 0.23346231, 0.23356628],\n    [ 0.78115441, 0.23998404, 0.23013825],\n    [ 0.78979746, 0.24694858, 0.22678822],\n    [ 0.79819286, 0.25427223, 0.22352658],\n    [ 0.80630444, 0.26198807, 0.22040877],\n    [ 0.81417437, 0.27001406, 0.21744645],\n    [ 0.82177364, 0.27837336, 0.21468316],\n    [ 0.82915955, 0.28696963, 0.21210766],\n    [ 0.83628628, 0.2958499 , 0.20977813],\n    [ 0.84322168, 0.30491136, 0.20766435],\n    [ 0.84995458, 0.31415945, 0.2057863 ],\n    [ 0.85648867, 0.32358058, 0.20415327],\n    [ 0.86286243, 0.33312058, 0.20274969],\n    [ 0.86908321, 0.34276705, 0.20157271],\n    [ 0.87512876, 0.3525416 , 0.20064949],\n    [ 0.88100349, 0.36243385, 0.19999078],\n    [ 0.8866469 , 0.37249496, 0.1997976 ],\n    [ 0.89203964, 0.38273475, 0.20013431],\n    [ 0.89713496, 0.39318156, 0.20121514],\n    [ 0.90195099, 0.40380687, 0.20301555],\n    [ 0.90648379, 0.41460191, 0.20558847],\n    [ 0.9106967 , 0.42557857, 0.20918529],\n    [ 0.91463791, 0.43668557, 0.21367954],\n    [ 0.91830723, 0.44790913, 0.21916352],\n    [ 0.92171507, 0.45922856, 0.22568002],\n    [ 0.92491786, 0.4705936 , 0.23308207],\n    [ 0.92790792, 0.48200153, 0.24145932],\n    [ 0.93073701, 0.49341219, 0.25065486],\n    [ 0.93343918, 0.5048017 , 0.26056148],\n    [ 0.93602064, 0.51616486, 0.27118485],\n    [ 0.93850535, 0.52748892, 0.28242464],\n    [ 0.94092933, 0.53875462, 0.29416042],\n    [ 0.94330011, 0.5499628 , 0.30634189],\n    [ 0.94563159, 0.56110987, 0.31891624],\n    [ 0.94792955, 0.57219822, 0.33184256],\n    [ 0.95020929, 0.5832232 , 0.34508419],\n    [ 0.95247324, 0.59419035, 0.35859866],\n    [ 0.95471709, 0.60510869, 0.37236035],\n    [ 0.95698411, 0.61595766, 0.38629631],\n    [ 0.95923863, 0.62676473, 0.40043317],\n    [ 0.9615041 , 0.6375203 , 0.41474106],\n    [ 0.96371553, 0.64826619, 0.42928335],\n    [ 0.96591497, 0.65899621, 0.44380444],\n    [ 0.96809871, 0.66971662, 0.45830232],\n    [ 0.9702495 , 0.6804394 , 0.47280492],\n    [ 0.9723881 , 0.69115622, 0.48729272],\n    [ 0.97450723, 0.70187358, 0.50178034],\n    [ 0.9766108 , 0.712592  , 0.51626837],\n    [ 0.97871716, 0.72330511, 0.53074053],\n    [ 0.98082222, 0.73401769, 0.54520694],\n    [ 0.9829001 , 0.74474445, 0.5597019 ],\n    [ 0.98497466, 0.75547635, 0.57420239],\n    [ 0.98705581, 0.76621129, 0.58870185],\n    [ 0.98913325, 0.77695637, 0.60321626],\n    [ 0.99119918, 0.78771716, 0.61775821],\n    [ 0.9932672 , 0.79848979, 0.63231691],\n    [ 0.99535958, 0.80926704, 0.64687278],\n    [ 0.99740544, 0.82008078, 0.66150571],\n    [ 0.9992197 , 0.83100723, 0.6764127 ]\n]\n\n\n_flare_lut = [\n    [0.92907237, 0.68878959, 0.50411509],\n    [0.92891402, 0.68494686, 0.50173994],\n    [0.92864754, 0.68116207, 0.4993754],\n    [0.92836112, 0.67738527, 0.49701572],\n    [0.9280599, 0.67361354, 0.49466044],\n    [0.92775569, 0.66983999, 0.49230866],\n    [0.9274375, 0.66607098, 0.48996097],\n    [0.927111, 0.66230315, 0.48761688],\n    [0.92677996, 0.6585342, 0.485276],\n    [0.92644317, 0.65476476, 0.48293832],\n    [0.92609759, 0.65099658, 0.48060392],\n    [0.925747, 0.64722729, 0.47827244],\n    [0.92539502, 0.64345456, 0.47594352],\n    [0.92503106, 0.6396848, 0.47361782],\n    [0.92466877, 0.6359095, 0.47129427],\n    [0.92429828, 0.63213463, 0.46897349],\n    [0.92392172, 0.62835879, 0.46665526],\n    [0.92354597, 0.62457749, 0.46433898],\n    [0.9231622, 0.6207962, 0.46202524],\n    [0.92277222, 0.61701365, 0.45971384],\n    [0.92237978, 0.61322733, 0.45740444],\n    [0.92198615, 0.60943622, 0.45509686],\n    [0.92158735, 0.60564276, 0.45279137],\n    [0.92118373, 0.60184659, 0.45048789],\n    [0.92077582, 0.59804722, 0.44818634],\n    [0.92036413, 0.59424414, 0.44588663],\n    [0.91994924, 0.5904368, 0.44358868],\n    [0.91952943, 0.58662619, 0.4412926],\n    [0.91910675, 0.58281075, 0.43899817],\n    [0.91868096, 0.57899046, 0.4367054],\n    [0.91825103, 0.57516584, 0.43441436],\n    [0.91781857, 0.57133556, 0.43212486],\n    [0.9173814, 0.56750099, 0.4298371],\n    [0.91694139, 0.56366058, 0.42755089],\n    [0.91649756, 0.55981483, 0.42526631],\n    [0.91604942, 0.55596387, 0.42298339],\n    [0.9155979, 0.55210684, 0.42070204],\n    [0.9151409, 0.54824485, 0.4184247],\n    [0.91466138, 0.54438817, 0.41617858],\n    [0.91416896, 0.54052962, 0.41396347],\n    [0.91366559, 0.53666778, 0.41177769],\n    [0.91315173, 0.53280208, 0.40962196],\n    [0.91262605, 0.52893336, 0.40749715],\n    [0.91208866, 0.52506133, 0.40540404],\n    [0.91153952, 0.52118582, 0.40334346],\n    [0.91097732, 0.51730767, 0.4013163],\n    [0.910403, 0.51342591, 0.39932342],\n    [0.90981494, 0.50954168, 0.39736571],\n    [0.90921368, 0.5056543, 0.39544411],\n    [0.90859797, 0.50176463, 0.39355952],\n    [0.90796841, 0.49787195, 0.39171297],\n    [0.90732341, 0.4939774, 0.38990532],\n    [0.90666382, 0.49008006, 0.38813773],\n    [0.90598815, 0.486181, 0.38641107],\n    [0.90529624, 0.48228017, 0.38472641],\n    [0.90458808, 0.47837738, 0.38308489],\n    [0.90386248, 0.47447348, 0.38148746],\n    [0.90311921, 0.4705685, 0.37993524],\n    [0.90235809, 0.46666239, 0.37842943],\n    [0.90157824, 0.46275577, 0.37697105],\n    [0.90077904, 0.45884905, 0.37556121],\n    [0.89995995, 0.45494253, 0.37420106],\n    [0.89912041, 0.4510366, 0.37289175],\n    [0.8982602, 0.44713126, 0.37163458],\n    [0.89737819, 0.44322747, 0.37043052],\n    [0.89647387, 0.43932557, 0.36928078],\n    [0.89554477, 0.43542759, 0.36818855],\n    [0.89458871, 0.4315354, 0.36715654],\n    [0.89360794, 0.42764714, 0.36618273],\n    [0.89260152, 0.42376366, 0.36526813],\n    [0.8915687, 0.41988565, 0.36441384],\n    [0.89050882, 0.41601371, 0.36362102],\n    [0.8894159, 0.41215334, 0.36289639],\n    [0.888292, 0.40830288, 0.36223756],\n    [0.88713784, 0.40446193, 0.36164328],\n    [0.88595253, 0.40063149, 0.36111438],\n    [0.88473115, 0.39681635, 0.3606566],\n    [0.88347246, 0.39301805, 0.36027074],\n    [0.88217931, 0.38923439, 0.35995244],\n    [0.880851, 0.38546632, 0.35970244],\n    [0.87947728, 0.38172422, 0.35953127],\n    [0.87806542, 0.37800172, 0.35942941],\n    [0.87661509, 0.37429964, 0.35939659],\n    [0.87511668, 0.37062819, 0.35944178],\n    [0.87357554, 0.36698279, 0.35955811],\n    [0.87199254, 0.3633634, 0.35974223],\n    [0.87035691, 0.35978174, 0.36000516],\n    [0.86867647, 0.35623087, 0.36033559],\n    [0.86694949, 0.35271349, 0.36073358],\n    [0.86516775, 0.34923921, 0.36120624],\n    [0.86333996, 0.34580008, 0.36174113],\n    [0.86145909, 0.3424046, 0.36234402],\n    [0.85952586, 0.33905327, 0.36301129],\n    [0.85754536, 0.33574168, 0.36373567],\n    [0.855514, 0.33247568, 0.36451271],\n    [0.85344392, 0.32924217, 0.36533344],\n    [0.8513284, 0.32604977, 0.36620106],\n    [0.84916723, 0.32289973, 0.36711424],\n    [0.84696243, 0.31979068, 0.36806976],\n    [0.84470627, 0.31673295, 0.36907066],\n    [0.84240761, 0.31371695, 0.37010969],\n    [0.84005337, 0.31075974, 0.37119284],\n    [0.83765537, 0.30784814, 0.3723105],\n    [0.83520234, 0.30499724, 0.37346726],\n    [0.83270291, 0.30219766, 0.37465552],\n    [0.83014895, 0.29946081, 0.37587769],\n    [0.82754694, 0.29677989, 0.37712733],\n    [0.82489111, 0.29416352, 0.37840532],\n    [0.82218644, 0.29160665, 0.37970606],\n    [0.81942908, 0.28911553, 0.38102921],\n    [0.81662276, 0.28668665, 0.38236999],\n    [0.81376555, 0.28432371, 0.383727],\n    [0.81085964, 0.28202508, 0.38509649],\n    [0.8079055, 0.27979128, 0.38647583],\n    [0.80490309, 0.27762348, 0.3878626],\n    [0.80185613, 0.2755178, 0.38925253],\n    [0.79876118, 0.27347974, 0.39064559],\n    [0.79562644, 0.27149928, 0.39203532],\n    [0.79244362, 0.2695883, 0.39342447],\n    [0.78922456, 0.26773176, 0.3948046],\n    [0.78596161, 0.26594053, 0.39617873],\n    [0.7826624, 0.26420493, 0.39754146],\n    [0.77932717, 0.26252522, 0.39889102],\n    [0.77595363, 0.2609049, 0.4002279],\n    [0.77254999, 0.25933319, 0.40154704],\n    [0.76911107, 0.25781758, 0.40284959],\n    [0.76564158, 0.25635173, 0.40413341],\n    [0.76214598, 0.25492998, 0.40539471],\n    [0.75861834, 0.25356035, 0.40663694],\n    [0.75506533, 0.25223402, 0.40785559],\n    [0.75148963, 0.2509473, 0.40904966],\n    [0.74788835, 0.24970413, 0.41022028],\n    [0.74426345, 0.24850191, 0.41136599],\n    [0.74061927, 0.24733457, 0.41248516],\n    [0.73695678, 0.24620072, 0.41357737],\n    [0.73327278, 0.24510469, 0.41464364],\n    [0.72957096, 0.24404127, 0.4156828],\n    [0.72585394, 0.24300672, 0.41669383],\n    [0.7221226, 0.24199971, 0.41767651],\n    [0.71837612, 0.24102046, 0.41863486],\n    [0.71463236, 0.24004289, 0.41956983],\n    [0.7108932, 0.23906316, 0.42048681],\n    [0.70715842, 0.23808142, 0.42138647],\n    [0.70342811, 0.2370976, 0.42226844],\n    [0.69970218, 0.23611179, 0.42313282],\n    [0.69598055, 0.2351247, 0.42397678],\n    [0.69226314, 0.23413578, 0.42480327],\n    [0.68854988, 0.23314511, 0.42561234],\n    [0.68484064, 0.23215279, 0.42640419],\n    [0.68113541, 0.23115942, 0.42717615],\n    [0.67743412, 0.23016472, 0.42792989],\n    [0.67373662, 0.22916861, 0.42866642],\n    [0.67004287, 0.22817117, 0.42938576],\n    [0.66635279, 0.22717328, 0.43008427],\n    [0.66266621, 0.22617435, 0.43076552],\n    [0.65898313, 0.22517434, 0.43142956],\n    [0.65530349, 0.22417381, 0.43207427],\n    [0.65162696, 0.22317307, 0.4327001],\n    [0.64795375, 0.22217149, 0.43330852],\n    [0.64428351, 0.22116972, 0.43389854],\n    [0.64061624, 0.22016818, 0.43446845],\n    [0.63695183, 0.21916625, 0.43502123],\n    [0.63329016, 0.21816454, 0.43555493],\n    [0.62963102, 0.2171635, 0.43606881],\n    [0.62597451, 0.21616235, 0.43656529],\n    [0.62232019, 0.21516239, 0.43704153],\n    [0.61866821, 0.21416307, 0.43749868],\n    [0.61501835, 0.21316435, 0.43793808],\n    [0.61137029, 0.21216761, 0.4383556],\n    [0.60772426, 0.2111715, 0.43875552],\n    [0.60407977, 0.21017746, 0.43913439],\n    [0.60043678, 0.20918503, 0.43949412],\n    [0.59679524, 0.20819447, 0.43983393],\n    [0.59315487, 0.20720639, 0.44015254],\n    [0.58951566, 0.20622027, 0.44045213],\n    [0.58587715, 0.20523751, 0.44072926],\n    [0.5822395, 0.20425693, 0.44098758],\n    [0.57860222, 0.20328034, 0.44122241],\n    [0.57496549, 0.20230637, 0.44143805],\n    [0.57132875, 0.20133689, 0.4416298],\n    [0.56769215, 0.20037071, 0.44180142],\n    [0.5640552, 0.19940936, 0.44194923],\n    [0.56041794, 0.19845221, 0.44207535],\n    [0.55678004, 0.1975, 0.44217824],\n    [0.55314129, 0.19655316, 0.44225723],\n    [0.54950166, 0.19561118, 0.44231412],\n    [0.54585987, 0.19467771, 0.44234111],\n    [0.54221157, 0.19375869, 0.44233698],\n    [0.5385549, 0.19285696, 0.44229959],\n    [0.5348913, 0.19197036, 0.44222958],\n    [0.53122177, 0.1910974, 0.44212735],\n    [0.52754464, 0.19024042, 0.44199159],\n    [0.52386353, 0.18939409, 0.44182449],\n    [0.52017476, 0.18856368, 0.44162345],\n    [0.51648277, 0.18774266, 0.44139128],\n    [0.51278481, 0.18693492, 0.44112605],\n    [0.50908361, 0.18613639, 0.4408295],\n    [0.50537784, 0.18534893, 0.44050064],\n    [0.50166912, 0.18457008, 0.44014054],\n    [0.49795686, 0.18380056, 0.43974881],\n    [0.49424218, 0.18303865, 0.43932623],\n    [0.49052472, 0.18228477, 0.43887255],\n    [0.48680565, 0.1815371, 0.43838867],\n    [0.48308419, 0.18079663, 0.43787408],\n    [0.47936222, 0.18006056, 0.43733022],\n    [0.47563799, 0.17933127, 0.43675585],\n    [0.47191466, 0.17860416, 0.43615337],\n    [0.46818879, 0.17788392, 0.43552047],\n    [0.46446454, 0.17716458, 0.43486036],\n    [0.46073893, 0.17645017, 0.43417097],\n    [0.45701462, 0.17573691, 0.43345429],\n    [0.45329097, 0.17502549, 0.43271025],\n    [0.44956744, 0.17431649, 0.4319386],\n    [0.44584668, 0.17360625, 0.43114133],\n    [0.44212538, 0.17289906, 0.43031642],\n    [0.43840678, 0.17219041, 0.42946642],\n    [0.43469046, 0.17148074, 0.42859124],\n    [0.4309749, 0.17077192, 0.42769008],\n    [0.42726297, 0.17006003, 0.42676519],\n    [0.42355299, 0.16934709, 0.42581586],\n    [0.41984535, 0.16863258, 0.42484219],\n    [0.41614149, 0.16791429, 0.42384614],\n    [0.41244029, 0.16719372, 0.42282661],\n    [0.40874177, 0.16647061, 0.42178429],\n    [0.40504765, 0.16574261, 0.42072062],\n    [0.401357, 0.16501079, 0.41963528],\n    [0.397669, 0.16427607, 0.418528],\n    [0.39398585, 0.16353554, 0.41740053],\n    [0.39030735, 0.16278924, 0.41625344],\n    [0.3866314, 0.16203977, 0.41508517],\n    [0.38295904, 0.16128519, 0.41389849],\n    [0.37928736, 0.16052483, 0.41270599],\n    [0.37562649, 0.15974704, 0.41151182],\n    [0.37197803, 0.15895049, 0.41031532],\n    [0.36833779, 0.15813871, 0.40911916],\n    [0.36470944, 0.15730861, 0.40792149],\n    [0.36109117, 0.15646169, 0.40672362],\n    [0.35748213, 0.15559861, 0.40552633],\n    [0.353885, 0.15471714, 0.40432831],\n    [0.35029682, 0.15381967, 0.4031316],\n    [0.34671861, 0.1529053, 0.40193587],\n    [0.34315191, 0.15197275, 0.40074049],\n    [0.33959331, 0.15102466, 0.3995478],\n    [0.33604378, 0.15006017, 0.39835754],\n    [0.33250529, 0.14907766, 0.39716879],\n    [0.32897621, 0.14807831, 0.39598285],\n    [0.3254559, 0.14706248, 0.39480044],\n    [0.32194567, 0.14602909, 0.39362106],\n    [0.31844477, 0.14497857, 0.39244549],\n    [0.31494974, 0.14391333, 0.39127626],\n    [0.31146605, 0.14282918, 0.39011024],\n    [0.30798857, 0.1417297, 0.38895105],\n    [0.30451661, 0.14061515, 0.38779953],\n    [0.30105136, 0.13948445, 0.38665531],\n    [0.2975886, 0.1383403, 0.38552159],\n    [0.29408557, 0.13721193, 0.38442775]\n]\n\n\n_crest_lut = [\n    [0.6468274, 0.80289262, 0.56592265],\n    [0.64233318, 0.80081141, 0.56639461],\n    [0.63791969, 0.7987162, 0.56674976],\n    [0.6335316, 0.79661833, 0.56706128],\n    [0.62915226, 0.7945212, 0.56735066],\n    [0.62477862, 0.79242543, 0.56762143],\n    [0.62042003, 0.79032918, 0.56786129],\n    [0.61606327, 0.78823508, 0.56808666],\n    [0.61171322, 0.78614216, 0.56829092],\n    [0.60736933, 0.78405055, 0.56847436],\n    [0.60302658, 0.78196121, 0.56864272],\n    [0.59868708, 0.77987374, 0.56879289],\n    [0.59435366, 0.77778758, 0.56892099],\n    [0.59001953, 0.77570403, 0.56903477],\n    [0.58568753, 0.77362254, 0.56913028],\n    [0.58135593, 0.77154342, 0.56920908],\n    [0.57702623, 0.76946638, 0.56926895],\n    [0.57269165, 0.76739266, 0.5693172],\n    [0.56835934, 0.76532092, 0.56934507],\n    [0.56402533, 0.76325185, 0.56935664],\n    [0.55968429, 0.76118643, 0.56935732],\n    [0.55534159, 0.75912361, 0.56934052],\n    [0.55099572, 0.75706366, 0.56930743],\n    [0.54664626, 0.75500662, 0.56925799],\n    [0.54228969, 0.75295306, 0.56919546],\n    [0.53792417, 0.75090328, 0.56912118],\n    [0.53355172, 0.74885687, 0.5690324],\n    [0.52917169, 0.74681387, 0.56892926],\n    [0.52478243, 0.74477453, 0.56881287],\n    [0.52038338, 0.74273888, 0.56868323],\n    [0.5159739, 0.74070697, 0.56854039],\n    [0.51155269, 0.73867895, 0.56838507],\n    [0.50711872, 0.73665492, 0.56821764],\n    [0.50267118, 0.73463494, 0.56803826],\n    [0.49822926, 0.73261388, 0.56785146],\n    [0.49381422, 0.73058524, 0.56767484],\n    [0.48942421, 0.72854938, 0.56751036],\n    [0.48505993, 0.72650623, 0.56735752],\n    [0.48072207, 0.72445575, 0.56721583],\n    [0.4764113, 0.72239788, 0.56708475],\n    [0.47212827, 0.72033258, 0.56696376],\n    [0.46787361, 0.71825983, 0.56685231],\n    [0.46364792, 0.71617961, 0.56674986],\n    [0.45945271, 0.71409167, 0.56665625],\n    [0.45528878, 0.71199595, 0.56657103],\n    [0.45115557, 0.70989276, 0.5664931],\n    [0.44705356, 0.70778212, 0.56642189],\n    [0.44298321, 0.70566406, 0.56635683],\n    [0.43894492, 0.70353863, 0.56629734],\n    [0.43493911, 0.70140588, 0.56624286],\n    [0.43096612, 0.69926587, 0.5661928],\n    [0.42702625, 0.69711868, 0.56614659],\n    [0.42311977, 0.69496438, 0.56610368],\n    [0.41924689, 0.69280308, 0.56606355],\n    [0.41540778, 0.69063486, 0.56602564],\n    [0.41160259, 0.68845984, 0.56598944],\n    [0.40783143, 0.68627814, 0.56595436],\n    [0.40409434, 0.68408988, 0.56591994],\n    [0.40039134, 0.68189518, 0.56588564],\n    [0.39672238, 0.6796942, 0.56585103],\n    [0.39308781, 0.67748696, 0.56581581],\n    [0.38949137, 0.67527276, 0.56578084],\n    [0.38592889, 0.67305266, 0.56574422],\n    [0.38240013, 0.67082685, 0.56570561],\n    [0.37890483, 0.66859548, 0.56566462],\n    [0.37544276, 0.66635871, 0.56562081],\n    [0.37201365, 0.66411673, 0.56557372],\n    [0.36861709, 0.6618697, 0.5655231],\n    [0.36525264, 0.65961782, 0.56546873],\n    [0.36191986, 0.65736125, 0.56541032],\n    [0.35861935, 0.65509998, 0.56534768],\n    [0.35535621, 0.65283302, 0.56528211],\n    [0.35212361, 0.65056188, 0.56521171],\n    [0.34892097, 0.64828676, 0.56513633],\n    [0.34574785, 0.64600783, 0.56505539],\n    [0.34260357, 0.64372528, 0.5649689],\n    [0.33948744, 0.64143931, 0.56487679],\n    [0.33639887, 0.6391501, 0.56477869],\n    [0.33334501, 0.63685626, 0.56467661],\n    [0.33031952, 0.63455911, 0.564569],\n    [0.3273199, 0.63225924, 0.56445488],\n    [0.32434526, 0.62995682, 0.56433457],\n    [0.32139487, 0.62765201, 0.56420795],\n    [0.31846807, 0.62534504, 0.56407446],\n    [0.3155731, 0.62303426, 0.56393695],\n    [0.31270304, 0.62072111, 0.56379321],\n    [0.30985436, 0.61840624, 0.56364307],\n    [0.30702635, 0.61608984, 0.56348606],\n    [0.30421803, 0.61377205, 0.56332267],\n    [0.30143611, 0.61145167, 0.56315419],\n    [0.29867863, 0.60912907, 0.56298054],\n    [0.29593872, 0.60680554, 0.56280022],\n    [0.29321538, 0.60448121, 0.56261376],\n    [0.2905079, 0.60215628, 0.56242036],\n    [0.28782827, 0.5998285, 0.56222366],\n    [0.28516521, 0.59749996, 0.56202093],\n    [0.28251558, 0.59517119, 0.56181204],\n    [0.27987847, 0.59284232, 0.56159709],\n    [0.27726216, 0.59051189, 0.56137785],\n    [0.27466434, 0.58818027, 0.56115433],\n    [0.2720767, 0.58584893, 0.56092486],\n    [0.26949829, 0.58351797, 0.56068983],\n    [0.26693801, 0.58118582, 0.56045121],\n    [0.26439366, 0.57885288, 0.56020858],\n    [0.26185616, 0.57652063, 0.55996077],\n    [0.25932459, 0.57418919, 0.55970795],\n    [0.25681303, 0.57185614, 0.55945297],\n    [0.25431024, 0.56952337, 0.55919385],\n    [0.25180492, 0.56719255, 0.5589305],\n    [0.24929311, 0.56486397, 0.5586654],\n    [0.24678356, 0.56253666, 0.55839491],\n    [0.24426587, 0.56021153, 0.55812473],\n    [0.24174022, 0.55788852, 0.55785448],\n    [0.23921167, 0.55556705, 0.55758211],\n    [0.23668315, 0.55324675, 0.55730676],\n    [0.23414742, 0.55092825, 0.55703167],\n    [0.23160473, 0.54861143, 0.5567573],\n    [0.22905996, 0.54629572, 0.55648168],\n    [0.22651648, 0.54398082, 0.5562029],\n    [0.22396709, 0.54166721, 0.55592542],\n    [0.22141221, 0.53935481, 0.55564885],\n    [0.21885269, 0.53704347, 0.55537294],\n    [0.21629986, 0.53473208, 0.55509319],\n    [0.21374297, 0.53242154, 0.5548144],\n    [0.21118255, 0.53011166, 0.55453708],\n    [0.2086192, 0.52780237, 0.55426067],\n    [0.20605624, 0.52549322, 0.55398479],\n    [0.20350004, 0.5231837, 0.55370601],\n    [0.20094292, 0.52087429, 0.55342884],\n    [0.19838567, 0.51856489, 0.55315283],\n    [0.19582911, 0.51625531, 0.55287818],\n    [0.19327413, 0.51394542, 0.55260469],\n    [0.19072933, 0.51163448, 0.5523289],\n    [0.18819045, 0.50932268, 0.55205372],\n    [0.18565609, 0.50701014, 0.55177937],\n    [0.18312739, 0.50469666, 0.55150597],\n    [0.18060561, 0.50238204, 0.55123374],\n    [0.178092, 0.50006616, 0.55096224],\n    [0.17558808, 0.49774882, 0.55069118],\n    [0.17310341, 0.49542924, 0.5504176],\n    [0.17063111, 0.49310789, 0.55014445],\n    [0.1681728, 0.49078458, 0.54987159],\n    [0.1657302, 0.48845913, 0.54959882],\n    [0.16330517, 0.48613135, 0.54932605],\n    [0.16089963, 0.48380104, 0.54905306],\n    [0.15851561, 0.48146803, 0.54877953],\n    [0.15615526, 0.47913212, 0.54850526],\n    [0.15382083, 0.47679313, 0.54822991],\n    [0.15151471, 0.47445087, 0.54795318],\n    [0.14924112, 0.47210502, 0.54767411],\n    [0.1470032, 0.46975537, 0.54739226],\n    [0.14480101, 0.46740187, 0.54710832],\n    [0.14263736, 0.46504434, 0.54682188],\n    [0.14051521, 0.46268258, 0.54653253],\n    [0.13843761, 0.46031639, 0.54623985],\n    [0.13640774, 0.45794558, 0.5459434],\n    [0.13442887, 0.45556994, 0.54564272],\n    [0.1325044, 0.45318928, 0.54533736],\n    [0.13063777, 0.4508034, 0.54502674],\n    [0.12883252, 0.44841211, 0.5447104],\n    [0.12709242, 0.44601517, 0.54438795],\n    [0.1254209, 0.44361244, 0.54405855],\n    [0.12382162, 0.44120373, 0.54372156],\n    [0.12229818, 0.43878887, 0.54337634],\n    [0.12085453, 0.4363676, 0.54302253],\n    [0.11949938, 0.43393955, 0.54265715],\n    [0.11823166, 0.43150478, 0.54228104],\n    [0.11705496, 0.42906306, 0.54189388],\n    [0.115972, 0.42661431, 0.54149449],\n    [0.11498598, 0.42415835, 0.54108222],\n    [0.11409965, 0.42169502, 0.54065622],\n    [0.11331533, 0.41922424, 0.5402155],\n    [0.11263542, 0.41674582, 0.53975931],\n    [0.1120615, 0.4142597, 0.53928656],\n    [0.11159738, 0.41176567, 0.53879549],\n    [0.11125248, 0.40926325, 0.53828203],\n    [0.11101698, 0.40675289, 0.53774864],\n    [0.11089152, 0.40423445, 0.53719455],\n    [0.11085121, 0.4017095, 0.53662425],\n    [0.11087217, 0.39917938, 0.53604354],\n    [0.11095515, 0.39664394, 0.53545166],\n    [0.11110676, 0.39410282, 0.53484509],\n    [0.11131735, 0.39155635, 0.53422678],\n    [0.11158595, 0.38900446, 0.53359634],\n    [0.11191139, 0.38644711, 0.5329534],\n    [0.11229224, 0.38388426, 0.53229748],\n    [0.11273683, 0.38131546, 0.53162393],\n    [0.11323438, 0.37874109, 0.53093619],\n    [0.11378271, 0.37616112, 0.53023413],\n    [0.11437992, 0.37357557, 0.52951727],\n    [0.11502681, 0.37098429, 0.52878396],\n    [0.11572661, 0.36838709, 0.52803124],\n    [0.11646936, 0.36578429, 0.52726234],\n    [0.11725299, 0.3631759, 0.52647685],\n    [0.1180755, 0.36056193, 0.52567436],\n    [0.1189438, 0.35794203, 0.5248497],\n    [0.11984752, 0.35531657, 0.52400649],\n    [0.1207833, 0.35268564, 0.52314492],\n    [0.12174895, 0.35004927, 0.52226461],\n    [0.12274959, 0.34740723, 0.52136104],\n    [0.12377809, 0.34475975, 0.52043639],\n    [0.12482961, 0.34210702, 0.51949179],\n    [0.125902, 0.33944908, 0.51852688],\n    [0.12699998, 0.33678574, 0.51753708],\n    [0.12811691, 0.33411727, 0.51652464],\n    [0.12924811, 0.33144384, 0.51549084],\n    [0.13039157, 0.32876552, 0.51443538],\n    [0.13155228, 0.32608217, 0.51335321],\n    [0.13272282, 0.32339407, 0.51224759],\n    [0.13389954, 0.32070138, 0.51111946],\n    [0.13508064, 0.31800419, 0.50996862],\n    [0.13627149, 0.31530238, 0.50878942],\n    [0.13746376, 0.31259627, 0.50758645],\n    [0.13865499, 0.30988598, 0.50636017],\n    [0.13984364, 0.30717161, 0.50511042],\n    [0.14103515, 0.30445309, 0.50383119],\n    [0.14222093, 0.30173071, 0.50252813],\n    [0.14339946, 0.2990046, 0.50120127],\n    [0.14456941, 0.29627483, 0.49985054],\n    [0.14573579, 0.29354139, 0.49847009],\n    [0.14689091, 0.29080452, 0.49706566],\n    [0.1480336, 0.28806432, 0.49563732],\n    [0.1491628, 0.28532086, 0.49418508],\n    [0.15028228, 0.28257418, 0.49270402],\n    [0.15138673, 0.27982444, 0.49119848],\n    [0.15247457, 0.27707172, 0.48966925],\n    [0.15354487, 0.2743161, 0.48811641],\n    [0.15459955, 0.27155765, 0.4865371],\n    [0.15563716, 0.26879642, 0.4849321],\n    [0.1566572, 0.26603191, 0.48330429],\n    [0.15765823, 0.26326032, 0.48167456],\n    [0.15862147, 0.26048295, 0.48005785],\n    [0.15954301, 0.25770084, 0.47845341],\n    [0.16043267, 0.25491144, 0.4768626],\n    [0.16129262, 0.25211406, 0.4752857],\n    [0.1621119, 0.24931169, 0.47372076],\n    [0.16290577, 0.24649998, 0.47217025],\n    [0.16366819, 0.24368054, 0.47063302],\n    [0.1644021, 0.24085237, 0.46910949],\n    [0.16510882, 0.2380149, 0.46759982],\n    [0.16579015, 0.23516739, 0.46610429],\n    [0.1664433, 0.2323105, 0.46462219],\n    [0.16707586, 0.22944155, 0.46315508],\n    [0.16768475, 0.22656122, 0.46170223],\n    [0.16826815, 0.22366984, 0.46026308],\n    [0.16883174, 0.22076514, 0.45883891],\n    [0.16937589, 0.21784655, 0.45742976],\n    [0.16990129, 0.21491339, 0.45603578],\n    [0.1704074, 0.21196535, 0.45465677],\n    [0.17089473, 0.20900176, 0.4532928],\n    [0.17136819, 0.20602012, 0.45194524],\n    [0.17182683, 0.20302012, 0.45061386],\n    [0.17227059, 0.20000106, 0.44929865],\n    [0.17270583, 0.19695949, 0.44800165],\n    [0.17313804, 0.19389201, 0.44672488],\n    [0.17363177, 0.19076859, 0.44549087]\n]\n\n\n_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\n"},{"col":0,"comment":"Handle changes to matplotlib colormap interface in 3.6.","endLoc":144,"header":"def register_colormap(name, cmap)","id":1589,"name":"register_colormap","nodeType":"Function","startLoc":138,"text":"def 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)"},{"attributeType":"str","col":4,"comment":"null","endLoc":106,"id":1590,"name":"stat","nodeType":"Attribute","startLoc":106,"text":"stat"},{"attributeType":"null","col":4,"comment":"null","endLoc":107,"id":1591,"name":"bins","nodeType":"Attribute","startLoc":107,"text":"bins"},{"attributeType":"float | None","col":4,"comment":"null","endLoc":108,"id":1592,"name":"binwidth","nodeType":"Attribute","startLoc":108,"text":"binwidth"},{"attributeType":"(float, float) | None","col":4,"comment":"null","endLoc":109,"id":1593,"name":"binrange","nodeType":"Attribute","startLoc":109,"text":"binrange"},{"attributeType":"bool | list","col":4,"comment":"null","endLoc":110,"id":1594,"name":"common_norm","nodeType":"Attribute","startLoc":110,"text":"common_norm"},{"attributeType":"bool | list","col":4,"comment":"null","endLoc":111,"id":1595,"name":"common_bins","nodeType":"Attribute","startLoc":111,"text":"common_bins"},{"attributeType":"bool","col":4,"comment":"null","endLoc":112,"id":1596,"name":"cumulative","nodeType":"Attribute","startLoc":112,"text":"cumulative"},{"attributeType":"bool","col":4,"comment":"null","endLoc":113,"id":1597,"name":"discrete","nodeType":"Attribute","startLoc":113,"text":"discrete"},{"col":4,"comment":"Apply the mapping to a single data value.","endLoc":84,"header":"def _lookup_single(self, key)","id":1598,"name":"_lookup_single","nodeType":"Function","startLoc":82,"text":"def _lookup_single(self, key):\n        \"\"\"Apply the mapping to a single data value.\"\"\"\n        return self.lookup_table[key]"},{"className":"TestCount","col":0,"comment":"null","endLoc":47,"id":1599,"nodeType":"Class","startLoc":12,"text":"class TestCount:\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)\n\n    def test_single_grouper(self, df):\n\n        ori = \"x\"\n        df = df[[\"x\"]]\n        gb = self.get_groupby(df, ori)\n        res = Count()(df, gb, ori, {})\n        expected = df.groupby(\"x\").size()\n        assert_array_equal(res.sort_values(\"x\")[\"y\"], expected)\n\n    def test_multiple_groupers(self, df):\n\n        ori = \"x\"\n        df = df[[\"x\", \"group\"]].sort_values(\"group\")\n        gb = self.get_groupby(df, ori)\n        res = Count()(df, gb, ori, {})\n        expected = df.groupby([\"x\", \"group\"]).size()\n        assert_array_equal(res.sort_values([\"x\", \"group\"])[\"y\"], expected)"},{"col":4,"comment":"null","endLoc":23,"header":"@pytest.fixture\n    def df(self, rng)","id":1600,"name":"df","nodeType":"Function","startLoc":14,"text":"@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        ))"},{"col":4,"comment":"Input check when values are provided as a list.","endLoc":80,"header":"def _check_list_length(self, levels, values, variable)","id":1602,"name":"_check_list_length","nodeType":"Function","startLoc":58,"text":"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"},{"col":0,"comment":"\n    dot(a, b, out=None)\n    \n        Dot product of two arrays.\n    \n        For 2-D arrays it is equivalent to matrix multiplication, and for 1-D\n        arrays to inner product of vectors (without complex conjugation). For\n        N dimensions it is a sum product over the last axis of `a` and\n        the second-to-last of `b`::\n    \n            dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m])\n    \n        Parameters\n        ----------\n        a : array_like\n            First argument.\n        b : array_like\n            Second argument.\n        out : ndarray, optional\n            Output argument. This must have the exact kind that would be returned\n            if it was not used. In particular, it must have the right type, must be\n            C-contiguous, and its dtype must be the dtype that would be returned\n            for `dot(a,b)`. This is a performance feature. Therefore, if these\n            conditions are not met, an exception is raised, instead of attempting\n            to be flexible.\n    \n        Returns\n        -------\n        output : ndarray\n            Returns the dot product of `a` and `b`.  If `a` and `b` are both\n            scalars or both 1-D arrays then a scalar is returned; otherwise\n            an array is returned.\n            If `out` is given, then it is returned.\n    \n        Raises\n        ------\n        ValueError\n            If the last dimension of `a` is not the same size as\n            the second-to-last dimension of `b`.\n    \n        See Also\n        --------\n        vdot : Complex-conjugating dot product.\n        tensordot : Sum products over arbitrary axes.\n        einsum : Einstein summation convention.\n        matmul : '@' operator as method with out parameter.\n    \n        Examples\n        --------\n        >>> np.dot(3, 4)\n        12\n    \n        Neither argument is complex-conjugated:\n    \n        >>> np.dot([2j, 3j], [2j, 3j])\n        (-13+0j)\n    \n        For 2-D arrays it is the matrix product:\n    \n        >>> a = [[1, 0], [0, 1]]\n        >>> b = [[4, 1], [2, 2]]\n        >>> np.dot(a, b)\n        array([[4, 1],\n               [2, 2]])\n    \n        >>> a = np.arange(3*4*5*6).reshape((3,4,5,6))\n        >>> b = np.arange(3*4*5*6)[::-1].reshape((5,4,6,3))\n        >>> np.dot(a, b)[2,3,2,1,2,2]\n        499128\n        >>> sum(a[2,3,2,:] * b[1,2,:,2])\n        499128\n    ","endLoc":840,"header":"def dot(a, b, out=None)","id":1604,"name":"dot","nodeType":"Function","startLoc":767,"text":"def dot(a, b, out=None): # real signature unknown; restored from __doc__\n    \"\"\"\n    dot(a, b, out=None)\n    \n        Dot product of two arrays.\n    \n        For 2-D arrays it is equivalent to matrix multiplication, and for 1-D\n        arrays to inner product of vectors (without complex conjugation). For\n        N dimensions it is a sum product over the last axis of `a` and\n        the second-to-last of `b`::\n    \n            dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m])\n    \n        Parameters\n        ----------\n        a : array_like\n            First argument.\n        b : array_like\n            Second argument.\n        out : ndarray, optional\n            Output argument. This must have the exact kind that would be returned\n            if it was not used. In particular, it must have the right type, must be\n            C-contiguous, and its dtype must be the dtype that would be returned\n            for `dot(a,b)`. This is a performance feature. Therefore, if these\n            conditions are not met, an exception is raised, instead of attempting\n            to be flexible.\n    \n        Returns\n        -------\n        output : ndarray\n            Returns the dot product of `a` and `b`.  If `a` and `b` are both\n            scalars or both 1-D arrays then a scalar is returned; otherwise\n            an array is returned.\n            If `out` is given, then it is returned.\n    \n        Raises\n        ------\n        ValueError\n            If the last dimension of `a` is not the same size as\n            the second-to-last dimension of `b`.\n    \n        See Also\n        --------\n        vdot : Complex-conjugating dot product.\n        tensordot : Sum products over arbitrary axes.\n        einsum : Einstein summation convention.\n        matmul : '@' operator as method with out parameter.\n    \n        Examples\n        --------\n        >>> np.dot(3, 4)\n        12\n    \n        Neither argument is complex-conjugated:\n    \n        >>> np.dot([2j, 3j], [2j, 3j])\n        (-13+0j)\n    \n        For 2-D arrays it is the matrix product:\n    \n        >>> a = [[1, 0], [0, 1]]\n        >>> b = [[4, 1], [2, 2]]\n        >>> np.dot(a, b)\n        array([[4, 1],\n               [2, 2]])\n    \n        >>> a = np.arange(3*4*5*6).reshape((3,4,5,6))\n        >>> b = np.arange(3*4*5*6)[::-1].reshape((5,4,6,3))\n        >>> np.dot(a, b)[2,3,2,1,2,2]\n        499128\n        >>> sum(a[2,3,2,:] * b[1,2,:,2])\n        499128\n    \"\"\"\n    pass"},{"fileName":"_docstrings.py","filePath":"seaborn","id":1605,"nodeType":"File","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\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\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)\n\n\n# 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)\n\n\n_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)\n"},{"className":"NumpyDocString","col":0,"comment":"Parses a numpydoc string to an abstract representation\n\n    Instances define a mapping from section title to structured data.\n\n    ","endLoc":561,"id":1606,"nodeType":"Class","startLoc":136,"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:])\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\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 = '..'\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\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\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()\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\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\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\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)"},{"attributeType":"list","col":0,"comment":"null","endLoc":5,"id":1607,"name":"_rocket_lut","nodeType":"Attribute","startLoc":5,"text":"_rocket_lut"},{"col":4,"comment":"null","endLoc":227,"header":"def _setup_segments(self, data, orient)","id":1608,"name":"_setup_segments","nodeType":"Function","startLoc":219,"text":"def _setup_segments(self, data, orient):\n\n        if self._sort:\n            data = data.sort_values(orient, kind=\"mergesort\")\n\n        # Column stack to avoid block consolidation\n        xy = np.column_stack([data[\"x\"], data[\"y\"]])\n\n        return [xy]"},{"col":4,"comment":"null","endLoc":34,"header":"def test_simple(self)","id":1609,"name":"test_simple","nodeType":"Function","startLoc":21,"text":"def test_simple(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n\n        p = Plot(x, y, text=s).add(Text()).plot()\n        ax = p._figure.axes[0]\n        for i, text in enumerate(self.get_texts(ax)):\n            x_, y_ = text.get_position()\n            assert x_ == x[i]\n            assert y_ == y[i]\n            assert text.get_text() == s[i]\n            assert text.get_horizontalalignment() == \"center\"\n            assert text.get_verticalalignment() == \"center_baseline\""},{"col":4,"comment":" Return getattr(self, name). ","endLoc":525,"header":"def __getattribute__(self, *args, **kwargs)","id":1610,"name":"__getattribute__","nodeType":"Function","startLoc":523,"text":"def __getattribute__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Return getattr(self, name). \"\"\"\n        pass"},{"col":4,"comment":" Initialize self.  See help(type(self)) for accurate signature. ","endLoc":529,"header":"def __init__(self, *iterables, repeat=1)","id":1611,"name":"__init__","nodeType":"Function","startLoc":527,"text":"def __init__(self, *iterables, repeat=1): # known case of itertools.product.__init__\n        \"\"\" Initialize self.  See help(type(self)) for accurate signature. \"\"\"\n        return []"},{"col":4,"comment":" Implement iter(self). ","endLoc":533,"header":"def __iter__(self, *args, **kwargs)","id":1612,"name":"__iter__","nodeType":"Function","startLoc":531,"text":"def __iter__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Implement iter(self). \"\"\"\n        pass"},{"col":4,"comment":" Create and return a new object.  See help(type) for accurate signature. ","endLoc":538,"header":"@staticmethod # known case of __new__\n    def __new__(*args, **kwargs)","id":1613,"name":"__new__","nodeType":"Function","startLoc":535,"text":"@staticmethod # known case of __new__\n    def __new__(*args, **kwargs): # real signature unknown\n        \"\"\" Create and return a new object.  See help(type) for accurate signature. \"\"\"\n        pass"},{"col":4,"comment":" Implement next(self). ","endLoc":542,"header":"def __next__(self, *args, **kwargs)","id":1614,"name":"__next__","nodeType":"Function","startLoc":540,"text":"def __next__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Implement next(self). \"\"\"\n        pass"},{"col":4,"comment":" Return state information for pickling. ","endLoc":546,"header":"def __reduce__(self, *args, **kwargs)","id":1615,"name":"__reduce__","nodeType":"Function","startLoc":544,"text":"def __reduce__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Return state information for pickling. \"\"\"\n        pass"},{"col":4,"comment":" Set state information for unpickling. ","endLoc":550,"header":"def __setstate__(self, *args, **kwargs)","id":1616,"name":"__setstate__","nodeType":"Function","startLoc":548,"text":"def __setstate__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Set state information for unpickling. \"\"\"\n        pass"},{"col":4,"comment":" Returns size in memory, in bytes. ","endLoc":554,"header":"def __sizeof__(self, *args, **kwargs)","id":1617,"name":"__sizeof__","nodeType":"Function","startLoc":552,"text":"def __sizeof__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Returns size in memory, in bytes. \"\"\"\n        pass"},{"className":"Dodge","col":0,"comment":"\n    Displacement and narrowing of overlapping marks along orientation axis.\n\n    Parameters\n    ----------\n    empty : {'keep', 'drop', 'fill'}\n    gap : float\n        Size of gap between dodged marks.\n    by : list of variable names\n        Variables to apply the movement to, otherwise use all.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Dodge.rst\n\n    ","endLoc":150,"id":1618,"nodeType":"Class","startLoc":80,"text":"@dataclass\nclass Dodge(Move):\n    \"\"\"\n    Displacement and narrowing of overlapping marks along orientation axis.\n\n    Parameters\n    ----------\n    empty : {'keep', 'drop', 'fill'}\n    gap : float\n        Size of gap between dodged marks.\n    by : list of variable names\n        Variables to apply the movement to, otherwise use all.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Dodge.rst\n\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"},{"col":4,"comment":"null","endLoc":29,"header":"def get_groupby(self, df, orient)","id":1619,"name":"get_groupby","nodeType":"Function","startLoc":25,"text":"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)"},{"col":0,"comment":"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    ","endLoc":204,"header":"def desaturate(color, prop)","id":1621,"name":"desaturate","nodeType":"Function","startLoc":172,"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"},{"col":4,"comment":"null","endLoc":38,"header":"def test_single_grouper(self, df)","id":1622,"name":"test_single_grouper","nodeType":"Function","startLoc":31,"text":"def test_single_grouper(self, df):\n\n        ori = \"x\"\n        df = df[[\"x\"]]\n        gb = self.get_groupby(df, ori)\n        res = Count()(df, gb, ori, {})\n        expected = df.groupby(\"x\").size()\n        assert_array_equal(res.sort_values(\"x\")[\"y\"], expected)"},{"attributeType":"null","col":8,"comment":"null","endLoc":172,"id":1624,"name":"imname","nodeType":"Attribute","startLoc":172,"text":"imname"},{"id":1625,"name":"objects.Plot.share.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"9252d5a5-8af1-4f99-b799-ee044329fb23\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"penguins = load_dataset(\\\"penguins\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"3a874676-6b0d-45b1-a227-857a536c5ed2\",\n   \"metadata\": {},\n   \"source\": [\n    \"By default, faceted plots will share all axes:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"615d0765-98c7-4694-8115-a6d1b3557fe7\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p = (\\n\",\n    \"    so.Plot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\")\\n\",\n    \"    .facet(col=\\\"species\\\", row=\\\"sex\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \")\\n\",\n    \"p\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"8b75feb1-491e-4031-9fcb-619037bd1bfb\",\n   \"metadata\": {},\n   \"source\": [\n    \"Set a coordinate variable to `False` to let each subplot adapt independently:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4c23c570-ca9b-49cc-9aab-7d167218454b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.share(x=False, y=False)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"cc46d8d0-7ab9-44c2-8a28-c656fe86c085\",\n   \"metadata\": {},\n   \"source\": [\n    \"It's also possible to share only across rows or columns:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"7cb8136b-9aa3-4c48-bd41-fc0e19fa997c\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.share(x=\\\"col\\\", y=\\\"row\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"91533aba-45ae-4011-b72c-10f5f79e01d0\",\n   \"metadata\": {},\n   \"source\": [\n    \"This method is also relevant for paired plots, which have different defaults. In this case, you would need to opt *in* to full sharing (although it may not always make sense):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e2b71770-e520-45b9-b41c-a66431f21e1f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, y=\\\"flipper_length_mm\\\")\\n\",\n    \"    .pair(x=[\\\"bill_length_mm\\\", \\\"bill_depth_mm\\\"])\\n\",\n    \"    .add(so.Dots())\\n\",\n    \"    .share(x=True)\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"92c29080-8561-4c90-8581-4d435a5f96b9\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"className":"Move","col":0,"comment":"Base class for objects that apply simple positional transforms.","endLoc":24,"id":1626,"nodeType":"Class","startLoc":15,"text":"@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"},{"col":4,"comment":"null","endLoc":24,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":1627,"name":"__call__","nodeType":"Function","startLoc":21,"text":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n        raise NotImplementedError"},{"attributeType":"bool","col":4,"comment":"null","endLoc":19,"id":1628,"name":"group_by_orient","nodeType":"Attribute","startLoc":19,"text":"group_by_orient"},{"col":4,"comment":"null","endLoc":150,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":1632,"name":"__call__","nodeType":"Function","startLoc":106,"text":"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"},{"col":4,"comment":"null","endLoc":64,"header":"def __init__(\n        self,\n        data: DataSource,\n        variables: dict[str, VariableSpec],\n    )","id":1633,"name":"__init__","nodeType":"Function","startLoc":49,"text":"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"},{"id":1634,"name":"v0.8.0.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.8.0 (July 2017)\n------------------\n\n- The default style is no longer applied when seaborn is imported. It is now necessary to explicitly call :func:`set` or one or more of :func:`set_style`, :func:`set_context`, and :func:`set_palette`. Correspondingly, the ``seaborn.apionly`` module has been deprecated.\n\n- Changed the behavior of :func:`heatmap` (and by extension :func:`clustermap`) when plotting divergent dataesets (i.e. when the ``center`` parameter is used). Instead of extending the lower and upper limits of the colormap to be symmetrical around the ``center`` value, the colormap is modified so that its middle color corresponds to ``center``. This means that the full range of the colormap will not be used (unless the data or specified ``vmin`` and ``vmax`` are symmetric), but the upper and lower limits of the colorbar will correspond to the range of the data. See the Github pull request `(#1184) `_ for examples of the behavior.\n\n- Removed automatic detection of diverging data in :func:`heatmap` (and by extension :func:`clustermap`). If you want the colormap to be treated as diverging (see above), it is now necessary to specify the ``center`` value. When no colormap is specified, specifying ``center`` will still change the default to be one that is more appropriate for displaying diverging data.\n\n- Added four new colormaps, created using `viscm `_ for perceptual uniformity. The new colormaps include two sequential colormaps (\"rocket\" and \"mako\") and two diverging colormaps (\"icefire\" and \"vlag\"). These colormaps are registered with matplotlib on seaborn import and the colormap objects can be accessed in the ``seaborn.cm`` namespace.\n\n- Changed the default :func:`heatmap` colormaps to be \"rocket\" (in the case of sequential data) or \"icefire\" (in the case of diverging data). Note that this change reverses the direction of the luminance ramp from the previous defaults. While potentially confusing and disruptive, this change better aligns the seaborn defaults with the new matplotlib default colormap (\"viridis\") and arguably better aligns the semantics of a \"heat\" map with the appearance of the colormap.\n\n- Added ``\"auto\"`` as a (default) option for tick labels in :func:`heatmap` and :func:`clustermap`. This will try to estimate how many ticks can be labeled without the text objects overlapping, which should improve performance for larger matrices.\n\n- Added the ``dodge`` parameter to :func:`boxplot`, :func:`violinplot`, and :func:`barplot` to allow use of ``hue`` without changing the position or width of the plot elements, as when the ``hue`` variable is not nested within the main categorical variable.\n\n- Correspondingly, the ``split`` parameter for :func:`stripplot` and :func:`swarmplot` has been renamed to ``dodge`` for consistency with the other categorical functions (and for differentiation from the meaning of ``split`` in :func:`violinplot`).\n\n- Added the ability to draw a colorbar for a bivariate :func:`kdeplot` with the ``cbar`` parameter (and related ``cbar_ax`` and ``cbar_kws`` parameters).\n\n- Added the ability to use error bars to show standard deviations rather than bootstrap confidence intervals in most statistical functions by putting ``ci=\"sd\"``.\n\n- Allow side-specific offsets in :func:`despine`.\n\n- Figure size is no longer part of the seaborn plotting context parameters.\n\n- Put a cap on the number of bins used in :func:`jointplot` for ``type==\"hex\"`` to avoid hanging when the reference rule prescribes too many.\n\n- Changed the y axis in :func:`heatmap`. Instead of reversing the rows of the data internally, the y axis is now inverted. This may affect code that draws on top of the heatmap in data coordinates.\n\n- Turn off dendrogram axes in :func:`clustermap` rather than setting the background color to white.\n\n- New matplotlib qualitative palettes (e.g. \"tab10\") are now handled correctly.\n\n- Some modules and functions have been internally reorganized; there should be no effect on code that uses the ``seaborn`` namespace.\n\n- Added a deprecation warning to ``tsplot`` function to indicate that it will be removed or replaced with a substantially altered version in a future release.\n\n- The ``interactplot`` and ``coefplot`` functions are officially deprecated and will be removed in a future release.\n"},{"fileName":"hexbin_marginals.py","filePath":"examples","id":1635,"nodeType":"File","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\")\n"},{"attributeType":"null","col":16,"comment":"null","endLoc":7,"id":1637,"name":"np","nodeType":"Attribute","startLoc":7,"text":"np"},{"id":1638,"name":"v0.10.1.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.10.1 (April 2020)\n--------------------\n\nThis is minor release with bug fixes for issues identified since 0.10.0.\n\n- Fixed a bug that appeared within the bootstrapping algorithm on 32-bit systems.\n\n- Fixed a bug where :func:`regplot` would crash on singleton inputs. Now a crash is avoided and regression estimation/plotting is skipped.\n\n- Fixed a bug where :func:`heatmap` would ignore user-specified under/over/bad values when recentering a colormap.\n\n- Fixed a bug where :func:`heatmap` would use values from masked cells when computing default colormap limits.\n\n- Fixed a bug where :func:`despine` would cause an error when trying to trim spines on a matplotlib categorical axis.\n\n- Adapted to a change in matplotlib that caused problems with single swarm plots.\n\n- Added the ``showfliers`` parameter to :func:`boxenplot` to suppress plotting of outlier data points, matching the API of :func:`boxplot`.\n\n- Avoided seeing an error from statmodels when data with an IQR of 0 is passed to :func:`kdeplot`.\n\n- Added the ``legend.title_fontsize`` to the :func:`plotting_context` definition.\n\n- Deprecated several utility functions that are no longer used internally (``percentiles``, ``sig_stars``, ``pmf_hist``, and ``sort_df``).\n"},{"fileName":"__init__.py","filePath":"tests/_core","id":1639,"nodeType":"File","text":""},{"col":0,"comment":"Calculate number of hist bins using Freedman-Diaconis rule.","endLoc":2402,"header":"def _freedman_diaconis_bins(a)","id":1640,"name":"_freedman_diaconis_bins","nodeType":"Function","startLoc":2390,"text":"def _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))"},{"col":4,"comment":"Discretize a predictor by assigning value to closest bin.","endLoc":329,"header":"def bin_predictor(self, bins)","id":1641,"name":"bin_predictor","nodeType":"Function","startLoc":317,"text":"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"},{"attributeType":"null","col":18,"comment":"null","endLoc":8,"id":1642,"name":"sns","nodeType":"Attribute","startLoc":8,"text":"sns"},{"attributeType":"RandomState","col":0,"comment":"null","endLoc":11,"id":1643,"name":"rs","nodeType":"Attribute","startLoc":11,"text":"rs"},{"col":4,"comment":"null","endLoc":175,"header":"def __init__(self, docstring, config={})","id":1644,"name":"__init__","nodeType":"Function","startLoc":164,"text":"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"},{"fileName":"histogram_stacked.py","filePath":"examples","id":1645,"nodeType":"File","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])\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":8,"id":1647,"name":"sns","nodeType":"Attribute","startLoc":8,"text":"sns"},{"attributeType":"list","col":0,"comment":"null","endLoc":265,"id":1648,"name":"_mako_lut","nodeType":"Attribute","startLoc":265,"text":"_mako_lut"},{"attributeType":"null","col":16,"comment":"null","endLoc":172,"id":1649,"name":"imdata","nodeType":"Attribute","startLoc":172,"text":"imdata"},{"attributeType":"str","col":12,"comment":"null","endLoc":174,"id":1650,"name":"impath","nodeType":"Attribute","startLoc":174,"text":"impath"},{"attributeType":"str","col":4,"comment":"null","endLoc":98,"id":1651,"name":"empty","nodeType":"Attribute","startLoc":98,"text":"empty"},{"attributeType":"float","col":4,"comment":"null","endLoc":99,"id":1652,"name":"gap","nodeType":"Attribute","startLoc":99,"text":"gap"},{"attributeType":"list | None","col":4,"comment":"null","endLoc":104,"id":1653,"name":"by","nodeType":"Attribute","startLoc":104,"text":"by"},{"className":"Jitter","col":0,"comment":"\n    Random displacement along one or both axes to reduce overplotting.\n\n    Parameters\n    ----------\n    width : float\n        Magnitude of jitter, relative to mark width, along the orientation axis.\n        If not provided, the default value will be 0 when `x` or `y` are set, otherwise\n        there will be a small amount of jitter applied by default.\n    x : float\n        Magnitude of jitter, in data units, along the x axis.\n    y : float\n        Magnitude of jitter, in data units, along the y axis.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Jitter.rst\n\n    ","endLoc":77,"id":1654,"nodeType":"Class","startLoc":27,"text":"@dataclass\nclass Jitter(Move):\n    \"\"\"\n    Random displacement along one or both axes to reduce overplotting.\n\n    Parameters\n    ----------\n    width : float\n        Magnitude of jitter, relative to mark width, along the orientation axis.\n        If not provided, the default value will be 0 when `x` or `y` are set, otherwise\n        there will be a small amount of jitter applied by default.\n    x : float\n        Magnitude of jitter, in data units, along the x axis.\n    y : float\n        Magnitude of jitter, in data units, along the y axis.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Jitter.rst\n\n    \"\"\"\n    width: float | Default = default\n    x: float = 0\n    y: float = 0\n    seed: int | None = None\n\n    def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n\n        data = data.copy()\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 is default:\n            width = 0.0 if self.x or self.y else 0.2\n        else:\n            width = cast(float, self.width)\n\n        if self.width:\n            data[orient] = jitter(data, orient, 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"},{"col":4,"comment":"null","endLoc":77,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":1655,"name":"__call__","nodeType":"Function","startLoc":53,"text":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame:\n\n        data = data.copy()\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 is default:\n            width = 0.0 if self.x or self.y else 0.2\n        else:\n            width = cast(float, self.width)\n\n        if self.width:\n            data[orient] = jitter(data, orient, 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"},{"col":0,"comment":"null","endLoc":1546,"header":"@overload\ndef next(__i: SupportsNext[_T]) -> _T","id":1656,"name":"next","nodeType":"Function","startLoc":1545,"text":"@overload\ndef next(__i: SupportsNext[_T]) -> _T: ..."},{"col":0,"comment":"null","endLoc":1548,"header":"@overload\ndef next(__i: SupportsNext[_T], __default: _VT) -> _T | _VT","id":1657,"name":"next","nodeType":"Function","startLoc":1547,"text":"@overload\ndef next(__i: SupportsNext[_T], __default: _VT) -> _T | _VT: ..."},{"attributeType":"null","col":21,"comment":"null","endLoc":9,"id":1658,"name":"mpl","nodeType":"Attribute","startLoc":9,"text":"mpl"},{"attributeType":"null","col":28,"comment":"null","endLoc":10,"id":1659,"name":"plt","nodeType":"Attribute","startLoc":10,"text":"plt"},{"attributeType":"null","col":0,"comment":"null","endLoc":14,"id":1660,"name":"diamonds","nodeType":"Attribute","startLoc":14,"text":"diamonds"},{"col":4,"comment":"\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        ","endLoc":260,"header":"def _assign_variables(\n        self,\n        data: DataSource,\n        variables: dict[str, VariableSpec],\n    ) -> tuple[DataFrame, dict[str, str | None], dict[str, str | int]]","id":1661,"name":"_assign_variables","nodeType":"Function","startLoc":119,"text":"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: Mapping | 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 data is not None:\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\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                val = cast(ColumnName, val)\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, 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, 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"},{"col":4,"comment":"null","endLoc":47,"header":"def test_multiple_groupers(self, df)","id":1662,"name":"test_multiple_groupers","nodeType":"Function","startLoc":40,"text":"def test_multiple_groupers(self, df):\n\n        ori = \"x\"\n        df = df[[\"x\", \"group\"]].sort_values(\"group\")\n        gb = self.get_groupby(df, ori)\n        res = Count()(df, gb, ori, {})\n        expected = df.groupby([\"x\", \"group\"]).size()\n        assert_array_equal(res.sort_values([\"x\", \"group\"])[\"y\"], expected)"},{"attributeType":"null","col":0,"comment":"null","endLoc":16,"id":1663,"name":"f","nodeType":"Attribute","startLoc":16,"text":"f"},{"col":4,"comment":"null","endLoc":1015,"header":"def extend(self, __iterable: Iterable[_T]) -> None","id":1665,"name":"extend","nodeType":"Function","startLoc":1015,"text":"def extend(self, __iterable: Iterable[_T]) -> None: ..."},{"attributeType":"ndarray | int | float | complex","col":0,"comment":"null","endLoc":12,"id":1666,"name":"x","nodeType":"Attribute","startLoc":12,"text":"x"},{"attributeType":"null","col":3,"comment":"null","endLoc":16,"id":1667,"name":"ax","nodeType":"Attribute","startLoc":16,"text":"ax"},{"col":0,"comment":"","endLoc":7,"header":"histogram_stacked.py#","id":1668,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nStacked histogram on a log scale\n================================\n\n_thumb: .5, .45\n\n\"\"\"\n\nsns.set_theme(style=\"ticks\")\n\ndiamonds = sns.load_dataset(\"diamonds\")\n\nf, ax = plt.subplots(figsize=(7, 5))\n\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)\n\nax.xaxis.set_major_formatter(mpl.ticker.ScalarFormatter())\n\nax.set_xticks([500, 1000, 2000, 5000, 10000])"},{"col":0,"comment":"\n    sqrt(x[, out])\n    \n    Return the positive square-root of an array, element-wise.\n    \n    Parameters\n    ----------\n    x : array_like\n        The values whose square-roots are required.\n    out : ndarray, optional\n        Alternate array object in which to put the result; if provided, it\n        must have the same shape as `x`\n    \n    Returns\n    -------\n    y : ndarray\n        An array of the same shape as `x`, containing the positive\n        square-root of each element in `x`.  If any element in `x` is\n        complex, a complex array is returned (and the square-roots of\n        negative reals are calculated).  If all of the elements in `x`\n        are real, so is `y`, with negative elements returning ``nan``.\n        If `out` was provided, `y` is a reference to it.\n    \n    See Also\n    --------\n    lib.scimath.sqrt\n        A version which returns complex numbers when given negative reals.\n    \n    Notes\n    -----\n    *sqrt* has--consistent with common convention--as its branch cut the\n    real \"interval\" [`-inf`, 0), and is continuous from above on it.\n    A branch cut is a curve in the complex plane across which a given\n    complex function fails to be continuous.\n    \n    Examples\n    --------\n    >>> np.sqrt([1,4,9])\n    array([ 1.,  2.,  3.])\n    \n    >>> np.sqrt([4, -1, -3+4J])\n    array([ 2.+0.j,  0.+1.j,  1.+2.j])\n    \n    >>> np.sqrt([4, -1, numpy.inf])\n    array([  2.,  NaN,  Inf])\n    ","endLoc":3651,"header":"def sqrt(x, out=None)","id":1669,"name":"sqrt","nodeType":"Function","startLoc":3604,"text":"def sqrt(x, out=None): # real signature unknown; restored from __doc__\n    \"\"\"\n    sqrt(x[, out])\n    \n    Return the positive square-root of an array, element-wise.\n    \n    Parameters\n    ----------\n    x : array_like\n        The values whose square-roots are required.\n    out : ndarray, optional\n        Alternate array object in which to put the result; if provided, it\n        must have the same shape as `x`\n    \n    Returns\n    -------\n    y : ndarray\n        An array of the same shape as `x`, containing the positive\n        square-root of each element in `x`.  If any element in `x` is\n        complex, a complex array is returned (and the square-roots of\n        negative reals are calculated).  If all of the elements in `x`\n        are real, so is `y`, with negative elements returning ``nan``.\n        If `out` was provided, `y` is a reference to it.\n    \n    See Also\n    --------\n    lib.scimath.sqrt\n        A version which returns complex numbers when given negative reals.\n    \n    Notes\n    -----\n    *sqrt* has--consistent with common convention--as its branch cut the\n    real \"interval\" [`-inf`, 0), and is continuous from above on it.\n    A branch cut is a curve in the complex plane across which a given\n    complex function fails to be continuous.\n    \n    Examples\n    --------\n    >>> np.sqrt([1,4,9])\n    array([ 1.,  2.,  3.])\n    \n    >>> np.sqrt([4, -1, -3+4J])\n    array([ 2.+0.j,  0.+1.j,  1.+2.j])\n    \n    >>> np.sqrt([4, -1, numpy.inf])\n    array([  2.,  NaN,  Inf])\n    \"\"\"\n    pass"},{"className":"TestHist","col":0,"comment":"null","endLoc":262,"id":1671,"nodeType":"Class","startLoc":50,"text":"class 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\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_invalid_stat(self):\n\n        with pytest.raises(ValueError, match=\"The `stat` parameter for `Hist`\"):\n            Hist(stat=\"invalid\")\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_norm_warning(self, long_df, triple_args):\n\n        h = Hist(common_norm=[\"b\"])\n        with pytest.warns(UserWarning, match=r\"Undefined variable\\(s\\)\"):\n            h(long_df, *triple_args)\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_common_bins_warning(self, long_df, triple_args):\n\n        h = Hist(common_bins=[\"b\"])\n        with pytest.warns(UserWarning, match=r\"Undefined variable\\(s\\)\"):\n            h(long_df, *triple_args)\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))\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))"},{"attributeType":"float | Default","col":4,"comment":"null","endLoc":48,"id":1672,"name":"width","nodeType":"Attribute","startLoc":48,"text":"width"},{"col":4,"comment":"null","endLoc":60,"header":"@pytest.fixture\n    def single_args(self)","id":1673,"name":"single_args","nodeType":"Function","startLoc":52,"text":"@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()}"},{"attributeType":"BinaryIO","col":39,"comment":"null","endLoc":175,"id":1674,"name":"f","nodeType":"Attribute","startLoc":175,"text":"f"},{"attributeType":"list","col":0,"comment":"null","endLoc":525,"id":1675,"name":"_vlag_lut","nodeType":"Attribute","startLoc":525,"text":"_vlag_lut"},{"attributeType":"null","col":4,"comment":"null","endLoc":51,"id":1676,"name":"legend","nodeType":"Attribute","startLoc":51,"text":"legend"},{"fileName":"__init__.py","filePath":"seaborn/_core","id":1677,"nodeType":"File","text":""},{"attributeType":"null","col":4,"comment":"null","endLoc":54,"id":1678,"name":"normed","nodeType":"Attribute","startLoc":54,"text":"normed"},{"attributeType":"str | None","col":8,"comment":"null","endLoc":60,"id":1679,"name":"variable","nodeType":"Attribute","startLoc":60,"text":"self.variable"},{"col":4,"comment":"null","endLoc":70,"header":"@pytest.fixture\n    def triple_args(self)","id":1681,"name":"triple_args","nodeType":"Function","startLoc":62,"text":"@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()}"},{"col":0,"comment":"Create a matplotlib colormap that will be updated by the widgets.","endLoc":28,"header":"def _init_mutable_colormap()","id":1682,"name":"_init_mutable_colormap","nodeType":"Function","startLoc":22,"text":"def _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"},{"attributeType":"float","col":4,"comment":"null","endLoc":49,"id":1683,"name":"x","nodeType":"Attribute","startLoc":49,"text":"x"},{"fileName":"many_pairwise_correlations.py","filePath":"examples","id":1684,"nodeType":"File","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})\n"},{"attributeType":"float","col":4,"comment":"null","endLoc":50,"id":1685,"name":"y","nodeType":"Attribute","startLoc":50,"text":"y"},{"attributeType":"int | None","col":4,"comment":"null","endLoc":51,"id":1686,"name":"seed","nodeType":"Attribute","startLoc":51,"text":"seed"},{"col":4,"comment":"null","endLoc":77,"header":"def test_string_bins(self, long_df)","id":1687,"name":"test_string_bins","nodeType":"Function","startLoc":72,"text":"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)))"},{"className":"Shift","col":0,"comment":"\n    Displacement of all marks with the same magnitude / direction.\n\n    Parameters\n    ----------\n    x, y : float\n        Magnitude of shift, in data units, along each axis.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Shift.rst\n\n    ","endLoc":218,"id":1688,"nodeType":"Class","startLoc":193,"text":"@dataclass\nclass Shift(Move):\n    \"\"\"\n    Displacement of all marks with the same magnitude / direction.\n\n    Parameters\n    ----------\n    x, y : float\n        Magnitude of shift, in data units, along each axis.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Shift.rst\n\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"},{"attributeType":"null","col":0,"comment":"null","endLoc":26,"id":1689,"name":"RGBATuple","nodeType":"Attribute","startLoc":26,"text":"RGBATuple"},{"col":4,"comment":"null","endLoc":218,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":1690,"name":"__call__","nodeType":"Function","startLoc":211,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":29,"id":1691,"name":"DashPattern","nodeType":"Attribute","startLoc":29,"text":"DashPattern"},{"attributeType":"null","col":0,"comment":"null","endLoc":30,"id":1692,"name":"DashPatternWithOffset","nodeType":"Attribute","startLoc":30,"text":"DashPatternWithOffset"},{"className":"PlotSpecError","col":0,"comment":"\n    Error class raised from seaborn.objects.Plot for compile-time failures.\n\n    In the declarative Plot interface, exceptions may not be triggered immediately\n    by bad user input (and validation at input time may not be possible). This class\n    is used to signal that indirect dependency. It should be raised in an exception\n    chain when compile-time operations fail with an error message providing useful\n    context (e.g., scaling errors could specify the variable that failed.)\n\n    ","endLoc":32,"id":1693,"nodeType":"Class","startLoc":10,"text":"class PlotSpecError(RuntimeError):\n    \"\"\"\n    Error class raised from seaborn.objects.Plot for compile-time failures.\n\n    In the declarative Plot interface, exceptions may not be triggered immediately\n    by bad user input (and validation at input time may not be possible). This class\n    is used to signal that indirect dependency. It should be raised in an exception\n    chain when compile-time operations fail with an error message providing useful\n    context (e.g., scaling errors could specify the variable that failed.)\n\n    \"\"\"\n    @classmethod\n    def _during(cls, step: str, var: str = \"\") -> PlotSpecError:\n        \"\"\"\n        Initialize the class to report the failure of a specific operation.\n        \"\"\"\n        message = []\n        if var:\n            message.append(f\"{step} failed for the `{var}` variable.\")\n        else:\n            message.append(f\"{step} failed.\")\n        message.append(\"See the traceback above for more information.\")\n        return cls(\" \".join(message))"},{"attributeType":"null","col":4,"comment":"null","endLoc":161,"id":1694,"name":"legend","nodeType":"Attribute","startLoc":161,"text":"legend"},{"attributeType":"null","col":4,"comment":"null","endLoc":162,"id":1695,"name":"normed","nodeType":"Attribute","startLoc":162,"text":"normed"},{"className":"RuntimeError","col":0,"comment":"null","endLoc":1994,"id":1696,"nodeType":"Class","startLoc":1994,"text":"class RuntimeError(Exception): ..."},{"attributeType":"LiteralString","col":0,"comment":"null","endLoc":23,"id":1697,"name":"ascii_letters","nodeType":"Attribute","startLoc":23,"text":"ascii_letters"},{"attributeType":"(float, float)","col":4,"comment":"null","endLoc":164,"id":1698,"name":"_default_range","nodeType":"Attribute","startLoc":164,"text":"_default_range"},{"col":0,"comment":"","endLoc":1,"header":"base.py#","id":1699,"name":"","nodeType":"Function","startLoc":1,"text":"MappableBool = Union[bool, Mappable]\n\nMappableString = Union[str, Mappable]\n\nMappableFloat = Union[float, Mappable]\n\nMappableColor = Union[str, tuple, Mappable]\n\nMappableStyle = Union[str, DashPattern, DashPatternWithOffset, Mappable]"},{"attributeType":"float","col":4,"comment":"null","endLoc":208,"id":1700,"name":"x","nodeType":"Attribute","startLoc":208,"text":"x"},{"attributeType":"float | ndarray | complex","col":0,"comment":"null","endLoc":13,"id":1701,"name":"y","nodeType":"Attribute","startLoc":13,"text":"y"},{"col":0,"comment":"Change the LUT values in a matplotlib colormap in-place.","endLoc":34,"header":"def _update_lut(cmap, colors)","id":1702,"name":"_update_lut","nodeType":"Function","startLoc":31,"text":"def _update_lut(cmap, colors):\n    \"\"\"Change the LUT values in a matplotlib colormap in-place.\"\"\"\n    cmap._lut[:256] = colors\n    cmap._set_extremes()"},{"attributeType":"float","col":4,"comment":"null","endLoc":209,"id":1703,"name":"y","nodeType":"Attribute","startLoc":209,"text":"y"},{"col":0,"comment":"Show a continuous matplotlib colormap.","endLoc":44,"header":"def _show_cmap(cmap)","id":1704,"name":"_show_cmap","nodeType":"Function","startLoc":37,"text":"def _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)"},{"className":"Stack","col":0,"comment":"\n    Displacement of overlapping bar or area marks along the value axis.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Stack.rst\n\n    ","endLoc":190,"id":1705,"nodeType":"Class","startLoc":153,"text":"@dataclass\nclass Stack(Move):\n    \"\"\"\n    Displacement of overlapping bar or area marks along the value axis.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Stack.rst\n\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)"},{"col":4,"comment":"null","endLoc":181,"header":"def _stack(self, df, orient)","id":1706,"name":"_stack","nodeType":"Function","startLoc":165,"text":"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"},{"attributeType":"null","col":4,"comment":"null","endLoc":297,"id":1707,"name":"_default_range","nodeType":"Attribute","startLoc":297,"text":"_default_range"},{"col":4,"comment":"\n        Parameters\n        ----------\n        data : str\n           String with lines separated by '\n'.\n\n        ","endLoc":66,"header":"def __init__(self, data)","id":1708,"name":"__init__","nodeType":"Function","startLoc":53,"text":"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()"},{"attributeType":"null","col":16,"comment":"null","endLoc":8,"id":1709,"name":"np","nodeType":"Attribute","startLoc":8,"text":"np"},{"className":"Color","col":0,"comment":"Color, as RGB(A), scalable with nominal palettes or continuous gradients.","endLoc":690,"id":1710,"nodeType":"Class","startLoc":539,"text":"class 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]\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)\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\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"},{"col":4,"comment":"null","endLoc":550,"header":"def standardize(self, val: ColorSpec) -> RGBTuple | RGBATuple","id":1711,"name":"standardize","nodeType":"Function","startLoc":544,"text":"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)"},{"attributeType":"list","col":0,"comment":"null","endLoc":785,"id":1712,"name":"_icefire_lut","nodeType":"Attribute","startLoc":785,"text":"_icefire_lut"},{"col":4,"comment":"Convert color sequence to RGB(A) array, preserving but not adding alpha.","endLoc":565,"header":"def _standardize_color_sequence(self, colors: ArrayLike) -> ArrayLike","id":1713,"name":"_standardize_color_sequence","nodeType":"Function","startLoc":552,"text":"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]"},{"col":0,"comment":"Who's a good boy?","endLoc":48,"header":"def dogplot(*_, **__)","id":1714,"name":"dogplot","nodeType":"Function","startLoc":33,"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()"},{"col":4,"comment":"null","endLoc":72,"header":"def reset(self)","id":1715,"name":"reset","nodeType":"Function","startLoc":71,"text":"def reset(self):\n        self._l = 0  # current line nr"},{"attributeType":"null","col":17,"comment":"null","endLoc":9,"id":1716,"name":"pd","nodeType":"Attribute","startLoc":9,"text":"pd"},{"attributeType":"null","col":18,"comment":"null","endLoc":10,"id":1717,"name":"sns","nodeType":"Attribute","startLoc":10,"text":"sns"},{"attributeType":"null","col":28,"comment":"null","endLoc":11,"id":1719,"name":"plt","nodeType":"Attribute","startLoc":11,"text":"plt"},{"attributeType":"RandomState","col":0,"comment":"null","endLoc":16,"id":1720,"name":"rs","nodeType":"Attribute","startLoc":16,"text":"rs"},{"attributeType":"null","col":8,"comment":"null","endLoc":475,"id":1724,"name":"error_method","nodeType":"Attribute","startLoc":475,"text":"self.error_method"},{"attributeType":"null","col":8,"comment":"null","endLoc":476,"id":1725,"name":"error_level","nodeType":"Attribute","startLoc":476,"text":"self.error_level"},{"col":0,"comment":"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    ","endLoc":140,"header":"def choose_colorbrewer_palette(data_type, as_cmap=False)","id":1726,"name":"choose_colorbrewer_palette","nodeType":"Function","startLoc":47,"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\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"},{"col":4,"comment":"null","endLoc":607,"header":"def infer_scale(self, arg: Any, data: Series) -> Scale","id":1728,"name":"infer_scale","nodeType":"Function","startLoc":567,"text":"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)"},{"col":4,"comment":"null","endLoc":190,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":1729,"name":"__call__","nodeType":"Function","startLoc":183,"text":"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)"},{"attributeType":"str","col":8,"comment":"null","endLoc":472,"id":1730,"name":"estimator","nodeType":"Attribute","startLoc":472,"text":"self.estimator"},{"attributeType":"dict","col":8,"comment":"null","endLoc":478,"id":1731,"name":"boot_kws","nodeType":"Attribute","startLoc":478,"text":"self.boot_kws"},{"attributeType":"null","col":0,"comment":"null","endLoc":15,"id":1732,"name":"Vector","nodeType":"Attribute","startLoc":15,"text":"Vector"},{"className":"Norm","col":0,"comment":"\n    Divisive scaling on the value axis after aggregating within groups.\n\n    Parameters\n    ----------\n    func : str or callable\n        Function called on each group to define the comparison value.\n    where : str\n        Query string defining the subset used to define the comparison values.\n    by : list of variables\n        Variables used to define aggregation groups.\n    percent : bool\n        If True, multiply the result by 100.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Norm.rst\n\n    ","endLoc":268,"id":1733,"nodeType":"Class","startLoc":221,"text":"@dataclass\nclass Norm(Move):\n    \"\"\"\n    Divisive scaling on the value axis after aggregating within groups.\n\n    Parameters\n    ----------\n    func : str or callable\n        Function called on each group to define the comparison value.\n    where : str\n        Query string defining the subset used to define the comparison values.\n    by : list of variables\n        Variables used to define aggregation groups.\n    percent : bool\n        If True, multiply the result by 100.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Norm.rst\n\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)"},{"col":4,"comment":"null","endLoc":261,"header":"def _norm(self, df, var)","id":1734,"name":"_norm","nodeType":"Function","startLoc":250,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":17,"id":1735,"name":"d","nodeType":"Attribute","startLoc":17,"text":"d"},{"className":"Agg","col":0,"comment":"\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    See Also\n    --------\n    objects.Est : Aggregation with error bars.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Agg.rst\n\n    ","endLoc":49,"id":1736,"nodeType":"Class","startLoc":15,"text":"@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    See Also\n    --------\n    objects.Est : Aggregation with error bars.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Agg.rst\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(subset=[var])\n            .reset_index(drop=True)\n        )\n        return res"},{"attributeType":"null","col":0,"comment":"null","endLoc":21,"id":1737,"name":"corr","nodeType":"Attribute","startLoc":21,"text":"corr"},{"col":4,"comment":"null","endLoc":49,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":1739,"name":"__call__","nodeType":"Function","startLoc":38,"text":"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(subset=[var])\n            .reset_index(drop=True)\n        )\n        return res"},{"col":4,"comment":"null","endLoc":268,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":1740,"name":"__call__","nodeType":"Function","startLoc":263,"text":"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)"},{"attributeType":"(...) -> Any | str","col":4,"comment":"null","endLoc":243,"id":1741,"name":"func","nodeType":"Attribute","startLoc":243,"text":"func"},{"attributeType":"str | None","col":4,"comment":"null","endLoc":244,"id":1742,"name":"where","nodeType":"Attribute","startLoc":244,"text":"where"},{"attributeType":"list | None","col":4,"comment":"null","endLoc":245,"id":1743,"name":"by","nodeType":"Attribute","startLoc":245,"text":"by"},{"attributeType":"bool","col":4,"comment":"null","endLoc":246,"id":1744,"name":"percent","nodeType":"Attribute","startLoc":246,"text":"percent"},{"attributeType":"bool","col":4,"comment":"null","endLoc":248,"id":1745,"name":"group_by_orient","nodeType":"Attribute","startLoc":248,"text":"group_by_orient"},{"attributeType":"list","col":0,"comment":"null","endLoc":1045,"id":1746,"name":"_flare_lut","nodeType":"Attribute","startLoc":1045,"text":"_flare_lut"},{"className":"MoveFixtures","col":0,"comment":"null","endLoc":61,"id":1747,"nodeType":"Class","startLoc":16,"text":"class 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)\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\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)"},{"col":4,"comment":"null","endLoc":428,"header":"def _parse(self)","id":1748,"name":"_parse","nodeType":"Function","startLoc":393,"text":"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"},{"col":4,"comment":"null","endLoc":30,"header":"@pytest.fixture\n    def df(self, rng)","id":1749,"name":"df","nodeType":"Function","startLoc":18,"text":"@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)"},{"col":4,"comment":"null","endLoc":42,"header":"@pytest.fixture\n    def toy_df(self)","id":1750,"name":"toy_df","nodeType":"Function","startLoc":32,"text":"@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)"},{"col":4,"comment":"null","endLoc":48,"header":"@pytest.fixture\n    def toy_df_widths(self, toy_df)","id":1751,"name":"toy_df_widths","nodeType":"Function","startLoc":44,"text":"@pytest.fixture\n    def toy_df_widths(self, toy_df):\n\n        toy_df[\"width\"] = [.8, .2, .4]\n        return toy_df"},{"col":4,"comment":"null","endLoc":61,"header":"@pytest.fixture\n    def toy_df_facets(self)","id":1752,"name":"toy_df_facets","nodeType":"Function","startLoc":50,"text":"@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)"},{"col":4,"comment":"null","endLoc":141,"header":"def test_variables_from_series(self)","id":1753,"name":"test_variables_from_series","nodeType":"Function","startLoc":134,"text":"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"},{"className":"TestJitter","col":0,"comment":"null","endLoc":125,"id":1754,"nodeType":"Class","startLoc":64,"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_default(self, df):\n\n        orient = \"x\"\n        groupby = self.get_groupby(df, orient)\n        res = Jitter()(df, groupby, orient, {})\n        self.check_same(res, df, \"y\", \"grp2\", \"width\")\n        self.check_pos(res, df, \"x\", 0.2 * df[\"width\"])\n        assert (res[\"x\"] - df[\"x\"]).abs().min() > 0\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])"},{"col":0,"comment":"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    ","endLoc":842,"header":"def set_color_codes(palette=\"deep\")","id":1755,"name":"set_color_codes","nodeType":"Function","startLoc":799,"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    \"\"\"\n    if palette == \"reset\":\n        colors = [\n            (0., 0., 1.),\n            (0., .5, 0.),\n            (1., 0., 0.),\n            (.75, 0., .75),\n            (.75, .75, 0.),\n            (0., .75, .75),\n            (0., 0., 0.)\n        ]\n    elif not isinstance(palette, str):\n        err = \"set_color_codes requires a named seaborn palette\"\n        raise TypeError(err)\n    elif palette in SEABORN_PALETTES:\n        if not palette.endswith(\"6\"):\n            palette = palette + \"6\"\n        colors = SEABORN_PALETTES[palette] + [(.1, .1, .1)]\n    else:\n        err = f\"Cannot set colors with palette '{palette}'\"\n        raise ValueError(err)\n\n    for code, color in zip(\"bgrmyck\", colors):\n        rgb = mpl.colors.colorConverter.to_rgb(color)\n        mpl.colors.colorConverter.colors[code] = rgb\n        mpl.colors.colorConverter.cache[code] = rgb"},{"col":4,"comment":"null","endLoc":69,"header":"def get_groupby(self, data, orient)","id":1756,"name":"get_groupby","nodeType":"Function","startLoc":66,"text":"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)"},{"col":4,"comment":"null","endLoc":73,"header":"def check_same(self, res, df, *cols)","id":1757,"name":"check_same","nodeType":"Function","startLoc":71,"text":"def check_same(self, res, df, *cols):\n        for col in cols:\n            assert_series_equal(res[col], df[col])"},{"col":4,"comment":"null","endLoc":79,"header":"def check_pos(self, res, df, var, limit)","id":1758,"name":"check_pos","nodeType":"Function","startLoc":75,"text":"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()"},{"col":0,"comment":"","endLoc":28,"header":"nb_to_doc.py#","id":1759,"name":"","nodeType":"Function","startLoc":2,"text":"\"\"\"Execute a .ipynb file, write out a processed .rst and clean .ipynb.\n\nSome functions in this script were copied from the nbstripout tool:\n\nCopyright (c) 2015 Min RK, Florian Rathgeber, Michael McNeil Forbes\n2019 Casper da Costa-Luis\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\"\"\"\n\nif __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)"},{"col":4,"comment":"null","endLoc":85,"header":"def test_int_bins(self, long_df)","id":1761,"name":"test_int_bins","nodeType":"Function","startLoc":79,"text":"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"},{"col":4,"comment":"null","endLoc":149,"header":"def test_variables_from_mix(self)","id":1762,"name":"test_variables_from_mix","nodeType":"Function","startLoc":143,"text":"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)"},{"col":4,"comment":"null","endLoc":158,"header":"def test_variables_must_be_1d(self)","id":1765,"name":"test_variables_must_be_1d","nodeType":"Function","startLoc":151,"text":"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)"},{"col":4,"comment":"Grab signature (if given) and summary","endLoc":391,"header":"def _parse_summary(self)","id":1766,"name":"_parse_summary","nodeType":"Function","startLoc":371,"text":"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()"},{"col":0,"comment":"null","endLoc":921,"header":"def _make_logit_transforms(base: float | None = None) -> TransFuncs","id":1767,"name":"_make_logit_transforms","nodeType":"Function","startLoc":909,"text":"def _make_logit_transforms(base: float | None = None) -> TransFuncs:\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"},{"col":4,"comment":"null","endLoc":204,"header":"def _is_at_section(self)","id":1769,"name":"_is_at_section","nodeType":"Function","startLoc":192,"text":"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))"},{"col":4,"comment":"null","endLoc":92,"header":"def test_array_bins(self, long_df)","id":1770,"name":"test_array_bins","nodeType":"Function","startLoc":87,"text":"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)"},{"col":4,"comment":"\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        ","endLoc":477,"header":"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","id":1771,"name":"add","nodeType":"Function","startLoc":390,"text":"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"},{"attributeType":"list","col":0,"comment":"null","endLoc":1305,"id":1774,"name":"_crest_lut","nodeType":"Attribute","startLoc":1305,"text":"_crest_lut"},{"col":4,"comment":"null","endLoc":101,"header":"def test_binwidth(self, long_df)","id":1775,"name":"test_binwidth","nodeType":"Function","startLoc":94,"text":"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)"},{"col":4,"comment":"null","endLoc":166,"header":"def test_dropna(self)","id":1776,"name":"test_dropna","nodeType":"Function","startLoc":160,"text":"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)"},{"col":4,"comment":"Define mapping as lookup in list of discrete color values.","endLoc":649,"header":"def _get_categorical_mapping(self, scale, data)","id":1777,"name":"_get_categorical_mapping","nodeType":"Function","startLoc":609,"text":"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"},{"col":0,"comment":"null","endLoc":2551,"header":"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)","id":1779,"name":"stripplot","nodeType":"Function","startLoc":2495,"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"},{"col":4,"comment":"null","endLoc":108,"header":"def test_binrange(self, long_df)","id":1780,"name":"test_binrange","nodeType":"Function","startLoc":103,"text":"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"},{"fileName":"categorical.py","filePath":"seaborn","id":1781,"nodeType":"File","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]\n\n\n# 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\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\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\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)\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)\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\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[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)\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[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\")\n\n\nclass _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.items()\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\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\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\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\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)\n\n\nclass _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\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\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()\n\n\nclass _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\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        # 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\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)\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()\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))\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])\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)\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))\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)\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)\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()\n\n\nclass _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)\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)\n\n\nclass _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\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()\n\n\nclass _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, capsize, label):\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        self.label = label\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\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, label=self.label)\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()\n\n\nclass _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)\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_na', 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\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))\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]\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        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)\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 = dict(\n\n    # Shared narrative docs\n    categorical_narrative=dedent(\"\"\"\\\n    .. note::\n        This function always treats one of the variables as categorical and\n        draws data at ordinal positions (0, 1, ... n) on the relevant axis,\n        even when the data has a numeric or date type.\n\n    See the :ref:`tutorial ` for more information.\\\n    \"\"\"),\n\n    new_categorical_narrative=dedent(\"\"\"\\\n    .. note::\n        By default, this function treats one of the variables as categorical\n        and draws data at ordinal positions (0, 1, ... n) on the relevant axis.\n        This can be disabled with the `native_scale` parameter.\n\n        See the :ref:`tutorial ` for more information.\\\n    \"\"\"),\n\n    # Shared function parameters\n    input_params=dedent(\"\"\"\\\n    x, y, hue : names of variables in ``data`` or vector data, optional\n        Inputs for plotting long-form data. See examples for interpretation.\\\n    \"\"\"),\n    string_input_params=dedent(\"\"\"\\\n    x, y, hue : names of variables in ``data``\n        Inputs for plotting long-form data. See examples for interpretation.\\\n    \"\"\"),\n    categorical_data=dedent(\"\"\"\\\n    data : DataFrame, array, or list of arrays, optional\n        Dataset for plotting. If ``x`` and ``y`` are absent, this is\n        interpreted as wide-form. Otherwise it is expected to be long-form.\\\n    \"\"\"),\n    long_form_data=dedent(\"\"\"\\\n    data : DataFrame\n        Long-form (tidy) dataset for plotting. Each column should correspond\n        to a variable, and each row should correspond to an observation.\\\n    \"\"\"),\n    order_vars=dedent(\"\"\"\\\n    order, hue_order : lists of strings, optional\n        Order to plot the categorical levels in; otherwise the levels are\n        inferred from the data objects.\\\n    \"\"\"),\n    stat_api_params=dedent(\"\"\"\\\n    estimator : string or callable that maps vector -> scalar, optional\n        Statistical function to estimate within each categorical bin.\n    errorbar : string, (string, number) tuple, callable or None\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, or None to hide errorbar.\n    n_boot : int, optional\n        Number of bootstrap samples used to compute confidence intervals.\n    units : name of variable in ``data`` or vector data, optional\n        Identifier of sampling units, which will be used to perform a\n        multilevel bootstrap and account for repeated measures design.\n    seed : int, numpy.random.Generator, or numpy.random.RandomState, optional\n        Seed or random number generator for reproducible bootstrapping.\\\n    \"\"\"),\n    orient=dedent(\"\"\"\\\n    orient : \"v\" | \"h\", optional\n        Orientation of the plot (vertical or horizontal). This is usually\n        inferred based on the type of the input variables, but it can be used\n        to resolve ambiguity when both `x` and `y` are numeric or when\n        plotting wide-form data.\\\n    \"\"\"),\n    color=dedent(\"\"\"\\\n    color : matplotlib color, optional\n        Single color for the elements in the plot.\\\n    \"\"\"),\n    palette=dedent(\"\"\"\\\n    palette : palette name, list, or dict, optional\n        Color palette that maps the hue variable. If the palette is a dictionary,\n        keys should be names of levels and values should be matplotlib colors.\\\n    \"\"\"),\n    hue_norm=dedent(\"\"\"\\\n    hue_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    saturation=dedent(\"\"\"\\\n    saturation : float, optional\n        Proportion of the original saturation to draw colors at. Large patches\n        often look better with slightly desaturated colors, but set this to\n        `1` if you want the plot colors to perfectly match the input color.\\\n    \"\"\"),\n    capsize=dedent(\"\"\"\\\n    capsize : float, optional\n        Width of the \"caps\" on error bars.\\\n    \"\"\"),\n    errwidth=dedent(\"\"\"\\\n    errwidth : float, optional\n        Thickness of error bar lines (and caps).\\\n    \"\"\"),\n    width=dedent(\"\"\"\\\n    width : float, optional\n        Width of a full element when not using hue nesting, or width of all the\n        elements for one level of the major grouping variable.\\\n    \"\"\"),\n    dodge=dedent(\"\"\"\\\n    dodge : bool, optional\n        When hue nesting is used, whether elements should be shifted along the\n        categorical axis.\\\n    \"\"\"),\n    linewidth=dedent(\"\"\"\\\n    linewidth : float, optional\n        Width of the gray lines that frame the plot elements.\\\n    \"\"\"),\n    native_scale=dedent(\"\"\"\\\n    native_scale : bool, optional\n        When True, numeric or datetime values on the categorical axis will maintain\n        their original scaling rather than being converted to fixed indices.\\\n    \"\"\"),\n    formatter=dedent(\"\"\"\\\n    formatter : callable, optional\n        Function for converting categorical data into strings. Affects both grouping\n        and tick labels.\\\n    \"\"\"),\n    legend=dedent(\"\"\"\\\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=dedent(\"\"\"\\\n    ax : matplotlib Axes, optional\n        Axes object to draw the plot onto, otherwise uses the current Axes.\\\n    \"\"\"),\n    ax_out=dedent(\"\"\"\\\n    ax : matplotlib Axes\n        Returns the Axes object with the plot drawn onto it.\\\n    \"\"\"),\n\n    # Shared see also\n    boxplot=dedent(\"\"\"\\\n    boxplot : A traditional box-and-whisker plot with a similar API.\\\n    \"\"\"),\n    violinplot=dedent(\"\"\"\\\n    violinplot : A combination of boxplot and kernel density estimation.\\\n    \"\"\"),\n    stripplot=dedent(\"\"\"\\\n    stripplot : A scatterplot where one variable is categorical. Can be used\n                in conjunction with other plots to show each observation.\\\n    \"\"\"),\n    swarmplot=dedent(\"\"\"\\\n    swarmplot : A categorical scatterplot where the points do not overlap. Can\n                be used with other plots to show each observation.\\\n    \"\"\"),\n    barplot=dedent(\"\"\"\\\n    barplot : Show point estimates and confidence intervals using bars.\\\n    \"\"\"),\n    countplot=dedent(\"\"\"\\\n    countplot : Show the counts of observations in each categorical bin.\\\n    \"\"\"),\n    pointplot=dedent(\"\"\"\\\n    pointplot : Show point estimates and confidence intervals using scatterplot\n                glyphs.\\\n    \"\"\"),\n    catplot=dedent(\"\"\"\\\n    catplot : Combine a categorical plot with a :class:`FacetGrid`.\\\n    \"\"\"),\n    boxenplot=dedent(\"\"\"\\\n    boxenplot : An enhanced boxplot for larger datasets.\\\n    \"\"\"),\n\n)\n\n_categorical_docs.update(_facet_docs)\n\n\ndef 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\n\n\nboxplot.__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)\n\n\ndef 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\n\n\nviolinplot.__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)\n\n\ndef 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\n\n\nboxenplot.__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)\n\n\ndef 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\n\n\nstripplot.__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. Note that `stripplot` has `linewidth=0` by default,\n        so edge colors are only visible with nonzero line width.\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)\n\n\ndef 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\n\n\nswarmplot.__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)\n\n\ndef 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\n\n\nbarplot.__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)\n\n\ndef 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, label=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, label)\n\n    if ax is None:\n        ax = plt.gca()\n\n    plotter.plot(ax)\n    return ax\n\n\npointplot.__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    label : string, optional\n        Label to represent the plot in a legend, only relevant when not using `hue`.\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)\n\n\ndef 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\n\n\ncountplot.__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)\n\n\ndef 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    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\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    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\n\n\ncatplot.__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)\n\n\nclass 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])\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\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]\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)\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        )\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\n"},{"className":"_RelationalPlotter","col":0,"comment":"null","endLoc":343,"id":1782,"nodeType":"Class","startLoc":184,"text":"class _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        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"},{"col":4,"comment":"null","endLoc":116,"header":"def test_discrete_bins(self, long_df)","id":1783,"name":"test_discrete_bins","nodeType":"Function","startLoc":110,"text":"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)"},{"className":"VectorPlotter","col":0,"comment":"Base class for objects underlying *plot functions.","endLoc":1450,"id":1784,"nodeType":"Class","startLoc":613,"text":"class 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))\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\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\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\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\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\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\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()\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_na', 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\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\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        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\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)\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)\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\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"},{"col":4,"comment":"null","endLoc":174,"header":"@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)","id":1786,"name":"test_singleton","nodeType":"Function","startLoc":168,"text":"@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"},{"col":0,"comment":"null","endLoc":966,"header":"def _make_symlog_transforms(c: float = 1, base: float = 10) -> TransFuncs","id":1787,"name":"_make_symlog_transforms","nodeType":"Function","startLoc":949,"text":"def _make_symlog_transforms(c: float = 1, base: float = 10) -> TransFuncs:\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"},{"attributeType":"TypedDict","col":0,"comment":"null","endLoc":1565,"id":1788,"name":"_lut_dict","nodeType":"Attribute","startLoc":1565,"text":"_lut_dict"},{"col":4,"comment":"Return True at least one of x or y is defined.","endLoc":666,"header":"@property\n    def has_xy_data(self)","id":1789,"name":"has_xy_data","nodeType":"Function","startLoc":663,"text":"@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))"},{"col":4,"comment":"null","endLoc":88,"header":"def test_default(self, df)","id":1791,"name":"test_default","nodeType":"Function","startLoc":81,"text":"def test_default(self, df):\n\n        orient = \"x\"\n        groupby = self.get_groupby(df, orient)\n        res = Jitter()(df, groupby, orient, {})\n        self.check_same(res, df, \"y\", \"grp2\", \"width\")\n        self.check_pos(res, df, \"x\", 0.2 * df[\"width\"])\n        assert (res[\"x\"] - df[\"x\"]).abs().min() > 0"},{"col":4,"comment":"Yield each subplot dictionary with Axes object and metadata.","endLoc":265,"header":"def __iter__(self) -> Generator[dict, None, None]","id":1792,"name":"__iter__","nodeType":"Function","startLoc":263,"text":"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"},{"col":4,"comment":"Return the number of subplots in this figure.","endLoc":269,"header":"def __len__(self) -> int","id":1793,"name":"__len__","nodeType":"Function","startLoc":267,"text":"def __len__(self) -> int:\n        \"\"\"Return the number of subplots in this figure.\"\"\"\n        return len(self._subplot_list)"},{"attributeType":"str | (ndarray) -> float","col":4,"comment":"null","endLoc":34,"id":1794,"name":"func","nodeType":"Attribute","startLoc":34,"text":"func"},{"attributeType":"null","col":12,"comment":"null","endLoc":179,"id":1796,"name":"_figure","nodeType":"Attribute","startLoc":179,"text":"self._figure"},{"col":4,"comment":"null","endLoc":275,"header":"def __add__(self, other)","id":1797,"name":"__add__","nodeType":"Function","startLoc":269,"text":"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}\")"},{"col":4,"comment":"null","endLoc":125,"header":"def test_discrete_bins_from_nominal_scale(self, rng)","id":1798,"name":"test_discrete_bins_from_nominal_scale","nodeType":"Function","startLoc":118,"text":"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)"},{"attributeType":"dict","col":8,"comment":"null","endLoc":82,"id":1800,"name":"grid_dimensions","nodeType":"Attribute","startLoc":82,"text":"self.grid_dimensions"},{"col":4,"comment":"null","endLoc":279,"header":"def _repr_png_(self) -> tuple[bytes, dict[str, float]]","id":1804,"name":"_repr_png_","nodeType":"Function","startLoc":277,"text":"def _repr_png_(self) -> tuple[bytes, dict[str, float]]:\n\n        return self.plot()._repr_png_()"},{"col":4,"comment":"\n        Compile the plot spec and return the Plotter object.\n        ","endLoc":821,"header":"def plot(self, pyplot: bool = False) -> Plotter","id":1805,"name":"plot","nodeType":"Function","startLoc":816,"text":"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)"},{"col":4,"comment":"null","endLoc":188,"header":"def test_ci(self)","id":1806,"name":"test_ci","nodeType":"Function","startLoc":176,"text":"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\""},{"col":4,"comment":"null","endLoc":327,"header":"def _theme_with_defaults(self) -> dict[str, Any]","id":1807,"name":"_theme_with_defaults","nodeType":"Function","startLoc":309,"text":"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"},{"col":4,"comment":"null","endLoc":131,"header":"def test_count_stat(self, long_df, single_args)","id":1808,"name":"test_count_stat","nodeType":"Function","startLoc":127,"text":"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)"},{"attributeType":"null","col":0,"comment":"null","endLoc":24,"id":1810,"name":"mask","nodeType":"Attribute","startLoc":24,"text":"mask"},{"attributeType":"null","col":12,"comment":"null","endLoc":168,"id":1811,"name":"_subplot_list","nodeType":"Attribute","startLoc":168,"text":"self._subplot_list"},{"attributeType":"bool","col":4,"comment":"null","endLoc":36,"id":1812,"name":"group_by_orient","nodeType":"Attribute","startLoc":36,"text":"group_by_orient"},{"attributeType":"null","col":8,"comment":"null","endLoc":119,"id":1813,"name":"wrap_dim","nodeType":"Attribute","startLoc":119,"text":"self.wrap_dim"},{"className":"Est","col":0,"comment":"\n    Calculate a point estimate and error bar interval.\n\n    For additional information about the various `errorbar` choices, see\n    the :doc:`errorbar tutorial `.\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    Examples\n    --------\n    .. include:: ../docstrings/objects.Est.rst\n\n    ","endLoc":110,"id":1814,"nodeType":"Class","startLoc":52,"text":"@dataclass\nclass Est(Stat):\n    \"\"\"\n    Calculate a point estimate and error bar interval.\n\n    For additional information about the various `errorbar` choices, see\n    the :doc:`errorbar tutorial `.\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    Examples\n    --------\n    .. include:: ../docstrings/objects.Est.rst\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])\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\"}[orient]\n        res = (\n            groupby\n            .apply(data, self._process, var, engine)\n            .dropna(subset=[var])\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"},{"attributeType":"null","col":8,"comment":"null","endLoc":106,"id":1815,"name":"wrap","nodeType":"Attribute","startLoc":106,"text":"self.wrap"},{"col":4,"comment":"null","endLoc":91,"header":"def _process(\n        self, data: DataFrame, var: str, estimator: EstimateAggregator\n    ) -> DataFrame","id":1816,"name":"_process","nodeType":"Function","startLoc":85,"text":"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])"},{"col":4,"comment":"Return a function that maps from data domain to color values.","endLoc":690,"header":"def get_mapping(\n        self, scale: Scale, data: Series\n    ) -> Callable[[ArrayLike], ArrayLike]","id":1817,"name":"get_mapping","nodeType":"Function","startLoc":651,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":27,"id":1818,"name":"f","nodeType":"Attribute","startLoc":27,"text":"f"},{"attributeType":"dict","col":8,"comment":"null","endLoc":39,"id":1819,"name":"subplot_spec","nodeType":"Attribute","startLoc":39,"text":"self.subplot_spec"},{"col":4,"comment":"null","endLoc":137,"header":"def test_probability_stat(self, long_df, single_args)","id":1820,"name":"test_probability_stat","nodeType":"Function","startLoc":133,"text":"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"},{"col":4,"comment":"null","endLoc":110,"header":"def __call__(\n        self, data: DataFrame, groupby: GroupBy, orient: str, scales: dict[str, Scale],\n    ) -> DataFrame","id":1821,"name":"__call__","nodeType":"Function","startLoc":93,"text":"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\"}[orient]\n        res = (\n            groupby\n            .apply(data, self._process, var, engine)\n            .dropna(subset=[var])\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"},{"attributeType":"null","col":8,"comment":"null","endLoc":100,"id":1822,"name":"n_subplots","nodeType":"Attribute","startLoc":100,"text":"self.n_subplots"},{"id":1824,"name":"copybutton.js","nodeType":"TextFile","path":"doc/_static","text":"// originally taken from scikit-learn's Sphinx theme\n$(document).ready(function() {\n    /* Add a [>>>] button on the top-right corner of code samples to hide\n     * the >>> and ... prompts and the output and thus make the code\n     * copyable.\n     * Note: This JS snippet was taken from the official python.org\n     * documentation site.*/\n    var div = $('.highlight-python .highlight,' +\n                '.highlight-python3 .highlight,' +\n                '.highlight-pycon .highlight')\n    var pre = div.find('pre');\n\n    // get the styles from the current theme\n    pre.parent().parent().css('position', 'relative');\n    var hide_text = 'Hide the prompts and output';\n    var show_text = 'Show the prompts and output';\n    var border_width = pre.css('border-top-width');\n    var border_style = pre.css('border-top-style');\n    var border_color = pre.css('border-top-color');\n    var button_styles = {\n        'cursor':'pointer', 'position': 'absolute', 'top': '0', 'right': '0',\n        'border-color': border_color, 'border-style': border_style,\n        'border-width': border_width, 'color': border_color, 'text-size': '75%',\n        'font-family': 'monospace', 'padding-left': '0.2em', 'padding-right': '0.2em'\n    }\n\n    // create and add the button to all the code blocks that contain >>>\n    div.each(function(index) {\n        var jthis = $(this);\n        if (jthis.find('.gp').length > 0) {\n            var button = $('>>>');\n            button.css(button_styles)\n            button.attr('title', hide_text);\n            jthis.prepend(button);\n        }\n        // tracebacks (.gt) contain bare text elements that need to be\n        // wrapped in a span to work with .nextUntil() (see later)\n        jthis.find('pre:has(.gt)').contents().filter(function() {\n            return ((this.nodeType == 3) && (this.data.trim().length > 0));\n        }).wrap('');\n    });\n\n    // define the behavior of the button when it's clicked\n    $('.copybutton').toggle(\n        function() {\n            var button = $(this);\n            button.parent().find('.go, .gp, .gt').hide();\n            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'hidden');\n            button.css('text-decoration', 'line-through');\n            button.attr('title', show_text);\n        },\n        function() {\n            var button = $(this);\n            button.parent().find('.go, .gp, .gt').show();\n            button.next('pre').find('.gt').nextUntil('.gp, .go').css('visibility', 'visible');\n            button.css('text-decoration', 'none');\n            button.attr('title', hide_text);\n        });\n});\n"},{"id":1825,"name":"ecdfplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Plot a univariate distribution along the x axis:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns; sns.set_theme()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"penguins = sns.load_dataset(\\\"penguins\\\")\\n\",\n    \"sns.ecdfplot(data=penguins, x=\\\"flipper_length_mm\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Flip the plot by assigning the data variable to the y axis:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.ecdfplot(data=penguins, y=\\\"flipper_length_mm\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"If neither `x` nor `y` is assigned, the dataset is treated as wide-form, and a histogram is drawn for each numeric column:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.ecdfplot(data=penguins.filter(like=\\\"bill_\\\", axis=\\\"columns\\\"))\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"You can also draw multiple histograms from a long-form dataset with hue mapping:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.ecdfplot(data=penguins, x=\\\"bill_length_mm\\\", hue=\\\"species\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"The default distribution statistic is normalized to show a proportion, but you can show absolute counts instead:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.ecdfplot(data=penguins, x=\\\"bill_length_mm\\\", hue=\\\"species\\\", stat=\\\"count\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"It's also possible to plot the empirical complementary CDF (1 - CDF):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.ecdfplot(data=penguins, x=\\\"bill_length_mm\\\", hue=\\\"species\\\", complementary=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"col":4,"comment":"null","endLoc":1016,"header":"def pop(self, __index: SupportsIndex = -1) -> _T","id":1826,"name":"pop","nodeType":"Function","startLoc":1016,"text":"def pop(self, __index: SupportsIndex = -1) -> _T: ..."},{"className":"TestSpecificationChecks","col":0,"comment":"null","endLoc":47,"id":1827,"nodeType":"Class","startLoc":9,"text":"class 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)"},{"col":4,"comment":"null","endLoc":16,"header":"def test_both_facets_and_wrap(self)","id":1828,"name":"test_both_facets_and_wrap","nodeType":"Function","startLoc":11,"text":"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, {})"},{"col":0,"comment":"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    ","endLoc":225,"header":"def choose_dark_palette(input=\"husl\", as_cmap=False)","id":1829,"name":"choose_dark_palette","nodeType":"Function","startLoc":143,"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"},{"col":4,"comment":"null","endLoc":23,"header":"def test_cross_xy_pairing_and_wrap(self)","id":1830,"name":"test_cross_xy_pairing_and_wrap","nodeType":"Function","startLoc":18,"text":"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)"},{"attributeType":"null","col":0,"comment":"null","endLoc":6,"id":1831,"name":"__all__","nodeType":"Attribute","startLoc":6,"text":"__all__"},{"col":0,"comment":"","endLoc":1,"header":"miscplot.py#","id":1832,"name":"","nodeType":"Function","startLoc":1,"text":"__all__ = [\"palplot\", \"dogplot\"]"},{"col":4,"comment":"null","endLoc":143,"header":"def test_proportion_stat(self, long_df, single_args)","id":1833,"name":"test_proportion_stat","nodeType":"Function","startLoc":139,"text":"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"},{"col":4,"comment":"null","endLoc":202,"header":"@pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_fast_regression(self)","id":1834,"name":"test_fast_regression","nodeType":"Function","startLoc":190,"text":"@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)"},{"id":1835,"name":"installing.rst","nodeType":"TextFile","path":"doc","text":".. _installing:\n\n.. currentmodule:: seaborn\n\nInstalling and getting started\n------------------------------\n\nOfficial releases of seaborn can be installed from `PyPI `_::\n\n    pip install seaborn\n\nThe basic invocation of `pip` will install seaborn and, if necessary, its mandatory dependencies.\nIt is possible to include optional dependencies that give access to a few advanced features::\n\n    pip install seaborn[stats]\n\nThe library is also included as part of the `Anaconda `_ distribution,\nand it can be installed with `conda`::\n\n    conda install seaborn\n\nAs the main Anaconda repository can be slow to add new releases, you may prefer using the\n`conda-forge `_ channel::\n\n    conda install seaborn -c conda-forge\n\nDependencies\n~~~~~~~~~~~~\n\nSupported Python versions\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Python 3.7+\n\nMandatory dependencies\n^^^^^^^^^^^^^^^^^^^^^^\n\n- `numpy `__\n\n- `pandas `__\n\n- `matplotlib `__\n\nOptional dependencies\n^^^^^^^^^^^^^^^^^^^^^\n\n- `statsmodels `__, for advanced regression plots\n\n- `scipy `__, for clustering matrices and some advanced options\n\n- `fastcluster `__, faster clustering of large matrices\n\nQuickstart\n~~~~~~~~~~\n\nOnce you have seaborn installed, you're ready to get started.\nTo test it out, you could load and plot one of the example datasets::\n\n    import seaborn as sns\n    df = sns.load_dataset(\"penguins\")\n    sns.pairplot(df, hue=\"species\")\n\nIf you're working in a Jupyter notebook or an IPython terminal with\n`matplotlib mode `_\nenabled, you should immediately see :ref:`the plot `.\nOtherwise, you may need to explicitly call :func:`matplotlib.pyplot.show`::\n\n    import matplotlib.pyplot as plt\n    plt.show()\n\nWhile you can get pretty far with only seaborn imported, having access to\nmatplotlib functions is often useful. The tutorials and API documentation\ntypically assume the following imports::\n\n    import numpy as np\n    import pandas as pd\n\n    import matplotlib as mpl\n    import matplotlib.pyplot as plt\n\n    import seaborn as sns\n    import seaborn.objects as so\n\nDebugging install issues\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe seaborn codebase is pure Python, and the library should generally install\nwithout issue. Occasionally, difficulties will arise because the dependencies\ninclude compiled code and link to system libraries. These difficulties\ntypically manifest as errors on import with messages such as ``\"DLL load\nfailed\"``. To debug such problems, read through the exception trace to\nfigure out which specific library failed to import, and then consult the\ninstallation docs for that package to see if they have tips for your particular\nsystem.\n\nIn some cases, an installation of seaborn will appear to succeed, but trying\nto import it will raise an error with the message ``\"No module named\nseaborn\"``. This usually means that you have multiple Python installations on\nyour system and that your ``pip`` or ``conda`` points towards a different\ninstallation than where your interpreter lives. Resolving this issue\nwill involve sorting out the paths on your system, but it can sometimes be\navoided by invoking ``pip`` with ``python -m pip install seaborn``.\n\nGetting help\n~~~~~~~~~~~~\n\nIf you think you've encountered a bug in seaborn, please report it on the\n`GitHub issue tracker `_.\nTo be useful, bug reports must include the following information:\n\n- A reproducible code example that demonstrates the problem\n- The output that you are seeing (an image of a plot, or the error message)\n- A clear explanation of why you think something is wrong\n- The specific versions of seaborn and matplotlib that you are working with\n\nBug reports are easiest to address if they can be demonstrated using one of the\nexample datasets from the seaborn docs (i.e. with :func:`load_dataset`).\nOtherwise, it is preferable that your example generate synthetic data to\nreproduce the problem. If you can only demonstrate the issue with your\nactual dataset, you will need to share it, ideally as a csv.\n\nIf you've encountered an error, searching the specific text of the message\nbefore opening a new issue can often help you solve the problem quickly and\navoid making a duplicate report.\n\nBecause matplotlib handles the actual rendering, errors or incorrect outputs\nmay be due to a problem in matplotlib rather than one in seaborn. It can save time\nif you try to reproduce the issue in an example that uses only matplotlib,\nso that you can report it in the right place. But it is alright to skip this\nstep if it's not obvious how to do it.\n\nGeneral support questions are more at home on either `stackoverflow\n`_, where there is a\nlarger audience of people who will see your post and may be able to offer\nassistance. Your chance of getting a quick answer will be higher if you include\n`runnable code `_,\na precise statement of what you are hoping to achieve, and a clear explanation\nof the problems that you have encountered.\n"},{"col":4,"comment":"null","endLoc":31,"header":"def test_col_facets_and_x_pairing(self)","id":1836,"name":"test_col_facets_and_x_pairing","nodeType":"Function","startLoc":25,"text":"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)"},{"col":0,"comment":"null","endLoc":988,"header":"def _make_power_transforms(exp: float) -> TransFuncs","id":1837,"name":"_make_power_transforms","nodeType":"Function","startLoc":980,"text":"def _make_power_transforms(exp: float) -> TransFuncs:\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"},{"col":4,"comment":"null","endLoc":39,"header":"def test_wrapped_columns_and_y_pairing(self)","id":1838,"name":"test_wrapped_columns_and_y_pairing","nodeType":"Function","startLoc":33,"text":"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)"},{"col":4,"comment":"null","endLoc":217,"header":"def _legend_artist(self, variables, value, scales)","id":1839,"name":"_legend_artist","nodeType":"Function","startLoc":202,"text":"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        )"},{"col":4,"comment":"null","endLoc":97,"header":"def test_width(self, df)","id":1842,"name":"test_width","nodeType":"Function","startLoc":90,"text":"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\"])"},{"col":0,"comment":"","endLoc":6,"header":"hexbin_marginals.py#","id":1843,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nHexbin plot with marginal distributions\n=======================================\n\n_thumb: .45, .4\n\"\"\"\n\nsns.set_theme(style=\"ticks\")\n\nrs = np.random.RandomState(11)\n\nx = rs.gamma(2, size=1000)\n\ny = -.5 * x + rs.normal(size=1000)\n\nsns.jointplot(x=x, y=y, kind=\"hex\", color=\"#4CB391\")"},{"col":4,"comment":"null","endLoc":47,"header":"def test_wrapped_x_pairing_and_facetd_rows(self)","id":1845,"name":"test_wrapped_x_pairing_and_facetd_rows","nodeType":"Function","startLoc":41,"text":"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)"},{"attributeType":"str | (ndarray) -> float","col":4,"comment":"null","endLoc":78,"id":1846,"name":"func","nodeType":"Attribute","startLoc":78,"text":"func"},{"col":4,"comment":"null","endLoc":149,"header":"def test_percent_stat(self, long_df, single_args)","id":1847,"name":"test_percent_stat","nodeType":"Function","startLoc":145,"text":"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"},{"attributeType":"null","col":3,"comment":"null","endLoc":27,"id":1848,"name":"ax","nodeType":"Attribute","startLoc":27,"text":"ax"},{"col":4,"comment":"null","endLoc":857,"header":"def _plot(self, pyplot: bool = False) -> Plotter","id":1849,"name":"_plot","nodeType":"Function","startLoc":823,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":30,"id":1851,"name":"cmap","nodeType":"Attribute","startLoc":30,"text":"cmap"},{"className":"TestSubplotSpec","col":0,"comment":"null","endLoc":267,"id":1852,"nodeType":"Class","startLoc":50,"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\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\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\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\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\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\"\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\"\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\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\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\"\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\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\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\""},{"col":4,"comment":"null","endLoc":60,"header":"def test_single_subplot(self)","id":1855,"name":"test_single_subplot","nodeType":"Function","startLoc":52,"text":"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"},{"col":4,"comment":"null","endLoc":73,"header":"def test_single_facet(self)","id":1856,"name":"test_single_facet","nodeType":"Function","startLoc":62,"text":"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"},{"col":0,"comment":"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    ","endLoc":310,"header":"def choose_light_palette(input=\"husl\", as_cmap=False)","id":1857,"name":"choose_light_palette","nodeType":"Function","startLoc":228,"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"},{"col":0,"comment":"null","endLoc":156,"header":"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)","id":1858,"name":"logo","nodeType":"Function","startLoc":61,"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    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)"},{"fileName":"wide_data_lineplot.py","filePath":"examples","id":1859,"nodeType":"File","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)\n"},{"col":0,"comment":"","endLoc":6,"header":"many_pairwise_correlations.py#","id":1860,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nPlotting a diagonal correlation matrix\n======================================\n\n_thumb: .3, .6\n\"\"\"\n\nsns.set_theme(style=\"white\")\n\nrs = np.random.RandomState(33)\n\nd = pd.DataFrame(data=rs.normal(size=(100, 26)),\n                 columns=list(ascii_letters[26:]))\n\ncorr = d.corr()\n\nmask = np.triu(np.ones_like(corr, dtype=bool))\n\nf, ax = plt.subplots(figsize=(11, 9))\n\ncmap = sns.diverging_palette(230, 20, as_cmap=True)\n\nsns.heatmap(corr, mask=mask, cmap=cmap, vmax=.3, center=0,\n            square=True, linewidths=.5, cbar_kws={\"shrink\": .5})"},{"col":4,"comment":"Low-level regression and prediction using linear algebra.","endLoc":246,"header":"def fit_fast(self, grid)","id":1861,"name":"fit_fast","nodeType":"Function","startLoc":229,"text":"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"},{"attributeType":"null","col":16,"comment":"null","endLoc":8,"id":1864,"name":"np","nodeType":"Attribute","startLoc":8,"text":"np"},{"col":4,"comment":"null","endLoc":106,"header":"def test_x(self, df)","id":1865,"name":"test_x","nodeType":"Function","startLoc":99,"text":"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)"},{"col":4,"comment":"null","endLoc":155,"header":"def test_density_stat(self, long_df, single_args)","id":1866,"name":"test_density_stat","nodeType":"Function","startLoc":151,"text":"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"},{"fileName":"_compat.py","filePath":"seaborn","id":1867,"nodeType":"File","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)\n\n\ndef 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\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            # See github.com/matplotlib/matplotlib/tree/v3.4.2/LICENSE\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\n\n\ndef 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\n\n\ndef 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})\n\n\ndef 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)\n"},{"col":0,"comment":"\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    ","endLoc":19,"header":"def MarkerStyle(marker=None, fillstyle=None)","id":1868,"name":"MarkerStyle","nodeType":"Function","startLoc":6,"text":"def 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)"},{"col":4,"comment":"null","endLoc":92,"header":"def test_two_facets(self)","id":1869,"name":"test_two_facets","nodeType":"Function","startLoc":75,"text":"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"},{"attributeType":"str | (str, float)","col":4,"comment":"null","endLoc":79,"id":1870,"name":"errorbar","nodeType":"Attribute","startLoc":79,"text":"errorbar"},{"col":4,"comment":"null","endLoc":228,"header":"def _read_to_next_section(self)","id":1871,"name":"_read_to_next_section","nodeType":"Function","startLoc":219,"text":"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"},{"attributeType":"null","col":17,"comment":"null","endLoc":9,"id":1873,"name":"pd","nodeType":"Attribute","startLoc":9,"text":"pd"},{"attributeType":"null","col":18,"comment":"null","endLoc":10,"id":1874,"name":"sns","nodeType":"Attribute","startLoc":10,"text":"sns"},{"attributeType":"RandomState","col":0,"comment":"null","endLoc":13,"id":1875,"name":"rs","nodeType":"Attribute","startLoc":13,"text":"rs"},{"col":4,"comment":"null","endLoc":161,"header":"def test_frequency_stat(self, long_df, single_args)","id":1877,"name":"test_frequency_stat","nodeType":"Function","startLoc":157,"text":"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)"},{"col":0,"comment":"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    ","endLoc":369,"header":"def choose_diverging_palette(as_cmap=False)","id":1879,"name":"choose_diverging_palette","nodeType":"Function","startLoc":313,"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\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"},{"attributeType":"str | tuple | Mappable","col":4,"comment":"null","endLoc":154,"id":1880,"name":"color","nodeType":"Attribute","startLoc":154,"text":"color"},{"col":4,"comment":"null","endLoc":115,"header":"def test_y(self, df)","id":1881,"name":"test_y","nodeType":"Function","startLoc":108,"text":"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)"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":155,"id":1882,"name":"alpha","nodeType":"Attribute","startLoc":155,"text":"alpha"},{"col":0,"comment":"null","endLoc":977,"header":"def _make_sqrt_transforms() -> TransFuncs","id":1883,"name":"_make_sqrt_transforms","nodeType":"Function","startLoc":969,"text":"def _make_sqrt_transforms() -> TransFuncs:\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"},{"col":4,"comment":"null","endLoc":882,"header":"def __init__(self, pyplot: bool, theme: dict[str, Any])","id":1884,"name":"__init__","nodeType":"Function","startLoc":875,"text":"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] = {}"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":156,"id":1885,"name":"linewidth","nodeType":"Attribute","startLoc":156,"text":"linewidth"},{"attributeType":"str | Mappable","col":4,"comment":"null","endLoc":157,"id":1886,"name":"linestyle","nodeType":"Attribute","startLoc":157,"text":"linestyle"},{"col":4,"comment":"null","endLoc":240,"header":"def _read_sections(self)","id":1887,"name":"_read_sections","nodeType":"Function","startLoc":230,"text":"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:])"},{"attributeType":"int","col":4,"comment":"null","endLoc":80,"id":1888,"name":"n_boot","nodeType":"Attribute","startLoc":80,"text":"n_boot"},{"attributeType":"bool","col":4,"comment":"null","endLoc":159,"id":1889,"name":"_sort","nodeType":"Attribute","startLoc":159,"text":"_sort"},{"className":"Lines","col":0,"comment":"\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    ","endLoc":245,"id":1890,"nodeType":"Class","startLoc":230,"text":"@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"},{"attributeType":"bool","col":4,"comment":"null","endLoc":245,"id":1891,"name":"_sort","nodeType":"Attribute","startLoc":245,"text":"_sort"},{"attributeType":"int | None","col":4,"comment":"null","endLoc":81,"id":1892,"name":"seed","nodeType":"Attribute","startLoc":81,"text":"seed"},{"attributeType":"null","col":4,"comment":"null","endLoc":541,"id":1893,"name":"legend","nodeType":"Attribute","startLoc":541,"text":"legend"},{"attributeType":"null","col":4,"comment":"null","endLoc":542,"id":1894,"name":"normed","nodeType":"Attribute","startLoc":542,"text":"normed"},{"col":0,"comment":"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    ","endLoc":426,"header":"def choose_cubehelix_palette(as_cmap=False)","id":1895,"name":"choose_cubehelix_palette","nodeType":"Function","startLoc":372,"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\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"},{"className":"Coordinate","col":0,"comment":"The position of visual marks with respect to the axes of the plot.","endLoc":151,"id":1896,"nodeType":"Class","startLoc":148,"text":"class Coordinate(Property):\n    \"\"\"The position of visual marks with respect to the axes of the plot.\"\"\"\n    legend = False\n    normed = False"},{"col":4,"comment":"null","endLoc":106,"header":"def test_col_facet_wrapped(self)","id":1897,"name":"test_col_facet_wrapped","nodeType":"Function","startLoc":94,"text":"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"},{"attributeType":"null","col":4,"comment":"null","endLoc":150,"id":1898,"name":"legend","nodeType":"Attribute","startLoc":150,"text":"legend"},{"col":4,"comment":"null","endLoc":166,"header":"def test_invalid_stat(self)","id":1899,"name":"test_invalid_stat","nodeType":"Function","startLoc":163,"text":"def test_invalid_stat(self):\n\n        with pytest.raises(ValueError, match=\"The `stat` parameter for `Hist`\"):\n            Hist(stat=\"invalid\")"},{"attributeType":"null","col":4,"comment":"null","endLoc":151,"id":1900,"name":"normed","nodeType":"Attribute","startLoc":151,"text":"normed"},{"attributeType":"bool","col":4,"comment":"null","endLoc":83,"id":1901,"name":"group_by_orient","nodeType":"Attribute","startLoc":83,"text":"group_by_orient"},{"className":"EdgeWidth","col":0,"comment":"Thickness of the edges on a patch mark, in points.","endLoc":287,"id":1902,"nodeType":"Class","startLoc":281,"text":"class 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"},{"attributeType":"null","col":0,"comment":"null","endLoc":14,"id":1903,"name":"values","nodeType":"Attribute","startLoc":14,"text":"values"},{"col":4,"comment":"Min and max values used by default for semantic mapping.","endLoc":287,"header":"@property\n    def default_range(self) -> tuple[float, float]","id":1904,"name":"default_range","nodeType":"Function","startLoc":283,"text":"@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"},{"className":"Range","col":0,"comment":"\n    An oriented line mark drawn between min/max values.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Range.rst\n\n    ","endLoc":271,"id":1905,"nodeType":"Class","startLoc":248,"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_segments(self, data, orient):\n\n        # TODO better checks on what variables we have\n        # TODO what if only one exist?\n        val = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        if not set(data.columns) & {f\"{val}min\", f\"{val}max\"}:\n            agg = {f\"{val}min\": (val, \"min\"), f\"{val}max\": (val, \"max\")}\n            data = data.groupby(orient).agg(**agg).reset_index()\n\n        cols = [orient, f\"{val}min\", f\"{val}max\"]\n        data = data[cols].melt(orient, value_name=val)[[\"x\", \"y\"]]\n        segments = [d.to_numpy() for _, d in data.groupby(orient)]\n        return segments"},{"className":"Fill","col":0,"comment":"Boolean property of points/bars/patches that can be solid or outlined.","endLoc":762,"id":1906,"nodeType":"Class","startLoc":698,"text":"class 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)\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"},{"col":4,"comment":"null","endLoc":271,"header":"def _setup_segments(self, data, orient)","id":1907,"name":"_setup_segments","nodeType":"Function","startLoc":259,"text":"def _setup_segments(self, data, orient):\n\n        # TODO better checks on what variables we have\n        # TODO what if only one exist?\n        val = {\"x\": \"y\", \"y\": \"x\"}[orient]\n        if not set(data.columns) & {f\"{val}min\", f\"{val}max\"}:\n            agg = {f\"{val}min\": (val, \"min\"), f\"{val}max\": (val, \"max\")}\n            data = data.groupby(orient).agg(**agg).reset_index()\n\n        cols = [orient, f\"{val}min\", f\"{val}max\"]\n        data = data[cols].melt(orient, value_name=val)[[\"x\", \"y\"]]\n        segments = [d.to_numpy() for _, d in data.groupby(orient)]\n        return segments"},{"col":4,"comment":"null","endLoc":125,"header":"def test_seed(self, df)","id":1908,"name":"test_seed","nodeType":"Function","startLoc":117,"text":"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])"},{"col":4,"comment":"null","endLoc":708,"header":"def standardize(self, val: Any) -> bool","id":1909,"name":"standardize","nodeType":"Function","startLoc":707,"text":"def standardize(self, val: Any) -> bool:\n        return bool(val)"},{"className":"Rolling","col":0,"comment":"null","endLoc":118,"id":1910,"nodeType":"Class","startLoc":113,"text":"@dataclass\nclass Rolling(Stat):\n    ...\n\n    def __call__(self, data, groupby, orient, scales):\n        ..."},{"col":4,"comment":"null","endLoc":118,"header":"def __call__(self, data, groupby, orient, scales)","id":1911,"name":"__call__","nodeType":"Function","startLoc":117,"text":"def __call__(self, data, groupby, orient, scales):\n        ..."},{"col":4,"comment":"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        ","endLoc":687,"header":"@property\n    def var_levels(self)","id":1913,"name":"var_levels","nodeType":"Function","startLoc":668,"text":"@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"},{"attributeType":"null","col":17,"comment":"null","endLoc":5,"id":1914,"name":"pd","nodeType":"Attribute","startLoc":5,"text":"pd"},{"col":4,"comment":"null","endLoc":947,"header":"def _repr_png_(self) -> tuple[bytes, dict[str, float]]","id":1915,"name":"_repr_png_","nodeType":"Function","startLoc":910,"text":"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"},{"col":4,"comment":"null","endLoc":172,"header":"def test_cumulative_count(self, long_df, single_args)","id":1916,"name":"test_cumulative_count","nodeType":"Function","startLoc":168,"text":"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)"},{"col":4,"comment":"null","endLoc":120,"header":"def test_row_facet_wrapped(self)","id":1917,"name":"test_row_facet_wrapped","nodeType":"Function","startLoc":108,"text":"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"},{"col":4,"comment":"null","endLoc":217,"header":"def _strip(self, doc)","id":1918,"name":"_strip","nodeType":"Function","startLoc":206,"text":"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]"},{"attributeType":"null","col":0,"comment":"null","endLoc":17,"id":1920,"name":"__all__","nodeType":"Attribute","startLoc":17,"text":"__all__"},{"col":0,"comment":"","endLoc":1,"header":"widgets.py#","id":1921,"name":"","nodeType":"Function","startLoc":1,"text":"try:\n    from ipywidgets import interact, FloatSlider, IntSlider\nexcept ImportError:\n    def interact(f):\n        msg = \"Interactive palettes require `ipywidgets`, which is not installed.\"\n        raise ImportError(msg)\n\n__all__ = [\"choose_colorbrewer_palette\", \"choose_cubehelix_palette\",\n           \"choose_dark_palette\", \"choose_light_palette\",\n           \"choose_diverging_palette\"]"},{"col":4,"comment":"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        ","endLoc":1092,"header":"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    )","id":1922,"name":"iter_data","nodeType":"Function","startLoc":973,"text":"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\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()"},{"col":4,"comment":"More general regression function using statsmodels objects.","endLoc":288,"header":"def fit_statsmodels(self, grid, model, **kwargs)","id":1923,"name":"fit_statsmodels","nodeType":"Function","startLoc":265,"text":"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"},{"col":4,"comment":"null","endLoc":178,"header":"def test_cumulative_proportion(self, long_df, single_args)","id":1924,"name":"test_cumulative_proportion","nodeType":"Function","startLoc":174,"text":"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"},{"col":4,"comment":"null","endLoc":134,"header":"def test_col_facet_wrapped_single_row(self)","id":1926,"name":"test_col_facet_wrapped_single_row","nodeType":"Function","startLoc":122,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":15,"id":1927,"name":"dates","nodeType":"Attribute","startLoc":15,"text":"dates"},{"col":4,"comment":"Generate a new object with the same information as the current spec.","endLoc":307,"header":"def _clone(self) -> Plot","id":1928,"name":"_clone","nodeType":"Function","startLoc":283,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":16,"id":1929,"name":"data","nodeType":"Attribute","startLoc":16,"text":"data"},{"col":0,"comment":"Plot rectangular data as a color-encoded matrix.\n\n    This is an Axes-level function and will draw the heatmap into the\n    currently-active Axes if none is provided to the ``ax`` argument.  Part of\n    this Axes space will be taken and used to plot a colormap, unless ``cbar``\n    is False or a separate Axes is provided to ``cbar_ax``.\n\n    Parameters\n    ----------\n    data : rectangular dataset\n        2D dataset that can be coerced into an ndarray. If a Pandas DataFrame\n        is provided, the index/column information will be used to label the\n        columns and rows.\n    vmin, vmax : floats, optional\n        Values to anchor the colormap, otherwise they are inferred from the\n        data and other keyword arguments.\n    cmap : matplotlib colormap name or object, or list of colors, optional\n        The mapping from data values to color space. If not provided, the\n        default will depend on whether ``center`` is set.\n    center : float, optional\n        The value at which to center the colormap when plotting divergent data.\n        Using this parameter will change the default ``cmap`` if none is\n        specified.\n    robust : bool, optional\n        If True and ``vmin`` or ``vmax`` are absent, the colormap range is\n        computed with robust quantiles instead of the extreme values.\n    annot : bool or rectangular dataset, optional\n        If True, write the data value in each cell. If an array-like with the\n        same shape as ``data``, then use this to annotate the heatmap instead\n        of the data. Note that DataFrames will match on position, not index.\n    fmt : str, optional\n        String formatting code to use when adding annotations.\n    annot_kws : dict of key, value mappings, optional\n        Keyword arguments for :meth:`matplotlib.axes.Axes.text` when ``annot``\n        is True.\n    linewidths : float, optional\n        Width of the lines that will divide each cell.\n    linecolor : color, optional\n        Color of the lines that will divide each cell.\n    cbar : bool, optional\n        Whether to draw a colorbar.\n    cbar_kws : dict of key, value mappings, optional\n        Keyword arguments for :meth:`matplotlib.figure.Figure.colorbar`.\n    cbar_ax : matplotlib Axes, optional\n        Axes in which to draw the colorbar, otherwise take space from the\n        main Axes.\n    square : bool, optional\n        If True, set the Axes aspect to \"equal\" so each cell will be\n        square-shaped.\n    xticklabels, yticklabels : \"auto\", bool, list-like, or int, optional\n        If True, plot the column names of the dataframe. If False, don't plot\n        the column names. If list-like, plot these alternate labels as the\n        xticklabels. If an integer, use the column names but plot only every\n        n label. If \"auto\", try to densely plot non-overlapping labels.\n    mask : bool array or DataFrame, optional\n        If passed, data will not be shown in cells where ``mask`` is True.\n        Cells with missing values are automatically masked.\n    ax : matplotlib Axes, optional\n        Axes in which to draw the plot, otherwise use the currently-active\n        Axes.\n    kwargs : other keyword arguments\n        All other keyword arguments are passed to\n        :meth:`matplotlib.axes.Axes.pcolormesh`.\n\n    Returns\n    -------\n    ax : matplotlib Axes\n        Axes object with the heatmap.\n\n    See Also\n    --------\n    clustermap : Plot a matrix using hierarchical clustering to arrange the\n                 rows and columns.\n\n    Examples\n    --------\n\n    .. include:: ../docstrings/heatmap.rst\n\n    ","endLoc":460,"header":"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)","id":1930,"name":"heatmap","nodeType":"Function","startLoc":355,"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    .. include:: ../docstrings/heatmap.rst\n\n    \"\"\"\n    # Initialize the plotter object\n    plotter = _HeatMapper(data, vmin, vmax, cmap, center, robust, annot, fmt,\n                          annot_kws, cbar, cbar_kws, xticklabels,\n                          yticklabels, mask)\n\n    # Add the pcolormesh kwargs here\n    kwargs[\"linewidths\"] = linewidths\n    kwargs[\"edgecolor\"] = linecolor\n\n    # Draw the plot and return the Axes\n    if ax is None:\n        ax = plt.gca()\n    if square:\n        ax.set_aspect(\"equal\")\n    plotter.plot(ax, cbar_ax, kwargs)\n    return ax"},{"attributeType":"null","col":0,"comment":"null","endLoc":17,"id":1931,"name":"data","nodeType":"Attribute","startLoc":17,"text":"data"},{"col":4,"comment":"null","endLoc":184,"header":"def test_cumulative_density(self, long_df, single_args)","id":1932,"name":"test_cumulative_density","nodeType":"Function","startLoc":180,"text":"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"},{"col":4,"comment":"Return a list of n values, alternating True and False.","endLoc":719,"header":"def _default_values(self, n: int) -> list","id":1933,"name":"_default_values","nodeType":"Function","startLoc":710,"text":"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))]"},{"col":0,"comment":"","endLoc":7,"header":"wide_data_lineplot.py#","id":1934,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nLineplot from a wide-form dataset\n=================================\n\n_thumb: .52, .5\n\n\"\"\"\n\nsns.set_theme(style=\"whitegrid\")\n\nrs = np.random.RandomState(365)\n\nvalues = rs.randn(365, 4).cumsum(axis=0)\n\ndates = pd.date_range(\"1 1 2016\", periods=365, freq=\"D\")\n\ndata = pd.DataFrame(values, dates, columns=[\"A\", \"B\", \"C\", \"D\"])\n\ndata = data.rolling(7).mean()\n\nsns.lineplot(data=data, palette=\"tab10\", linewidth=2.5)"},{"col":0,"comment":"null","endLoc":646,"header":"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)","id":1937,"name":"lineplot","nodeType":"Function","startLoc":603,"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"},{"col":0,"comment":"\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    ","endLoc":857,"header":"def _deprecate_ci(errorbar, ci)","id":1938,"name":"_deprecate_ci","nodeType":"Function","startLoc":835,"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"},{"attributeType":"tuple | str | None","col":4,"comment":"null","endLoc":319,"id":1939,"name":"values","nodeType":"Attribute","startLoc":319,"text":"values"},{"col":4,"comment":"null","endLoc":146,"header":"def test_x_and_y_paired(self)","id":1940,"name":"test_x_and_y_paired","nodeType":"Function","startLoc":136,"text":"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\""},{"col":4,"comment":"null","endLoc":157,"header":"def test_x_paired(self)","id":1941,"name":"test_x_paired","nodeType":"Function","startLoc":148,"text":"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"},{"col":4,"comment":"null","endLoc":168,"header":"def test_y_paired(self)","id":1942,"name":"test_y_paired","nodeType":"Function","startLoc":159,"text":"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\""},{"col":4,"comment":"null","endLoc":180,"header":"def test_x_paired_and_wrapped(self)","id":1943,"name":"test_x_paired_and_wrapped","nodeType":"Function","startLoc":170,"text":"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"},{"col":4,"comment":"null","endLoc":192,"header":"def test_y_paired_and_wrapped(self)","id":1944,"name":"test_y_paired_and_wrapped","nodeType":"Function","startLoc":182,"text":"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"},{"col":4,"comment":"null","endLoc":204,"header":"def test_y_paired_and_wrapped_single_row(self)","id":1945,"name":"test_y_paired_and_wrapped_single_row","nodeType":"Function","startLoc":194,"text":"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"},{"col":4,"comment":"null","endLoc":219,"header":"def test_col_faceted_y_paired(self)","id":1946,"name":"test_col_faceted_y_paired","nodeType":"Function","startLoc":206,"text":"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\""},{"fileName":"marginal_ticks.py","filePath":"examples","id":1948,"nodeType":"File","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)\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":1949,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"col":4,"comment":"null","endLoc":190,"header":"def test_common_norm_default(self, long_df, triple_args)","id":1950,"name":"test_common_norm_default","nodeType":"Function","startLoc":186,"text":"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)"},{"col":4,"comment":"null","endLoc":216,"header":"@pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_regress_poly(self)","id":1951,"name":"test_regress_poly","nodeType":"Function","startLoc":204,"text":"@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)"},{"col":4,"comment":"null","endLoc":234,"header":"def test_row_faceted_x_paired(self)","id":1952,"name":"test_row_faceted_x_paired","nodeType":"Function","startLoc":221,"text":"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"},{"className":"TestDodge","col":0,"comment":"null","endLoc":270,"id":1953,"nodeType":"Class","startLoc":128,"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])\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)\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])\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)\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\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)\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)"},{"attributeType":"null","col":0,"comment":"null","endLoc":9,"id":1954,"name":"mpg","nodeType":"Attribute","startLoc":9,"text":"mpg"},{"attributeType":"tuple | None","col":4,"comment":"null","endLoc":320,"id":1955,"name":"norm","nodeType":"Attribute","startLoc":320,"text":"norm"},{"col":4,"comment":"null","endLoc":139,"header":"def test_default(self, toy_df)","id":1956,"name":"test_default","nodeType":"Function","startLoc":132,"text":"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])"},{"fileName":"exceptions.py","filePath":"seaborn/_core","id":1957,"nodeType":"File","text":"\"\"\"\nCustom exceptions for the seaborn.objects interface.\n\nThis is very lightweight, but it's a separate module to avoid circular imports.\n\n\"\"\"\nfrom __future__ import annotations\n\n\nclass PlotSpecError(RuntimeError):\n    \"\"\"\n    Error class raised from seaborn.objects.Plot for compile-time failures.\n\n    In the declarative Plot interface, exceptions may not be triggered immediately\n    by bad user input (and validation at input time may not be possible). This class\n    is used to signal that indirect dependency. It should be raised in an exception\n    chain when compile-time operations fail with an error message providing useful\n    context (e.g., scaling errors could specify the variable that failed.)\n\n    \"\"\"\n    @classmethod\n    def _during(cls, step: str, var: str = \"\") -> PlotSpecError:\n        \"\"\"\n        Initialize the class to report the failure of a specific operation.\n        \"\"\"\n        message = []\n        if var:\n            message.append(f\"{step} failed for the `{var}` variable.\")\n        else:\n            message.append(f\"{step} failed.\")\n        message.append(\"See the traceback above for more information.\")\n        return cls(\" \".join(message))\n"},{"col":0,"comment":"","endLoc":6,"header":"exceptions.py#","id":1958,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nCustom exceptions for the seaborn.objects interface.\n\nThis is very lightweight, but it's a separate module to avoid circular imports.\n\n\"\"\""},{"col":4,"comment":"\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        ","endLoc":500,"header":"def tick(\n        self,\n        locator: Locator | None = None, *,\n        at: Sequence[float] | None = None,\n        upto: int | None = None,\n        count: int | None = None,\n        every: float | None = None,\n        between: tuple[float, float] | None = None,\n        minor: int | None = None,\n    ) -> Continuous","id":1959,"name":"tick","nodeType":"Function","startLoc":441,"text":"def tick(\n        self,\n        locator: Locator | None = None, *,\n        at: Sequence[float] | None = None,\n        upto: int | None = None,\n        count: int | None = None,\n        every: float | None = None,\n        between: tuple[float, float] | None = None,\n        minor: int | None = None,\n    ) -> Continuous:\n        \"\"\"\n        Configure the selection of ticks for the scale's axis or legend.\n\n        Parameters\n        ----------\n        locator : :class:`matplotlib.ticker.Locator` subclass\n            Pre-configured matplotlib locator; other parameters will not be used.\n        at : sequence of floats\n            Place ticks at these specific locations (in data units).\n        upto : int\n            Choose \"nice\" locations for ticks, but do not exceed this number.\n        count : int\n            Choose exactly this number of ticks, bounded by `between` or axis limits.\n        every : float\n            Choose locations at this interval of separation (in data units).\n        between : pair of floats\n            Bound upper / lower ticks when using `every` or `count`.\n        minor : int\n            Number of unlabeled ticks to draw between labeled \"major\" ticks.\n\n        Returns\n        -------\n        scale\n            Copy of self with new tick configuration.\n\n        \"\"\"\n        # 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"},{"id":1960,"name":"objects.Est.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"57ececfa-0ae0-4acb-b85d-7c6a6ca8d3db\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"diamonds = load_dataset(\\\"diamonds\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"03c64256-8daf-4b32-87bd-b425e27a7823\",\n   \"metadata\": {},\n   \"source\": [\n    \"The default behavior is to compute the mean and 95% confidence interval (using bootstrapping):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"46017dc7-7c3c-4dcf-9232-2e3ac490d980\",\n   \"metadata\": {\n    \"tags\": []\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"p = so.Plot(diamonds, \\\"clarity\\\", \\\"carat\\\")\\n\",\n    \"p.add(so.Range(), so.Est())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"1bf04e8d-998e-4a47-9375-ddcde76e3914\",\n   \"metadata\": {},\n   \"source\": [\n    \"Other estimators may be selected by name if they are pandas methods:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"ea394c55-8fa6-4fb0-8665-42c03ef3576e\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Range(), so.Est(\\\"median\\\"))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"9c5f3c91-fecb-4e75-b045-b30870154083\",\n   \"metadata\": {},\n   \"source\": [\n    \"There are several options for computing the error bar interval, such as (scaled) standard errors:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"9c350af5-d549-4cce-b3f2-e9bef33aef36\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Range(), so.Est(errorbar=\\\"se\\\"))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"8c8d321b-5e73-418c-8c71-4b91cf187e57\",\n   \"metadata\": {},\n   \"source\": [\n    \"The error bars can also represent the spread of the distribution around the estimate using (scaled) standard deviations:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"fd2cd9dc-e4c9-4ba1-ac79-38806cf1e009\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Range(), so.Est(errorbar=\\\"sd\\\"))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"6dba074b-881c-40df-b42e-458e4a26e23d\",\n   \"metadata\": {},\n   \"source\": [\n    \"Because confidence intervals are computed using bootstrapping, there will be small amounts of randomness. Reduce the random variability by increasing the nubmer of bootstrap iterations (although this will be slower), or eliminate it by seeding the random number generator:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d6b450e1-8b1f-411f-aa01-bbb46ab3b6ec\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Range(), so.Est(seed=0))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"5e4a0594-e1ee-4f72-971e-3763dd626e8b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"col":4,"comment":"null","endLoc":342,"header":"@property\n    def _variables(self) -> list[str]","id":1961,"name":"_variables","nodeType":"Function","startLoc":329,"text":"@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(v for v in layer[\"vars\"] if v not in variables)\n\n        # Coerce to str in return to appease mypy; we know these will only\n        # ever be strings but I don't think we can type a DataFrame that way yet\n        return [str(v) for v in variables]"},{"attributeType":"JointGrid","col":0,"comment":"null","endLoc":12,"id":1962,"name":"g","nodeType":"Attribute","startLoc":12,"text":"g"},{"col":4,"comment":"Regression using numpy polyfit for higher-order trends.","endLoc":263,"header":"def fit_poly(self, grid, order)","id":1963,"name":"fit_poly","nodeType":"Function","startLoc":248,"text":"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"},{"col":4,"comment":"null","endLoc":197,"header":"def test_common_norm_false(self, long_df, triple_args)","id":1964,"name":"test_common_norm_false","nodeType":"Function","startLoc":192,"text":"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)"},{"col":0,"comment":"Test that we get a bootstrap array of the right shape.","endLoc":34,"header":"def test_bootstrap_length(random)","id":1965,"name":"test_bootstrap_length","nodeType":"Function","startLoc":26,"text":"def 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"},{"col":4,"comment":"null","endLoc":247,"header":"def test_x_any_y_paired_non_cross(self)","id":1966,"name":"test_x_any_y_paired_non_cross","nodeType":"Function","startLoc":236,"text":"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"},{"col":4,"comment":"null","endLoc":261,"header":"def test_x_any_y_paired_non_cross_wrapped(self)","id":1967,"name":"test_x_any_y_paired_non_cross_wrapped","nodeType":"Function","startLoc":249,"text":"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"},{"col":4,"comment":"null","endLoc":267,"header":"def test_forced_unshared_facets(self)","id":1968,"name":"test_forced_unshared_facets","nodeType":"Function","startLoc":263,"text":"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\""},{"col":4,"comment":"null","endLoc":148,"header":"def test_fill(self, toy_df)","id":1969,"name":"test_fill","nodeType":"Function","startLoc":141,"text":"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])"},{"className":"TestSubplotElements","col":0,"comment":"null","endLoc":525,"id":1970,"nodeType":"Class","startLoc":270,"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)\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\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\"\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\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\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}\"\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\"]\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"},{"col":0,"comment":"","endLoc":6,"header":"marginal_ticks.py#","id":1971,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nScatterplot with marginal ticks\n===============================\n\n_thumb: .66, .34\n\"\"\"\n\nsns.set_theme(style=\"white\", color_codes=True)\n\nmpg = sns.load_dataset(\"mpg\")\n\ng = sns.JointGrid(data=mpg, x=\"mpg\", y=\"acceleration\", space=0, ratio=17)\n\ng.plot_joint(sns.scatterplot, size=mpg[\"horsepower\"], sizes=(30, 120),\n             color=\"g\", alpha=.6, legend=False)\n\ng.plot_marginals(sns.rugplot, height=1, color=\"g\", alpha=.6)"},{"fileName":"pairgrid_dotplot.py","filePath":"examples","id":1973,"nodeType":"File","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)\n"},{"col":4,"comment":"null","endLoc":285,"header":"def test_single_subplot(self)","id":1974,"name":"test_single_subplot","nodeType":"Function","startLoc":272,"text":"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]"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":1975,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"col":4,"comment":"null","endLoc":376,"header":"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    )","id":1976,"name":"__init__","nodeType":"Function","startLoc":351,"text":"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"},{"col":4,"comment":"null","endLoc":230,"header":"def test_regress_logx(self)","id":1977,"name":"test_regress_logx","nodeType":"Function","startLoc":218,"text":"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]"},{"col":4,"comment":"null","endLoc":204,"header":"def test_common_norm_subset(self, long_df, triple_args)","id":1978,"name":"test_common_norm_subset","nodeType":"Function","startLoc":199,"text":"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)"},{"col":0,"comment":"Test that bootstrapping a random array stays within the right range.","endLoc":43,"header":"def test_bootstrap_range(random)","id":1979,"name":"test_bootstrap_range","nodeType":"Function","startLoc":37,"text":"def 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()"},{"attributeType":"null","col":0,"comment":"null","endLoc":11,"id":1980,"name":"crashes","nodeType":"Attribute","startLoc":11,"text":"crashes"},{"id":1981,"name":"mpl_palette.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"1d0d41d3-463c-4c6f-aa65-38131bdf3ddb\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme()\\n\",\n    \"sns.palettes._patch_colormap_display()\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"d2a0ae1e-a01e-49b3-a677-2b05a195990a\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return discrete samples from a continuous matplotlib colormap:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2b6a4ce9-6e4e-4b59-ada8-14ef8aef21d7\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.mpl_palette(\\\"viridis\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"0ccc47b1-c969-46e2-93bb-b9eb5a2e2141\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return the continuous colormap instead; note how the extreme values are more intense:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a8a1bc5d-1d62-45c6-a53b-9fadb58f11c0\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.mpl_palette(\\\"viridis\\\", as_cmap=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"ff0d1a3b-8641-40c0-bb4b-c22b83ec9432\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return more colors:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"8faef1d8-a1eb-4060-be10-377342c9bd1d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.mpl_palette(\\\"viridis\\\", 8)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"612bf052-e888-411d-a2ea-6a742a78bc63\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return values from a qualitative colormap:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"74db95a8-4898-4f6c-a57d-c751af1dc7bf\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.mpl_palette(\\\"Set2\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"918494bf-1b8e-4b00-8950-1bd73032dee1\",\n   \"metadata\": {},\n   \"source\": [\n    \"Notice how the palette will only contain distinct colors and can be shorter than requested:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d97efa25-9050-4e28-b758-da6f43c9f963\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.mpl_palette(\\\"Set2\\\", 10)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f64ad118-e213-43cc-a714-98ed13cc3824\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"col":4,"comment":"null","endLoc":157,"header":"def test_drop(self, toy_df)","id":1983,"name":"test_drop","nodeType":"Function","startLoc":150,"text":"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])"},{"id":1984,"name":"objects.Path.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2923956c-f141-4ecb-ab08-e819099f0fa9\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"healthexp = load_dataset(\\\"healthexp\\\").sort_values([\\\"Country\\\", \\\"Year\\\"])\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"8c2781ed-190d-4155-99ac-0170b94de030\",\n   \"metadata\": {},\n   \"source\": [\n    \"Unlike :class:`Line`, this mark does not sort observations before plotting, making it suitable for plotting trajectories through a variable space:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"199c0b22-1cbd-4b5a-bebe-f59afa79b9c6\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p = so.Plot(healthexp, \\\"Spending_USD\\\", \\\"Life_Expectancy\\\", color=\\\"Country\\\")\\n\",\n    \"p.add(so.Path())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"fb87bd85-024b-42f5-b458-3550271d7124\",\n   \"metadata\": {},\n   \"source\": [\n    \"It otherwise offers the same set of options, including a number of properties that can be set or mapped:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"280de309-1c0d-4cdc-8f4c-a4f15da461cf\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Path(marker=\\\"o\\\", pointsize=2, linewidth=.75, fillcolor=\\\"w\\\"))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4e795770-4481-4e23-a49b-e828a1f5cbbd\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"attributeType":"PairGrid","col":0,"comment":"null","endLoc":14,"id":1985,"name":"g","nodeType":"Attribute","startLoc":14,"text":"g"},{"col":4,"comment":"null","endLoc":565,"header":"def _parse_for_log_params(\n        self, trans: str | TransFuncs | None\n    ) -> tuple[float | None, float | None]","id":1986,"name":"_parse_for_log_params","nodeType":"Function","startLoc":553,"text":"def _parse_for_log_params(\n        self, trans: str | TransFuncs | 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"},{"col":4,"comment":"null","endLoc":210,"header":"def test_common_norm_warning(self, long_df, triple_args)","id":1987,"name":"test_common_norm_warning","nodeType":"Function","startLoc":206,"text":"def test_common_norm_warning(self, long_df, triple_args):\n\n        h = Hist(common_norm=[\"b\"])\n        with pytest.warns(UserWarning, match=r\"Undefined variable\\(s\\)\"):\n            h(long_df, *triple_args)"},{"fileName":"test_utils.py","filePath":"tests","id":1988,"nodeType":"File","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)\n\n\ndef _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)\n\n\ndef 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)\n\n\n@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\n\n\nclass 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()\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\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\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)\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)\n\n\ndef 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\n\n\ndef 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])\n\n\ndef 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\n\n\ndef 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}\")\n\n\ndef 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)\n\n\ndef 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)\n\n\n@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\n\n\ndef 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]))\n\n\ndef 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\"\n\n\ndef 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)\n"},{"className":"Dash","col":0,"comment":"\n    A line mark drawn as an oriented segment for each datapoint.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Dash.rst\n\n    ","endLoc":294,"id":1989,"nodeType":"Class","startLoc":274,"text":"@document_properties\n@dataclass\nclass Dash(Paths):\n    \"\"\"\n    A line mark drawn as an oriented segment for each datapoint.\n\n    Examples\n    --------\n    .. include:: ../docstrings/objects.Dash.rst\n\n    \"\"\"\n    width: MappableFloat = Mappable(.8, grouping=False)\n\n    def _setup_segments(self, data, orient):\n\n        ori = [\"x\", \"y\"].index(orient)\n        xys = data[[\"x\", \"y\"]].to_numpy().astype(float)\n        segments = np.stack([xys, xys], axis=1)\n        segments[:, 0, ori] -= data[\"width\"] / 2\n        segments[:, 1, ori] += data[\"width\"] / 2\n        return segments"},{"col":4,"comment":"null","endLoc":166,"header":"def test_gap(self, toy_df)","id":1990,"name":"test_gap","nodeType":"Function","startLoc":159,"text":"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])"},{"col":4,"comment":"null","endLoc":294,"header":"def _setup_segments(self, data, orient)","id":1991,"name":"_setup_segments","nodeType":"Function","startLoc":287,"text":"def _setup_segments(self, data, orient):\n\n        ori = [\"x\", \"y\"].index(orient)\n        xys = data[[\"x\", \"y\"]].to_numpy().astype(float)\n        segments = np.stack([xys, xys], axis=1)\n        segments[:, 0, ori] -= data[\"width\"] / 2\n        segments[:, 1, ori] += data[\"width\"] / 2\n        return segments"},{"col":4,"comment":"null","endLoc":219,"header":"def test_common_bins_default(self, long_df, triple_args)","id":1992,"name":"test_common_bins_default","nodeType":"Function","startLoc":212,"text":"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"},{"col":0,"comment":"Produce a Normalize object given a Scale and min/max domain limits.","endLoc":67,"header":"def norm_from_scale(scale, norm)","id":1993,"name":"norm_from_scale","nodeType":"Function","startLoc":22,"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\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            # See github.com/matplotlib/matplotlib/tree/v3.4.2/LICENSE\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"},{"className":"HTTPException","col":0,"comment":"null","endLoc":212,"id":1994,"nodeType":"Class","startLoc":212,"text":"class HTTPException(Exception): ..."},{"col":4,"comment":"null","endLoc":175,"header":"def test_widths_default(self, toy_df_widths)","id":1995,"name":"test_widths_default","nodeType":"Function","startLoc":168,"text":"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])"},{"col":4,"comment":"Fit the model in log-space.","endLoc":315,"header":"def fit_logx(self, grid)","id":1996,"name":"fit_logx","nodeType":"Function","startLoc":296,"text":"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"},{"attributeType":"None","col":4,"comment":"null","endLoc":35,"id":1997,"name":"map_type","nodeType":"Attribute","startLoc":35,"text":"map_type"},{"attributeType":"None","col":4,"comment":"null","endLoc":38,"id":1998,"name":"levels","nodeType":"Attribute","startLoc":38,"text":"levels"},{"attributeType":"None","col":4,"comment":"null","endLoc":41,"id":1999,"name":"lookup_table","nodeType":"Attribute","startLoc":41,"text":"lookup_table"},{"attributeType":"null","col":8,"comment":"null","endLoc":50,"id":2000,"name":"plotter","nodeType":"Attribute","startLoc":50,"text":"self.plotter"},{"className":"HueMapping","col":0,"comment":"Mapping that sets artist colors according to data values.","endLoc":288,"id":2001,"nodeType":"Class","startLoc":94,"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\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\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\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"},{"col":4,"comment":"null","endLoc":184,"header":"def test_widths_fill(self, toy_df_widths)","id":2002,"name":"test_widths_fill","nodeType":"Function","startLoc":177,"text":"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])"},{"col":4,"comment":"Map the levels of the `hue` variable to distinct colors.\n\n        Parameters\n        ----------\n        # TODO add generic parameters\n\n        ","endLoc":168,"header":"def __init__(\n        self, plotter, palette=None, order=None, norm=None,\n    )","id":2003,"name":"__init__","nodeType":"Function","startLoc":106,"text":"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"},{"col":0,"comment":"Test that bootstrap works with multiple input arrays.","endLoc":56,"header":"def test_bootstrap_multiarg(random)","id":2005,"name":"test_bootstrap_multiarg","nodeType":"Function","startLoc":46,"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)"},{"col":4,"comment":"null","endLoc":193,"header":"def test_widths_drop(self, toy_df_widths)","id":2006,"name":"test_widths_drop","nodeType":"Function","startLoc":186,"text":"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])"},{"col":4,"comment":"\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            Set to `None` to override the default formatter with a log transform.\n        unit : str or (str, str) tuple\n            Use  SI prefixes with these units (e.g., with `unit=\"g\"`, a tick value\n            of 5000 will appear as `5 kg`). When a tuple, the first element gives the\n            separator between the number and unit.\n\n        Returns\n        -------\n        scale\n            Copy of self with new label configuration.\n\n        ","endLoc":551,"header":"def label(\n        self,\n        formatter: Formatter | None = None, *,\n        like: str | Callable | None = None,\n        base: int | None | Default = default,\n        unit: str | None = None,\n    ) -> Continuous","id":2007,"name":"label","nodeType":"Function","startLoc":502,"text":"def label(\n        self,\n        formatter: Formatter | None = None, *,\n        like: str | Callable | None = None,\n        base: int | None | Default = default,\n        unit: str | None = None,\n    ) -> Continuous:\n        \"\"\"\n        Configure the appearance of tick labels for the scale's axis or legend.\n\n        Parameters\n        ----------\n        formatter : :class:`matplotlib.ticker.Formatter` subclass\n            Pre-configured formatter to use; other parameters will be ignored.\n        like : str or callable\n            Either a format pattern (e.g., `\".2f\"`), a format string with fields named\n            `x` and/or `pos` (e.g., `\"${x:.2f}\"`), or a callable 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            Set to `None` to override the default formatter with a log transform.\n        unit : str or (str, str) tuple\n            Use  SI prefixes with these units (e.g., with `unit=\"g\"`, a tick value\n            of 5000 will appear as `5 kg`). When a tuple, the first element gives the\n            separator between the number and unit.\n\n        Returns\n        -------\n        scale\n            Copy of self with new label configuration.\n\n        \"\"\"\n        # 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"},{"attributeType":"list","col":0,"comment":"null","endLoc":26,"id":2008,"name":"titles","nodeType":"Attribute","startLoc":26,"text":"titles"},{"attributeType":"null","col":4,"comment":"null","endLoc":29,"id":2009,"name":"ax","nodeType":"Attribute","startLoc":29,"text":"ax"},{"fileName":"smooth_bivariate_kde.py","filePath":"examples","id":2011,"nodeType":"File","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)\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":2013,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"col":4,"comment":"null","endLoc":202,"header":"def test_faceted_default(self, toy_df_facets)","id":2014,"name":"test_faceted_default","nodeType":"Function","startLoc":195,"text":"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)"},{"col":4,"comment":"null","endLoc":441,"header":"def _error_location(self, msg, error=True)","id":2015,"name":"_error_location","nodeType":"Function","startLoc":430,"text":"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)"},{"className":"TestSpineUtils","col":0,"comment":"null","endLoc":283,"id":2016,"nodeType":"Class","startLoc":125,"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()\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\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\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)\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)"},{"col":4,"comment":"null","endLoc":148,"header":"def test_despine(self)","id":2018,"name":"test_despine","nodeType":"Function","startLoc":135,"text":"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()"},{"attributeType":"str","col":4,"comment":"null","endLoc":1575,"id":2019,"name":"_name","nodeType":"Attribute","startLoc":1575,"text":"_name"},{"attributeType":"null","col":0,"comment":"null","endLoc":10,"id":2021,"name":"df","nodeType":"Attribute","startLoc":10,"text":"df"},{"col":4,"comment":"null","endLoc":247,"header":"@pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_regress_n_boot(self)","id":2023,"name":"test_regress_n_boot","nodeType":"Function","startLoc":232,"text":"@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))"},{"col":4,"comment":"null","endLoc":211,"header":"def test_faceted_fill(self, toy_df_facets)","id":2024,"name":"test_faceted_fill","nodeType":"Function","startLoc":204,"text":"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])"},{"attributeType":"JointGrid","col":0,"comment":"null","endLoc":12,"id":2025,"name":"g","nodeType":"Attribute","startLoc":12,"text":"g"},{"col":4,"comment":"null","endLoc":305,"header":"@pytest.mark.parametrize(\"dim\", [\"col\", \"row\"])\n    def test_single_facet_dim(self, dim)","id":2026,"name":"test_single_facet_dim","nodeType":"Function","startLoc":287,"text":"@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)"},{"col":4,"comment":"Determine how to implement the mapping.","endLoc":211,"header":"def infer_map_type(self, palette, norm, input_format, var_type)","id":2028,"name":"infer_map_type","nodeType":"Function","startLoc":198,"text":"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"},{"col":4,"comment":"null","endLoc":621,"header":"def _get_locators(self, locator, at, upto, count, every, between, minor)","id":2029,"name":"_get_locators","nodeType":"Function","startLoc":567,"text":"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"},{"col":0,"comment":"","endLoc":6,"header":"smooth_bivariate_kde.py#","id":2030,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nSmooth kernel density with marginal histograms\n==============================================\n\n_thumb: .48, .41\n\"\"\"\n\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)\n\ng.plot_joint(sns.kdeplot,\n             fill=True, clip=((2200, 6800), (10, 25)),\n             thresh=0, levels=100, cmap=\"rocket\")\n\ng.plot_marginals(sns.histplot, color=\"#03051A\", alpha=1, bins=25)"},{"col":4,"comment":"null","endLoc":220,"header":"def test_faceted_drop(self, toy_df_facets)","id":2032,"name":"test_faceted_drop","nodeType":"Function","startLoc":213,"text":"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)"},{"col":4,"comment":"null","endLoc":52,"header":"def test_set_properties(self)","id":2034,"name":"test_set_properties","nodeType":"Function","startLoc":36,"text":"def test_set_properties(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        color = \"red\"\n        alpha = .6\n        fontsize = 6\n        valign = \"bottom\"\n\n        m = Text(color=color, alpha=alpha, fontsize=fontsize, valign=valign)\n        p = Plot(x, y, text=s).add(m).plot()\n        ax = p._figure.axes[0]\n        for i, text in enumerate(self.get_texts(ax)):\n            assert text.get_text() == s[i]\n            assert text.get_color() == to_rgba(m.color, m.alpha)\n            assert text.get_fontsize() == m.fontsize\n            assert text.get_verticalalignment() == m.valign"},{"fileName":"test_area.py","filePath":"tests/_marks","id":2035,"nodeType":"File","text":"\nimport 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 TestArea:\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        colors = p._theme[\"axes.prop_cycle\"].by_key()[\"color\"]\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(colors[0], .2))\n\n        ec = poly.get_edgecolor()\n        assert_array_equal(ec, to_rgba(colors[0], 1))\n\n        lw = poly.get_linewidth()\n        assert_array_equal(lw, mpl.rcParams[\"patch.linewidth\"] * 2)\n\n    def test_set_properties(self):\n\n        x, y = [1, 2, 3], [1, 2, 1]\n        mark = Area(\n            color=\".33\",\n            alpha=.3,\n            edgecolor=\".88\",\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\n\n    def test_mapped_properties(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        cs = [\".2\", \".8\"]\n        p = Plot(x=x, y=y, color=g, edgewidth=g).scale(color=cs).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(cs, .2))\n\n        ecs = [p.get_edgecolor() for p in ax.patches]\n        assert_array_equal(ecs, to_rgba_array(cs, 1))\n\n        lws = [p.get_linewidth() for p in ax.patches]\n        assert lws[0] > lws[1]\n\n    def test_unfilled(self):\n\n        x, y = [1, 2, 3], [1, 2, 1]\n        c = \".5\"\n        p = Plot(x=x, y=y).add(Area(fill=False, color=c)).plot()\n        ax = p._figure.axes[0]\n        poly = ax.patches[0]\n        assert poly.get_facecolor() == to_rgba(c, 0)\n\n\nclass TestBand:\n\n    def test_range(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)\n\n    def test_auto_range(self):\n\n        x = [1, 1, 2, 2, 2]\n        y = [1, 2, 3, 4, 5]\n        p = Plot(x=x, y=y).add(Band()).plot()\n        ax = p._figure.axes[0]\n        verts = ax.patches[0].get_path().vertices.T\n\n        expected_x = [1, 2, 2, 1, 1]\n        assert_array_equal(verts[0], expected_x)\n\n        expected_y = [1, 3, 5, 2, 1]\n        assert_array_equal(verts[1], expected_y)\n"},{"className":"TestArea","col":0,"comment":"null","endLoc":98,"id":2036,"nodeType":"Class","startLoc":11,"text":"class TestArea:\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        colors = p._theme[\"axes.prop_cycle\"].by_key()[\"color\"]\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(colors[0], .2))\n\n        ec = poly.get_edgecolor()\n        assert_array_equal(ec, to_rgba(colors[0], 1))\n\n        lw = poly.get_linewidth()\n        assert_array_equal(lw, mpl.rcParams[\"patch.linewidth\"] * 2)\n\n    def test_set_properties(self):\n\n        x, y = [1, 2, 3], [1, 2, 1]\n        mark = Area(\n            color=\".33\",\n            alpha=.3,\n            edgecolor=\".88\",\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\n\n    def test_mapped_properties(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        cs = [\".2\", \".8\"]\n        p = Plot(x=x, y=y, color=g, edgewidth=g).scale(color=cs).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(cs, .2))\n\n        ecs = [p.get_edgecolor() for p in ax.patches]\n        assert_array_equal(ecs, to_rgba_array(cs, 1))\n\n        lws = [p.get_linewidth() for p in ax.patches]\n        assert lws[0] > lws[1]\n\n    def test_unfilled(self):\n\n        x, y = [1, 2, 3], [1, 2, 1]\n        c = \".5\"\n        p = Plot(x=x, y=y).add(Area(fill=False, color=c)).plot()\n        ax = p._figure.axes[0]\n        poly = ax.patches[0]\n        assert poly.get_facecolor() == to_rgba(c, 0)"},{"col":4,"comment":"null","endLoc":231,"header":"def test_orient(self, toy_df)","id":2037,"name":"test_orient","nodeType":"Function","startLoc":222,"text":"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])"},{"col":4,"comment":"null","endLoc":35,"header":"def test_single_defaults(self)","id":2038,"name":"test_single_defaults","nodeType":"Function","startLoc":13,"text":"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        colors = p._theme[\"axes.prop_cycle\"].by_key()[\"color\"]\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(colors[0], .2))\n\n        ec = poly.get_edgecolor()\n        assert_array_equal(ec, to_rgba(colors[0], 1))\n\n        lw = poly.get_linewidth()\n        assert_array_equal(lw, mpl.rcParams[\"patch.linewidth\"] * 2)"},{"id":2039,"name":"distributions.ipynb","nodeType":"TextFile","path":"doc/_tutorial","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _distribution_tutorial:\\n\",\n    \"\\n\",\n    \".. currentmodule:: seaborn\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Visualizing distributions of data\\n\",\n    \"==================================\\n\",\n    \"\\n\",\n    \"An early step in any effort to analyze or model data should be to understand how the variables are distributed. Techniques for distribution visualization can provide quick answers to many important questions. What range do the observations cover? What is their central tendency? Are they heavily skewed in one direction? Is there evidence for bimodality? Are there significant outliers? Do the answers to these questions vary across subsets defined by other variables?\\n\",\n    \"\\n\",\n    \"The :ref:`distributions module ` contains several functions designed to answer questions such as these. The axes-level functions are :func:`histplot`, :func:`kdeplot`, :func:`ecdfplot`, and :func:`rugplot`. They are grouped together within the figure-level :func:`displot`, :func:`jointplot`, and :func:`pairplot` functions.\\n\",\n    \"\\n\",\n    \"There are several different approaches to visualizing a distribution, and each has its relative advantages and drawbacks. It is important to understand these factors so that you can choose the best approach for your particular aim.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"%matplotlib inline\\n\",\n    \"import seaborn as sns; sns.set_theme()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _tutorial_hist:\\n\",\n    \"\\n\",\n    \"Plotting univariate histograms\\n\",\n    \"------------------------------\\n\",\n    \"\\n\",\n    \"Perhaps the most common approach to visualizing a distribution is the *histogram*. This is the default approach in :func:`displot`, which uses the same underlying code as :func:`histplot`. A histogram is a bar plot where the axis representing the data variable is divided into a set of discrete bins and the count of observations falling within each bin is shown using the height of the corresponding bar:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"penguins = sns.load_dataset(\\\"penguins\\\")\\n\",\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"This plot immediately affords a few insights about the ``flipper_length_mm`` variable. For instance, we can see that the most common flipper length is about 195 mm, but the distribution appears bimodal, so this one number does not represent the data well.\\n\",\n    \"\\n\",\n    \"Choosing the bin size\\n\",\n    \"^^^^^^^^^^^^^^^^^^^^^\\n\",\n    \"\\n\",\n    \"The size of the bins is an important parameter, and using the wrong bin size can mislead by obscuring important features of the data or by creating apparent features out of random variability. By default, :func:`displot`/:func:`histplot` choose a default bin size based on the variance of the data and the number of observations. But you should not be over-reliant on such automatic approaches, because they depend on particular assumptions about the structure of your data. It is always advisable to check that your impressions of the distribution are consistent across different bin sizes. To choose the size directly, set the `binwidth` parameter:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", binwidth=3)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"In other circumstances, it may make more sense to specify the *number* of bins, rather than their size:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", bins=20)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"One example of a situation where defaults fail is when the variable takes a relatively small number of integer values. In that case, the default bin width may be too small, creating awkward gaps in the distribution:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"tips = sns.load_dataset(\\\"tips\\\")\\n\",\n    \"sns.displot(tips, x=\\\"size\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"One approach would be to specify the precise bin breaks by passing an array to ``bins``:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(tips, x=\\\"size\\\", bins=[1, 2, 3, 4, 5, 6, 7])\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"This can also be accomplished by setting ``discrete=True``, which chooses bin breaks that represent the unique values in a dataset with bars that are centered on their corresponding value.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(tips, x=\\\"size\\\", discrete=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"It's also possible to visualize the distribution of a categorical variable using the logic of a histogram. Discrete bins are automatically set for categorical variables, but it may also be helpful to \\\"shrink\\\" the bars slightly to emphasize the categorical nature of the axis:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(tips, x=\\\"day\\\", shrink=.8)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Conditioning on other variables\\n\",\n    \"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\",\n    \"\\n\",\n    \"Once you understand the distribution of a variable, the next step is often to ask whether features of that distribution differ across other variables in the dataset. For example, what accounts for the bimodal distribution of flipper lengths that we saw above? :func:`displot` and :func:`histplot` provide support for conditional subsetting via the ``hue`` semantic. Assigning a variable to ``hue`` will draw a separate histogram for each of its unique values and distinguish them by color:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"By default, the different histograms are \\\"layered\\\" on top of each other and, in some cases, they may be difficult to distinguish. One option is to change the visual representation of the histogram from a bar plot to a \\\"step\\\" plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", element=\\\"step\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Alternatively, instead of layering each bar, they can be \\\"stacked\\\", or moved vertically. In this plot, the outline of the full histogram will match the plot with only a single variable:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", multiple=\\\"stack\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The stacked histogram emphasizes the part-whole relationship between the variables, but it can obscure other features (for example, it is difficult to determine the mode of the Adelie distribution. Another option is \\\"dodge\\\" the bars, which moves them horizontally and reduces their width. This ensures that there are no overlaps and that the bars remain comparable in terms of height. But it only works well when the categorical variable has a small number of levels:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"sex\\\", multiple=\\\"dodge\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Because :func:`displot` is a figure-level function and is drawn onto a :class:`FacetGrid`, it is also possible to draw each individual distribution in a separate subplot by assigning the second variable to ``col`` or ``row`` rather than (or in addition to) ``hue``. This represents the distribution of each subset well, but it makes it more difficult to draw direct comparisons:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", col=\\\"sex\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"None of these approaches are perfect, and  we will soon see some alternatives to a histogram that are better-suited to the task of comparison.\\n\",\n    \"\\n\",\n    \"Normalized histogram statistics\\n\",\n    \"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\",\n    \"\\n\",\n    \"Before we do, another point to note is that, when the subsets have unequal numbers of observations, comparing their distributions in terms of counts may not be ideal. One solution is to *normalize* the counts using the ``stat`` parameter:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", stat=\\\"density\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"By default, however, the normalization is applied to the entire distribution, so this simply rescales the height of the bars. By setting ``common_norm=False``, each subset will be normalized independently:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", stat=\\\"density\\\", common_norm=False)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Density normalization scales the bars so that their *areas* sum to 1. As a result, the density axis is not directly interpretable. Another option is to normalize the bars to that their *heights* sum to 1. This makes most sense when the variable is discrete, but  it is an option for all histograms:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", stat=\\\"probability\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _tutorial_kde:\\n\",\n    \"\\n\",\n    \"Kernel density estimation\\n\",\n    \"-------------------------\\n\",\n    \"\\n\",\n    \"A histogram aims to approximate the underlying probability density function that generated the data by binning and counting observations. Kernel density estimation (KDE) presents a different solution to the same problem. Rather than using discrete bins, a KDE plot smooths the observations with a Gaussian kernel, producing a continuous density estimate:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Choosing the smoothing bandwidth\\n\",\n    \"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\",\n    \"\\n\",\n    \"Much like with the bin size in the histogram, the ability of the KDE to accurately represent the data depends on the choice of smoothing bandwidth. An over-smoothed estimate might erase meaningful features, but an under-smoothed estimate can obscure the true shape within random noise. The easiest way to check the robustness of the estimate is to adjust the default bandwidth:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", kind=\\\"kde\\\", bw_adjust=.25)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note how the narrow bandwidth makes the bimodality much more apparent, but the curve is much less smooth. In contrast, a larger bandwidth obscures the bimodality almost completely:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", kind=\\\"kde\\\", bw_adjust=2)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Conditioning on other variables\\n\",\n    \"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\",\n    \"\\n\",\n    \"As with histograms, if you assign a ``hue`` variable, a separate density estimate will be computed for each level of that variable:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"In many cases, the layered KDE is easier to interpret than the layered histogram, so it is often a good choice for the task of comparison. Many of the same options for resolving multiple distributions apply to the KDE as well, however:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", kind=\\\"kde\\\", multiple=\\\"stack\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note how the stacked plot filled in the area between each curve by default. It is also possible to fill in the curves for single or layered densities, although the default alpha value (opacity) will be different, so that the individual densities are easier to resolve.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", kind=\\\"kde\\\", fill=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Kernel density estimation pitfalls\\n\",\n    \"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\",\n    \"\\n\",\n    \"KDE plots have many advantages. Important features of the data are easy to discern (central tendency, bimodality, skew), and they afford easy comparisons between subsets. But there are also situations where KDE poorly represents the underlying data. This is because the logic of KDE assumes that the underlying distribution is smooth and unbounded. One way this assumption can fail is when a variable reflects a quantity that is naturally bounded. If there are observations lying close to the bound (for example, small values of a variable that cannot be negative), the KDE curve may extend to unrealistic values:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(tips, x=\\\"total_bill\\\", kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"This can be partially avoided with the ``cut`` parameter, which specifies how far the curve should extend beyond the extreme datapoints. But this influences only where the curve is drawn; the density estimate will still smooth over the range where no data can exist, causing it to be artificially low at the extremes of the distribution:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(tips, x=\\\"total_bill\\\", kind=\\\"kde\\\", cut=0)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The KDE approach also fails for discrete data or when data are naturally continuous but specific values are over-represented. The important thing to keep in mind is that the KDE will *always show you a smooth curve*, even when the data themselves are not smooth. For example, consider this distribution of diamond weights:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"diamonds = sns.load_dataset(\\\"diamonds\\\")\\n\",\n    \"sns.displot(diamonds, x=\\\"carat\\\", kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"While the KDE suggests that there are peaks around specific values, the histogram reveals a much more jagged distribution:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(diamonds, x=\\\"carat\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"As a compromise, it is possible to combine these two approaches. While in histogram mode, :func:`displot` (as with :func:`histplot`) has the option of including the smoothed KDE curve (note ``kde=True``, not ``kind=\\\"kde\\\"``):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(diamonds, x=\\\"carat\\\", kde=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _tutorial_ecdf:\\n\",\n    \"\\n\",\n    \"Empirical cumulative distributions\\n\",\n    \"----------------------------------\\n\",\n    \"\\n\",\n    \"A third option for visualizing distributions computes the \\\"empirical cumulative distribution function\\\" (ECDF). This plot draws a monotonically-increasing curve through each datapoint such that the height of the curve reflects the proportion of observations with a smaller value:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", kind=\\\"ecdf\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The ECDF plot has two key advantages. Unlike the histogram or KDE, it directly represents each datapoint. That means there is no bin size or smoothing parameter to consider. Additionally, because the curve is monotonically increasing, it is well-suited for comparing multiple distributions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", kind=\\\"ecdf\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The major downside to the ECDF plot is that it represents the shape of the distribution less intuitively than a histogram or density curve. Consider how the bimodality of flipper lengths is immediately apparent in the histogram, but to see it in the ECDF plot, you must look for varying slopes. Nevertheless, with practice, you can learn to answer all of the important questions about a distribution by examining the ECDF, and doing so can be a powerful approach.\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Visualizing bivariate distributions\\n\",\n    \"-----------------------------------\\n\",\n    \"\\n\",\n    \"All of the examples so far have considered *univariate* distributions: distributions of a single variable, perhaps conditional on a second variable assigned to ``hue``. Assigning a second variable to ``y``, however, will plot a *bivariate* distribution:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"A bivariate histogram bins the data within rectangles that tile the plot and then shows the count of observations within each rectangle with the fill color (analogous to a :func:`heatmap`). Similarly, a bivariate KDE plot smoothes the (x, y) observations with a 2D Gaussian. The default representation then shows the *contours* of the 2D density:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assigning a ``hue`` variable will plot multiple heatmaps or contour sets using different colors. For bivariate histograms, this will only work well if there is minimal overlap between the conditional distributions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", hue=\\\"species\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The contour approach of the bivariate KDE plot lends itself better to evaluating overlap, although a plot with too many contours can get busy:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", hue=\\\"species\\\", kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Just as with univariate plots, the choice of bin size or smoothing bandwidth will determine how well the plot represents the underlying bivariate distribution. The same parameters apply, but they can be tuned for each variable by passing a pair of values:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", binwidth=(2, .5))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"To aid interpretation of the heatmap, add a colorbar to show the mapping between counts and color intensity:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", binwidth=(2, .5), cbar=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The meaning of the bivariate density contours is less straightforward. Because the density is not directly interpretable, the contours are drawn at *iso-proportions* of the density, meaning that each curve shows a level set such that some proportion *p* of the density lies below it. The *p* values are evenly spaced, with the lowest level contolled by the ``thresh`` parameter and the number controlled by ``levels``:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", kind=\\\"kde\\\", thresh=.2, levels=4)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The ``levels`` parameter also accepts a list of values, for more control:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", kind=\\\"kde\\\", levels=[.01, .05, .1, .8])\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The bivariate histogram allows one or both variables to be discrete. Plotting one discrete and one continuous variable offers another way to compare conditional univariate distributions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(diamonds, x=\\\"price\\\", y=\\\"clarity\\\", log_scale=(True, False))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"In contrast, plotting two discrete variables is an easy to way show the cross-tabulation of the observations:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(diamonds, x=\\\"color\\\", y=\\\"clarity\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Distribution visualization in other settings\\n\",\n    \"--------------------------------------------\\n\",\n    \"\\n\",\n    \"Several other figure-level plotting functions in seaborn make use of the :func:`histplot` and :func:`kdeplot` functions.\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"Plotting joint and marginal distributions\\n\",\n    \"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\",\n    \"\\n\",\n    \"The first is :func:`jointplot`, which augments a bivariate relatonal or distribution plot with the marginal distributions of the two variables. By default, :func:`jointplot` represents the bivariate distribution using :func:`scatterplot` and the marginal distributions using :func:`histplot`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.jointplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Similar to :func:`displot`, setting a different ``kind=\\\"kde\\\"`` in :func:`jointplot` will change both the joint and marginal plots the use :func:`kdeplot`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.jointplot(\\n\",\n    \"    data=penguins,\\n\",\n    \"    x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", hue=\\\"species\\\",\\n\",\n    \"    kind=\\\"kde\\\"\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \":func:`jointplot` is a convenient interface to the :class:`JointGrid` class, which offeres more flexibility when used directly:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"g = sns.JointGrid(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\")\\n\",\n    \"g.plot_joint(sns.histplot)\\n\",\n    \"g.plot_marginals(sns.boxplot)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"A less-obtrusive way to show marginal distributions uses a \\\"rug\\\" plot, which adds a small tick on the edge of the plot to represent each individual observation. This is built into :func:`displot`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(\\n\",\n    \"    penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\",\\n\",\n    \"    kind=\\\"kde\\\", rug=True\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"And the axes-level :func:`rugplot` function can be used to add rugs on the side of any other kind of plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.relplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\")\\n\",\n    \"sns.rugplot(data=penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Plotting many distributions\\n\",\n    \"^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n\",\n    \"\\n\",\n    \"The :func:`pairplot` function offers a similar blend of joint and marginal distributions. Rather than focusing on a single relationship, however, :func:`pairplot` uses a \\\"small-multiple\\\" approach to visualize the univariate distribution of all variables in a dataset along with all of their pairwise relationships:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(penguins)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"As with :func:`jointplot`/:class:`JointGrid`, using the underlying :class:`PairGrid` directly will afford more flexibility with only a bit more typing:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"g = sns.PairGrid(penguins)\\n\",\n    \"g.map_upper(sns.histplot)\\n\",\n    \"g.map_lower(sns.kdeplot, fill=True)\\n\",\n    \"g.map_diag(sns.histplot, kde=True)\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"celltoolbar\": \"Tags\",\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"fileName":"multiple_ecdf.py","filePath":"examples","id":2040,"nodeType":"File","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)\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":2041,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"col":4,"comment":"null","endLoc":252,"header":"@pytest.mark.parametrize(\"grp\", [\"grp2\", \"grp3\"])\n    def test_single_semantic(self, df, grp)","id":2042,"name":"test_single_semantic","nodeType":"Function","startLoc":235,"text":"@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)"},{"col":4,"comment":"null","endLoc":270,"header":"def test_two_semantics(self, df)","id":2043,"name":"test_two_semantics","nodeType":"Function","startLoc":254,"text":"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)"},{"className":"TestStack","col":0,"comment":"null","endLoc":311,"id":2044,"nodeType":"Class","startLoc":273,"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])\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\", {})"},{"col":4,"comment":"null","endLoc":282,"header":"def test_basic(self, toy_df)","id":2045,"name":"test_basic","nodeType":"Function","startLoc":275,"text":"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])"},{"col":0,"comment":"Test axis kwarg to bootstrap function.","endLoc":68,"header":"def test_bootstrap_axis(random)","id":2046,"name":"test_bootstrap_axis","nodeType":"Function","startLoc":59,"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])"},{"col":4,"comment":"null","endLoc":336,"header":"@pytest.mark.parametrize(\"dim\", [\"col\", \"row\"])\n    def test_single_facet_dim_wrapped(self, dim)","id":2047,"name":"test_single_facet_dim_wrapped","nodeType":"Function","startLoc":307,"text":"@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"},{"fileName":"axisgrid.py","filePath":"seaborn","id":2048,"nodeType":"File","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)\n\n\nclass _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\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\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)\n\n\nclass 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\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\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\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\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\n\n\n_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)\n\n\nclass 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)\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)\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\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.items()]\n\n            # Some matplotlib functions don't handle pandas objects correctly\n            if func_module.startswith(\"matplotlib\"):\n                plot_args = [v.values for v in plot_args]\n\n            # Draw the plot\n            self._facet_plot(func, ax, plot_args, kwargs)\n\n        # Finalize the annotations and layout\n        self._finalize_grid(args[:2])\n\n        return self\n\n    def map_dataframe(self, func, *args, **kwargs):\n        \"\"\"Like ``.map`` but passes args as strings and inserts data in kwargs.\n\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\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)\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\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\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 column variable when titles are drawn on the grid\n            margins. Must have {col_var} and {col_name} formatting keys.\n\n        Returns\n        -------\n        self: object\n            Returns self.\n\n        \"\"\"\n        args = dict(row_var=self._row_var, col_var=self._col_var)\n        kwargs[\"size\"] = kwargs.pop(\"size\", mpl.rcParams[\"axes.labelsize\"])\n\n        # Establish default templates\n        if row_template is None:\n            row_template = \"{row_var} = {row_name}\"\n        if col_template is None:\n            col_template = \"{col_var} = {col_name}\"\n        if template is None:\n            if self._row_var is None:\n                template = col_template\n            elif self._col_var is None:\n                template = row_template\n            else:\n                template = \" | \".join([row_template, col_template])\n\n        row_template = utils.to_utf8(row_template)\n        col_template = utils.to_utf8(col_template)\n        template = utils.to_utf8(template)\n\n        if self._margin_titles:\n\n            # Remove any existing title texts\n            for text in self._margin_titles_texts:\n                text.remove()\n            self._margin_titles_texts = []\n\n            if self.row_names is not None:\n                # Draw the row titles on the right edge of the grid\n                for i, row_name in enumerate(self.row_names):\n                    ax = self.axes[i, -1]\n                    args.update(dict(row_name=row_name))\n                    title = row_template.format(**args)\n                    text = ax.annotate(\n                        title, xy=(1.02, .5), xycoords=\"axes fraction\",\n                        rotation=270, ha=\"left\", va=\"center\",\n                        **kwargs\n                    )\n                    self._margin_titles_texts.append(text)\n\n            if self.col_names is not None:\n                # Draw the column titles  as normal titles\n                for j, col_name in enumerate(self.col_names):\n                    args.update(dict(col_name=col_name))\n                    title = col_template.format(**args)\n                    self.axes[0, j].set_title(title, **kwargs)\n\n            return self\n\n        # Otherwise title each facet with all the necessary information\n        if (self._row_var is not None) and (self._col_var is not None):\n            for i, row_name in enumerate(self.row_names):\n                for j, col_name in enumerate(self.col_names):\n                    args.update(dict(row_name=row_name, col_name=col_name))\n                    title = template.format(**args)\n                    self.axes[i, j].set_title(title, **kwargs)\n        elif self.row_names is not None and len(self.row_names):\n            for i, row_name in enumerate(self.row_names):\n                args.update(dict(row_name=row_name))\n                title = template.format(**args)\n                self.axes[i, 0].set_title(title, **kwargs)\n        elif self.col_names is not None and len(self.col_names):\n            for i, col_name in enumerate(self.col_names):\n                args.update(dict(col_name=col_name))\n                title = template.format(**args)\n                # Index the flat array so col_wrap works\n                self.axes.flat[i].set_title(title, **kwargs)\n        return self\n\n    def refline(self, *, x=None, y=None, color='.5', linestyle='--', **line_kws):\n        \"\"\"Add a reference line(s) to each facet.\n\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\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\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\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\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\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\n\n\nclass 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    \"\"\"\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)\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\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\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\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\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\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\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)\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)\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)\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\n\n\nclass 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)\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\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\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\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\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\n\n\nJointGrid.__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)\n\n\ndef pairplot(\n    data, *,\n    hue=None, hue_order=None, palette=None,\n    vars=None, x_vars=None, y_vars=None,\n    kind=\"scatter\", diag_kind=\"auto\", markers=None,\n    height=2.5, aspect=1, corner=False, dropna=False,\n    plot_kws=None, diag_kws=None, grid_kws=None, size=None,\n):\n    \"\"\"Plot pairwise relationships in a dataset.\n\n    By default, this function will create a grid of Axes such that each numeric\n    variable in ``data`` will by shared across the y-axes across a single row and\n    the x-axes across a single column. The diagonal plots are treated\n    differently: a univariate distribution plot is drawn to show the marginal\n    distribution of the data in each column.\n\n    It is also possible to show a subset of variables or plot different\n    variables on the rows and columns.\n\n    This is a high-level interface for :class:`PairGrid` that is intended to\n    make it easy to draw a few common styles. You should use :class:`PairGrid`\n    directly if you need more flexibility.\n\n    Parameters\n    ----------\n    data : `pandas.DataFrame`\n        Tidy (long-form) dataframe where each column is a variable and\n        each row is an observation.\n    hue : name of variable in ``data``\n        Variable in ``data`` to map plot aspects to different colors.\n    hue_order : list of strings\n        Order for the levels of the hue variable in the palette\n    palette : dict or seaborn color palette\n        Set of colors for mapping the ``hue`` variable. If a dict, keys\n        should be values  in the ``hue`` variable.\n    vars : list of variable names\n        Variables within ``data`` to use, otherwise use every column with\n        a numeric datatype.\n    {x, y}_vars : lists of variable names\n        Variables within ``data`` to use separately for the rows and\n        columns of the figure; i.e. to make a non-square plot.\n    kind : {'scatter', 'kde', 'hist', 'reg'}\n        Kind of plot to make.\n    diag_kind : {'auto', 'hist', 'kde', None}\n        Kind of plot for the diagonal subplots. If 'auto', choose based on\n        whether or not ``hue`` is used.\n    markers : single matplotlib marker code or list\n        Either the marker to use for all scatterplot points or a list of markers\n        with a length the same as the number of levels in the hue variable so that\n        differently colored points will also have different scatterplot\n        markers.\n    height : scalar\n        Height (in inches) of each facet.\n    aspect : scalar\n        Aspect * height gives the width (in inches) of each facet.\n    corner : bool\n        If True, don't add axes to the upper (off-diagonal) triangle of the\n        grid, making this a \"corner\" plot.\n    dropna : boolean\n        Drop missing values from the data before plotting.\n    {plot, diag, grid}_kws : dicts\n        Dictionaries of keyword arguments. ``plot_kws`` are passed to the\n        bivariate plotting function, ``diag_kws`` are passed to the univariate\n        plotting function, and ``grid_kws`` are passed to the :class:`PairGrid`\n        constructor.\n\n    Returns\n    -------\n    grid : :class:`PairGrid`\n        Returns the underlying :class:`PairGrid` instance for further tweaking.\n\n    See Also\n    --------\n    PairGrid : Subplot grid for more flexible plotting of pairwise relationships.\n    JointGrid : Grid for plotting joint and marginal distributions of two variables.\n\n    Examples\n    --------\n\n    .. include:: ../docstrings/pairplot.rst\n\n    \"\"\"\n    # Avoid circular import\n    from .distributions import histplot, kdeplot\n\n    # Handle deprecations\n    if size is not None:\n        height = size\n        msg = (\"The `size` parameter has been renamed to `height`; \"\n               \"please update your code.\")\n        warnings.warn(msg, UserWarning)\n\n    if not isinstance(data, pd.DataFrame):\n        raise TypeError(\n            f\"'data' must be pandas DataFrame object, not: {type(data)}\")\n\n    plot_kws = {} if plot_kws is None else plot_kws.copy()\n    diag_kws = {} if diag_kws is None else diag_kws.copy()\n    grid_kws = {} if grid_kws is None else grid_kws.copy()\n\n    # Resolve \"auto\" diag kind\n    if diag_kind == \"auto\":\n        if hue is None:\n            diag_kind = \"kde\" if kind == \"kde\" else \"hist\"\n        else:\n            diag_kind = \"hist\" if kind == \"hist\" else \"kde\"\n\n    # Set up the PairGrid\n    grid_kws.setdefault(\"diag_sharey\", diag_kind == \"hist\")\n    grid = PairGrid(data, vars=vars, x_vars=x_vars, y_vars=y_vars, hue=hue,\n                    hue_order=hue_order, palette=palette, corner=corner,\n                    height=height, aspect=aspect, dropna=dropna, **grid_kws)\n\n    # Add the markers here as PairGrid has figured out how many levels of the\n    # hue variable are needed and we don't want to duplicate that process\n    if markers is not None:\n        if kind == \"reg\":\n            # Needed until regplot supports style\n            if grid.hue_names is None:\n                n_markers = 1\n            else:\n                n_markers = len(grid.hue_names)\n            if not isinstance(markers, list):\n                markers = [markers] * n_markers\n            if len(markers) != n_markers:\n                raise ValueError(\"markers must be a singleton or a list of \"\n                                 \"markers for each level of the hue variable\")\n            grid.hue_kws = {\"marker\": markers}\n        elif kind == \"scatter\":\n            if isinstance(markers, str):\n                plot_kws[\"marker\"] = markers\n            elif hue is not None:\n                plot_kws[\"style\"] = data[hue]\n                plot_kws[\"markers\"] = markers\n\n    # Draw the marginal plots on the diagonal\n    diag_kws = diag_kws.copy()\n    diag_kws.setdefault(\"legend\", False)\n    if diag_kind == \"hist\":\n        grid.map_diag(histplot, **diag_kws)\n    elif diag_kind == \"kde\":\n        diag_kws.setdefault(\"fill\", True)\n        diag_kws.setdefault(\"warn_singular\", False)\n        grid.map_diag(kdeplot, **diag_kws)\n\n    # Maybe plot on the off-diagonals\n    if diag_kind is not None:\n        plotter = grid.map_offdiag\n    else:\n        plotter = grid.map\n\n    if kind == \"scatter\":\n        from .relational import scatterplot  # Avoid circular import\n        plotter(scatterplot, **plot_kws)\n    elif kind == \"reg\":\n        from .regression import regplot  # Avoid circular import\n        plotter(regplot, **plot_kws)\n    elif kind == \"kde\":\n        from .distributions import kdeplot  # Avoid circular import\n        plot_kws.setdefault(\"warn_singular\", False)\n        plotter(kdeplot, **plot_kws)\n    elif kind == \"hist\":\n        from .distributions import histplot  # Avoid circular import\n        plotter(histplot, **plot_kws)\n\n    # Add a legend\n    if hue is not None:\n        grid.add_legend()\n\n    grid.tight_layout()\n\n    return grid\n\n\ndef 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    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\n\n\njointplot.__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)\n"},{"col":4,"comment":"null","endLoc":261,"header":"def _parse_param_list(self, content, single_element_is_type=False)","id":2049,"name":"_parse_param_list","nodeType":"Function","startLoc":242,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":9,"id":2050,"name":"mpg","nodeType":"Attribute","startLoc":9,"text":"mpg"},{"col":0,"comment":"Handle changes to post-hoc axis sharing.","endLoc":164,"header":"def share_axis(ax0, ax1, which)","id":2051,"name":"share_axis","nodeType":"Function","startLoc":158,"text":"def 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)"},{"col":0,"comment":"Test that we can get reproducible resamples by seeding the RNG.","endLoc":77,"header":"def test_bootstrap_seed(random)","id":2052,"name":"test_bootstrap_seed","nodeType":"Function","startLoc":71,"text":"def 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)"},{"col":4,"comment":"null","endLoc":291,"header":"def test_faceted(self, toy_df_facets)","id":2054,"name":"test_faceted","nodeType":"Function","startLoc":284,"text":"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])"},{"col":0,"comment":"Test bootstrap of OLS model fit.","endLoc":101,"header":"def test_bootstrap_ols(random)","id":2055,"name":"test_bootstrap_ols","nodeType":"Function","startLoc":80,"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()"},{"col":0,"comment":"Deindent a list of lines maximally","endLoc":574,"header":"def dedent_lines(lines)","id":2056,"name":"dedent_lines","nodeType":"Function","startLoc":572,"text":"def dedent_lines(lines):\n    \"\"\"Deindent a list of lines maximally\"\"\"\n    return textwrap.dedent(\"\\n\".join(lines)).split(\"\\n\")"},{"col":4,"comment":"null","endLoc":660,"header":"def _get_formatter(self, locator, formatter, like, base, unit)","id":2057,"name":"_get_formatter","nodeType":"Function","startLoc":623,"text":"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 default:\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"},{"attributeType":"((int, int, int), (int, int, int))","col":0,"comment":"null","endLoc":11,"id":2058,"name":"colors","nodeType":"Attribute","startLoc":11,"text":"colors"},{"attributeType":"null","col":0,"comment":"null","endLoc":12,"id":2059,"name":"cmap","nodeType":"Attribute","startLoc":12,"text":"cmap"},{"id":2060,"name":"logo-mark-darkbg.svg","nodeType":"TextFile","path":"doc/_static","text":"\n\n\n\n \n  \n   \n    \n    2020-09-07T14:13:59.975140\n    image/svg+xml\n    \n     \n      Matplotlib v3.3.1, https://matplotlib.org/\n     \n    \n   \n  \n \n \n  \n \n \n  \n   \n  \n  \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n   \n   \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n   \n  \n \n \n  \n   \n  \n  \n   \n  \n  \n   \n  \n \n\n"},{"id":2061,"name":"v0.9.1.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.9.1 (January 2020)\n---------------------\n\nThis is a minor release with a number of bug fixes and adaptations to changes in seaborn's dependencies. There are also several new features.\n\nThis is the final version of seaborn that will support Python 2.7 or 3.5.\n\nNew features\n~~~~~~~~~~~~\n\n- Added more control over the arrangement of the elements drawn by :func:`clustermap` with the ``{dendrogram,colors}_ratio`` and ``cbar_pos`` parameters. Additionally, the default organization and scaling with different figure sizes has been improved.\n\n- Added the ``corner`` option to :class:`PairGrid` and :func:`pairplot` to make a grid without the upper triangle of bivariate axes.\n\n- Added the ability to seed the random number generator for the bootstrap used to define error bars in several plots. Relevant functions now have a ``seed`` parameter, which can take either fixed seed (typically an ``int``) or a numpy random number generator object (either the newer :class:`numpy.random.Generator` or the older :class:`numpy.random.mtrand.RandomState`).\n\n- Generalized the idea of \"diagonal\" axes in :class:`PairGrid` to any axes that share an x and y variable.\n\n- In :class:`PairGrid`, the ``hue`` variable is now excluded from the default list of variables that make up the rows and columns of the grid.\n\n- Exposed the ``layout_pad`` parameter in :class:`PairGrid` and set a smaller default than what matptlotlib sets for more efficient use of space in dense grids.\n\n- It is now possible to force a categorical interpretation of the ``hue`` variable in a relational plot by passing the name of a categorical palette (e.g. ``\"deep\"``, or ``\"Set2\"``). This complements the (previously supported) option of passing a list/dict of colors.\n\n- Added the ``tree_kws`` parameter to :func:`clustermap` to control the properties of the lines in the dendrogram.\n\n- Added the ability to pass hierarchical label names to the :class:`FacetGrid` legend, which also fixes a bug in :func:`relplot` when the same label appeared in different semantics.\n\n- Improved support for grouping observations based on pandas index information in categorical plots.\n\nBug fixes and adaptations\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Avoided an error when singular data is passed to :func:`kdeplot`, issuing a warning instead. This makes :func:`pairplot` more robust.\n\n- Fixed the behavior of ``dropna`` in :class:`PairGrid` to properly exclude null datapoints from each plot when set to ``True``.\n\n- Fixed an issue where :func:`regplot` could interfere with other axes in a multi-plot matplotlib figure.\n\n- Semantic variables with a ``category`` data type will always be treated as categorical in relational plots.\n\n- Avoided a warning about color specifications that arose from :func:`boxenplot` on newer matplotlibs.\n\n- Adapted to a change in how matplotlib scales axis margins, which caused multiple calls to :func:`regplot` with ``truncate=False`` to progressively expand the x axis limits. Because there are currently limitations on how autoscaling works in matplotlib, the default value for ``truncate`` in seaborn has also been changed to ``True``.\n\n- Relational plots no longer error when hue/size data are inferred to be numeric but stored with a string datatype.\n\n- Relational plots now consider semantics with only a single value that can be interpreted as boolean (0 or 1) to be categorical, not numeric.\n\n- Relational plots now handle list or dict specifications for ``sizes`` correctly.\n\n- Fixed an issue in :func:`pointplot` where missing levels of a hue variable would cause an exception after a recent update in matplotlib.\n\n- Fixed a bug when setting the rotation of x tick labels on a :class:`FacetGrid`.\n\n- Fixed a bug where values would be excluded from categorical plots when only one variable was a pandas ``Series`` with a non-default index.\n\n- Fixed a bug when using ``Series`` objects as arguments for ``x_partial`` or ``y_partial`` in :func:`regplot`.\n\n- Fixed a bug when passing a ``norm`` object and using color annotations in :func:`clustermap`.\n\n- Fixed a bug where annotations were not rearranged to match the clustering in :func:`clustermap`.\n\n- Fixed a bug when trying to call :func:`set` while specifying a list of colors for the palette.\n\n- Fixed a bug when resetting the color code short-hands to the matplotlib default.\n\n- Avoided errors from stricter type checking in upcoming ``numpy`` changes.\n\n- Avoided error/warning in :func:`lineplot` when plotting categoricals with empty levels.\n\n- Allowed ``colors`` to be passed through to a bivariate :func:`kdeplot`.\n\n- Standardized the output format of custom color palette functions.\n\n- Fixed a bug where legends for numerical variables in a relational plot could show a surprisingly large number of decimal places.\n\n- Improved robustness to missing values in distribution plots.\n\n- Made it possible to specify the location of the :class:`FacetGrid` legend using matplotlib keyword arguments.\n"},{"col":4,"comment":"Return True if specified axis is log scaled on all attached axes.","endLoc":1319,"header":"def _log_scaled(self, axis)","id":2063,"name":"_log_scaled","nodeType":"Function","startLoc":1301,"text":"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)"},{"col":4,"comment":"null","endLoc":302,"header":"def test_misssing_data(self, toy_df)","id":2064,"name":"test_misssing_data","nodeType":"Function","startLoc":293,"text":"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])"},{"col":0,"comment":"Remove leading and trailing blank lines from a list of lines","endLoc":46,"header":"def strip_blank_lines(l)","id":2065,"name":"strip_blank_lines","nodeType":"Function","startLoc":40,"text":"def 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"},{"col":4,"comment":"null","endLoc":311,"header":"def test_baseline_homogeneity_check(self, toy_df)","id":2066,"name":"test_baseline_homogeneity_check","nodeType":"Function","startLoc":304,"text":"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\", {})"},{"fileName":"timeseries_facets.py","filePath":"examples","id":2067,"nodeType":"File","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()\n"},{"col":0,"comment":"","endLoc":6,"header":"multiple_ecdf.py#","id":2068,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nFacetted ECDF plots\n===================\n\n_thumb: .30, .49\n\"\"\"\n\nsns.set_theme(style=\"ticks\")\n\nmpg = sns.load_dataset(\"mpg\")\n\ncolors = (250, 70, 50), (350, 70, 50)\n\ncmap = sns.blend_palette(colors, input=\"husl\", as_cmap=True)\n\nsns.displot(\n    mpg,\n    x=\"displacement\", col=\"origin\", hue=\"model_year\",\n    kind=\"ecdf\", aspect=.75, linewidth=2, palette=cmap,\n)"},{"col":4,"comment":"null","endLoc":70,"header":"def test_mapped_properties(self)","id":2069,"name":"test_mapped_properties","nodeType":"Function","startLoc":54,"text":"def test_mapped_properties(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        color = list(\"aab\")\n        fontsize = [1, 2, 4]\n\n        p = Plot(x, y, color=color, fontsize=fontsize, text=s).add(Text()).plot()\n        ax = p._figure.axes[0]\n        texts = self.get_texts(ax)\n        assert texts[0].get_color() == texts[1].get_color()\n        assert texts[0].get_color() != texts[2].get_color()\n        assert (\n            texts[0].get_fontsize()\n            < texts[1].get_fontsize()\n            < texts[2].get_fontsize()\n        )"},{"fileName":"part_whole_bars.py","filePath":"examples","id":2070,"nodeType":"File","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)\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":6,"id":2071,"name":"sns","nodeType":"Attribute","startLoc":6,"text":"sns"},{"attributeType":"tuple | str | None","col":4,"comment":"null","endLoc":433,"id":2073,"name":"values","nodeType":"Attribute","startLoc":433,"text":"values"},{"col":4,"comment":"\n        .. index: default\n           :refguide: something, else, and more\n\n        ","endLoc":369,"header":"def _parse_index(self, section, content)","id":2074,"name":"_parse_index","nodeType":"Function","startLoc":352,"text":"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"},{"col":4,"comment":"null","endLoc":228,"header":"def test_common_bins_false(self, long_df, triple_args)","id":2075,"name":"test_common_bins_false","nodeType":"Function","startLoc":221,"text":"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\"]))"},{"attributeType":"null","col":18,"comment":"null","endLoc":8,"id":2076,"name":"sns","nodeType":"Attribute","startLoc":8,"text":"sns"},{"className":"TestShift","col":0,"comment":"null","endLoc":329,"id":2078,"nodeType":"Class","startLoc":314,"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)"},{"col":4,"comment":"null","endLoc":321,"header":"def test_default(self, toy_df)","id":2079,"name":"test_default","nodeType":"Function","startLoc":316,"text":"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])"},{"id":2081,"name":"v0.11.1.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.11.1 (December 2020)\n-----------------------\n\nThis a bug fix release and is a recommended upgrade for all users on v0.11.0.\n\n- |Enhancement| Reduced the use of matplotlib global state in the :ref:`multi-grid classes ` (:pr:`2388`).\n\n- |Fix| Restored support for using tuples or numeric keys to reference fields in a long-form `data` object (:pr:`2386`).\n\n- |Fix| Fixed a bug in :func:`lineplot` where NAs were propagating into the confidence interval, sometimes erasing it from the plot (:pr:`2273`).\n\n- |Fix| Fixed a bug in :class:`PairGrid`/:func:`pairplot` where diagonal axes would be empty when the grid was not square and the diagonal axes did not contain the marginal plots (:pr:`2270`).\n\n- |Fix| Fixed a bug in :class:`PairGrid`/:func:`pairplot` where off-diagonal plots would not appear when column names in `data` had non-string type (:pr:`2368`).\n\n- |Fix| Fixed a bug where categorical dtype information was ignored when data consisted of boolean or boolean-like values (:pr:`2379`).\n\n- |Fix| Fixed a bug in :class:`FacetGrid` where interior tick labels would be hidden when only the orthogonal axis was shared (:pr:`2347`).\n\n- |Fix| Fixed a bug in :class:`FacetGrid` that caused an error when `legend_out=False` was set (:pr:`2304`).\n\n- |Fix| Fixed a bug in :func:`kdeplot` where ``common_norm=True`` was ignored if ``hue`` was not assigned (:pr:`2378`).\n\n- |Fix| Fixed a bug in :func:`displot` where the ``row_order`` and ``col_order`` parameters were not used (:pr:`2262`).\n\n- |Fix| Fixed a bug in :class:`PairGrid`/:func:`pairplot` that caused an exception when using `corner=True` and `diag_kind=None` (:pr:`2382`).\n\n- |Fix| Fixed a bug in :func:`clustermap` where `annot=False` was ignored (:pr:`2323`).\n\n- |Fix| Fixed a bug in :func:`clustermap` where row/col color annotations could not have a categorical dtype (:pr:`2389`).\n\n- |Fix| Fixed a bug in :func:`boxenplot` where the `linewidth` parameter was ignored (:pr:`2287`).\n\n- |Fix| Raise a more informative error in :class:`PairGrid`/:func:`pairplot` when no variables can be found to define the rows/columns of the grid (:pr:`2382`).\n\n- |Fix| Raise a more informative error from :func:`clustermap` if row/col color objects have semantic index but data object does not (:pr:`2313`).\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":11,"id":2082,"name":"flights","nodeType":"Attribute","startLoc":11,"text":"flights"},{"id":2083,"name":"objects.Dash.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"3227e585-7166-44e7-b0c2-8570e098102d\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"penguins = load_dataset(\\\"penguins\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"1b424322-eaa4-45c7-8007-a671ef2afbde\",\n   \"metadata\": {},\n   \"source\": [\n    \"A line segment is drawn for each datapoint, centered on the value along the orientation axis:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"fc835356-2dc2-4583-a9f9-c1fe0a6cc9ea\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p = so.Plot(penguins, \\\"species\\\", \\\"body_mass_g\\\", color=\\\"sex\\\")\\n\",\n    \"p.add(so.Dash())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"ad9b94de-f19f-4e60-8275-686e749da39c\",\n   \"metadata\": {},\n   \"source\": [\n    \"A number of properties can be mapped or set directly:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"6070a665-ab19-43a6-9eba-e206193d9422\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Dash(alpha=.5), linewidth=\\\"flipper_length_mm\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"2c4a8291-0a84-4e70-a992-756850933791\",\n   \"metadata\": {},\n   \"source\": [\n    \"The mark has a `width` property, which is relative to the spacing between orientation values:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"315327da-421e-46c8-8a1b-8b87355d0439\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Dash(width=.5))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"224bf51a-b8d8-4d8e-b0ab-b63ec6788584\",\n   \"metadata\": {},\n   \"source\": [\n    \"When dodged, the width will automatically adapt:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"227e889c-7ce7-49fc-b985-f7746393930e\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Dash(), so.Dodge())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"aa807f57-5d37-4faa-8fd2-1e5378115f9f\",\n   \"metadata\": {},\n   \"source\": [\n    \"This mark works well to show aggregate values when paired with a strip plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"5141e0b8-ea1a-4178-adde-21b4bc2e705f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    p\\n\",\n    \"    .add(so.Dash(), so.Agg(), so.Dodge())\\n\",\n    \"    .add(so.Dots(), so.Dodge(), so.Jitter())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"f2abd4b7-5afb-4661-95f3-b51bfa101273\",\n   \"metadata\": {},\n   \"source\": [\n    \"When both coordinate variables are numeric, you can control the orientation explicitly:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f6d7e236-327f-460f-b12e-46d7444ac348\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(\\n\",\n    \"        penguins[\\\"body_mass_g\\\"],\\n\",\n    \"        penguins[\\\"flipper_length_mm\\\"].round(-1),\\n\",\n    \"    )\\n\",\n    \"    .add(so.Dash(), orient=\\\"y\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"6811d776-93e5-49ce-88a6-14786a67841d\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"attributeType":"str | ((Any) -> Any, (Any) -> Any) | None","col":4,"comment":"null","endLoc":434,"id":2084,"name":"trans","nodeType":"Attribute","startLoc":434,"text":"trans"},{"col":4,"comment":"null","endLoc":329,"header":"@pytest.mark.parametrize(\"x,y\", [(.3, 0), (0, .2), (.1, .3)])\n    def test_moves(self, toy_df, x, y)","id":2085,"name":"test_moves","nodeType":"Function","startLoc":323,"text":"@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)"},{"attributeType":"null","col":28,"comment":"null","endLoc":7,"id":2086,"name":"plt","nodeType":"Attribute","startLoc":7,"text":"plt"},{"fileName":"regression_marginals.py","filePath":"examples","id":2087,"nodeType":"File","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)\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":11,"id":2088,"name":"f","nodeType":"Attribute","startLoc":11,"text":"f"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":2089,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"attributeType":"null","col":3,"comment":"null","endLoc":11,"id":2091,"name":"ax","nodeType":"Attribute","startLoc":11,"text":"ax"},{"col":4,"comment":"null","endLoc":64,"header":"def test_set_properties(self)","id":2092,"name":"test_set_properties","nodeType":"Function","startLoc":37,"text":"def test_set_properties(self):\n\n        x, y = [1, 2, 3], [1, 2, 1]\n        mark = Area(\n            color=\".33\",\n            alpha=.3,\n            edgecolor=\".88\",\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"},{"attributeType":"int","col":4,"comment":"null","endLoc":439,"id":2093,"name":"_priority","nodeType":"Attribute","startLoc":439,"text":"_priority"},{"attributeType":"null","col":0,"comment":"null","endLoc":10,"id":2094,"name":"tips","nodeType":"Attribute","startLoc":10,"text":"tips"},{"attributeType":"null","col":0,"comment":"null","endLoc":14,"id":2095,"name":"crashes","nodeType":"Attribute","startLoc":14,"text":"crashes"},{"className":"TestNorm","col":0,"comment":"null","endLoc":367,"id":2096,"nodeType":"Class","startLoc":332,"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)"},{"col":4,"comment":"null","endLoc":340,"header":"@pytest.mark.parametrize(\"orient\", [\"x\", \"y\"])\n    def test_default_no_groups(self, df, orient)","id":2097,"name":"test_default_no_groups","nodeType":"Function","startLoc":334,"text":"@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)"},{"attributeType":"null","col":0,"comment":"null","endLoc":14,"id":2098,"name":"g","nodeType":"Attribute","startLoc":14,"text":"g"},{"col":4,"comment":"\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        ","endLoc":350,"header":"def _parse_see_also(self, content)","id":2100,"name":"_parse_see_also","nodeType":"Function","startLoc":299,"text":"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"},{"col":0,"comment":"","endLoc":5,"header":"part_whole_bars.py#","id":2101,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nHorizontal bar plots\n====================\n\n\"\"\"\n\nsns.set_theme(style=\"whitegrid\")\n\nf, ax = plt.subplots(figsize=(6, 15))\n\ncrashes = sns.load_dataset(\"car_crashes\").sort_values(\"total\", ascending=False)\n\nsns.set_color_codes(\"pastel\")\n\nsns.barplot(x=\"total\", y=\"abbrev\", data=crashes,\n            label=\"Total\", color=\"b\")\n\nsns.set_color_codes(\"muted\")\n\nsns.barplot(x=\"alcohol\", y=\"abbrev\", data=crashes,\n            label=\"Alcohol-involved\", color=\"b\")\n\nax.legend(ncol=2, loc=\"lower right\", frameon=True)\n\nax.set(xlim=(0, 24), ylabel=\"\",\n       xlabel=\"Automobile collisions per billion miles\")\n\nsns.despine(left=True, bottom=True)"},{"attributeType":"null","col":4,"comment":"null","endLoc":22,"id":2102,"name":"year","nodeType":"Attribute","startLoc":22,"text":"year"},{"attributeType":"float | Mappable","col":4,"comment":"null","endLoc":285,"id":2103,"name":"width","nodeType":"Attribute","startLoc":285,"text":"width"},{"attributeType":"null","col":10,"comment":"null","endLoc":22,"id":2104,"name":"ax","nodeType":"Attribute","startLoc":22,"text":"ax"},{"attributeType":"null","col":0,"comment":"null","endLoc":11,"id":2105,"name":"g","nodeType":"Attribute","startLoc":11,"text":"g"},{"col":0,"comment":"","endLoc":7,"header":"timeseries_facets.py#","id":2106,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nSmall multiple time series\n--------------------------\n\n_thumb: .42, .58\n\n\"\"\"\n\nsns.set_theme(style=\"dark\")\n\nflights = sns.load_dataset(\"flights\")\n\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\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\nax.set_xticks(ax.get_xticks()[::2])\n\ng.set_titles(\"\")\n\ng.set_axis_labels(\"\", \"Passengers\")\n\ng.tight_layout()"},{"attributeType":"null","col":16,"comment":"null","endLoc":5,"id":2107,"name":"np","nodeType":"Attribute","startLoc":5,"text":"np"},{"attributeType":"null","col":21,"comment":"null","endLoc":6,"id":2108,"name":"mpl","nodeType":"Attribute","startLoc":6,"text":"mpl"},{"col":0,"comment":"","endLoc":6,"header":"regression_marginals.py#","id":2109,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nLinear regression with marginal distributions\n=============================================\n\n_thumb: .65, .65\n\"\"\"\n\nsns.set_theme(style=\"darkgrid\")\n\ntips = sns.load_dataset(\"tips\")\n\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)"},{"col":0,"comment":"null","endLoc":2764,"header":"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)","id":2110,"name":"barplot","nodeType":"Function","startLoc":2739,"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"},{"className":"Temporal","col":0,"comment":"\n    A scale for date/time data.\n    ","endLoc":770,"id":2111,"nodeType":"Class","startLoc":663,"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\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\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\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"},{"col":4,"comment":"\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        ","endLoc":714,"header":"def tick(\n        self, locator: Locator | None = None, *,\n        upto: int | None = None,\n    ) -> Temporal","id":2112,"name":"tick","nodeType":"Function","startLoc":682,"text":"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"},{"col":4,"comment":"null","endLoc":349,"header":"@pytest.mark.parametrize(\"orient\", [\"x\", \"y\"])\n    def test_default_groups(self, df, orient)","id":2113,"name":"test_default_groups","nodeType":"Function","startLoc":342,"text":"@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)"},{"col":4,"comment":"null","endLoc":237,"header":"def test_common_bins_subset(self, long_df, triple_args)","id":2114,"name":"test_common_bins_subset","nodeType":"Function","startLoc":230,"text":"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()"},{"fileName":"test_scales.py","filePath":"tests/_core","id":2115,"nodeType":"File","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\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\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_format_disabled(self, x):\n\n        s = Continuous(trans=\"log\").label(base=None)._setup(x, Coordinate())\n        a = PseudoAxis(s._matplotlib_scale)\n        a.set_view_interval(20, 20000)\n        labels = a.major.formatter.format_ticks(a.major.locator())\n        for text in labels:\n            assert re.match(r\"^\\d+$\", text)\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)\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\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)\n\n\nclass 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, \"\"]\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\"]\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\"]\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\"]\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)])\n\n    def test_empty_data(self):\n\n        x = pd.Series([], dtype=object, name=\"x\")\n        s = Nominal()._setup(x, Coordinate())\n        assert_array_equal(s(x), [])\n\n\nclass 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}\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)\n"},{"fileName":"grouped_violinplots.py","filePath":"examples","id":2116,"nodeType":"File","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)\n"},{"fileName":"simple_violinplots.py","filePath":"examples","id":2117,"nodeType":"File","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\")\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":2118,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"attributeType":"null","col":16,"comment":"null","endLoc":6,"id":2119,"name":"np","nodeType":"Attribute","startLoc":6,"text":"np"},{"className":"PseudoAxis","col":0,"comment":"\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    ","endLoc":894,"id":2120,"nodeType":"Class","startLoc":791,"text":"class 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\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()\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()"},{"col":4,"comment":"null","endLoc":819,"header":"def set_view_interval(self, vmin, vmax)","id":2121,"name":"set_view_interval","nodeType":"Function","startLoc":818,"text":"def set_view_interval(self, vmin, vmax):\n        self._view_interval = vmin, vmax"},{"col":4,"comment":"null","endLoc":822,"header":"def get_view_interval(self)","id":2122,"name":"get_view_interval","nodeType":"Function","startLoc":821,"text":"def get_view_interval(self):\n        return self._view_interval"},{"col":4,"comment":"null","endLoc":830,"header":"def set_data_interval(self, vmin, vmax)","id":2123,"name":"set_data_interval","nodeType":"Function","startLoc":829,"text":"def set_data_interval(self, vmin, vmax):\n        self._data_interval = vmin, vmax"},{"col":4,"comment":"null","endLoc":833,"header":"def get_data_interval(self)","id":2124,"name":"get_data_interval","nodeType":"Function","startLoc":832,"text":"def get_data_interval(self):\n        return self._data_interval"},{"col":4,"comment":"null","endLoc":838,"header":"def get_tick_space(self)","id":2125,"name":"get_tick_space","nodeType":"Function","startLoc":835,"text":"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"},{"col":4,"comment":"null","endLoc":842,"header":"def set_major_locator(self, locator)","id":2126,"name":"set_major_locator","nodeType":"Function","startLoc":840,"text":"def set_major_locator(self, locator):\n        self.major.locator = locator\n        locator.set_axis(self)"},{"col":4,"comment":"null","endLoc":846,"header":"def set_major_formatter(self, formatter)","id":2127,"name":"set_major_formatter","nodeType":"Function","startLoc":844,"text":"def set_major_formatter(self, formatter):\n        self.major.formatter = formatter\n        formatter.set_axis(self)"},{"col":4,"comment":"\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        ","endLoc":743,"header":"def label(\n        self,\n        formatter: Formatter | None = None, *,\n        concise: bool = False,\n    ) -> Temporal","id":2128,"name":"label","nodeType":"Function","startLoc":716,"text":"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"},{"col":4,"comment":"null","endLoc":850,"header":"def set_minor_locator(self, locator)","id":2129,"name":"set_minor_locator","nodeType":"Function","startLoc":848,"text":"def set_minor_locator(self, locator):\n        self.minor.locator = locator\n        locator.set_axis(self)"},{"col":4,"comment":"null","endLoc":756,"header":"def _get_locators(self, locator, upto)","id":2130,"name":"_get_locators","nodeType":"Function","startLoc":745,"text":"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"},{"col":4,"comment":"null","endLoc":355,"header":"def test_sum(self, df)","id":2131,"name":"test_sum","nodeType":"Function","startLoc":351,"text":"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)"},{"col":4,"comment":"null","endLoc":854,"header":"def set_minor_formatter(self, formatter)","id":2132,"name":"set_minor_formatter","nodeType":"Function","startLoc":852,"text":"def set_minor_formatter(self, formatter):\n        self.minor.formatter = formatter\n        formatter.set_axis(self)"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":2133,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"attributeType":"null","col":0,"comment":"null","endLoc":11,"id":2134,"name":"tips","nodeType":"Attribute","startLoc":11,"text":"tips"},{"attributeType":"null","col":0,"comment":"null","endLoc":12,"id":2135,"name":"rs","nodeType":"Attribute","startLoc":12,"text":"rs"},{"col":4,"comment":"null","endLoc":857,"header":"def set_units(self, units)","id":2136,"name":"set_units","nodeType":"Function","startLoc":856,"text":"def set_units(self, units):\n        self.units = units"},{"col":4,"comment":"Pass units to the internal converter, potentially updating its mapping.","endLoc":875,"header":"def update_units(self, x)","id":2137,"name":"update_units","nodeType":"Function","startLoc":859,"text":"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()"},{"col":4,"comment":"Initialize the plotter.","endLoc":1540,"header":"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)","id":2138,"name":"__init__","nodeType":"Function","startLoc":1525,"text":"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"},{"attributeType":"int","col":0,"comment":"null","endLoc":13,"id":2140,"name":"n","nodeType":"Attribute","startLoc":13,"text":"n"},{"attributeType":"int","col":3,"comment":"null","endLoc":13,"id":2141,"name":"p","nodeType":"Attribute","startLoc":13,"text":"p"},{"col":0,"comment":"","endLoc":6,"header":"grouped_violinplots.py#","id":2142,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nGrouped violinplots with split violins\n======================================\n\n_thumb: .44, .47\n\"\"\"\n\nsns.set_theme(style=\"whitegrid\")\n\ntips = sns.load_dataset(\"tips\")\n\nsns.violinplot(data=tips, x=\"day\", y=\"total_bill\", hue=\"smoker\",\n               split=True, inner=\"quart\", linewidth=1,\n               palette={\"Yes\": \"b\", \"No\": \".85\"})\n\nsns.despine(left=True)"},{"attributeType":"null","col":0,"comment":"null","endLoc":14,"id":2143,"name":"d","nodeType":"Attribute","startLoc":14,"text":"d"},{"col":0,"comment":"","endLoc":5,"header":"simple_violinplots.py#","id":2144,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nViolinplots with observations\n=============================\n\n\"\"\"\n\nsns.set_theme()\n\nrs = np.random.default_rng(0)\n\nn, p = 40, 8\n\nd = rs.normal(0, 2, (n, p))\n\nd += np.log(np.arange(1, p + 1)) * -5 + 10\n\nsns.violinplot(data=d, palette=\"light:g\", inner=\"points\", orient=\"h\")"},{"col":4,"comment":"null","endLoc":89,"header":"def test_mapped_properties(self)","id":2146,"name":"test_mapped_properties","nodeType":"Function","startLoc":66,"text":"def test_mapped_properties(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        cs = [\".2\", \".8\"]\n        p = Plot(x=x, y=y, color=g, edgewidth=g).scale(color=cs).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(cs, .2))\n\n        ecs = [p.get_edgecolor() for p in ax.patches]\n        assert_array_equal(ecs, to_rgba_array(cs, 1))\n\n        lws = [p.get_linewidth() for p in ax.patches]\n        assert lws[0] > lws[1]"},{"col":4,"comment":"null","endLoc":770,"header":"def _get_formatter(self, locator, formatter, concise)","id":2147,"name":"_get_formatter","nodeType":"Function","startLoc":758,"text":"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"},{"col":4,"comment":"null","endLoc":361,"header":"def test_where(self, df)","id":2148,"name":"test_where","nodeType":"Function","startLoc":357,"text":"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)"},{"col":0,"comment":"null","endLoc":2314,"header":"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)","id":2150,"name":"violinplot","nodeType":"Function","startLoc":2297,"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"},{"attributeType":"null","col":4,"comment":"null","endLoc":678,"id":2151,"name":"trans","nodeType":"Attribute","startLoc":678,"text":"trans"},{"col":4,"comment":"null","endLoc":1492,"header":"def estimate_statistic(self, estimator, errorbar, n_boot, seed)","id":2152,"name":"estimate_statistic","nodeType":"Function","startLoc":1438,"text":"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)"},{"col":4,"comment":"null","endLoc":367,"header":"def test_percent(self, df)","id":2153,"name":"test_percent","nodeType":"Function","startLoc":363,"text":"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)"},{"attributeType":"int","col":4,"comment":"null","endLoc":680,"id":2154,"name":"_priority","nodeType":"Attribute","startLoc":680,"text":"_priority"},{"col":4,"comment":"Return a numeric representation of the input data.","endLoc":883,"header":"def convert_units(self, x)","id":2155,"name":"convert_units","nodeType":"Function","startLoc":877,"text":"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)"},{"attributeType":"list","col":11,"comment":"null","endLoc":1575,"id":2156,"name":"_lut","nodeType":"Attribute","startLoc":1575,"text":"_lut"},{"col":4,"comment":"\n        Specify mappings from data units to visual properties.\n\n        Keywords correspond to variables defined in the plot, including coordinate\n        variables (`x`, `y`) and semantic variables (`color`, `pointsize`, etc.).\n\n        A number of \"magic\" arguments are accepted, including:\n            - The name of a transform (e.g., `\"log\"`, `\"sqrt\"`)\n            - The name of a palette (e.g., `\"viridis\"`, `\"muted\"`)\n            - A tuple of values, defining the output range (e.g. `(1, 5)`)\n            - A dict, implying a :class:`Nominal` scale (e.g. `{\"a\": .2, \"b\": .5}`)\n            - A list of values, implying a :class:`Nominal` scale (e.g. `[\"b\", \"r\"]`)\n\n        For more explicit control, pass a scale spec object such as :class:`Continuous`\n        or :class:`Nominal`. Or pass `None` to use an \"identity\" scale, which treats\n        data values as literally encoding visual properties.\n\n        Examples\n        --------\n        .. include:: ../docstrings/objects.Plot.scale.rst\n\n        ","endLoc":630,"header":"def scale(self, **scales: Scale) -> Plot","id":2157,"name":"scale","nodeType":"Function","startLoc":605,"text":"def scale(self, **scales: Scale) -> Plot:\n        \"\"\"\n        Specify mappings from data units to visual properties.\n\n        Keywords correspond to variables defined in the plot, including coordinate\n        variables (`x`, `y`) and semantic variables (`color`, `pointsize`, etc.).\n\n        A number of \"magic\" arguments are accepted, including:\n            - The name of a transform (e.g., `\"log\"`, `\"sqrt\"`)\n            - The name of a palette (e.g., `\"viridis\"`, `\"muted\"`)\n            - A tuple of values, defining the output range (e.g. `(1, 5)`)\n            - A dict, implying a :class:`Nominal` scale (e.g. `{\"a\": .2, \"b\": .5}`)\n            - A list of values, implying a :class:`Nominal` scale (e.g. `[\"b\", \"r\"]`)\n\n        For more explicit control, pass a scale spec object such as :class:`Continuous`\n        or :class:`Nominal`. Or pass `None` to use an \"identity\" scale, which treats\n        data values as literally encoding visual properties.\n\n        Examples\n        --------\n        .. include:: ../docstrings/objects.Plot.scale.rst\n\n        \"\"\"\n        new = self._clone()\n        new._scales.update(scales)\n        return new"},{"col":4,"comment":"null","endLoc":243,"header":"def test_common_bins_warning(self, long_df, triple_args)","id":2158,"name":"test_common_bins_warning","nodeType":"Function","startLoc":239,"text":"def test_common_bins_warning(self, long_df, triple_args):\n\n        h = Hist(common_bins=[\"b\"])\n        with pytest.warns(UserWarning, match=r\"Undefined variable\\(s\\)\"):\n            h(long_df, *triple_args)"},{"col":0,"comment":"Context manager for preventing rc-controlled auto-layout behavior.","endLoc":876,"header":"@contextmanager\ndef _disable_autolayout()","id":2159,"name":"_disable_autolayout","nodeType":"Function","startLoc":860,"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"},{"col":4,"comment":"null","endLoc":925,"header":"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)","id":2160,"name":"__init__","nodeType":"Function","startLoc":896,"text":"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"},{"className":"DocstringComponents","col":0,"comment":"null","endLoc":59,"id":2161,"nodeType":"Class","startLoc":6,"text":"class 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\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\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)"},{"attributeType":"null","col":16,"comment":"null","endLoc":4,"id":2162,"name":"np","nodeType":"Attribute","startLoc":4,"text":"np"},{"col":4,"comment":"Read entries from a dict, optionally stripping outer whitespace.","endLoc":23,"header":"def __init__(self, comp_dict, strip_whitespace=True)","id":2163,"name":"__init__","nodeType":"Function","startLoc":10,"text":"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"},{"attributeType":"null","col":17,"comment":"null","endLoc":5,"id":2164,"name":"pd","nodeType":"Attribute","startLoc":5,"text":"pd"},{"id":2165,"name":"v0.12.0.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"v0.12.0 (September 2022)\n------------------------\n\nIntroduction of the objects interface\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis release debuts the `seaborn.objects` interface, an entirely new approach to making plots with seaborn. It is the product of several years of design and 16 months of implementation work. The interface aims to provide a more declarative, composable, and extensible API for making statistical graphics. It is inspired by Wilkinson's grammar of graphics, offering a Pythonic API that is informed by the design of libraries such as `ggplot2` and `vega-lite` along with lessons from the past 10 years of seaborn's development.\n\nFor more information and numerous examples, see the :doc:`tutorial chapter ` and :ref:`API reference `\n\nThis initial release should be considered \"experimental\". While it is stable enough for serious use, there are definitely some rough edges, and some key features remain to be implemented. It is possible that breaking changes may occur over the next few minor releases. Please be patient with any limitations that you encounter and help the development by reporting issues when you find behavior surprising.\n\nKeyword-only arguments\n~~~~~~~~~~~~~~~~~~~~~~\n\n|API|\n\nSeaborn's plotting functions now require explicit keywords for most arguments, following the deprecation of positional arguments in v0.11.0. With this enforcement, most functions have also had their parameter lists rearranged so that `data` is the first and only positional argument. This adds consistency across the various functions in the library. It also means that calling `func(data)` will do something for nearly all functions (those that support wide-form data) and that :class:`pandas.DataFrame` can be piped directly into a plot. It is possible that the signatures will be loosened a bit in future releases so that `x` and `y` can be positional, but minimal support for positional arguments after this change will reduce the chance of inadvertent mis-specification (:pr:`2804`).\n\nModernization of categorical scatterplots\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis release begins the process of modernizing the :ref:`categorical plots `, beginning with :func:`stripplot` and :func:`swarmplot`. These functions are sporting some enhancements that alleviate a few long-running frustrations (:pr:`2413`, :pr:`2447`):\n\n- |Feature| The new `native_scale` parameter allows numeric or datetime categories to be plotted with their original scale rather than converted to strings and plotted at fixed intervals.\n\n- |Feature| The new `formatter` parameter allows more control over the string representation of values on the categorical axis. There should also be improved defaults for some types, such as dates.\n\n- |Enhancement| It is now possible to assign `hue` when using only one coordinate variable (i.e. only `x` or `y`).\n\n- |Enhancement| It is now possible to disable the legend.\n\nThe updates also harmonize behavior with functions that have been more recently introduced. This should be relatively non-disruptive, although a few defaults will change:\n\n- |Defaults| The functions now hook into matplotlib's unit system for plotting categorical data. (Seaborn's categorical functions actually predate support for categorical data in matplotlib.) This should mostly be transparent to the user, but it may resolve a few edge cases. For example, matplotlib interactivity should work better (e.g., for showing the data value under the cursor).\n\n- |Defaults| A color palette is no longer applied to levels of the categorical variable by default. It is now necessary to explicitly assign `hue` to see multiple colors (i.e., assign the same variable to `x`/`y` and `hue`). Passing `palette` without `hue` will continue to be honored for one release cycle.\n\n- |Defaults| Numeric `hue` variables now receive a continuous mapping by default, using the same rules as :func:`scatterplot`. Pass `palette=\"deep\"` to reproduce previous defaults.\n\n- |Defaults| The plots now follow the default property cycle; i.e. calling an axes-level function multiple times with the same active axes will produce different-colored artists.\n\n- |API| Currently, assigning `hue` and then passing a `color` will produce a gradient palette. This is now deprecated, as it is easy to request a gradient with, e.g. `palette=\"light:blue\"`.\n\nSimilar enhancements / updates should be expected to roll out to other categorical plotting functions in future releases. There are also several function-specific enhancements:\n\n- |Enhancement| In :func:`stripplot`, a \"strip\" with a single observation will be plotted without jitter (:pr:`2413`)\n\n- |Enhancement| In :func:`swarmplot`, the points are now swarmed at draw time, meaning that the plot will adapt to further changes in axis scaling or tweaks to the plot layout (:pr:`2443`).\n\n- |Feature| In :func:`swarmplot`, the proportion of points that must overlap before issuing a warning can now be controlled with the `warn_thresh` parameter (:pr:`2447`).\n\n- |Fix| In :func:`swarmplot`, the order of the points in each swarm now matches the order in the original dataset; previously they were sorted. This affects only the underlying data stored in the matplotlib artist, not the visual representation (:pr:`2443`).\n\nMore flexible errorbars\n~~~~~~~~~~~~~~~~~~~~~~~\n\n|API| |Feature|\n\nIncreased the flexibility of what can be shown by the internally-calculated errorbars for :func:`lineplot`, :func:`barplot`, and :func:`pointplot`.\n\nWith the new `errorbar` parameter, it is now possible to select bootstrap confidence intervals, percentile / predictive intervals, or intervals formed by scaled standard deviations or standard errors. The parameter also accepts an arbitrary function that maps from a vector to an interval. There is a new :doc:`user guide chapter ` demonstrating these options and explaining when you might want to use each one.\n\nAs a consequence of this change, the `ci` parameter has been deprecated. Note that :func:`regplot` retains the previous API, but it will likely be updated in a future release (:pr:`2407`, :pr:`2866`).\n\nOther updates\n~~~~~~~~~~~~~\n\n- |Feature| It is now possible to aggregate / sort a :func:`lineplot` along the y axis using `orient=\"y\"` (:pr:`2854`).\n\n- |Feature| Made it easier to customize :class:`FacetGrid` / :class:`PairGrid` / :class:`JointGrid` with a fluent (method-chained) style by adding `apply`/ `pipe` methods. Additionally, fixed the `tight_layout` and `refline` methods so that they return `self` (:pr:`2926`).\n\n- |Feature| Added :meth:`FacetGrid.tick_params` and :meth:`PairGrid.tick_params` to customize the appearance of the ticks, tick labels, and gridlines of all subplots at once (:pr:`2944`).\n\n- |Enhancement| Added a `width` parameter to :func:`barplot` (:pr:`2860`).\n\n- |Enhancement| It is now possible to specify `estimator` as a string in :func:`barplot` and :func:`pointplot`, in addition to a callable (:pr:`2866`).\n\n- |Enhancement| Error bars in :func:`regplot` now inherit the alpha value of the points they correspond to (:pr:`2540`).\n\n- |Enhancement| When using :func:`pairplot` with `corner=True` and `diag_kind=None`, the top left y axis label is no longer hidden (:pr:`2850`).\n\n- |Enhancement| It is now possible to plot a discrete :func:`histplot` as a step function or polygon (:pr:`2859`).\n\n- |Enhancement| It is now possible to customize the appearance of elements in a :func:`boxenplot` with `box_kws`/`line_kws`/`flier_kws` (:pr:`2909`).\n\n- |Fix| Improved integration with the matplotlib color cycle in most axes-level functions (:pr:`2449`).\n\n- |Fix| Fixed a regression in 0.11.2 that caused some functions to stall indefinitely or raise when the input data had a duplicate index (:pr:`2776`).\n\n- |Fix| Fixed a bug in :func:`histplot` and :func:`kdeplot` where weights were not factored into the normalization (:pr:`2812`).\n\n- |Fix| Fixed two edgecases in :func:`histplot` when only `binwidth` was provided (:pr:`2813`).\n\n- |Fix| Fixed a bug in :func:`violinplot` where inner boxes/points could be missing with unpaired split violins (:pr:`2814`).\n\n- |Fix| Fixed a bug in :class:`PairGrid` where an error would be raised when defining `hue` only in the mapping methods (:pr:`2847`).\n\n- |Fix| Fixed a bug in :func:`scatterplot` where an error would be raised when `hue_order` was a subset of the hue levels (:pr:`2848`).\n\n- |Fix| Fixed a bug in :func:`histplot` where dodged bars would have different widths on a log scale (:pr:`2849`).\n\n- |Fix| In :func:`lineplot`, allowed the `dashes` keyword to set the style of a line without mapping a `style` variable (:pr:`2449`).\n\n- |Fix| Improved support in :func:`relplot` for \"wide\" data and for faceting variables passed as non-pandas objects (:pr:`2846`).\n\n- |Fix| Subplot titles will no longer be reset when calling :meth:`FacetGrid.map` or :meth:`FacetGrid.map_dataframe` (:pr:`2705`).\n\n- |Fix| Added a workaround for a matplotlib issue that caused figure-level functions to freeze when `plt.show` was called (:pr:`2925`).\n\n- |Fix| Improved robustness to numerical errors in :func:`kdeplot` (:pr:`2862`).\n\n- |Fix| Fixed a bug where :func:`rugplot` was ignoring expand_margins=False (:pr:`2953`).\n\n- |Defaults| The `patch.facecolor` rc param is no longer set by :func:`set_palette` (or :func:`set_theme`). This should have no general effect, because the matplotlib default is now `\"C0\"` (:pr:`2906`).\n\n- |Build| Made `scipy` an optional dependency and added `pip install seaborn[stats]` as a method for ensuring the availability of compatible `scipy` and `statsmodels` libraries at install time. This has a few minor implications for existing code, which are explained in the Github pull request (:pr:`2398`).\n\n- |Build| Example datasets are now stored in an OS-specific cache location (as determined by `appdirs`) rather than in the user's home directory. Users should feel free to remove `~/seaborn-data` if desired (:pr:`2773`).\n\n- |Build| The unit test suite is no longer part of the source or wheel distribution. Seaborn has never had a runtime API for exercising the tests, so this should not have workflow implications (:pr:`2833`).\n\n- |Build| Following `NEP29 `_, dropped support for Python 3.6 and bumped the minimally-supported versions of the library dependencies.\n\n- |API| Removed the previously-deprecated `factorplot` along with several previously-deprecated utility functions (`iqr`, `percentiles`, `pmf_hist`, and `sort_df`).\n\n- |API| Removed the (previously-unused) option to pass additional keyword arguments to :func:`pointplot`.\n"},{"id":2166,"name":"swarmplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme(style=\\\"whitegrid\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assigning a single numeric variable shows its univariate distribution with points adjusted along on the other axis such that they don't overlap:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"tips = sns.load_dataset(\\\"tips\\\")\\n\",\n    \"sns.swarmplot(data=tips, x=\\\"total_bill\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assigning a second variable splits the groups of points to compare categorical levels of that variable:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Show vertically-oriented swarms by swapping the assignment of the categorical and numerical variables:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(data=tips, x=\\\"day\\\", y=\\\"total_bill\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Prior to version 0.12, the levels of the categorical variable had different colors by default. To get the same effect, assign the `hue` variable explicitly:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"day\\\", legend=False)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Or you can assign a distinct variable to `hue` to show a multidimensional relationship:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"sex\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"If the `hue` variable is numeric, it will be mapped with a quantitative palette by default (note that this was not the case prior to version 0.12):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"size\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use `palette` to control the color mapping, including forcing a categorical mapping by passing the name of a qualitative palette:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"size\\\", palette=\\\"deep\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"By default, the different levels of the `hue` variable are intermingled in each swarm, but setting `dodge=True` will split them:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(data=tips, x=\\\"total_bill\\\", y=\\\"day\\\", hue=\\\"sex\\\", dodge=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The \\\"orientation\\\" of the plot (defined as the direction along which quantitative relationships are preserved) is usually inferred automatically. But in ambiguous cases, such as when both axis variables are numeric, it can be specified:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(data=tips, x=\\\"total_bill\\\", y=\\\"size\\\", orient=\\\"h\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"When the local density of points is too high, they will be forced to overlap in the \\\"gutters\\\" of each swarm and a warning will be issued. Decreasing the size of the points can help to avoid this problem:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(data=tips, x=\\\"total_bill\\\", y=\\\"size\\\", orient=\\\"h\\\", size=3)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"By default, the categorical variable will be mapped to discrete indices with a fixed scale (0, 1, ...), even when it is numeric:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(\\n\",\n    \"    data=tips.query(\\\"size in [2, 3, 5]\\\"),\\n\",\n    \"    x=\\\"total_bill\\\", y=\\\"size\\\", orient=\\\"h\\\",\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"To disable this behavior and use the original scale of the variable, set `native_scale=True` (notice how this also changes the order of the variables on the y axis):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(\\n\",\n    \"    data=tips.query(\\\"size in [2, 3, 5]\\\"),\\n\",\n    \"    x=\\\"total_bill\\\", y=\\\"size\\\", orient=\\\"h\\\",\\n\",\n    \"    native_scale=True,\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Further visual customization can be achieved by passing keyword arguments for :func:`matplotlib.axes.Axes.scatter`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.swarmplot(\\n\",\n    \"    data=tips, x=\\\"total_bill\\\", y=\\\"day\\\",\\n\",\n    \"    marker=\\\"x\\\", linewidth=1, \\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"To make a plot with multiple facets, it is safer to use :func:`catplot` with `kind=\\\"swarm\\\"` than to work with :class:`FacetGrid` directly, because :func:`catplot` will ensure that the categorical and hue variables are properly synchronized in each facet:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.catplot(\\n\",\n    \"    data=tips, kind=\\\"swarm\\\",\\n\",\n    \"    x=\\\"time\\\", y=\\\"total_bill\\\", hue=\\\"sex\\\", col=\\\"day\\\",\\n\",\n    \"    aspect=.5\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"id":2167,"name":"objects.Plot.on.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"fb8e120d-5dcf-483b-a0d1-74857d09ce7d\",\n   \"metadata\": {},\n   \"source\": [\n    \".. currentmodule:: seaborn.objects\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"9252d5a5-8af1-4f99-b799-ee044329fb23\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"%config InlineBackend.figure_format = \\\"retina\\\"\\n\",\n    \"import seaborn as sns\\n\",\n    \"import seaborn.objects as so\\n\",\n    \"import matplotlib as mpl\\n\",\n    \"import matplotlib.pyplot as plt\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"diamonds = load_dataset(\\\"diamonds\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"3445ed22-7a6a-4f91-8914-49bb1af023cb\",\n   \"metadata\": {},\n   \"source\": [\n    \"Passing a :class:`matplotlib.axes.Axes` object provides functionality closest to seaborn's axes-level plotting functions. Notice how the resulting image looks different from others created with :class:`Plot`. This is because the plot theme uses the global rcParams at the time the axes were created, rather than :class:`Plot` defaults:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b816b0b1-b861-404e-bec6-9b2b0844ea5a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p = so.Plot(diamonds, \\\"carat\\\", \\\"price\\\").add(so.Dots())\\n\",\n    \"f, ax = plt.subplots()\\n\",\n    \"p.on(ax).show()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"ce3aa102-50fe-44ce-9e06-e25d14b410f1\",\n   \"metadata\": {},\n   \"source\": [\n    \"Alternatively, calling :func:`matplotlib.pyplot.figure` will defer axes creation to :class:`Plot`, which will apply the default theme (and any customizations specified with :meth:`Plot.theme`):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"52eefae9-d08e-48fb-a15b-27920609d53b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f = plt.figure()\\n\",\n    \"p.on(f).show()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"171fa466-1f7a-4c5e-8a12-61edb3f11e4a\",\n   \"metadata\": {},\n   \"source\": [\n    \"Creating a :class:`matplotlib.figure.Figure` object will bypass `pyplot` altogether. This may be useful for embedding :class:`Plot` figures in a GUI application:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"bba83103-ab74-4e3c-b16e-77644f4c0431\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f = mpl.figure.Figure()\\n\",\n    \"p.on(f).plot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"4cce3d40-acea-4f5c-87c4-56666480d2fe\",\n   \"metadata\": {},\n   \"source\": [\n    \"Using :class:`Plot.on` also provides access to the underlying matplotlib objects, which may be useful for deep customization. But it requires a careful attention to the order of operations by which the :class:`Plot` is specified, compiled, customized, and displayed:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"91823d24-8269-4b72-abeb-38201eb2db3f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f = mpl.figure.Figure()\\n\",\n    \"res = p.on(f).plot()\\n\",\n    \"\\n\",\n    \"ax = f.axes[0]\\n\",\n    \"rect = mpl.patches.Rectangle(\\n\",\n    \"    xy=(0, 1), width=.4, height=.1,\\n\",\n    \"    color=\\\"C1\\\", alpha=.2,\\n\",\n    \"    transform=ax.transAxes, clip_on=False,\\n\",\n    \")\\n\",\n    \"ax.add_artist(rect)\\n\",\n    \"ax.text(\\n\",\n    \"    x=rect.get_width() / 2, y=1 + rect.get_height() / 2,\\n\",\n    \"    s=\\\"Diamonds: very sparkly!\\\", size=12,\\n\",\n    \"    ha=\\\"center\\\", va=\\\"center\\\", transform=ax.transAxes,\\n\",\n    \")\\n\",\n    \"\\n\",\n    \"res\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"61286891-25b3-4db5-8ebe-af080d5c5f31\",\n   \"metadata\": {},\n   \"source\": [\n    \"Matplotlib 3.4 introduced the concept of :meth:`matplotlib.figure.Figure.subfigures`, which make it easier to composite multiple arrangements of subplots. These can also be passed to :meth:`Plot.on`, \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"ca19a28e-7a49-46b3-a727-a26f4a1099c3\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f = mpl.figure.Figure(figsize=(7, 4), dpi=100, layout=\\\"constrained\\\")\\n\",\n    \"sf1, sf2 = f.subfigures(1, 2)\\n\",\n    \"\\n\",\n    \"p.on(sf1).plot()\\n\",\n    \"(\\n\",\n    \"    so.Plot(diamonds, x=\\\"price\\\")\\n\",\n    \"    .add(so.Bars(), so.Hist())\\n\",\n    \"    .facet(row=\\\"cut\\\")\\n\",\n    \"    .scale(x=\\\"log\\\")\\n\",\n    \"    .share(y=False)\\n\",\n    \"    .on(sf2)\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"6ecd4166-939d-4925-92be-bf886a16ae94\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":2168,"name":"scatterplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import numpy as np\\n\",\n    \"import pandas as pd\\n\",\n    \"import seaborn as sns\\n\",\n    \"import matplotlib.pyplot as plt\\n\",\n    \"sns.set_theme()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"These examples will use the \\\"tips\\\" dataset, which has a mixture of numeric and categorical variables:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"tips = sns.load_dataset(\\\"tips\\\")\\n\",\n    \"tips.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Passing long-form data and assigning ``x`` and ``y`` will draw a scatter plot between two variables:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.scatterplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assigning a variable to ``hue`` will map its levels to the color of the points:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.scatterplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"time\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assigning the same variable to ``style`` will also vary the markers and create a more accessible plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.scatterplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"time\\\", style=\\\"time\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assigning ``hue`` and ``style`` to different variables will vary colors and markers independently:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.scatterplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"day\\\", style=\\\"time\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"If the variable assigned to ``hue`` is numeric, the semantic mapping will be quantitative and use a different default palette:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.scatterplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"size\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Pass the name of a categorical palette or explicit colors (as a Python list of dictionary) to force categorical mapping of the ``hue`` variable:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.scatterplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"size\\\", palette=\\\"deep\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"If there are a large number of unique numeric values, the legend will show a representative, evenly-spaced set:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"tip_rate = tips.eval(\\\"tip / total_bill\\\").rename(\\\"tip_rate\\\")\\n\",\n    \"sns.scatterplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=tip_rate)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"A numeric variable can also be assigned to ``size`` to apply a semantic mapping to the areas of the points:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.scatterplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"size\\\", size=\\\"size\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Control the range of marker areas with ``sizes``, and set ``lengend=\\\"full\\\"`` to force every unique value to appear in the legend:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.scatterplot(\\n\",\n    \"    data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"size\\\", size=\\\"size\\\",\\n\",\n    \"    sizes=(20, 200), legend=\\\"full\\\"\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Pass a tuple of values or a :class:`matplotlib.colors.Normalize` object to ``hue_norm`` to control the quantitative hue mapping:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.scatterplot(\\n\",\n    \"    data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"size\\\", size=\\\"size\\\",\\n\",\n    \"    sizes=(20, 200), hue_norm=(0, 7), legend=\\\"full\\\"\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Control the specific markers used to map the ``style`` variable by passing a Python list or dictionary of marker codes:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"markers = {\\\"Lunch\\\": \\\"s\\\", \\\"Dinner\\\": \\\"X\\\"}\\n\",\n    \"sns.scatterplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", style=\\\"time\\\", markers=markers)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Additional keyword arguments are passed to :meth:`matplotlib.axes.Axes.scatter`, allowing you to directly set the attributes of the plot that are not semantically mapped:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.scatterplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", s=100, color=\\\".2\\\", marker=\\\"+\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The previous examples used a long-form dataset. When working with wide-form data, each column will be plotted against its index using both ``hue`` and ``style`` mapping:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"index = pd.date_range(\\\"1 1 2000\\\", periods=100, freq=\\\"m\\\", name=\\\"date\\\")\\n\",\n    \"data = np.random.randn(100, 4).cumsum(axis=0)\\n\",\n    \"wide_df = pd.DataFrame(data, index, [\\\"a\\\", \\\"b\\\", \\\"c\\\", \\\"d\\\"])\\n\",\n    \"sns.scatterplot(data=wide_df)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use :func:`relplot` to combine :func:`scatterplot` and :class:`FacetGrid`. This allows grouping within additional categorical variables, and plotting them across multiple subplots.\\n\",\n    \"\\n\",\n    \"Using :func:`relplot` is safer than using :class:`FacetGrid` directly, as it ensures synchronization of the semantic mappings across facets.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.relplot(\\n\",\n    \"    data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\",\\n\",\n    \"    col=\\\"time\\\", hue=\\\"day\\\", style=\\\"day\\\",\\n\",\n    \"    kind=\\\"scatter\\\"\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"col":4,"comment":"null","endLoc":251,"header":"def test_histogram_single(self, long_df, single_args)","id":2169,"name":"test_histogram_single","nodeType":"Function","startLoc":245,"text":"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))"},{"id":2170,"name":"objects.Agg.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"0d053943-66c9-410d-ad65-ce91f1c1ff48\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"diamonds = load_dataset(\\\"diamonds\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"51b029af-b83b-4ae0-a6ff-f48bf9692518\",\n   \"metadata\": {},\n   \"source\": [\n    \"The default behavior is to aggregate by taking a mean over each group:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"28451b4e-9f4e-4604-b2b9-6138c4f51436\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p = so.Plot(diamonds, \\\"clarity\\\", \\\"carat\\\")\\n\",\n    \"p.add(so.Bar(), so.Agg())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"53859a3b-051c-423d-97ef-b03f647268b7\",\n   \"metadata\": {},\n   \"source\": [\n    \"Other aggregation functions can be selected by name if they are pandas methods:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"5beaac3a-b9f7-4acc-81c7-480599e3675e\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Bar(), so.Agg(\\\"median\\\"))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"2d318ee3-56c1-4fd4-99a5-fa87db770f67\",\n   \"metadata\": {},\n   \"source\": [\n    \"It's also possible to pass an arbitrary aggregation function:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"bd11e289-7274-464a-b781-06fb756cf8de\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Bar(), so.Agg(lambda x: x.quantile(.75) - x.quantile(.25)))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"555394c1-25f8-4932-94d1-f67a8a9fa1c6\",\n   \"metadata\": {},\n   \"source\": [\n    \"When other mapping variables are assigned, they'll be used to define aggregation groups. With some marks, it may be helpful to use additional transforms, such as :class:`Dodge`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"5755cdeb-1d1a-4434-9cc5-91024735eb4e\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Bar(), so.Agg(), so.Dodge(), color=\\\"cut\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"07eb1150-db57-4a58-b830-8a7aba9f46ec\",\n   \"metadata\": {},\n   \"source\": [\n    \"The variable that gets aggregated depends on the orientation of the layer, which is usually inferred from the coordinate variable types (but may also be specified with the `orient` parameter in :meth:`Plot.add`):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"1bdcc970-1b6c-4a3d-b0bc-6c7a625163ff\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"so.Plot(diamonds, \\\"carat\\\", \\\"clarity\\\").add(so.Bar(), so.Agg())\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"ad8006ff-5472-4345-9537-a5680c519f4f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":2171,"name":"clustermap.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"ffc1e1d9-fa74-4121-aa87-e1a8665e4c2b\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"41b4f602-32af-44f8-bf1a-0f1695c9abbb\",\n   \"metadata\": {},\n   \"source\": [\n    \"Plot a heatmap with row and column clustering:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c715bd8f-cf5d-4caa-9244-336b3d0248a8\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"iris = sns.load_dataset(\\\"iris\\\")\\n\",\n    \"species = iris.pop(\\\"species\\\")\\n\",\n    \"sns.clustermap(iris)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"1cc3134c-579a-442a-97d8-a878651ce90a\",\n   \"metadata\": {},\n   \"source\": [\n    \"Change the size and layout of the figure:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"fd33cf4b-9589-4b9a-a246-0b95bad28c51\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.clustermap(\\n\",\n    \"    iris,\\n\",\n    \"    figsize=(7, 5),\\n\",\n    \"    row_cluster=False,\\n\",\n    \"    dendrogram_ratio=(.1, .2),\\n\",\n    \"    cbar_pos=(0, .2, .03, .4)\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"c5d3408d-f5d6-4045-9d61-15573a981587\",\n   \"metadata\": {},\n   \"source\": [\n    \"Add colored labels to identify observations:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"79d3fe52-6146-4f33-a39a-1d4a47243ea5\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"lut = dict(zip(species.unique(), \\\"rbg\\\"))\\n\",\n    \"row_colors = species.map(lut)\\n\",\n    \"sns.clustermap(iris, row_colors=row_colors)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"f2f944e2-36cd-4653-86b4-6d2affec13d6\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use a different colormap and adjust the limits of the color range:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"6137c7ad-db92-47b8-9d00-3228c4e1f7df\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.clustermap(iris, cmap=\\\"mako\\\", vmin=0, vmax=10)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"93f96d1c-9d04-464f-93c9-4319caa8504a\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use differente clustering parameters:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f9e76bde-a222-4eca-971f-54f56ad53281\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.clustermap(iris, metric=\\\"correlation\\\", method=\\\"single\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"ea6ed3fd-188d-4244-adac-ec0169c02205\",\n   \"metadata\": {},\n   \"source\": [\n    \"Standardize the data within the columns:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e5f744c4-b959-4ed1-b2cf-6046c9214568\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.clustermap(iris, standard_scale=1)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"7ca72242-4eb0-4f8e-b0c0-d1ef7166b738\",\n   \"metadata\": {},\n   \"source\": [\n    \"Normalize the data within rows:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"33815c4c-9bae-4226-bd11-3dfdb7ecab2b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.clustermap(iris, z_score=0, cmap=\\\"vlag\\\", center=0)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"0f37d57a-b049-4665-9c24-4d5fbbca00ba\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"id":2172,"name":"v0.10.0.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.10.0 (January 2020)\n----------------------\n\nThis is a major update that is being released simultaneously with version 0.9.1. It has all of the same features (and bugs!) as 0.9.1, but there are important changes to the dependencies.\n\nMost notably, all support for Python 2 has now been dropped. Support for Python 3.5 has also been dropped. Seaborn is now strictly compatible with Python 3.6+.\n\nMinimally supported versions of the dependent PyData libraries have also been increased, in some cases substantially. While seaborn has tended to be very conservative about maintaining compatibility with older dependencies, this was causing increasing pain during development. At the same time, these libraries are now much easier to install. Going forward, seaborn will likely stay close to the `Numpy community guidelines `_ for version support.\n\nThis release also removes a few previously-deprecated features:\n\n- The ``tsplot`` function and ``seaborn.timeseries`` module have been removed. Recall that ``tsplot`` was replaced with :func:`lineplot`.\n\n- The ``seaborn.apionly`` entry-point has been removed.\n\n- The ``seaborn.linearmodels`` module (previously renamed to ``seaborn.regression``) has been removed.\n"},{"attributeType":"null","col":4,"comment":"null","endLoc":1577,"id":2173,"name":"_cmap","nodeType":"Attribute","startLoc":1577,"text":"_cmap"},{"attributeType":"null","col":4,"comment":"null","endLoc":1580,"id":2174,"name":"_cmap_r","nodeType":"Attribute","startLoc":1580,"text":"_cmap_r"},{"col":4,"comment":"Provide dot access to entries for clean raw docstrings.","endLoc":41,"header":"def __getattr__(self, attr)","id":2176,"name":"__getattr__","nodeType":"Function","startLoc":25,"text":"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"},{"className":"MockMark","col":0,"comment":"null","endLoc":77,"id":2178,"nodeType":"Class","startLoc":47,"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"},{"id":2179,"name":"v0.12.1.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.12.1 (October 2022)\n----------------------\n\nThis is an incremental release that is a recommended upgrade for all users. It addresses a handful of bugs / regressions in v0.12.0 and adds several features and enhancements to the new :doc:`objects interface `.\n\n- |Feature| Added the :class:`objects.Text` mark (:pr:`3051`).\n\n- |Feature| Added the :class:`objects.Dash` mark (:pr:`3074`).\n\n- |Feature| Added the :class:`objects.Perc` stat (:pr:`3063`).\n\n- |Feature| Added the :class:`objects.Count` stat (:pr:`3086`).\n\n- |Feature| The :class:`objects.Band` and :class:`objects.Range` marks will now cover the full extent of the data if `min` / `max` variables are not explicitly assigned or added in a transform (:pr:`3056`).\n\n- |Enhancement| |Defaults| The :class:`objects.Jitter` move now applies a small amount of jitter by default (:pr:`3066`).\n\n- |Enhancement| |Defaults| Axes with a :class:`objects.Nominal` scale now appear like categorical axes in classic seaborn, with fixed margins, no grid, and an inverted y axis (:pr:`3069`).\n\n- |Enhancement| |API| The :meth:`objects.Continuous.label` method now accepts `base=None` to override the default formatter with a log transform (:pr:`3087`).\n\n- |Enhancement| |Fix| Marks that sort along the orient axis (e.g. :class:`objects.Line`) now use a stable algorithm (:pr:`3064`).\n\n- |Enhancement| |Fix| Added a `label` parameter to :func:`pointplot`, which addresses a regression in 0.12.0 when :func:`pointplot` is passed to :class:`FacetGrid` (:pr:`3016`).\n\n- |Fix| Fixed a bug that caused an exception when more than two layers with the same mappings were added to :class:`objects.Plot` (:pr:`3055`).\n\n- |Fix| Made :class:`objects.PolyFit` robust to missing data (:pr:`3010`).\n\n- |Fix| Fixed a bug in :class:`objects.Plot` that occurred when data assigned to the orient coordinate had zero variance (:pr:`3084`).\n\n- |Fix| Fixed a regression in :func:`kdeplot` where passing `cmap` for an unfilled bivariate plot would raise an exception (:pr:`3065`).\n\n- |Fix| Addressed a performance regression in :func:`lineplot` with a large number of unique x values (:pr:`3081`).\n\n- |Build| Seaborn no longer contains doctest-style examples, simplifying the testing infrastructure (:pr:`3034`).\n"},{"col":4,"comment":"null","endLoc":59,"header":"def __init__(self, *args, **kwargs)","id":2180,"name":"__init__","nodeType":"Function","startLoc":51,"text":"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"},{"col":0,"comment":"","endLoc":1,"header":"cm.py#","id":2181,"name":"","nodeType":"Function","startLoc":1,"text":"_rocket_lut = [\n    [ 0.01060815, 0.01808215, 0.10018654],\n    [ 0.01428972, 0.02048237, 0.10374486],\n    [ 0.01831941, 0.0229766 , 0.10738511],\n    [ 0.02275049, 0.02554464, 0.11108639],\n    [ 0.02759119, 0.02818316, 0.11483751],\n    [ 0.03285175, 0.03088792, 0.11863035],\n    [ 0.03853466, 0.03365771, 0.12245873],\n    [ 0.04447016, 0.03648425, 0.12631831],\n    [ 0.05032105, 0.03936808, 0.13020508],\n    [ 0.05611171, 0.04224835, 0.13411624],\n    [ 0.0618531 , 0.04504866, 0.13804929],\n    [ 0.06755457, 0.04778179, 0.14200206],\n    [ 0.0732236 , 0.05045047, 0.14597263],\n    [ 0.0788708 , 0.05305461, 0.14995981],\n    [ 0.08450105, 0.05559631, 0.15396203],\n    [ 0.09011319, 0.05808059, 0.15797687],\n    [ 0.09572396, 0.06050127, 0.16200507],\n    [ 0.10132312, 0.06286782, 0.16604287],\n    [ 0.10692823, 0.06517224, 0.17009175],\n    [ 0.1125315 , 0.06742194, 0.17414848],\n    [ 0.11813947, 0.06961499, 0.17821272],\n    [ 0.12375803, 0.07174938, 0.18228425],\n    [ 0.12938228, 0.07383015, 0.18636053],\n    [ 0.13501631, 0.07585609, 0.19044109],\n    [ 0.14066867, 0.0778224 , 0.19452676],\n    [ 0.14633406, 0.07973393, 0.1986151 ],\n    [ 0.15201338, 0.08159108, 0.20270523],\n    [ 0.15770877, 0.08339312, 0.20679668],\n    [ 0.16342174, 0.0851396 , 0.21088893],\n    [ 0.16915387, 0.08682996, 0.21498104],\n    [ 0.17489524, 0.08848235, 0.2190294 ],\n    [ 0.18065495, 0.09009031, 0.22303512],\n    [ 0.18643324, 0.09165431, 0.22699705],\n    [ 0.19223028, 0.09317479, 0.23091409],\n    [ 0.19804623, 0.09465217, 0.23478512],\n    [ 0.20388117, 0.09608689, 0.23860907],\n    [ 0.20973515, 0.09747934, 0.24238489],\n    [ 0.21560818, 0.09882993, 0.24611154],\n    [ 0.22150014, 0.10013944, 0.2497868 ],\n    [ 0.22741085, 0.10140876, 0.25340813],\n    [ 0.23334047, 0.10263737, 0.25697736],\n    [ 0.23928891, 0.10382562, 0.2604936 ],\n    [ 0.24525608, 0.10497384, 0.26395596],\n    [ 0.25124182, 0.10608236, 0.26736359],\n    [ 0.25724602, 0.10715148, 0.27071569],\n    [ 0.26326851, 0.1081815 , 0.27401148],\n    [ 0.26930915, 0.1091727 , 0.2772502 ],\n    [ 0.27536766, 0.11012568, 0.28043021],\n    [ 0.28144375, 0.11104133, 0.2835489 ],\n    [ 0.2875374 , 0.11191896, 0.28660853],\n    [ 0.29364846, 0.11275876, 0.2896085 ],\n    [ 0.29977678, 0.11356089, 0.29254823],\n    [ 0.30592213, 0.11432553, 0.29542718],\n    [ 0.31208435, 0.11505284, 0.29824485],\n    [ 0.31826327, 0.1157429 , 0.30100076],\n    [ 0.32445869, 0.11639585, 0.30369448],\n    [ 0.33067031, 0.11701189, 0.30632563],\n    [ 0.33689808, 0.11759095, 0.3088938 ],\n    [ 0.34314168, 0.11813362, 0.31139721],\n    [ 0.34940101, 0.11863987, 0.3138355 ],\n    [ 0.355676  , 0.11910909, 0.31620996],\n    [ 0.36196644, 0.1195413 , 0.31852037],\n    [ 0.36827206, 0.11993653, 0.32076656],\n    [ 0.37459292, 0.12029443, 0.32294825],\n    [ 0.38092887, 0.12061482, 0.32506528],\n    [ 0.38727975, 0.12089756, 0.3271175 ],\n    [ 0.39364518, 0.12114272, 0.32910494],\n    [ 0.40002537, 0.12134964, 0.33102734],\n    [ 0.40642019, 0.12151801, 0.33288464],\n    [ 0.41282936, 0.12164769, 0.33467689],\n    [ 0.41925278, 0.12173833, 0.33640407],\n    [ 0.42569057, 0.12178916, 0.33806605],\n    [ 0.43214263, 0.12179973, 0.33966284],\n    [ 0.43860848, 0.12177004, 0.34119475],\n    [ 0.44508855, 0.12169883, 0.34266151],\n    [ 0.45158266, 0.12158557, 0.34406324],\n    [ 0.45809049, 0.12142996, 0.34540024],\n    [ 0.46461238, 0.12123063, 0.34667231],\n    [ 0.47114798, 0.12098721, 0.34787978],\n    [ 0.47769736, 0.12069864, 0.34902273],\n    [ 0.48426077, 0.12036349, 0.35010104],\n    [ 0.49083761, 0.11998161, 0.35111537],\n    [ 0.49742847, 0.11955087, 0.35206533],\n    [ 0.50403286, 0.11907081, 0.35295152],\n    [ 0.51065109, 0.11853959, 0.35377385],\n    [ 0.51728314, 0.1179558 , 0.35453252],\n    [ 0.52392883, 0.11731817, 0.35522789],\n    [ 0.53058853, 0.11662445, 0.35585982],\n    [ 0.53726173, 0.11587369, 0.35642903],\n    [ 0.54394898, 0.11506307, 0.35693521],\n    [ 0.5506426 , 0.11420757, 0.35737863],\n    [ 0.55734473, 0.11330456, 0.35775059],\n    [ 0.56405586, 0.11235265, 0.35804813],\n    [ 0.57077365, 0.11135597, 0.35827146],\n    [ 0.5774991 , 0.11031233, 0.35841679],\n    [ 0.58422945, 0.10922707, 0.35848469],\n    [ 0.59096382, 0.10810205, 0.35847347],\n    [ 0.59770215, 0.10693774, 0.35838029],\n    [ 0.60444226, 0.10573912, 0.35820487],\n    [ 0.61118304, 0.10450943, 0.35794557],\n    [ 0.61792306, 0.10325288, 0.35760108],\n    [ 0.62466162, 0.10197244, 0.35716891],\n    [ 0.63139686, 0.10067417, 0.35664819],\n    [ 0.63812122, 0.09938212, 0.35603757],\n    [ 0.64483795, 0.0980891 , 0.35533555],\n    [ 0.65154562, 0.09680192, 0.35454107],\n    [ 0.65824241, 0.09552918, 0.3536529 ],\n    [ 0.66492652, 0.09428017, 0.3526697 ],\n    [ 0.67159578, 0.09306598, 0.35159077],\n    [ 0.67824099, 0.09192342, 0.3504148 ],\n    [ 0.684863  , 0.09085633, 0.34914061],\n    [ 0.69146268, 0.0898675 , 0.34776864],\n    [ 0.69803757, 0.08897226, 0.3462986 ],\n    [ 0.70457834, 0.0882129 , 0.34473046],\n    [ 0.71108138, 0.08761223, 0.3430635 ],\n    [ 0.7175507 , 0.08716212, 0.34129974],\n    [ 0.72398193, 0.08688725, 0.33943958],\n    [ 0.73035829, 0.0868623 , 0.33748452],\n    [ 0.73669146, 0.08704683, 0.33543669],\n    [ 0.74297501, 0.08747196, 0.33329799],\n    [ 0.74919318, 0.08820542, 0.33107204],\n    [ 0.75535825, 0.08919792, 0.32876184],\n    [ 0.76145589, 0.09050716, 0.32637117],\n    [ 0.76748424, 0.09213602, 0.32390525],\n    [ 0.77344838, 0.09405684, 0.32136808],\n    [ 0.77932641, 0.09634794, 0.31876642],\n    [ 0.78513609, 0.09892473, 0.31610488],\n    [ 0.79085854, 0.10184672, 0.313391  ],\n    [ 0.7965014 , 0.10506637, 0.31063031],\n    [ 0.80205987, 0.10858333, 0.30783   ],\n    [ 0.80752799, 0.11239964, 0.30499738],\n    [ 0.81291606, 0.11645784, 0.30213802],\n    [ 0.81820481, 0.12080606, 0.29926105],\n    [ 0.82341472, 0.12535343, 0.2963705 ],\n    [ 0.82852822, 0.13014118, 0.29347474],\n    [ 0.83355779, 0.13511035, 0.29057852],\n    [ 0.83850183, 0.14025098, 0.2876878 ],\n    [ 0.84335441, 0.14556683, 0.28480819],\n    [ 0.84813096, 0.15099892, 0.281943  ],\n    [ 0.85281737, 0.15657772, 0.27909826],\n    [ 0.85742602, 0.1622583 , 0.27627462],\n    [ 0.86196552, 0.16801239, 0.27346473],\n    [ 0.86641628, 0.17387796, 0.27070818],\n    [ 0.87079129, 0.17982114, 0.26797378],\n    [ 0.87507281, 0.18587368, 0.26529697],\n    [ 0.87925878, 0.19203259, 0.26268136],\n    [ 0.8833417 , 0.19830556, 0.26014181],\n    [ 0.88731387, 0.20469941, 0.25769539],\n    [ 0.89116859, 0.21121788, 0.2553592 ],\n    [ 0.89490337, 0.21785614, 0.25314362],\n    [ 0.8985026 , 0.22463251, 0.25108745],\n    [ 0.90197527, 0.23152063, 0.24918223],\n    [ 0.90530097, 0.23854541, 0.24748098],\n    [ 0.90848638, 0.24568473, 0.24598324],\n    [ 0.911533  , 0.25292623, 0.24470258],\n    [ 0.9144225 , 0.26028902, 0.24369359],\n    [ 0.91717106, 0.26773821, 0.24294137],\n    [ 0.91978131, 0.27526191, 0.24245973],\n    [ 0.92223947, 0.28287251, 0.24229568],\n    [ 0.92456587, 0.29053388, 0.24242622],\n    [ 0.92676657, 0.29823282, 0.24285536],\n    [ 0.92882964, 0.30598085, 0.24362274],\n    [ 0.93078135, 0.31373977, 0.24468803],\n    [ 0.93262051, 0.3215093 , 0.24606461],\n    [ 0.93435067, 0.32928362, 0.24775328],\n    [ 0.93599076, 0.33703942, 0.24972157],\n    [ 0.93752831, 0.34479177, 0.25199928],\n    [ 0.93899289, 0.35250734, 0.25452808],\n    [ 0.94036561, 0.36020899, 0.25734661],\n    [ 0.94167588, 0.36786594, 0.2603949 ],\n    [ 0.94291042, 0.37549479, 0.26369821],\n    [ 0.94408513, 0.3830811 , 0.26722004],\n    [ 0.94520419, 0.39062329, 0.27094924],\n    [ 0.94625977, 0.39813168, 0.27489742],\n    [ 0.94727016, 0.4055909 , 0.27902322],\n    [ 0.94823505, 0.41300424, 0.28332283],\n    [ 0.94914549, 0.42038251, 0.28780969],\n    [ 0.95001704, 0.42771398, 0.29244728],\n    [ 0.95085121, 0.43500005, 0.29722817],\n    [ 0.95165009, 0.44224144, 0.30214494],\n    [ 0.9524044 , 0.44944853, 0.3072105 ],\n    [ 0.95312556, 0.45661389, 0.31239776],\n    [ 0.95381595, 0.46373781, 0.31769923],\n    [ 0.95447591, 0.47082238, 0.32310953],\n    [ 0.95510255, 0.47787236, 0.32862553],\n    [ 0.95569679, 0.48489115, 0.33421404],\n    [ 0.95626788, 0.49187351, 0.33985601],\n    [ 0.95681685, 0.49882008, 0.34555431],\n    [ 0.9573439 , 0.50573243, 0.35130912],\n    [ 0.95784842, 0.51261283, 0.35711942],\n    [ 0.95833051, 0.51946267, 0.36298589],\n    [ 0.95879054, 0.52628305, 0.36890904],\n    [ 0.95922872, 0.53307513, 0.3748895 ],\n    [ 0.95964538, 0.53983991, 0.38092784],\n    [ 0.96004345, 0.54657593, 0.3870292 ],\n    [ 0.96042097, 0.55328624, 0.39319057],\n    [ 0.96077819, 0.55997184, 0.39941173],\n    [ 0.9611152 , 0.5666337 , 0.40569343],\n    [ 0.96143273, 0.57327231, 0.41203603],\n    [ 0.96173392, 0.57988594, 0.41844491],\n    [ 0.96201757, 0.58647675, 0.42491751],\n    [ 0.96228344, 0.59304598, 0.43145271],\n    [ 0.96253168, 0.5995944 , 0.43805131],\n    [ 0.96276513, 0.60612062, 0.44471698],\n    [ 0.96298491, 0.6126247 , 0.45145074],\n    [ 0.96318967, 0.61910879, 0.45824902],\n    [ 0.96337949, 0.6255736 , 0.46511271],\n    [ 0.96355923, 0.63201624, 0.47204746],\n    [ 0.96372785, 0.63843852, 0.47905028],\n    [ 0.96388426, 0.64484214, 0.4861196 ],\n    [ 0.96403203, 0.65122535, 0.4932578 ],\n    [ 0.96417332, 0.65758729, 0.50046894],\n    [ 0.9643063 , 0.66393045, 0.5077467 ],\n    [ 0.96443322, 0.67025402, 0.51509334],\n    [ 0.96455845, 0.67655564, 0.52251447],\n    [ 0.96467922, 0.68283846, 0.53000231],\n    [ 0.96479861, 0.68910113, 0.53756026],\n    [ 0.96492035, 0.69534192, 0.5451917 ],\n    [ 0.96504223, 0.7015636 , 0.5528892 ],\n    [ 0.96516917, 0.70776351, 0.5606593 ],\n    [ 0.96530224, 0.71394212, 0.56849894],\n    [ 0.96544032, 0.72010124, 0.57640375],\n    [ 0.96559206, 0.72623592, 0.58438387],\n    [ 0.96575293, 0.73235058, 0.59242739],\n    [ 0.96592829, 0.73844258, 0.60053991],\n    [ 0.96612013, 0.74451182, 0.60871954],\n    [ 0.96632832, 0.75055966, 0.61696136],\n    [ 0.96656022, 0.75658231, 0.62527295],\n    [ 0.96681185, 0.76258381, 0.63364277],\n    [ 0.96709183, 0.76855969, 0.64207921],\n    [ 0.96739773, 0.77451297, 0.65057302],\n    [ 0.96773482, 0.78044149, 0.65912731],\n    [ 0.96810471, 0.78634563, 0.66773889],\n    [ 0.96850919, 0.79222565, 0.6764046 ],\n    [ 0.96893132, 0.79809112, 0.68512266],\n    [ 0.96935926, 0.80395415, 0.69383201],\n    [ 0.9698028 , 0.80981139, 0.70252255],\n    [ 0.97025511, 0.81566605, 0.71120296],\n    [ 0.97071849, 0.82151775, 0.71987163],\n    [ 0.97120159, 0.82736371, 0.72851999],\n    [ 0.97169389, 0.83320847, 0.73716071],\n    [ 0.97220061, 0.83905052, 0.74578903],\n    [ 0.97272597, 0.84488881, 0.75440141],\n    [ 0.97327085, 0.85072354, 0.76299805],\n    [ 0.97383206, 0.85655639, 0.77158353],\n    [ 0.97441222, 0.86238689, 0.78015619],\n    [ 0.97501782, 0.86821321, 0.78871034],\n    [ 0.97564391, 0.87403763, 0.79725261],\n    [ 0.97628674, 0.87986189, 0.8057883 ],\n    [ 0.97696114, 0.88568129, 0.81430324],\n    [ 0.97765722, 0.89149971, 0.82280948],\n    [ 0.97837585, 0.89731727, 0.83130786],\n    [ 0.97912374, 0.90313207, 0.83979337],\n    [ 0.979891  , 0.90894778, 0.84827858],\n    [ 0.98067764, 0.91476465, 0.85676611],\n    [ 0.98137749, 0.92061729, 0.86536915]\n]\n\n_mako_lut = [\n    [ 0.04503935, 0.01482344, 0.02092227],\n    [ 0.04933018, 0.01709292, 0.02535719],\n    [ 0.05356262, 0.01950702, 0.03018802],\n    [ 0.05774337, 0.02205989, 0.03545515],\n    [ 0.06188095, 0.02474764, 0.04115287],\n    [ 0.06598247, 0.0275665 , 0.04691409],\n    [ 0.07005374, 0.03051278, 0.05264306],\n    [ 0.07409947, 0.03358324, 0.05834631],\n    [ 0.07812339, 0.03677446, 0.06403249],\n    [ 0.08212852, 0.0400833 , 0.06970862],\n    [ 0.08611731, 0.04339148, 0.07538208],\n    [ 0.09009161, 0.04664706, 0.08105568],\n    [ 0.09405308, 0.04985685, 0.08673591],\n    [ 0.09800301, 0.05302279, 0.09242646],\n    [ 0.10194255, 0.05614641, 0.09813162],\n    [ 0.10587261, 0.05922941, 0.103854  ],\n    [ 0.1097942 , 0.06227277, 0.10959847],\n    [ 0.11370826, 0.06527747, 0.11536893],\n    [ 0.11761516, 0.06824548, 0.12116393],\n    [ 0.12151575, 0.07117741, 0.12698763],\n    [ 0.12541095, 0.07407363, 0.1328442 ],\n    [ 0.12930083, 0.07693611, 0.13873064],\n    [ 0.13317849, 0.07976988, 0.14465095],\n    [ 0.13701138, 0.08259683, 0.15060265],\n    [ 0.14079223, 0.08542126, 0.15659379],\n    [ 0.14452486, 0.08824175, 0.16262484],\n    [ 0.14820351, 0.09106304, 0.16869476],\n    [ 0.15183185, 0.09388372, 0.17480366],\n    [ 0.15540398, 0.09670855, 0.18094993],\n    [ 0.15892417, 0.09953561, 0.18713384],\n    [ 0.16238588, 0.10236998, 0.19335329],\n    [ 0.16579435, 0.10520905, 0.19960847],\n    [ 0.16914226, 0.10805832, 0.20589698],\n    [ 0.17243586, 0.11091443, 0.21221911],\n    [ 0.17566717, 0.11378321, 0.21857219],\n    [ 0.17884322, 0.11666074, 0.2249565 ],\n    [ 0.18195582, 0.11955283, 0.23136943],\n    [ 0.18501213, 0.12245547, 0.23781116],\n    [ 0.18800459, 0.12537395, 0.24427914],\n    [ 0.19093944, 0.1283047 , 0.25077369],\n    [ 0.19381092, 0.13125179, 0.25729255],\n    [ 0.19662307, 0.13421303, 0.26383543],\n    [ 0.19937337, 0.13719028, 0.27040111],\n    [ 0.20206187, 0.14018372, 0.27698891],\n    [ 0.20469116, 0.14319196, 0.28359861],\n    [ 0.20725547, 0.14621882, 0.29022775],\n    [ 0.20976258, 0.14925954, 0.29687795],\n    [ 0.21220409, 0.15231929, 0.30354703],\n    [ 0.21458611, 0.15539445, 0.31023563],\n    [ 0.21690827, 0.15848519, 0.31694355],\n    [ 0.21916481, 0.16159489, 0.32366939],\n    [ 0.2213631 , 0.16471913, 0.33041431],\n    [ 0.22349947, 0.1678599 , 0.33717781],\n    [ 0.2255714 , 0.1710185 , 0.34395925],\n    [ 0.22758415, 0.17419169, 0.35075983],\n    [ 0.22953569, 0.17738041, 0.35757941],\n    [ 0.23142077, 0.18058733, 0.3644173 ],\n    [ 0.2332454 , 0.18380872, 0.37127514],\n    [ 0.2350092 , 0.18704459, 0.3781528 ],\n    [ 0.23670785, 0.190297  , 0.38504973],\n    [ 0.23834119, 0.19356547, 0.39196711],\n    [ 0.23991189, 0.19684817, 0.39890581],\n    [ 0.24141903, 0.20014508, 0.4058667 ],\n    [ 0.24286214, 0.20345642, 0.4128484 ],\n    [ 0.24423453, 0.20678459, 0.41985299],\n    [ 0.24554109, 0.21012669, 0.42688124],\n    [ 0.2467815 , 0.21348266, 0.43393244],\n    [ 0.24795393, 0.21685249, 0.4410088 ],\n    [ 0.24905614, 0.22023618, 0.448113  ],\n    [ 0.25007383, 0.22365053, 0.45519562],\n    [ 0.25098926, 0.22710664, 0.46223892],\n    [ 0.25179696, 0.23060342, 0.46925447],\n    [ 0.25249346, 0.23414353, 0.47623196],\n    [ 0.25307401, 0.23772973, 0.48316271],\n    [ 0.25353152, 0.24136961, 0.49001976],\n    [ 0.25386167, 0.24506548, 0.49679407],\n    [ 0.25406082, 0.2488164 , 0.50348932],\n    [ 0.25412435, 0.25262843, 0.51007843],\n    [ 0.25404842, 0.25650743, 0.51653282],\n    [ 0.25383134, 0.26044852, 0.52286845],\n    [ 0.2534705 , 0.26446165, 0.52903422],\n    [ 0.25296722, 0.2685428 , 0.53503572],\n    [ 0.2523226 , 0.27269346, 0.54085315],\n    [ 0.25153974, 0.27691629, 0.54645752],\n    [ 0.25062402, 0.28120467, 0.55185939],\n    [ 0.24958205, 0.28556371, 0.55701246],\n    [ 0.24842386, 0.28998148, 0.56194601],\n    [ 0.24715928, 0.29446327, 0.56660884],\n    [ 0.24580099, 0.29899398, 0.57104399],\n    [ 0.24436202, 0.30357852, 0.57519929],\n    [ 0.24285591, 0.30819938, 0.57913247],\n    [ 0.24129828, 0.31286235, 0.58278615],\n    [ 0.23970131, 0.3175495 , 0.5862272 ],\n    [ 0.23807973, 0.32226344, 0.58941872],\n    [ 0.23644557, 0.32699241, 0.59240198],\n    [ 0.2348113 , 0.33173196, 0.59518282],\n    [ 0.23318874, 0.33648036, 0.59775543],\n    [ 0.2315855 , 0.34122763, 0.60016456],\n    [ 0.23001121, 0.34597357, 0.60240251],\n    [ 0.2284748 , 0.35071512, 0.6044784 ],\n    [ 0.22698081, 0.35544612, 0.60642528],\n    [ 0.22553305, 0.36016515, 0.60825252],\n    [ 0.22413977, 0.36487341, 0.60994938],\n    [ 0.22280246, 0.36956728, 0.61154118],\n    [ 0.22152555, 0.37424409, 0.61304472],\n    [ 0.22030752, 0.37890437, 0.61446646],\n    [ 0.2191538 , 0.38354668, 0.61581561],\n    [ 0.21806257, 0.38817169, 0.61709794],\n    [ 0.21703799, 0.39277882, 0.61831922],\n    [ 0.21607792, 0.39736958, 0.61948028],\n    [ 0.21518463, 0.40194196, 0.62059763],\n    [ 0.21435467, 0.40649717, 0.62167507],\n    [ 0.21358663, 0.41103579, 0.62271724],\n    [ 0.21288172, 0.41555771, 0.62373011],\n    [ 0.21223835, 0.42006355, 0.62471794],\n    [ 0.21165312, 0.42455441, 0.62568371],\n    [ 0.21112526, 0.42903064, 0.6266318 ],\n    [ 0.21065161, 0.43349321, 0.62756504],\n    [ 0.21023306, 0.43794288, 0.62848279],\n    [ 0.20985996, 0.44238227, 0.62938329],\n    [ 0.20951045, 0.44680966, 0.63030696],\n    [ 0.20916709, 0.45122981, 0.63124483],\n    [ 0.20882976, 0.45564335, 0.63219599],\n    [ 0.20849798, 0.46005094, 0.63315928],\n    [ 0.20817199, 0.46445309, 0.63413391],\n    [ 0.20785149, 0.46885041, 0.63511876],\n    [ 0.20753716, 0.47324327, 0.63611321],\n    [ 0.20722876, 0.47763224, 0.63711608],\n    [ 0.20692679, 0.48201774, 0.63812656],\n    [ 0.20663156, 0.48640018, 0.63914367],\n    [ 0.20634336, 0.49078002, 0.64016638],\n    [ 0.20606303, 0.49515755, 0.6411939 ],\n    [ 0.20578999, 0.49953341, 0.64222457],\n    [ 0.20552612, 0.50390766, 0.64325811],\n    [ 0.20527189, 0.50828072, 0.64429331],\n    [ 0.20502868, 0.51265277, 0.64532947],\n    [ 0.20479718, 0.51702417, 0.64636539],\n    [ 0.20457804, 0.52139527, 0.64739979],\n    [ 0.20437304, 0.52576622, 0.64843198],\n    [ 0.20418396, 0.53013715, 0.64946117],\n    [ 0.20401238, 0.53450825, 0.65048638],\n    [ 0.20385896, 0.53887991, 0.65150606],\n    [ 0.20372653, 0.54325208, 0.65251978],\n    [ 0.20361709, 0.5476249 , 0.6535266 ],\n    [ 0.20353258, 0.55199854, 0.65452542],\n    [ 0.20347472, 0.55637318, 0.655515  ],\n    [ 0.20344718, 0.56074869, 0.65649508],\n    [ 0.20345161, 0.56512531, 0.65746419],\n    [ 0.20349089, 0.56950304, 0.65842151],\n    [ 0.20356842, 0.57388184, 0.65936642],\n    [ 0.20368663, 0.57826181, 0.66029768],\n    [ 0.20384884, 0.58264293, 0.6612145 ],\n    [ 0.20405904, 0.58702506, 0.66211645],\n    [ 0.20431921, 0.59140842, 0.66300179],\n    [ 0.20463464, 0.59579264, 0.66387079],\n    [ 0.20500731, 0.60017798, 0.66472159],\n    [ 0.20544449, 0.60456387, 0.66555409],\n    [ 0.20596097, 0.60894927, 0.66636568],\n    [ 0.20654832, 0.61333521, 0.66715744],\n    [ 0.20721003, 0.61772167, 0.66792838],\n    [ 0.20795035, 0.62210845, 0.66867802],\n    [ 0.20877302, 0.62649546, 0.66940555],\n    [ 0.20968223, 0.63088252, 0.6701105 ],\n    [ 0.21068163, 0.63526951, 0.67079211],\n    [ 0.21177544, 0.63965621, 0.67145005],\n    [ 0.21298582, 0.64404072, 0.67208182],\n    [ 0.21430361, 0.64842404, 0.67268861],\n    [ 0.21572716, 0.65280655, 0.67326978],\n    [ 0.21726052, 0.65718791, 0.6738255 ],\n    [ 0.21890636, 0.66156803, 0.67435491],\n    [ 0.220668  , 0.66594665, 0.67485792],\n    [ 0.22255447, 0.67032297, 0.67533374],\n    [ 0.22458372, 0.67469531, 0.67578061],\n    [ 0.22673713, 0.67906542, 0.67620044],\n    [ 0.22901625, 0.6834332 , 0.67659251],\n    [ 0.23142316, 0.68779836, 0.67695703],\n    [ 0.23395924, 0.69216072, 0.67729378],\n    [ 0.23663857, 0.69651881, 0.67760151],\n    [ 0.23946645, 0.70087194, 0.67788018],\n    [ 0.24242624, 0.70522162, 0.67813088],\n    [ 0.24549008, 0.70957083, 0.67835215],\n    [ 0.24863372, 0.71392166, 0.67854868],\n    [ 0.25187832, 0.71827158, 0.67872193],\n    [ 0.25524083, 0.72261873, 0.67887024],\n    [ 0.25870947, 0.72696469, 0.67898912],\n    [ 0.26229238, 0.73130855, 0.67907645],\n    [ 0.26604085, 0.73564353, 0.67914062],\n    [ 0.26993099, 0.73997282, 0.67917264],\n    [ 0.27397488, 0.74429484, 0.67917096],\n    [ 0.27822463, 0.74860229, 0.67914468],\n    [ 0.28264201, 0.75290034, 0.67907959],\n    [ 0.2873016 , 0.75717817, 0.67899164],\n    [ 0.29215894, 0.76144162, 0.67886578],\n    [ 0.29729823, 0.76567816, 0.67871894],\n    [ 0.30268199, 0.76989232, 0.67853896],\n    [ 0.30835665, 0.77407636, 0.67833512],\n    [ 0.31435139, 0.77822478, 0.67811118],\n    [ 0.3206671 , 0.78233575, 0.67786729],\n    [ 0.32733158, 0.78640315, 0.67761027],\n    [ 0.33437168, 0.79042043, 0.67734882],\n    [ 0.34182112, 0.79437948, 0.67709394],\n    [ 0.34968889, 0.79827511, 0.67685638],\n    [ 0.35799244, 0.80210037, 0.67664969],\n    [ 0.36675371, 0.80584651, 0.67649539],\n    [ 0.3759816 , 0.80950627, 0.67641393],\n    [ 0.38566792, 0.81307432, 0.67642947],\n    [ 0.39579804, 0.81654592, 0.67656899],\n    [ 0.40634556, 0.81991799, 0.67686215],\n    [ 0.41730243, 0.82318339, 0.67735255],\n    [ 0.4285828 , 0.82635051, 0.6780564 ],\n    [ 0.44012728, 0.82942353, 0.67900049],\n    [ 0.45189421, 0.83240398, 0.68021733],\n    [ 0.46378379, 0.83530763, 0.6817062 ],\n    [ 0.47573199, 0.83814472, 0.68347352],\n    [ 0.48769865, 0.84092197, 0.68552698],\n    [ 0.49962354, 0.84365379, 0.68783929],\n    [ 0.5114027 , 0.8463718 , 0.69029789],\n    [ 0.52301693, 0.84908401, 0.69288545],\n    [ 0.53447549, 0.85179048, 0.69561066],\n    [ 0.54578602, 0.8544913 , 0.69848331],\n    [ 0.55695565, 0.85718723, 0.70150427],\n    [ 0.56798832, 0.85987893, 0.70468261],\n    [ 0.57888639, 0.86256715, 0.70802931],\n    [ 0.5896541 , 0.8652532 , 0.71154204],\n    [ 0.60028928, 0.86793835, 0.71523675],\n    [ 0.61079441, 0.87062438, 0.71910895],\n    [ 0.62116633, 0.87331311, 0.72317003],\n    [ 0.63140509, 0.87600675, 0.72741689],\n    [ 0.64150735, 0.87870746, 0.73185717],\n    [ 0.65147219, 0.8814179 , 0.73648495],\n    [ 0.66129632, 0.8841403 , 0.74130658],\n    [ 0.67097934, 0.88687758, 0.74631123],\n    [ 0.68051833, 0.88963189, 0.75150483],\n    [ 0.68991419, 0.89240612, 0.75687187],\n    [ 0.69916533, 0.89520211, 0.76241714],\n    [ 0.70827373, 0.89802257, 0.76812286],\n    [ 0.71723995, 0.90086891, 0.77399039],\n    [ 0.72606665, 0.90374337, 0.7800041 ],\n    [ 0.73475675, 0.90664718, 0.78615802],\n    [ 0.74331358, 0.90958151, 0.79244474],\n    [ 0.75174143, 0.91254787, 0.79884925],\n    [ 0.76004473, 0.91554656, 0.80536823],\n    [ 0.76827704, 0.91856549, 0.81196513],\n    [ 0.77647029, 0.921603  , 0.81855729],\n    [ 0.78462009, 0.92466151, 0.82514119],\n    [ 0.79273542, 0.92773848, 0.83172131],\n    [ 0.8008109 , 0.93083672, 0.83829355],\n    [ 0.80885107, 0.93395528, 0.84485982],\n    [ 0.81685878, 0.9370938 , 0.85142101],\n    [ 0.82483206, 0.94025378, 0.8579751 ],\n    [ 0.83277661, 0.94343371, 0.86452477],\n    [ 0.84069127, 0.94663473, 0.87106853],\n    [ 0.84857662, 0.9498573 , 0.8776059 ],\n    [ 0.8564431 , 0.95309792, 0.88414253],\n    [ 0.86429066, 0.95635719, 0.89067759],\n    [ 0.87218969, 0.95960708, 0.89725384]\n]\n\n_vlag_lut = [\n    [ 0.13850039, 0.41331206, 0.74052025],\n    [ 0.15077609, 0.41762684, 0.73970427],\n    [ 0.16235219, 0.4219191 , 0.7389667 ],\n    [ 0.1733322 , 0.42619024, 0.73832537],\n    [ 0.18382538, 0.43044226, 0.73776764],\n    [ 0.19394034, 0.4346772 , 0.73725867],\n    [ 0.20367115, 0.43889576, 0.73685314],\n    [ 0.21313625, 0.44310003, 0.73648045],\n    [ 0.22231173, 0.44729079, 0.73619681],\n    [ 0.23125148, 0.45146945, 0.73597803],\n    [ 0.23998101, 0.45563715, 0.7358223 ],\n    [ 0.24853358, 0.45979489, 0.73571524],\n    [ 0.25691416, 0.4639437 , 0.73566943],\n    [ 0.26513894, 0.46808455, 0.73568319],\n    [ 0.27322194, 0.47221835, 0.73575497],\n    [ 0.28117543, 0.47634598, 0.73588332],\n    [ 0.28901021, 0.48046826, 0.73606686],\n    [ 0.2967358 , 0.48458597, 0.73630433],\n    [ 0.30436071, 0.48869986, 0.73659451],\n    [ 0.3118955 , 0.49281055, 0.73693255],\n    [ 0.31935389, 0.49691847, 0.73730851],\n    [ 0.32672701, 0.5010247 , 0.73774013],\n    [ 0.33402607, 0.50512971, 0.73821941],\n    [ 0.34125337, 0.50923419, 0.73874905],\n    [ 0.34840921, 0.51333892, 0.73933402],\n    [ 0.35551826, 0.51744353, 0.73994642],\n    [ 0.3625676 , 0.52154929, 0.74060763],\n    [ 0.36956356, 0.52565656, 0.74131327],\n    [ 0.37649902, 0.52976642, 0.74207698],\n    [ 0.38340273, 0.53387791, 0.74286286],\n    [ 0.39025859, 0.53799253, 0.7436962 ],\n    [ 0.39706821, 0.54211081, 0.744578  ],\n    [ 0.40384046, 0.54623277, 0.74549872],\n    [ 0.41058241, 0.55035849, 0.74645094],\n    [ 0.41728385, 0.55448919, 0.74745174],\n    [ 0.42395178, 0.55862494, 0.74849357],\n    [ 0.4305964 , 0.56276546, 0.74956387],\n    [ 0.4372044 , 0.56691228, 0.75068412],\n    [ 0.4437909 , 0.57106468, 0.75183427],\n    [ 0.45035117, 0.5752235 , 0.75302312],\n    [ 0.45687824, 0.57938983, 0.75426297],\n    [ 0.46339713, 0.58356191, 0.75551816],\n    [ 0.46988778, 0.58774195, 0.75682037],\n    [ 0.47635605, 0.59192986, 0.75816245],\n    [ 0.48281101, 0.5961252 , 0.75953212],\n    [ 0.4892374 , 0.60032986, 0.76095418],\n    [ 0.49566225, 0.60454154, 0.76238852],\n    [ 0.50206137, 0.60876307, 0.76387371],\n    [ 0.50845128, 0.61299312, 0.76538551],\n    [ 0.5148258 , 0.61723272, 0.76693475],\n    [ 0.52118385, 0.62148236, 0.76852436],\n    [ 0.52753571, 0.62574126, 0.77013939],\n    [ 0.53386831, 0.63001125, 0.77180152],\n    [ 0.54020159, 0.63429038, 0.7734803 ],\n    [ 0.54651272, 0.63858165, 0.77521306],\n    [ 0.55282975, 0.64288207, 0.77695608],\n    [ 0.55912585, 0.64719519, 0.77875327],\n    [ 0.56542599, 0.65151828, 0.78056551],\n    [ 0.57170924, 0.65585426, 0.78242747],\n    [ 0.57799572, 0.6602009 , 0.78430751],\n    [ 0.58426817, 0.66456073, 0.78623458],\n    [ 0.590544  , 0.66893178, 0.78818117],\n    [ 0.59680758, 0.67331643, 0.79017369],\n    [ 0.60307553, 0.67771273, 0.79218572],\n    [ 0.60934065, 0.68212194, 0.79422987],\n    [ 0.61559495, 0.68654548, 0.7963202 ],\n    [ 0.62185554, 0.69098125, 0.79842918],\n    [ 0.62810662, 0.69543176, 0.80058381],\n    [ 0.63436425, 0.69989499, 0.80275812],\n    [ 0.64061445, 0.70437326, 0.80497621],\n    [ 0.6468706 , 0.70886488, 0.80721641],\n    [ 0.65312213, 0.7133717 , 0.80949719],\n    [ 0.65937818, 0.71789261, 0.81180392],\n    [ 0.66563334, 0.72242871, 0.81414642],\n    [ 0.67189155, 0.72697967, 0.81651872],\n    [ 0.67815314, 0.73154569, 0.81892097],\n    [ 0.68441395, 0.73612771, 0.82136094],\n    [ 0.69068321, 0.74072452, 0.82382353],\n    [ 0.69694776, 0.7453385 , 0.82633199],\n    [ 0.70322431, 0.74996721, 0.8288583 ],\n    [ 0.70949595, 0.75461368, 0.83143221],\n    [ 0.7157774 , 0.75927574, 0.83402904],\n    [ 0.72206299, 0.76395461, 0.83665922],\n    [ 0.72835227, 0.76865061, 0.8393242 ],\n    [ 0.73465238, 0.7733628 , 0.84201224],\n    [ 0.74094862, 0.77809393, 0.84474951],\n    [ 0.74725683, 0.78284158, 0.84750915],\n    [ 0.75357103, 0.78760701, 0.85030217],\n    [ 0.75988961, 0.79239077, 0.85313207],\n    [ 0.76621987, 0.79719185, 0.85598668],\n    [ 0.77255045, 0.8020125 , 0.85888658],\n    [ 0.77889241, 0.80685102, 0.86181298],\n    [ 0.78524572, 0.81170768, 0.86476656],\n    [ 0.79159841, 0.81658489, 0.86776906],\n    [ 0.79796459, 0.82148036, 0.8707962 ],\n    [ 0.80434168, 0.82639479, 0.87385315],\n    [ 0.8107221 , 0.83132983, 0.87695392],\n    [ 0.81711301, 0.8362844 , 0.88008641],\n    [ 0.82351479, 0.84125863, 0.88325045],\n    [ 0.82992772, 0.84625263, 0.88644594],\n    [ 0.83634359, 0.85126806, 0.8896878 ],\n    [ 0.84277295, 0.85630293, 0.89295721],\n    [ 0.84921192, 0.86135782, 0.89626076],\n    [ 0.85566206, 0.866432  , 0.89959467],\n    [ 0.86211514, 0.87152627, 0.90297183],\n    [ 0.86857483, 0.87663856, 0.90638248],\n    [ 0.87504231, 0.88176648, 0.90981938],\n    [ 0.88151194, 0.88690782, 0.91328493],\n    [ 0.88797938, 0.89205857, 0.91677544],\n    [ 0.89443865, 0.89721298, 0.9202854 ],\n    [ 0.90088204, 0.90236294, 0.92380601],\n    [ 0.90729768, 0.90749778, 0.92732797],\n    [ 0.91367037, 0.91260329, 0.93083814],\n    [ 0.91998105, 0.91766106, 0.93431861],\n    [ 0.92620596, 0.92264789, 0.93774647],\n    [ 0.93231683, 0.9275351 , 0.94109192],\n    [ 0.93827772, 0.9322888 , 0.94432312],\n    [ 0.94404755, 0.93686925, 0.94740137],\n    [ 0.94958284, 0.94123072, 0.95027696],\n    [ 0.95482682, 0.9453245 , 0.95291103],\n    [ 0.9597248 , 0.94909728, 0.95525103],\n    [ 0.96422552, 0.95249273, 0.95723271],\n    [ 0.96826161, 0.95545812, 0.95882188],\n    [ 0.97178458, 0.95793984, 0.95995705],\n    [ 0.97474105, 0.95989142, 0.96059997],\n    [ 0.97708604, 0.96127366, 0.96071853],\n    [ 0.97877855, 0.96205832, 0.96030095],\n    [ 0.97978484, 0.96222949, 0.95935496],\n    [ 0.9805997 , 0.96155216, 0.95813083],\n    [ 0.98152619, 0.95993719, 0.95639322],\n    [ 0.9819726 , 0.95766608, 0.95399269],\n    [ 0.98191855, 0.9547873 , 0.95098107],\n    [ 0.98138514, 0.95134771, 0.94740644],\n    [ 0.98040845, 0.94739906, 0.94332125],\n    [ 0.97902107, 0.94300131, 0.93878672],\n    [ 0.97729348, 0.93820409, 0.93385135],\n    [ 0.9752533 , 0.933073  , 0.92858252],\n    [ 0.97297834, 0.92765261, 0.92302309],\n    [ 0.97049104, 0.92200317, 0.91723505],\n    [ 0.96784372, 0.91616744, 0.91126063],\n    [ 0.96507281, 0.91018664, 0.90514124],\n    [ 0.96222034, 0.90409203, 0.89890756],\n    [ 0.9593079 , 0.89791478, 0.89259122],\n    [ 0.95635626, 0.89167908, 0.88621654],\n    [ 0.95338303, 0.88540373, 0.87980238],\n    [ 0.95040174, 0.87910333, 0.87336339],\n    [ 0.94742246, 0.87278899, 0.86691076],\n    [ 0.94445249, 0.86646893, 0.86045277],\n    [ 0.94150476, 0.86014606, 0.85399191],\n    [ 0.93857394, 0.85382798, 0.84753642],\n    [ 0.93566206, 0.84751766, 0.84108935],\n    [ 0.93277194, 0.8412164 , 0.83465197],\n    [ 0.92990106, 0.83492672, 0.82822708],\n    [ 0.92704736, 0.82865028, 0.82181656],\n    [ 0.92422703, 0.82238092, 0.81541333],\n    [ 0.92142581, 0.81612448, 0.80902415],\n    [ 0.91864501, 0.80988032, 0.80264838],\n    [ 0.91587578, 0.80365187, 0.79629001],\n    [ 0.9131367 , 0.79743115, 0.78994   ],\n    [ 0.91041602, 0.79122265, 0.78360361],\n    [ 0.90771071, 0.78502727, 0.77728196],\n    [ 0.90501581, 0.77884674, 0.7709771 ],\n    [ 0.90235365, 0.77267117, 0.76467793],\n    [ 0.8997019 , 0.76650962, 0.75839484],\n    [ 0.89705346, 0.76036481, 0.752131  ],\n    [ 0.89444021, 0.75422253, 0.74587047],\n    [ 0.89183355, 0.74809474, 0.73962689],\n    [ 0.88923216, 0.74198168, 0.73340061],\n    [ 0.88665892, 0.73587283, 0.72717995],\n    [ 0.88408839, 0.72977904, 0.72097718],\n    [ 0.88153537, 0.72369332, 0.71478461],\n    [ 0.87899389, 0.7176179 , 0.70860487],\n    [ 0.87645157, 0.71155805, 0.7024439 ],\n    [ 0.8739399 , 0.70549893, 0.6962854 ],\n    [ 0.87142626, 0.6994551 , 0.69014561],\n    [ 0.8689268 , 0.69341868, 0.68401597],\n    [ 0.86643562, 0.687392  , 0.67789917],\n    [ 0.86394434, 0.68137863, 0.67179927],\n    [ 0.86147586, 0.67536728, 0.665704  ],\n    [ 0.85899928, 0.66937226, 0.6596292 ],\n    [ 0.85654668, 0.66337773, 0.6535577 ],\n    [ 0.85408818, 0.65739772, 0.64750494],\n    [ 0.85164413, 0.65142189, 0.64145983],\n    [ 0.84920091, 0.6454565 , 0.63542932],\n    [ 0.84676427, 0.63949827, 0.62941   ],\n    [ 0.84433231, 0.63354773, 0.62340261],\n    [ 0.84190106, 0.62760645, 0.61740899],\n    [ 0.83947935, 0.62166951, 0.61142404],\n    [ 0.8370538 , 0.61574332, 0.60545478],\n    [ 0.83463975, 0.60981951, 0.59949247],\n    [ 0.83221877, 0.60390724, 0.593547  ],\n    [ 0.82980985, 0.59799607, 0.58760751],\n    [ 0.82740268, 0.59209095, 0.58167944],\n    [ 0.82498638, 0.5861973 , 0.57576866],\n    [ 0.82258181, 0.5803034 , 0.56986307],\n    [ 0.82016611, 0.57442123, 0.56397539],\n    [ 0.81776305, 0.56853725, 0.55809173],\n    [ 0.81534551, 0.56266602, 0.55222741],\n    [ 0.81294293, 0.55679056, 0.5463651 ],\n    [ 0.81052113, 0.55092973, 0.54052443],\n    [ 0.80811509, 0.54506305, 0.53468464],\n    [ 0.80568952, 0.53921036, 0.52886622],\n    [ 0.80327506, 0.53335335, 0.52305077],\n    [ 0.80084727, 0.52750583, 0.51725256],\n    [ 0.79842217, 0.5216578 , 0.51146173],\n    [ 0.79599382, 0.51581223, 0.50568155],\n    [ 0.79355781, 0.50997127, 0.49991444],\n    [ 0.79112596, 0.50412707, 0.49415289],\n    [ 0.78867442, 0.49829386, 0.48841129],\n    [ 0.7862306 , 0.49245398, 0.48267247],\n    [ 0.7837687 , 0.48662309, 0.47695216],\n    [ 0.78130809, 0.4807883 , 0.47123805],\n    [ 0.77884467, 0.47495151, 0.46553236],\n    [ 0.77636283, 0.46912235, 0.45984473],\n    [ 0.77388383, 0.46328617, 0.45416141],\n    [ 0.77138912, 0.45745466, 0.44849398],\n    [ 0.76888874, 0.45162042, 0.44283573],\n    [ 0.76638802, 0.44577901, 0.43718292],\n    [ 0.76386116, 0.43994762, 0.43155211],\n    [ 0.76133542, 0.43410655, 0.42592523],\n    [ 0.75880631, 0.42825801, 0.42030488],\n    [ 0.75624913, 0.42241905, 0.41470727],\n    [ 0.7536919 , 0.41656866, 0.40911347],\n    [ 0.75112748, 0.41071104, 0.40352792],\n    [ 0.74854331, 0.40485474, 0.3979589 ],\n    [ 0.74594723, 0.39899309, 0.39240088],\n    [ 0.74334332, 0.39312199, 0.38685075],\n    [ 0.74073277, 0.38723941, 0.3813074 ],\n    [ 0.73809409, 0.38136133, 0.37578553],\n    [ 0.73544692, 0.37547129, 0.37027123],\n    [ 0.73278943, 0.36956954, 0.36476549],\n    [ 0.73011829, 0.36365761, 0.35927038],\n    [ 0.72743485, 0.35773314, 0.35378465],\n    [ 0.72472722, 0.35180504, 0.34831662],\n    [ 0.72200473, 0.34586421, 0.34285937],\n    [ 0.71927052, 0.33990649, 0.33741033],\n    [ 0.71652049, 0.33393396, 0.33197219],\n    [ 0.71375362, 0.32794602, 0.32654545],\n    [ 0.71096951, 0.32194148, 0.32113016],\n    [ 0.70816772, 0.31591904, 0.31572637],\n    [ 0.70534784, 0.30987734, 0.31033414],\n    [ 0.70250944, 0.30381489, 0.30495353],\n    [ 0.69965211, 0.2977301 , 0.2995846 ],\n    [ 0.6967754 , 0.29162126, 0.29422741],\n    [ 0.69388446, 0.28548074, 0.28887769],\n    [ 0.69097561, 0.2793096 , 0.28353795],\n    [ 0.68803513, 0.27311993, 0.27821876],\n    [ 0.6850794 , 0.26689144, 0.27290694],\n    [ 0.682108  , 0.26062114, 0.26760246],\n    [ 0.67911013, 0.2543177 , 0.26231367],\n    [ 0.67609393, 0.24796818, 0.25703372],\n    [ 0.67305921, 0.24156846, 0.25176238],\n    [ 0.67000176, 0.23511902, 0.24650278],\n    [ 0.66693423, 0.22859879, 0.24124404],\n    [ 0.6638441 , 0.22201742, 0.2359961 ],\n    [ 0.66080672, 0.21526712, 0.23069468]\n]\n\n_icefire_lut = [\n    [ 0.73936227, 0.90443867, 0.85757238],\n    [ 0.72888063, 0.89639109, 0.85488394],\n    [ 0.71834255, 0.88842162, 0.8521605 ],\n    [ 0.70773866, 0.88052939, 0.849422  ],\n    [ 0.69706215, 0.87271313, 0.84668315],\n    [ 0.68629021, 0.86497329, 0.84398721],\n    [ 0.67543654, 0.85730617, 0.84130969],\n    [ 0.66448539, 0.84971123, 0.83868005],\n    [ 0.65342679, 0.84218728, 0.83611512],\n    [ 0.64231804, 0.83471867, 0.83358584],\n    [ 0.63117745, 0.827294  , 0.83113431],\n    [ 0.62000484, 0.81991069, 0.82876741],\n    [ 0.60879435, 0.81256797, 0.82648905],\n    [ 0.59754118, 0.80526458, 0.82430414],\n    [ 0.58624247, 0.79799884, 0.82221573],\n    [ 0.57489525, 0.7907688 , 0.82022901],\n    [ 0.56349779, 0.78357215, 0.81834861],\n    [ 0.55204294, 0.77640827, 0.81657563],\n    [ 0.54052516, 0.76927562, 0.81491462],\n    [ 0.52894085, 0.76217215, 0.81336913],\n    [ 0.51728854, 0.75509528, 0.81194156],\n    [ 0.50555676, 0.74804469, 0.81063503],\n    [ 0.49373871, 0.7410187 , 0.80945242],\n    [ 0.48183174, 0.73401449, 0.80839675],\n    [ 0.46982587, 0.72703075, 0.80747097],\n    [ 0.45770893, 0.72006648, 0.80667756],\n    [ 0.44547249, 0.71311941, 0.80601991],\n    [ 0.43318643, 0.70617126, 0.80549278],\n    [ 0.42110294, 0.69916972, 0.80506683],\n    [ 0.40925101, 0.69211059, 0.80473246],\n    [ 0.3976693 , 0.68498786, 0.80448272],\n    [ 0.38632002, 0.67781125, 0.80431024],\n    [ 0.37523981, 0.67057537, 0.80420832],\n    [ 0.36442578, 0.66328229, 0.80417474],\n    [ 0.35385939, 0.65593699, 0.80420591],\n    [ 0.34358916, 0.64853177, 0.8043    ],\n    [ 0.33355526, 0.64107876, 0.80445484],\n    [ 0.32383062, 0.63356578, 0.80467091],\n    [ 0.31434372, 0.62600624, 0.8049475 ],\n    [ 0.30516161, 0.618389  , 0.80528692],\n    [ 0.29623491, 0.61072284, 0.80569021],\n    [ 0.28759072, 0.60300319, 0.80616055],\n    [ 0.27923924, 0.59522877, 0.80669803],\n    [ 0.27114651, 0.5874047 , 0.80730545],\n    [ 0.26337153, 0.57952055, 0.80799113],\n    [ 0.25588696, 0.57157984, 0.80875922],\n    [ 0.248686  , 0.56358255, 0.80961366],\n    [ 0.24180668, 0.55552289, 0.81055123],\n    [ 0.23526251, 0.54739477, 0.8115939 ],\n    [ 0.22921445, 0.53918506, 0.81267292],\n    [ 0.22397687, 0.53086094, 0.8137141 ],\n    [ 0.21977058, 0.52241482, 0.81457651],\n    [ 0.21658989, 0.51384321, 0.81528511],\n    [ 0.21452772, 0.50514155, 0.81577278],\n    [ 0.21372783, 0.49630865, 0.81589566],\n    [ 0.21409503, 0.48734861, 0.81566163],\n    [ 0.2157176 , 0.47827123, 0.81487615],\n    [ 0.21842857, 0.46909168, 0.81351614],\n    [ 0.22211705, 0.45983212, 0.81146983],\n    [ 0.22665681, 0.45052233, 0.80860217],\n    [ 0.23176013, 0.44119137, 0.80494325],\n    [ 0.23727775, 0.43187704, 0.80038017],\n    [ 0.24298285, 0.42261123, 0.79493267],\n    [ 0.24865068, 0.41341842, 0.78869164],\n    [ 0.25423116, 0.40433127, 0.78155831],\n    [ 0.25950239, 0.39535521, 0.77376848],\n    [ 0.2644736 , 0.38651212, 0.76524809],\n    [ 0.26901584, 0.37779582, 0.75621942],\n    [ 0.27318141, 0.36922056, 0.746605  ],\n    [ 0.27690355, 0.3607736 , 0.73659374],\n    [ 0.28023585, 0.35244234, 0.72622103],\n    [ 0.28306009, 0.34438449, 0.71500731],\n    [ 0.28535896, 0.33660243, 0.70303975],\n    [ 0.28708711, 0.32912157, 0.69034504],\n    [ 0.28816354, 0.32200604, 0.67684067],\n    [ 0.28862749, 0.31519824, 0.66278813],\n    [ 0.28847904, 0.30869064, 0.6482815 ],\n    [ 0.28770912, 0.30250126, 0.63331265],\n    [ 0.28640325, 0.29655509, 0.61811374],\n    [ 0.28458943, 0.29082155, 0.60280913],\n    [ 0.28233561, 0.28527482, 0.58742866],\n    [ 0.27967038, 0.2798938 , 0.57204225],\n    [ 0.27665361, 0.27465357, 0.55667809],\n    [ 0.27332564, 0.2695165 , 0.54145387],\n    [ 0.26973851, 0.26447054, 0.52634916],\n    [ 0.2659204 , 0.25949691, 0.511417  ],\n    [ 0.26190145, 0.25458123, 0.49668768],\n    [ 0.2577151 , 0.24971691, 0.48214874],\n    [ 0.25337618, 0.24490494, 0.46778758],\n    [ 0.24890842, 0.24013332, 0.45363816],\n    [ 0.24433654, 0.23539226, 0.4397245 ],\n    [ 0.23967922, 0.23067729, 0.4260591 ],\n    [ 0.23495608, 0.22598894, 0.41262952],\n    [ 0.23018113, 0.22132414, 0.39945577],\n    [ 0.22534609, 0.21670847, 0.38645794],\n    [ 0.22048761, 0.21211723, 0.37372555],\n    [ 0.2156198 , 0.20755389, 0.36125301],\n    [ 0.21074637, 0.20302717, 0.34903192],\n    [ 0.20586893, 0.19855368, 0.33701661],\n    [ 0.20101757, 0.19411573, 0.32529173],\n    [ 0.19619947, 0.18972425, 0.31383846],\n    [ 0.19140726, 0.18540157, 0.30260777],\n    [ 0.1866769 , 0.1811332 , 0.29166583],\n    [ 0.18201285, 0.17694992, 0.28088776],\n    [ 0.17745228, 0.17282141, 0.27044211],\n    [ 0.17300684, 0.16876921, 0.26024893],\n    [ 0.16868273, 0.16479861, 0.25034479],\n    [ 0.16448691, 0.16091728, 0.24075373],\n    [ 0.16043195, 0.15714351, 0.23141745],\n    [ 0.15652427, 0.15348248, 0.22238175],\n    [ 0.15277065, 0.14994111, 0.21368395],\n    [ 0.14918274, 0.14653431, 0.20529486],\n    [ 0.14577095, 0.14327403, 0.19720829],\n    [ 0.14254381, 0.14016944, 0.18944326],\n    [ 0.13951035, 0.13723063, 0.18201072],\n    [ 0.13667798, 0.13446606, 0.17493774],\n    [ 0.13405762, 0.13188822, 0.16820842],\n    [ 0.13165767, 0.12950667, 0.16183275],\n    [ 0.12948748, 0.12733187, 0.15580631],\n    [ 0.12755435, 0.1253723 , 0.15014098],\n    [ 0.12586516, 0.12363617, 0.1448459 ],\n    [ 0.12442647, 0.12213143, 0.13992571],\n    [ 0.12324241, 0.12086419, 0.13539995],\n    [ 0.12232067, 0.11984278, 0.13124644],\n    [ 0.12166209, 0.11907077, 0.12749671],\n    [ 0.12126982, 0.11855309, 0.12415079],\n    [ 0.12114244, 0.11829179, 0.1212385 ],\n    [ 0.12127766, 0.11828837, 0.11878534],\n    [ 0.12284806, 0.1179729 , 0.11772022],\n    [ 0.12619498, 0.11721796, 0.11770203],\n    [ 0.129968  , 0.11663788, 0.11792377],\n    [ 0.13410011, 0.11625146, 0.11839138],\n    [ 0.13855459, 0.11606618, 0.11910584],\n    [ 0.14333775, 0.11607038, 0.1200606 ],\n    [ 0.148417  , 0.11626929, 0.12125453],\n    [ 0.15377389, 0.11666192, 0.12268364],\n    [ 0.15941427, 0.11723486, 0.12433911],\n    [ 0.16533376, 0.11797856, 0.12621303],\n    [ 0.17152547, 0.11888403, 0.12829735],\n    [ 0.17797765, 0.11994436, 0.13058435],\n    [ 0.18468769, 0.12114722, 0.13306426],\n    [ 0.19165663, 0.12247737, 0.13572616],\n    [ 0.19884415, 0.12394381, 0.1385669 ],\n    [ 0.20627181, 0.12551883, 0.14157124],\n    [ 0.21394877, 0.12718055, 0.14472604],\n    [ 0.22184572, 0.12893119, 0.14802579],\n    [ 0.22994394, 0.13076731, 0.15146314],\n    [ 0.23823937, 0.13267611, 0.15502793],\n    [ 0.24676041, 0.13462172, 0.15870321],\n    [ 0.25546457, 0.13661751, 0.16248722],\n    [ 0.26433628, 0.13865956, 0.16637301],\n    [ 0.27341345, 0.14070412, 0.17034221],\n    [ 0.28264773, 0.14277192, 0.1743957 ],\n    [ 0.29202272, 0.14486161, 0.17852793],\n    [ 0.30159648, 0.14691224, 0.1827169 ],\n    [ 0.31129002, 0.14897583, 0.18695213],\n    [ 0.32111555, 0.15103351, 0.19119629],\n    [ 0.33107961, 0.1530674 , 0.19543758],\n    [ 0.34119892, 0.15504762, 0.1996803 ],\n    [ 0.35142388, 0.15701131, 0.20389086],\n    [ 0.36178937, 0.1589124 , 0.20807639],\n    [ 0.37229381, 0.16073993, 0.21223189],\n    [ 0.38288348, 0.16254006, 0.2163249 ],\n    [ 0.39359592, 0.16426336, 0.22036577],\n    [ 0.40444332, 0.16588767, 0.22434027],\n    [ 0.41537995, 0.16745325, 0.2282297 ],\n    [ 0.42640867, 0.16894939, 0.23202755],\n    [ 0.43754706, 0.17034847, 0.23572899],\n    [ 0.44878564, 0.1716535 , 0.23932344],\n    [ 0.4601126 , 0.17287365, 0.24278607],\n    [ 0.47151732, 0.17401641, 0.24610337],\n    [ 0.48300689, 0.17506676, 0.2492737 ],\n    [ 0.49458302, 0.17601892, 0.25227688],\n    [ 0.50623876, 0.17687777, 0.255096  ],\n    [ 0.5179623 , 0.17765528, 0.2577162 ],\n    [ 0.52975234, 0.17835232, 0.2601134 ],\n    [ 0.54159776, 0.17898292, 0.26226847],\n    [ 0.55348804, 0.17956232, 0.26416003],\n    [ 0.56541729, 0.18010175, 0.26575971],\n    [ 0.57736669, 0.180631  , 0.26704888],\n    [ 0.58932081, 0.18117827, 0.26800409],\n    [ 0.60127582, 0.18175888, 0.26858488],\n    [ 0.61319563, 0.1824336 , 0.2687872 ],\n    [ 0.62506376, 0.18324015, 0.26858301],\n    [ 0.63681202, 0.18430173, 0.26795276],\n    [ 0.64842603, 0.18565472, 0.26689463],\n    [ 0.65988195, 0.18734638, 0.26543435],\n    [ 0.67111966, 0.18948885, 0.26357955],\n    [ 0.68209194, 0.19216636, 0.26137175],\n    [ 0.69281185, 0.19535326, 0.25887063],\n    [ 0.70335022, 0.19891271, 0.25617971],\n    [ 0.71375229, 0.20276438, 0.25331365],\n    [ 0.72401436, 0.20691287, 0.25027366],\n    [ 0.73407638, 0.21145051, 0.24710661],\n    [ 0.74396983, 0.21631913, 0.24380715],\n    [ 0.75361506, 0.22163653, 0.24043996],\n    [ 0.7630579 , 0.22731637, 0.23700095],\n    [ 0.77222228, 0.23346231, 0.23356628],\n    [ 0.78115441, 0.23998404, 0.23013825],\n    [ 0.78979746, 0.24694858, 0.22678822],\n    [ 0.79819286, 0.25427223, 0.22352658],\n    [ 0.80630444, 0.26198807, 0.22040877],\n    [ 0.81417437, 0.27001406, 0.21744645],\n    [ 0.82177364, 0.27837336, 0.21468316],\n    [ 0.82915955, 0.28696963, 0.21210766],\n    [ 0.83628628, 0.2958499 , 0.20977813],\n    [ 0.84322168, 0.30491136, 0.20766435],\n    [ 0.84995458, 0.31415945, 0.2057863 ],\n    [ 0.85648867, 0.32358058, 0.20415327],\n    [ 0.86286243, 0.33312058, 0.20274969],\n    [ 0.86908321, 0.34276705, 0.20157271],\n    [ 0.87512876, 0.3525416 , 0.20064949],\n    [ 0.88100349, 0.36243385, 0.19999078],\n    [ 0.8866469 , 0.37249496, 0.1997976 ],\n    [ 0.89203964, 0.38273475, 0.20013431],\n    [ 0.89713496, 0.39318156, 0.20121514],\n    [ 0.90195099, 0.40380687, 0.20301555],\n    [ 0.90648379, 0.41460191, 0.20558847],\n    [ 0.9106967 , 0.42557857, 0.20918529],\n    [ 0.91463791, 0.43668557, 0.21367954],\n    [ 0.91830723, 0.44790913, 0.21916352],\n    [ 0.92171507, 0.45922856, 0.22568002],\n    [ 0.92491786, 0.4705936 , 0.23308207],\n    [ 0.92790792, 0.48200153, 0.24145932],\n    [ 0.93073701, 0.49341219, 0.25065486],\n    [ 0.93343918, 0.5048017 , 0.26056148],\n    [ 0.93602064, 0.51616486, 0.27118485],\n    [ 0.93850535, 0.52748892, 0.28242464],\n    [ 0.94092933, 0.53875462, 0.29416042],\n    [ 0.94330011, 0.5499628 , 0.30634189],\n    [ 0.94563159, 0.56110987, 0.31891624],\n    [ 0.94792955, 0.57219822, 0.33184256],\n    [ 0.95020929, 0.5832232 , 0.34508419],\n    [ 0.95247324, 0.59419035, 0.35859866],\n    [ 0.95471709, 0.60510869, 0.37236035],\n    [ 0.95698411, 0.61595766, 0.38629631],\n    [ 0.95923863, 0.62676473, 0.40043317],\n    [ 0.9615041 , 0.6375203 , 0.41474106],\n    [ 0.96371553, 0.64826619, 0.42928335],\n    [ 0.96591497, 0.65899621, 0.44380444],\n    [ 0.96809871, 0.66971662, 0.45830232],\n    [ 0.9702495 , 0.6804394 , 0.47280492],\n    [ 0.9723881 , 0.69115622, 0.48729272],\n    [ 0.97450723, 0.70187358, 0.50178034],\n    [ 0.9766108 , 0.712592  , 0.51626837],\n    [ 0.97871716, 0.72330511, 0.53074053],\n    [ 0.98082222, 0.73401769, 0.54520694],\n    [ 0.9829001 , 0.74474445, 0.5597019 ],\n    [ 0.98497466, 0.75547635, 0.57420239],\n    [ 0.98705581, 0.76621129, 0.58870185],\n    [ 0.98913325, 0.77695637, 0.60321626],\n    [ 0.99119918, 0.78771716, 0.61775821],\n    [ 0.9932672 , 0.79848979, 0.63231691],\n    [ 0.99535958, 0.80926704, 0.64687278],\n    [ 0.99740544, 0.82008078, 0.66150571],\n    [ 0.9992197 , 0.83100723, 0.6764127 ]\n]\n\n_flare_lut = [\n    [0.92907237, 0.68878959, 0.50411509],\n    [0.92891402, 0.68494686, 0.50173994],\n    [0.92864754, 0.68116207, 0.4993754],\n    [0.92836112, 0.67738527, 0.49701572],\n    [0.9280599, 0.67361354, 0.49466044],\n    [0.92775569, 0.66983999, 0.49230866],\n    [0.9274375, 0.66607098, 0.48996097],\n    [0.927111, 0.66230315, 0.48761688],\n    [0.92677996, 0.6585342, 0.485276],\n    [0.92644317, 0.65476476, 0.48293832],\n    [0.92609759, 0.65099658, 0.48060392],\n    [0.925747, 0.64722729, 0.47827244],\n    [0.92539502, 0.64345456, 0.47594352],\n    [0.92503106, 0.6396848, 0.47361782],\n    [0.92466877, 0.6359095, 0.47129427],\n    [0.92429828, 0.63213463, 0.46897349],\n    [0.92392172, 0.62835879, 0.46665526],\n    [0.92354597, 0.62457749, 0.46433898],\n    [0.9231622, 0.6207962, 0.46202524],\n    [0.92277222, 0.61701365, 0.45971384],\n    [0.92237978, 0.61322733, 0.45740444],\n    [0.92198615, 0.60943622, 0.45509686],\n    [0.92158735, 0.60564276, 0.45279137],\n    [0.92118373, 0.60184659, 0.45048789],\n    [0.92077582, 0.59804722, 0.44818634],\n    [0.92036413, 0.59424414, 0.44588663],\n    [0.91994924, 0.5904368, 0.44358868],\n    [0.91952943, 0.58662619, 0.4412926],\n    [0.91910675, 0.58281075, 0.43899817],\n    [0.91868096, 0.57899046, 0.4367054],\n    [0.91825103, 0.57516584, 0.43441436],\n    [0.91781857, 0.57133556, 0.43212486],\n    [0.9173814, 0.56750099, 0.4298371],\n    [0.91694139, 0.56366058, 0.42755089],\n    [0.91649756, 0.55981483, 0.42526631],\n    [0.91604942, 0.55596387, 0.42298339],\n    [0.9155979, 0.55210684, 0.42070204],\n    [0.9151409, 0.54824485, 0.4184247],\n    [0.91466138, 0.54438817, 0.41617858],\n    [0.91416896, 0.54052962, 0.41396347],\n    [0.91366559, 0.53666778, 0.41177769],\n    [0.91315173, 0.53280208, 0.40962196],\n    [0.91262605, 0.52893336, 0.40749715],\n    [0.91208866, 0.52506133, 0.40540404],\n    [0.91153952, 0.52118582, 0.40334346],\n    [0.91097732, 0.51730767, 0.4013163],\n    [0.910403, 0.51342591, 0.39932342],\n    [0.90981494, 0.50954168, 0.39736571],\n    [0.90921368, 0.5056543, 0.39544411],\n    [0.90859797, 0.50176463, 0.39355952],\n    [0.90796841, 0.49787195, 0.39171297],\n    [0.90732341, 0.4939774, 0.38990532],\n    [0.90666382, 0.49008006, 0.38813773],\n    [0.90598815, 0.486181, 0.38641107],\n    [0.90529624, 0.48228017, 0.38472641],\n    [0.90458808, 0.47837738, 0.38308489],\n    [0.90386248, 0.47447348, 0.38148746],\n    [0.90311921, 0.4705685, 0.37993524],\n    [0.90235809, 0.46666239, 0.37842943],\n    [0.90157824, 0.46275577, 0.37697105],\n    [0.90077904, 0.45884905, 0.37556121],\n    [0.89995995, 0.45494253, 0.37420106],\n    [0.89912041, 0.4510366, 0.37289175],\n    [0.8982602, 0.44713126, 0.37163458],\n    [0.89737819, 0.44322747, 0.37043052],\n    [0.89647387, 0.43932557, 0.36928078],\n    [0.89554477, 0.43542759, 0.36818855],\n    [0.89458871, 0.4315354, 0.36715654],\n    [0.89360794, 0.42764714, 0.36618273],\n    [0.89260152, 0.42376366, 0.36526813],\n    [0.8915687, 0.41988565, 0.36441384],\n    [0.89050882, 0.41601371, 0.36362102],\n    [0.8894159, 0.41215334, 0.36289639],\n    [0.888292, 0.40830288, 0.36223756],\n    [0.88713784, 0.40446193, 0.36164328],\n    [0.88595253, 0.40063149, 0.36111438],\n    [0.88473115, 0.39681635, 0.3606566],\n    [0.88347246, 0.39301805, 0.36027074],\n    [0.88217931, 0.38923439, 0.35995244],\n    [0.880851, 0.38546632, 0.35970244],\n    [0.87947728, 0.38172422, 0.35953127],\n    [0.87806542, 0.37800172, 0.35942941],\n    [0.87661509, 0.37429964, 0.35939659],\n    [0.87511668, 0.37062819, 0.35944178],\n    [0.87357554, 0.36698279, 0.35955811],\n    [0.87199254, 0.3633634, 0.35974223],\n    [0.87035691, 0.35978174, 0.36000516],\n    [0.86867647, 0.35623087, 0.36033559],\n    [0.86694949, 0.35271349, 0.36073358],\n    [0.86516775, 0.34923921, 0.36120624],\n    [0.86333996, 0.34580008, 0.36174113],\n    [0.86145909, 0.3424046, 0.36234402],\n    [0.85952586, 0.33905327, 0.36301129],\n    [0.85754536, 0.33574168, 0.36373567],\n    [0.855514, 0.33247568, 0.36451271],\n    [0.85344392, 0.32924217, 0.36533344],\n    [0.8513284, 0.32604977, 0.36620106],\n    [0.84916723, 0.32289973, 0.36711424],\n    [0.84696243, 0.31979068, 0.36806976],\n    [0.84470627, 0.31673295, 0.36907066],\n    [0.84240761, 0.31371695, 0.37010969],\n    [0.84005337, 0.31075974, 0.37119284],\n    [0.83765537, 0.30784814, 0.3723105],\n    [0.83520234, 0.30499724, 0.37346726],\n    [0.83270291, 0.30219766, 0.37465552],\n    [0.83014895, 0.29946081, 0.37587769],\n    [0.82754694, 0.29677989, 0.37712733],\n    [0.82489111, 0.29416352, 0.37840532],\n    [0.82218644, 0.29160665, 0.37970606],\n    [0.81942908, 0.28911553, 0.38102921],\n    [0.81662276, 0.28668665, 0.38236999],\n    [0.81376555, 0.28432371, 0.383727],\n    [0.81085964, 0.28202508, 0.38509649],\n    [0.8079055, 0.27979128, 0.38647583],\n    [0.80490309, 0.27762348, 0.3878626],\n    [0.80185613, 0.2755178, 0.38925253],\n    [0.79876118, 0.27347974, 0.39064559],\n    [0.79562644, 0.27149928, 0.39203532],\n    [0.79244362, 0.2695883, 0.39342447],\n    [0.78922456, 0.26773176, 0.3948046],\n    [0.78596161, 0.26594053, 0.39617873],\n    [0.7826624, 0.26420493, 0.39754146],\n    [0.77932717, 0.26252522, 0.39889102],\n    [0.77595363, 0.2609049, 0.4002279],\n    [0.77254999, 0.25933319, 0.40154704],\n    [0.76911107, 0.25781758, 0.40284959],\n    [0.76564158, 0.25635173, 0.40413341],\n    [0.76214598, 0.25492998, 0.40539471],\n    [0.75861834, 0.25356035, 0.40663694],\n    [0.75506533, 0.25223402, 0.40785559],\n    [0.75148963, 0.2509473, 0.40904966],\n    [0.74788835, 0.24970413, 0.41022028],\n    [0.74426345, 0.24850191, 0.41136599],\n    [0.74061927, 0.24733457, 0.41248516],\n    [0.73695678, 0.24620072, 0.41357737],\n    [0.73327278, 0.24510469, 0.41464364],\n    [0.72957096, 0.24404127, 0.4156828],\n    [0.72585394, 0.24300672, 0.41669383],\n    [0.7221226, 0.24199971, 0.41767651],\n    [0.71837612, 0.24102046, 0.41863486],\n    [0.71463236, 0.24004289, 0.41956983],\n    [0.7108932, 0.23906316, 0.42048681],\n    [0.70715842, 0.23808142, 0.42138647],\n    [0.70342811, 0.2370976, 0.42226844],\n    [0.69970218, 0.23611179, 0.42313282],\n    [0.69598055, 0.2351247, 0.42397678],\n    [0.69226314, 0.23413578, 0.42480327],\n    [0.68854988, 0.23314511, 0.42561234],\n    [0.68484064, 0.23215279, 0.42640419],\n    [0.68113541, 0.23115942, 0.42717615],\n    [0.67743412, 0.23016472, 0.42792989],\n    [0.67373662, 0.22916861, 0.42866642],\n    [0.67004287, 0.22817117, 0.42938576],\n    [0.66635279, 0.22717328, 0.43008427],\n    [0.66266621, 0.22617435, 0.43076552],\n    [0.65898313, 0.22517434, 0.43142956],\n    [0.65530349, 0.22417381, 0.43207427],\n    [0.65162696, 0.22317307, 0.4327001],\n    [0.64795375, 0.22217149, 0.43330852],\n    [0.64428351, 0.22116972, 0.43389854],\n    [0.64061624, 0.22016818, 0.43446845],\n    [0.63695183, 0.21916625, 0.43502123],\n    [0.63329016, 0.21816454, 0.43555493],\n    [0.62963102, 0.2171635, 0.43606881],\n    [0.62597451, 0.21616235, 0.43656529],\n    [0.62232019, 0.21516239, 0.43704153],\n    [0.61866821, 0.21416307, 0.43749868],\n    [0.61501835, 0.21316435, 0.43793808],\n    [0.61137029, 0.21216761, 0.4383556],\n    [0.60772426, 0.2111715, 0.43875552],\n    [0.60407977, 0.21017746, 0.43913439],\n    [0.60043678, 0.20918503, 0.43949412],\n    [0.59679524, 0.20819447, 0.43983393],\n    [0.59315487, 0.20720639, 0.44015254],\n    [0.58951566, 0.20622027, 0.44045213],\n    [0.58587715, 0.20523751, 0.44072926],\n    [0.5822395, 0.20425693, 0.44098758],\n    [0.57860222, 0.20328034, 0.44122241],\n    [0.57496549, 0.20230637, 0.44143805],\n    [0.57132875, 0.20133689, 0.4416298],\n    [0.56769215, 0.20037071, 0.44180142],\n    [0.5640552, 0.19940936, 0.44194923],\n    [0.56041794, 0.19845221, 0.44207535],\n    [0.55678004, 0.1975, 0.44217824],\n    [0.55314129, 0.19655316, 0.44225723],\n    [0.54950166, 0.19561118, 0.44231412],\n    [0.54585987, 0.19467771, 0.44234111],\n    [0.54221157, 0.19375869, 0.44233698],\n    [0.5385549, 0.19285696, 0.44229959],\n    [0.5348913, 0.19197036, 0.44222958],\n    [0.53122177, 0.1910974, 0.44212735],\n    [0.52754464, 0.19024042, 0.44199159],\n    [0.52386353, 0.18939409, 0.44182449],\n    [0.52017476, 0.18856368, 0.44162345],\n    [0.51648277, 0.18774266, 0.44139128],\n    [0.51278481, 0.18693492, 0.44112605],\n    [0.50908361, 0.18613639, 0.4408295],\n    [0.50537784, 0.18534893, 0.44050064],\n    [0.50166912, 0.18457008, 0.44014054],\n    [0.49795686, 0.18380056, 0.43974881],\n    [0.49424218, 0.18303865, 0.43932623],\n    [0.49052472, 0.18228477, 0.43887255],\n    [0.48680565, 0.1815371, 0.43838867],\n    [0.48308419, 0.18079663, 0.43787408],\n    [0.47936222, 0.18006056, 0.43733022],\n    [0.47563799, 0.17933127, 0.43675585],\n    [0.47191466, 0.17860416, 0.43615337],\n    [0.46818879, 0.17788392, 0.43552047],\n    [0.46446454, 0.17716458, 0.43486036],\n    [0.46073893, 0.17645017, 0.43417097],\n    [0.45701462, 0.17573691, 0.43345429],\n    [0.45329097, 0.17502549, 0.43271025],\n    [0.44956744, 0.17431649, 0.4319386],\n    [0.44584668, 0.17360625, 0.43114133],\n    [0.44212538, 0.17289906, 0.43031642],\n    [0.43840678, 0.17219041, 0.42946642],\n    [0.43469046, 0.17148074, 0.42859124],\n    [0.4309749, 0.17077192, 0.42769008],\n    [0.42726297, 0.17006003, 0.42676519],\n    [0.42355299, 0.16934709, 0.42581586],\n    [0.41984535, 0.16863258, 0.42484219],\n    [0.41614149, 0.16791429, 0.42384614],\n    [0.41244029, 0.16719372, 0.42282661],\n    [0.40874177, 0.16647061, 0.42178429],\n    [0.40504765, 0.16574261, 0.42072062],\n    [0.401357, 0.16501079, 0.41963528],\n    [0.397669, 0.16427607, 0.418528],\n    [0.39398585, 0.16353554, 0.41740053],\n    [0.39030735, 0.16278924, 0.41625344],\n    [0.3866314, 0.16203977, 0.41508517],\n    [0.38295904, 0.16128519, 0.41389849],\n    [0.37928736, 0.16052483, 0.41270599],\n    [0.37562649, 0.15974704, 0.41151182],\n    [0.37197803, 0.15895049, 0.41031532],\n    [0.36833779, 0.15813871, 0.40911916],\n    [0.36470944, 0.15730861, 0.40792149],\n    [0.36109117, 0.15646169, 0.40672362],\n    [0.35748213, 0.15559861, 0.40552633],\n    [0.353885, 0.15471714, 0.40432831],\n    [0.35029682, 0.15381967, 0.4031316],\n    [0.34671861, 0.1529053, 0.40193587],\n    [0.34315191, 0.15197275, 0.40074049],\n    [0.33959331, 0.15102466, 0.3995478],\n    [0.33604378, 0.15006017, 0.39835754],\n    [0.33250529, 0.14907766, 0.39716879],\n    [0.32897621, 0.14807831, 0.39598285],\n    [0.3254559, 0.14706248, 0.39480044],\n    [0.32194567, 0.14602909, 0.39362106],\n    [0.31844477, 0.14497857, 0.39244549],\n    [0.31494974, 0.14391333, 0.39127626],\n    [0.31146605, 0.14282918, 0.39011024],\n    [0.30798857, 0.1417297, 0.38895105],\n    [0.30451661, 0.14061515, 0.38779953],\n    [0.30105136, 0.13948445, 0.38665531],\n    [0.2975886, 0.1383403, 0.38552159],\n    [0.29408557, 0.13721193, 0.38442775]\n]\n\n_crest_lut = [\n    [0.6468274, 0.80289262, 0.56592265],\n    [0.64233318, 0.80081141, 0.56639461],\n    [0.63791969, 0.7987162, 0.56674976],\n    [0.6335316, 0.79661833, 0.56706128],\n    [0.62915226, 0.7945212, 0.56735066],\n    [0.62477862, 0.79242543, 0.56762143],\n    [0.62042003, 0.79032918, 0.56786129],\n    [0.61606327, 0.78823508, 0.56808666],\n    [0.61171322, 0.78614216, 0.56829092],\n    [0.60736933, 0.78405055, 0.56847436],\n    [0.60302658, 0.78196121, 0.56864272],\n    [0.59868708, 0.77987374, 0.56879289],\n    [0.59435366, 0.77778758, 0.56892099],\n    [0.59001953, 0.77570403, 0.56903477],\n    [0.58568753, 0.77362254, 0.56913028],\n    [0.58135593, 0.77154342, 0.56920908],\n    [0.57702623, 0.76946638, 0.56926895],\n    [0.57269165, 0.76739266, 0.5693172],\n    [0.56835934, 0.76532092, 0.56934507],\n    [0.56402533, 0.76325185, 0.56935664],\n    [0.55968429, 0.76118643, 0.56935732],\n    [0.55534159, 0.75912361, 0.56934052],\n    [0.55099572, 0.75706366, 0.56930743],\n    [0.54664626, 0.75500662, 0.56925799],\n    [0.54228969, 0.75295306, 0.56919546],\n    [0.53792417, 0.75090328, 0.56912118],\n    [0.53355172, 0.74885687, 0.5690324],\n    [0.52917169, 0.74681387, 0.56892926],\n    [0.52478243, 0.74477453, 0.56881287],\n    [0.52038338, 0.74273888, 0.56868323],\n    [0.5159739, 0.74070697, 0.56854039],\n    [0.51155269, 0.73867895, 0.56838507],\n    [0.50711872, 0.73665492, 0.56821764],\n    [0.50267118, 0.73463494, 0.56803826],\n    [0.49822926, 0.73261388, 0.56785146],\n    [0.49381422, 0.73058524, 0.56767484],\n    [0.48942421, 0.72854938, 0.56751036],\n    [0.48505993, 0.72650623, 0.56735752],\n    [0.48072207, 0.72445575, 0.56721583],\n    [0.4764113, 0.72239788, 0.56708475],\n    [0.47212827, 0.72033258, 0.56696376],\n    [0.46787361, 0.71825983, 0.56685231],\n    [0.46364792, 0.71617961, 0.56674986],\n    [0.45945271, 0.71409167, 0.56665625],\n    [0.45528878, 0.71199595, 0.56657103],\n    [0.45115557, 0.70989276, 0.5664931],\n    [0.44705356, 0.70778212, 0.56642189],\n    [0.44298321, 0.70566406, 0.56635683],\n    [0.43894492, 0.70353863, 0.56629734],\n    [0.43493911, 0.70140588, 0.56624286],\n    [0.43096612, 0.69926587, 0.5661928],\n    [0.42702625, 0.69711868, 0.56614659],\n    [0.42311977, 0.69496438, 0.56610368],\n    [0.41924689, 0.69280308, 0.56606355],\n    [0.41540778, 0.69063486, 0.56602564],\n    [0.41160259, 0.68845984, 0.56598944],\n    [0.40783143, 0.68627814, 0.56595436],\n    [0.40409434, 0.68408988, 0.56591994],\n    [0.40039134, 0.68189518, 0.56588564],\n    [0.39672238, 0.6796942, 0.56585103],\n    [0.39308781, 0.67748696, 0.56581581],\n    [0.38949137, 0.67527276, 0.56578084],\n    [0.38592889, 0.67305266, 0.56574422],\n    [0.38240013, 0.67082685, 0.56570561],\n    [0.37890483, 0.66859548, 0.56566462],\n    [0.37544276, 0.66635871, 0.56562081],\n    [0.37201365, 0.66411673, 0.56557372],\n    [0.36861709, 0.6618697, 0.5655231],\n    [0.36525264, 0.65961782, 0.56546873],\n    [0.36191986, 0.65736125, 0.56541032],\n    [0.35861935, 0.65509998, 0.56534768],\n    [0.35535621, 0.65283302, 0.56528211],\n    [0.35212361, 0.65056188, 0.56521171],\n    [0.34892097, 0.64828676, 0.56513633],\n    [0.34574785, 0.64600783, 0.56505539],\n    [0.34260357, 0.64372528, 0.5649689],\n    [0.33948744, 0.64143931, 0.56487679],\n    [0.33639887, 0.6391501, 0.56477869],\n    [0.33334501, 0.63685626, 0.56467661],\n    [0.33031952, 0.63455911, 0.564569],\n    [0.3273199, 0.63225924, 0.56445488],\n    [0.32434526, 0.62995682, 0.56433457],\n    [0.32139487, 0.62765201, 0.56420795],\n    [0.31846807, 0.62534504, 0.56407446],\n    [0.3155731, 0.62303426, 0.56393695],\n    [0.31270304, 0.62072111, 0.56379321],\n    [0.30985436, 0.61840624, 0.56364307],\n    [0.30702635, 0.61608984, 0.56348606],\n    [0.30421803, 0.61377205, 0.56332267],\n    [0.30143611, 0.61145167, 0.56315419],\n    [0.29867863, 0.60912907, 0.56298054],\n    [0.29593872, 0.60680554, 0.56280022],\n    [0.29321538, 0.60448121, 0.56261376],\n    [0.2905079, 0.60215628, 0.56242036],\n    [0.28782827, 0.5998285, 0.56222366],\n    [0.28516521, 0.59749996, 0.56202093],\n    [0.28251558, 0.59517119, 0.56181204],\n    [0.27987847, 0.59284232, 0.56159709],\n    [0.27726216, 0.59051189, 0.56137785],\n    [0.27466434, 0.58818027, 0.56115433],\n    [0.2720767, 0.58584893, 0.56092486],\n    [0.26949829, 0.58351797, 0.56068983],\n    [0.26693801, 0.58118582, 0.56045121],\n    [0.26439366, 0.57885288, 0.56020858],\n    [0.26185616, 0.57652063, 0.55996077],\n    [0.25932459, 0.57418919, 0.55970795],\n    [0.25681303, 0.57185614, 0.55945297],\n    [0.25431024, 0.56952337, 0.55919385],\n    [0.25180492, 0.56719255, 0.5589305],\n    [0.24929311, 0.56486397, 0.5586654],\n    [0.24678356, 0.56253666, 0.55839491],\n    [0.24426587, 0.56021153, 0.55812473],\n    [0.24174022, 0.55788852, 0.55785448],\n    [0.23921167, 0.55556705, 0.55758211],\n    [0.23668315, 0.55324675, 0.55730676],\n    [0.23414742, 0.55092825, 0.55703167],\n    [0.23160473, 0.54861143, 0.5567573],\n    [0.22905996, 0.54629572, 0.55648168],\n    [0.22651648, 0.54398082, 0.5562029],\n    [0.22396709, 0.54166721, 0.55592542],\n    [0.22141221, 0.53935481, 0.55564885],\n    [0.21885269, 0.53704347, 0.55537294],\n    [0.21629986, 0.53473208, 0.55509319],\n    [0.21374297, 0.53242154, 0.5548144],\n    [0.21118255, 0.53011166, 0.55453708],\n    [0.2086192, 0.52780237, 0.55426067],\n    [0.20605624, 0.52549322, 0.55398479],\n    [0.20350004, 0.5231837, 0.55370601],\n    [0.20094292, 0.52087429, 0.55342884],\n    [0.19838567, 0.51856489, 0.55315283],\n    [0.19582911, 0.51625531, 0.55287818],\n    [0.19327413, 0.51394542, 0.55260469],\n    [0.19072933, 0.51163448, 0.5523289],\n    [0.18819045, 0.50932268, 0.55205372],\n    [0.18565609, 0.50701014, 0.55177937],\n    [0.18312739, 0.50469666, 0.55150597],\n    [0.18060561, 0.50238204, 0.55123374],\n    [0.178092, 0.50006616, 0.55096224],\n    [0.17558808, 0.49774882, 0.55069118],\n    [0.17310341, 0.49542924, 0.5504176],\n    [0.17063111, 0.49310789, 0.55014445],\n    [0.1681728, 0.49078458, 0.54987159],\n    [0.1657302, 0.48845913, 0.54959882],\n    [0.16330517, 0.48613135, 0.54932605],\n    [0.16089963, 0.48380104, 0.54905306],\n    [0.15851561, 0.48146803, 0.54877953],\n    [0.15615526, 0.47913212, 0.54850526],\n    [0.15382083, 0.47679313, 0.54822991],\n    [0.15151471, 0.47445087, 0.54795318],\n    [0.14924112, 0.47210502, 0.54767411],\n    [0.1470032, 0.46975537, 0.54739226],\n    [0.14480101, 0.46740187, 0.54710832],\n    [0.14263736, 0.46504434, 0.54682188],\n    [0.14051521, 0.46268258, 0.54653253],\n    [0.13843761, 0.46031639, 0.54623985],\n    [0.13640774, 0.45794558, 0.5459434],\n    [0.13442887, 0.45556994, 0.54564272],\n    [0.1325044, 0.45318928, 0.54533736],\n    [0.13063777, 0.4508034, 0.54502674],\n    [0.12883252, 0.44841211, 0.5447104],\n    [0.12709242, 0.44601517, 0.54438795],\n    [0.1254209, 0.44361244, 0.54405855],\n    [0.12382162, 0.44120373, 0.54372156],\n    [0.12229818, 0.43878887, 0.54337634],\n    [0.12085453, 0.4363676, 0.54302253],\n    [0.11949938, 0.43393955, 0.54265715],\n    [0.11823166, 0.43150478, 0.54228104],\n    [0.11705496, 0.42906306, 0.54189388],\n    [0.115972, 0.42661431, 0.54149449],\n    [0.11498598, 0.42415835, 0.54108222],\n    [0.11409965, 0.42169502, 0.54065622],\n    [0.11331533, 0.41922424, 0.5402155],\n    [0.11263542, 0.41674582, 0.53975931],\n    [0.1120615, 0.4142597, 0.53928656],\n    [0.11159738, 0.41176567, 0.53879549],\n    [0.11125248, 0.40926325, 0.53828203],\n    [0.11101698, 0.40675289, 0.53774864],\n    [0.11089152, 0.40423445, 0.53719455],\n    [0.11085121, 0.4017095, 0.53662425],\n    [0.11087217, 0.39917938, 0.53604354],\n    [0.11095515, 0.39664394, 0.53545166],\n    [0.11110676, 0.39410282, 0.53484509],\n    [0.11131735, 0.39155635, 0.53422678],\n    [0.11158595, 0.38900446, 0.53359634],\n    [0.11191139, 0.38644711, 0.5329534],\n    [0.11229224, 0.38388426, 0.53229748],\n    [0.11273683, 0.38131546, 0.53162393],\n    [0.11323438, 0.37874109, 0.53093619],\n    [0.11378271, 0.37616112, 0.53023413],\n    [0.11437992, 0.37357557, 0.52951727],\n    [0.11502681, 0.37098429, 0.52878396],\n    [0.11572661, 0.36838709, 0.52803124],\n    [0.11646936, 0.36578429, 0.52726234],\n    [0.11725299, 0.3631759, 0.52647685],\n    [0.1180755, 0.36056193, 0.52567436],\n    [0.1189438, 0.35794203, 0.5248497],\n    [0.11984752, 0.35531657, 0.52400649],\n    [0.1207833, 0.35268564, 0.52314492],\n    [0.12174895, 0.35004927, 0.52226461],\n    [0.12274959, 0.34740723, 0.52136104],\n    [0.12377809, 0.34475975, 0.52043639],\n    [0.12482961, 0.34210702, 0.51949179],\n    [0.125902, 0.33944908, 0.51852688],\n    [0.12699998, 0.33678574, 0.51753708],\n    [0.12811691, 0.33411727, 0.51652464],\n    [0.12924811, 0.33144384, 0.51549084],\n    [0.13039157, 0.32876552, 0.51443538],\n    [0.13155228, 0.32608217, 0.51335321],\n    [0.13272282, 0.32339407, 0.51224759],\n    [0.13389954, 0.32070138, 0.51111946],\n    [0.13508064, 0.31800419, 0.50996862],\n    [0.13627149, 0.31530238, 0.50878942],\n    [0.13746376, 0.31259627, 0.50758645],\n    [0.13865499, 0.30988598, 0.50636017],\n    [0.13984364, 0.30717161, 0.50511042],\n    [0.14103515, 0.30445309, 0.50383119],\n    [0.14222093, 0.30173071, 0.50252813],\n    [0.14339946, 0.2990046, 0.50120127],\n    [0.14456941, 0.29627483, 0.49985054],\n    [0.14573579, 0.29354139, 0.49847009],\n    [0.14689091, 0.29080452, 0.49706566],\n    [0.1480336, 0.28806432, 0.49563732],\n    [0.1491628, 0.28532086, 0.49418508],\n    [0.15028228, 0.28257418, 0.49270402],\n    [0.15138673, 0.27982444, 0.49119848],\n    [0.15247457, 0.27707172, 0.48966925],\n    [0.15354487, 0.2743161, 0.48811641],\n    [0.15459955, 0.27155765, 0.4865371],\n    [0.15563716, 0.26879642, 0.4849321],\n    [0.1566572, 0.26603191, 0.48330429],\n    [0.15765823, 0.26326032, 0.48167456],\n    [0.15862147, 0.26048295, 0.48005785],\n    [0.15954301, 0.25770084, 0.47845341],\n    [0.16043267, 0.25491144, 0.4768626],\n    [0.16129262, 0.25211406, 0.4752857],\n    [0.1621119, 0.24931169, 0.47372076],\n    [0.16290577, 0.24649998, 0.47217025],\n    [0.16366819, 0.24368054, 0.47063302],\n    [0.1644021, 0.24085237, 0.46910949],\n    [0.16510882, 0.2380149, 0.46759982],\n    [0.16579015, 0.23516739, 0.46610429],\n    [0.1664433, 0.2323105, 0.46462219],\n    [0.16707586, 0.22944155, 0.46315508],\n    [0.16768475, 0.22656122, 0.46170223],\n    [0.16826815, 0.22366984, 0.46026308],\n    [0.16883174, 0.22076514, 0.45883891],\n    [0.16937589, 0.21784655, 0.45742976],\n    [0.16990129, 0.21491339, 0.45603578],\n    [0.1704074, 0.21196535, 0.45465677],\n    [0.17089473, 0.20900176, 0.4532928],\n    [0.17136819, 0.20602012, 0.45194524],\n    [0.17182683, 0.20302012, 0.45061386],\n    [0.17227059, 0.20000106, 0.44929865],\n    [0.17270583, 0.19695949, 0.44800165],\n    [0.17313804, 0.19389201, 0.44672488],\n    [0.17363177, 0.19076859, 0.44549087]\n]\n\n_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"},{"col":4,"comment":"null","endLoc":891,"header":"def get_scale(self)","id":2182,"name":"get_scale","nodeType":"Function","startLoc":885,"text":"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"},{"col":4,"comment":"null","endLoc":894,"header":"def get_majorticklocs(self)","id":2183,"name":"get_majorticklocs","nodeType":"Function","startLoc":893,"text":"def get_majorticklocs(self):\n        return self.major.locator()"},{"col":4,"comment":"Add multiple sub-sets of components.","endLoc":46,"header":"@classmethod\n    def from_nested_components(cls, **kwargs)","id":2184,"name":"from_nested_components","nodeType":"Function","startLoc":43,"text":"@classmethod\n    def from_nested_components(cls, **kwargs):\n        \"\"\"Add multiple sub-sets of components.\"\"\"\n        return cls(kwargs, strip_whitespace=False)"},{"fileName":"_testing.py","filePath":"seaborn","id":2185,"nodeType":"File","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\n\n\ndef 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)\n"},{"col":4,"comment":"Find the support and density for all of the data.","endLoc":1050,"header":"def estimate_densities(self, bw, cut, scale, scale_hue, gridsize)","id":2186,"name":"estimate_densities","nodeType":"Function","startLoc":927,"text":"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        # 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"},{"col":0,"comment":"null","endLoc":47,"header":"def assert_artists_equal(list1, list2)","id":2187,"name":"assert_artists_equal","nodeType":"Function","startLoc":24,"text":"def 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"},{"fileName":"paired_pointplots.py","filePath":"examples","id":2188,"nodeType":"File","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)\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":6,"id":2189,"name":"sns","nodeType":"Attribute","startLoc":6,"text":"sns"},{"col":4,"comment":"Use the numpydoc parser to extract components from existing func.","endLoc":59,"header":"@classmethod\n    def from_function_params(cls, func)","id":2190,"name":"from_function_params","nodeType":"Function","startLoc":48,"text":"@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)"},{"col":4,"comment":"\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        ","endLoc":388,"header":"def on(self, target: Axes | SubFigure | Figure) -> Plot","id":2191,"name":"on","nodeType":"Function","startLoc":344,"text":"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"},{"attributeType":"null","col":4,"comment":"null","endLoc":801,"id":2192,"name":"axis_name","nodeType":"Attribute","startLoc":801,"text":"axis_name"},{"col":0,"comment":"\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    ","endLoc":105,"header":"def scale_factory(scale, axis, **kwargs)","id":2193,"name":"scale_factory","nodeType":"Function","startLoc":70,"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"},{"attributeType":"null","col":8,"comment":"null","endLoc":819,"id":2194,"name":"_view_interval","nodeType":"Attribute","startLoc":819,"text":"self._view_interval"},{"id":2195,"name":"v0.4.0.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.4.0 (September 2014)\n-----------------------\n\nThis is a major release from 0.3. Highlights include new approaches for :ref:`quick, high-level dataset exploration ` (along with a more :ref:`flexible interface `) and easy creation of :ref:`perceptually-appropriate color palettes ` using the cubehelix system. Along with these additions, there are a number of smaller changes that make visualizing data with seaborn easier and more powerful.\n\nPlotting functions\n~~~~~~~~~~~~~~~~~~\n\n- A new object, :class:`PairGrid`, and a corresponding function :func:`pairplot`, for drawing grids of pairwise relationships in a dataset. This style of plot is sometimes called a \"scatterplot matrix\", but the representation of the data in :class:`PairGrid` is flexible and many styles other than scatterplots can be used. See the :ref:`docs ` for more information. **Note:** due to a bug in older versions of matplotlib, you will have best results if you use these functions with matplotlib 1.4 or later.\n\n- The rules for choosing default color palettes when variables are mapped to different colors have been unified (and thus changed in some cases). Now when no specific palette is requested, the current global color palette will be used, unless the number of variables to be mapped exceeds the number of unique colors in the palette, in which case the ``\"husl\"`` palette will be used to avoid cycling.\n\n- Added a keyword argument ``hist_norm`` to :func:`distplot`. When a :func:`distplot` is now drawn without a KDE or parametric density, the histogram is drawn as counts instead of a density. This can be overridden by by setting ``hist_norm`` to ``True``.\n\n- When using :class:`FacetGrid` with a ``hue`` variable, the legend is no longer drawn by default when you call :meth:`FacetGrid.map`. Instead, you have to call :meth:`FacetGrid.add_legend` manually. This should make it easier to layer multiple plots onto the grid without having duplicated legends.\n\n- Made some changes to ``factorplot`` so that it behaves better when not all levels of the ``x`` variable are represented in each facet.\n\n- Added the ``logx`` option to :func:`regplot` for fitting the regression in log space.\n\n- When :func:`violinplot` encounters a bin with only a single observation, it will now plot a horizontal line at that value instead of erroring out.\n\nStyle and color palettes\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Added the :func:`cubehelix_palette` function for generating sequential palettes from the cubehelix system. See the :ref:`palette docs ` for more information on how these palettes can be used. There is also the :func:`choose_cubehelix` which will launch an interactive app to select cubehelix parameters in the notebook.\n\n- Added the :func:`xkcd_palette` and the ``xkcd_rgb`` dictionary so that colors can be specified with names from the `xkcd color survey `_.\n\n- Added the ``font_scale`` option to :func:`plotting_context`, :func:`set_context`, and :func:`set`. ``font_scale`` can independently increase or decrease the size of the font elements in the plot.\n\n- Font-handling should work better on systems without Arial installed. This is accomplished by adding the ``font.sans-serif`` field to the ``axes_style`` definition with Arial and Liberation Sans prepended to matplotlib defaults. The font family can also be set through the ``font`` keyword argument in :func:`set`. Due to matplotlib bugs, this might not work as expected on matplotlib 1.3.\n\n- The :func:`despine` function gets a new keyword argument ``offset``, which replaces the deprecated :func:`offset_spines` function. You no longer need to offset the spines before plotting data.\n\n- Added a default value for ``pdf.fonttype`` so that text in PDFs is editable in Adobe Illustrator.\n\n\nOther API Changes\n~~~~~~~~~~~~~~~~~\n\n- Removed the deprecated ``set_color_palette`` and ``palette_context`` functions. These were replaced in version 0.3 by the :func:`set_palette` function and ability to use :func:`color_palette` directly in a ``with`` statement.\n\n- Removed the ability to specify a ``nogrid`` style, which was renamed to ``white`` in 0.3.\n"},{"attributeType":"null","col":8,"comment":"null","endLoc":808,"id":2196,"name":"major","nodeType":"Attribute","startLoc":808,"text":"self.major"},{"attributeType":"null","col":8,"comment":"null","endLoc":809,"id":2197,"name":"minor","nodeType":"Attribute","startLoc":809,"text":"self.minor"},{"attributeType":"null","col":0,"comment":"null","endLoc":10,"id":2198,"name":"titanic","nodeType":"Attribute","startLoc":10,"text":"titanic"},{"attributeType":"null","col":8,"comment":"null","endLoc":805,"id":2199,"name":"converter","nodeType":"Attribute","startLoc":805,"text":"self.converter"},{"attributeType":"null","col":8,"comment":"null","endLoc":807,"id":2200,"name":"scale","nodeType":"Attribute","startLoc":807,"text":"self.scale"},{"col":4,"comment":"null","endLoc":70,"header":"def _plot(self, split_gen, scales, orient)","id":2201,"name":"_plot","nodeType":"Function","startLoc":61,"text":"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"},{"attributeType":"null","col":8,"comment":"null","endLoc":806,"id":2203,"name":"units","nodeType":"Attribute","startLoc":806,"text":"self.units"},{"attributeType":"PairGrid","col":0,"comment":"null","endLoc":13,"id":2204,"name":"g","nodeType":"Attribute","startLoc":13,"text":"g"},{"col":4,"comment":"\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        ","endLoc":540,"header":"def pair(\n        self,\n        x: VariableSpecList = None,\n        y: VariableSpecList = None,\n        wrap: int | None = None,\n        cross: bool = True,\n    ) -> Plot","id":2205,"name":"pair","nodeType":"Function","startLoc":479,"text":"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"},{"attributeType":"null","col":8,"comment":"null","endLoc":813,"id":2206,"name":"_data_interval","nodeType":"Attribute","startLoc":813,"text":"self._data_interval"},{"className":"ObjectProperty","col":0,"comment":"A property defined by arbitrary an object, with inherently nominal scaling.","endLoc":372,"id":2207,"nodeType":"Class","startLoc":323,"text":"class 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)\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"},{"col":0,"comment":"Test that results make sense when passing unit IDs to bootstrap.","endLoc":115,"header":"def test_bootstrap_units(random)","id":2208,"name":"test_bootstrap_units","nodeType":"Function","startLoc":104,"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()"},{"col":4,"comment":"null","endLoc":333,"header":"def _default_values(self, n: int) -> list","id":2209,"name":"_default_values","nodeType":"Function","startLoc":332,"text":"def _default_values(self, n: int) -> list:\n        raise NotImplementedError()"},{"col":0,"comment":"","endLoc":5,"header":"paired_pointplots.py#","id":2210,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nPaired categorical plots\n========================\n\n\"\"\"\n\nsns.set_theme(style=\"whitegrid\")\n\ntitanic = sns.load_dataset(\"titanic\")\n\ng = sns.PairGrid(titanic, y_vars=\"survived\",\n                 x_vars=[\"class\", \"sex\", \"who\", \"alone\"],\n                 height=5, aspect=.5)\n\ng.map(sns.pointplot, scale=1.3, errwidth=4, color=\"xkcd:plum\")\n\ng.set(ylim=(0, 1))\n\nsns.despine(fig=g.fig, left=True)"},{"col":4,"comment":"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        ","endLoc":1358,"header":"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    )","id":2211,"name":"__init__","nodeType":"Function","startLoc":1186,"text":"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)"},{"attributeType":"null","col":0,"comment":"null","endLoc":26,"id":2212,"name":"networks","nodeType":"Attribute","startLoc":26,"text":"networks"},{"id":2213,"name":".gitignore","nodeType":"TextFile","path":"examples","text":"*.html\n*_files/\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":27,"id":2214,"name":"network_colors","nodeType":"Attribute","startLoc":27,"text":"network_colors"},{"attributeType":"ClusterGrid","col":0,"comment":"null","endLoc":30,"id":2216,"name":"g","nodeType":"Attribute","startLoc":30,"text":"g"},{"fileName":"__init__.py","filePath":"tests/_stats","id":2217,"nodeType":"File","text":""},{"id":2218,"name":"objects_interface.ipynb","nodeType":"TextFile","path":"doc/_tutorial","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"35110bb9-6889-4bd5-b9d6-5a0479131433\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _objects_tutorial:\\n\",\n    \"\\n\",\n    \".. currentmodule:: seaborn.objects\\n\",\n    \"\\n\",\n    \"The seaborn.objects interface\\n\",\n    \"=============================\\n\",\n    \"\\n\",\n    \"The `seaborn.objects` namespace was introduced in version 0.12 as a completely new interface for making seaborn plots. It offers a more consistent and flexible API, comprising a collection of composable classes for transforming and plotting data. In contrast to the existing `seaborn` functions, the new interface aims to support end-to-end plot specification and customization without dropping down to matplotlib (although it will remain possible to do so if necessary).\\n\",\n    \"\\n\",\n    \".. note::\\n\",\n    \"    The objects interface is currently experimental and incomplete. It is stable enough for serious use, but there certainly are some rough edges and missing features.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"706badfa-58be-4808-9016-bd0ca3ebaf12\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"import matplotlib as mpl\\n\",\n    \"tips = sns.load_dataset(\\\"tips\\\")\\n\",\n    \"penguins = sns.load_dataset(\\\"penguins\\\").dropna()\\n\",\n    \"diamonds = sns.load_dataset(\\\"diamonds\\\")\\n\",\n    \"healthexp = sns.load_dataset(\\\"healthexp\\\").sort_values([\\\"Country\\\", \\\"Year\\\"]).query(\\\"Year <= 2020\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"dd1ceae5-f930-41c2-8a18-f3cf94a161ad\",\n   \"metadata\": {},\n   \"source\": [\n    \"Specifying a plot and mapping data\\n\",\n    \"----------------------------------\\n\",\n    \"\\n\",\n    \"The objects interface should be imported with the following convention:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"1c113156-20ad-4612-a9f5-0071d7fd35dd\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"6518484e-828b-4e7c-8529-ed6c9e61fa69\",\n   \"metadata\": {},\n   \"source\": [\n    \"The `seaborn.objects` namespace will provide access to all of the relevant classes. The most important is :class:`Plot`. You specify plots by instantiating a :class:`Plot` object and calling its methods. Let's see a simple example:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2e7f8ad0-9831-464b-9825-60733f110f34\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\")\\n\",\n    \"    .add(so.Dot())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"52785052-6c80-4f35-87e4-b27df499bd5c\",\n   \"metadata\": {},\n   \"source\": [\n    \"This code, which produces a scatter plot, should look reasonably familiar. Just as when using :func:`seaborn.scatterplot`, we passed a tidy dataframe (`penguins`) and assigned two of its columns to the `x` and `y` coordinates of the plot. But instead of starting with the type of chart and then adding some data assignments, here we started with the data assignments and then added a graphical element.\\n\",\n    \"\\n\",\n    \"Setting properties\\n\",\n    \"~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"The :class:`Dot` class is an example of a :class:`Mark`: an object that graphically represents data values. Each mark will have a number of properties that can be set to change its appearance:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"310bac42-cfe4-4c45-9ddf-27c2cb200a8a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\")\\n\",\n    \"    .add(so.Dot(color=\\\"g\\\", pointsize=4))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"3f817822-dd96-4263-a42e-824f9ca4083a\",\n   \"metadata\": {},\n   \"source\": [\n    \"Mapping properties\\n\",\n    \"~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"As with seaborn's functions, it is also possible to *map* data values to various graphical properties:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"6267e411-1f75-461e-a189-ead4452b2ec6\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(\\n\",\n    \"        penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\",\\n\",\n    \"        color=\\\"species\\\", pointsize=\\\"body_mass_g\\\",\\n\",\n    \"    )\\n\",\n    \"    .add(so.Dot())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"b6bfc0bf-cae1-44ed-9f52-e9f748c3877d\",\n   \"metadata\": {},\n   \"source\": [\n    \"While this basic functionality is not novel, an important difference from the function API is that properties are mapped using the same parameter names that would set them directly (instead of having `hue` vs. `color`, etc.). What matters is *where* the property is defined: passing a value when you initialize :class:`Dot` will set it directly, whereas assigning a variable when you set up the :class:`Plot` will *map* the corresponding data.\\n\",\n    \"\\n\",\n    \"Beyond this difference, the objects interface also allows a much wider range of mark properties to be mapped:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b8637528-4e17-4a41-be1c-2cb4275a5586\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(\\n\",\n    \"        penguins, x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\",\\n\",\n    \"        edgecolor=\\\"sex\\\", edgewidth=\\\"body_mass_g\\\",\\n\",\n    \"    )\\n\",\n    \"    .add(so.Dot(color=\\\".8\\\"))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"220930c4-410c-4452-a89e-95045f325cc0\",\n   \"metadata\": {},\n   \"source\": [\n    \"Defining groups\\n\",\n    \"~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"The :class:`Dot` mark represents each data point independently, so the assignment of a variable to a property only has the effect of changing each dot's appearance. For marks that group or connect observations, such as :class:`Line`, it also determines the number of distinct graphical elements:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"95f892e1-8adc-43d3-8b30-84d8c848040a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(healthexp, x=\\\"Year\\\", y=\\\"Life_Expectancy\\\", color=\\\"Country\\\")\\n\",\n    \"    .add(so.Line())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"6665552c-674b-405e-a3ee-237517649349\",\n   \"metadata\": {},\n   \"source\": [\n    \"It is also possible to define a grouping without changing any visual properties, by using `group`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f9287beb-7a66-4dcb-bccf-9c5cab2790f4\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(healthexp, x=\\\"Year\\\", y=\\\"Life_Expectancy\\\", group=\\\"Country\\\")\\n\",\n    \"    .add(so.Line())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"be097dfa-e33c-41f5-8b5a-09013cb33e6e\",\n   \"metadata\": {},\n   \"source\": [\n    \"Transforming data before plotting\\n\",\n    \"---------------------------------\\n\",\n    \"\\n\",\n    \"Statistical transformation\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"As with many seaborn functions, the objects interface supports statistical transformations. These are performed by :class:`Stat` objects, such as :class:`Agg`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"0964d2af-ce53-48b5-b79a-3277b05584dd\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"species\\\", y=\\\"body_mass_g\\\")\\n\",\n    \"    .add(so.Bar(), so.Agg())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"5ac229b2-3692-4d35-8ba3-e35262f198ce\",\n   \"metadata\": {},\n   \"source\": [\n    \"In the function interface, statistical transformations are possible with some visual representations (e.g. :func:`seaborn.barplot`) but not others (e.g. :func:`seaborn.scatterplot`). The objects interface more cleanly separates representation and transformation, allowing you to compose :class:`Mark` and :class:`Stat` objects:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"5c2f917d-1cb7-4d33-b8c4-2126a4f91ccc\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"species\\\", y=\\\"body_mass_g\\\")\\n\",\n    \"    .add(so.Dot(pointsize=10), so.Agg())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"1b9d7688-22f5-4f4a-b58e-71d8ff550b48\",\n   \"metadata\": {},\n   \"source\": [\n    \"When forming groups by mapping properties, the :class:`Stat` transformation is applied to each group separately:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"734f9dac-4663-4e51-8070-716c0c0296c6\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"species\\\", y=\\\"body_mass_g\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Dot(pointsize=10), so.Agg())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"e60a8e83-c34c-4769-b34f-e0c23c80b870\",\n   \"metadata\": {},\n   \"source\": [\n    \"Resolving overplotting\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"Some seaborn functions also have mechanisms that automatically resolve overplotting, as when :func:`seaborn.barplot` \\\"dodges\\\" bars once `hue` is assigned. The objects interface has less complex default behavior. Bars representing multiple groups will overlap by default:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"96653815-7da3-4a77-877a-485b5e7578a4\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"species\\\", y=\\\"body_mass_g\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Bar(), so.Agg())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"06ee3b9f-0ae9-467f-8a40-e340e6f3ce7d\",\n   \"metadata\": {},\n   \"source\": [\n    \"Nevertheless, it is possible to compose the :class:`Bar` mark with the :class:`Agg` stat and a second transformation, implemented by :class:`Dodge`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e29792ae-c238-4538-952a-5af81adcefe0\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"species\\\", y=\\\"body_mass_g\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Bar(), so.Agg(), so.Dodge())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"a27dcb37-be58-427b-a722-9039b91b6503\",\n   \"metadata\": {},\n   \"source\": [\n    \"The :class:`Dodge` class is an example of a :class:`Move` transformation, which is like a :class:`Stat` but only adjusts `x` and `y` coordinates. The :class:`Move` classes can be applied with any mark, and it's not necessary to use a :class:`Stat` first:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c4509ea7-36fe-4ffb-b784-e945d13fb93c\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"species\\\", y=\\\"body_mass_g\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Dot(), so.Dodge())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"a62e44ae-d6e7-4ab5-af2e-7b49a2031b1d\",\n   \"metadata\": {},\n   \"source\": [\n    \"It's also possible to apply multiple :class:`Move` operations in sequence:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"07536818-9ddd-46d1-b10c-b034fa257335\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"species\\\", y=\\\"body_mass_g\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Dot(), so.Dodge(), so.Jitter(.3))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"fd8ed5cc-6ba4-4d03-8414-57a782971d4c\",\n   \"metadata\": {},\n   \"source\": [\n    \"Creating variables through transformation\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"The :class:`Agg` stat requires both `x` and `y` to already be defined, but variables can also be *created* through statistical transformation. For example, the :class:`Hist` stat requires only one of `x` *or* `y` to be defined, and it will create the other by counting observations:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4b1f2c61-d294-4a85-a383-384d92523c36\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"species\\\")\\n\",\n    \"    .add(so.Bar(), so.Hist())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"9b33ea0c-f11d-48d7-be7c-13e9993906d8\",\n   \"metadata\": {},\n   \"source\": [\n    \"The :class:`Hist` stat will also create new `x` values (by binning) when given numeric data:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"25123abd-75d4-4550-ac86-5281fdabc023\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"flipper_length_mm\\\")\\n\",\n    \"    .add(so.Bars(), so.Hist())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"0dd84c56-eeb3-4904-b957-1677eaebd33c\",\n   \"metadata\": {},\n   \"source\": [\n    \"Notice how we used :class:`Bars`, rather than :class:`Bar` for the plot with the continuous `x` axis. These two marks are related, but :class:`Bars` has different defaults and works better for continuous histograms. It also produces a different, more efficient matplotlib artist. You will find the pattern of singular/plural marks elsewhere. The plural version is typically optimized for cases with larger numbers of marks.\\n\",\n    \"\\n\",\n    \"Some transforms accept both `x` and `y`, but add *interval* data for each coordinate. This is particularly relevant for plotting error bars after aggregating:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"6bc29e9d-d660-4638-80fd-8d77e15d9109\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"body_mass_g\\\", y=\\\"species\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Range(), so.Est(errorbar=\\\"sd\\\"), so.Dodge())\\n\",\n    \"    .add(so.Dot(), so.Agg(), so.Dodge())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"3aecc891-1abb-45b2-bf15-c6944820b242\",\n   \"metadata\": {},\n   \"source\": [\n    \"Orienting marks and transforms\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"When aggregating, dodging, and drawing a bar, the `x` and `y` variables are treated differently. Each operation has the concept of an *orientation*. The :class:`Plot` tries to determine the orientation automatically based on the data types of the variables. For instance, if we flip the assignment of `species` and `body_mass_g`, we'll get the same plot, but oriented horizontally:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"1dd7ebeb-893e-4d27-aeaf-a8ff0cd2cc15\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"body_mass_g\\\", y=\\\"species\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Bar(), so.Agg(), so.Dodge())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"382603cb-9ae9-46ed-bceb-b48456781092\",\n   \"metadata\": {},\n   \"source\": [\n    \"Sometimes, the correct orientation is ambiguous, as when both the `x` and `y` variables are numeric. In these cases, you can be explicit by passing the `orient` parameter to :meth:`Plot.add`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"75277dda-47c4-443c-9454-b8d97fc399e2\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, x=\\\"total_bill\\\", y=\\\"size\\\", color=\\\"time\\\")\\n\",\n    \"    .add(so.Bar(), so.Agg(), so.Dodge(), orient=\\\"y\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"dc845c14-03e5-495d-9dc8-3a90f7879346\",\n   \"metadata\": {},\n   \"source\": [\n    \"Building and displaying the plot\\n\",\n    \"--------------------------------\\n\",\n    \"\\n\",\n    \"Each example thus far has produced a single subplot with a single kind of mark on it. But :class:`Plot` does not limit you to this.\\n\",\n    \"\\n\",\n    \"Adding multiple layers\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"More complex single-subplot graphics can be created by calling :meth:`Plot.add` repeatedly. Each time it is called, it defines a *layer* in the plot. For example, we may want to add a scatterplot (now using :class:`Dots`) and then a regression fit:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"922b6d3d-7a81-4921-97f2-953a1fbc69ec\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, x=\\\"total_bill\\\", y=\\\"tip\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \"    .add(so.Line(), so.PolyFit())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"f0309733-a86a-4952-bc3b-533d639f0b52\",\n   \"metadata\": {},\n   \"source\": [\n    \"Variable mappings that are defined in the :class:`Plot` constructor will be used for all layers:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"604d16b9-383b-4b88-9ed7-fdefed55039a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, x=\\\"total_bill\\\", y=\\\"tip\\\", color=\\\"time\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \"    .add(so.Line(), so.PolyFit())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"eb56fb8d-aaa3-4b6e-b311-0354562174b5\",\n   \"metadata\": {},\n   \"source\": [\n    \"Layer-specific mappings\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"You can also define a mapping such that it is used only in a specific layer. This is accomplished by defining the mapping within the call to :class:`Plot.add` for the relevant layer:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f69a3a38-97e8-40fb-b7d4-95a751ebdcfb\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, x=\\\"total_bill\\\", y=\\\"tip\\\")\\n\",\n    \"    .add(so.Dots(), color=\\\"time\\\")\\n\",\n    \"    .add(so.Line(color=\\\".2\\\"), so.PolyFit())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"b3f94f01-23d4-4f7a-98f8-de93dafc230a\",\n   \"metadata\": {},\n   \"source\": [\n    \"Alternatively, define the layer for the entire plot, but *remove* it from a specific layer by setting the variable to `None`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"45706bec-3453-4a7e-9ac7-c743baff4da6\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, x=\\\"total_bill\\\", y=\\\"tip\\\", color=\\\"time\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \"    .add(so.Line(color=\\\".2\\\"), so.PolyFit(), color=None)\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"295013b3-7d91-4a59-b63b-fe50e642954c\",\n   \"metadata\": {},\n   \"source\": [\n    \"To recap, there are three ways to specify the value of a mark property: (1) by mapping a variable in all layers, (2) by mapping a variable in a specific layer, and (3) by setting the property directy:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2341eafd-4d6f-4530-835a-a409d2057d74\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide-input\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"from io import StringIO\\n\",\n    \"from IPython.display import SVG\\n\",\n    \"C = sns.color_palette(\\\"deep\\\")\\n\",\n    \"f = mpl.figure.Figure(figsize=(7, 3))\\n\",\n    \"ax = f.subplots()\\n\",\n    \"fontsize = 18\\n\",\n    \"ax.add_artist(mpl.patches.Rectangle((.13, .53), .45, .09, color=C[0], alpha=.3))\\n\",\n    \"ax.add_artist(mpl.patches.Rectangle((.22, .43), .235, .09, color=C[1], alpha=.3))\\n\",\n    \"ax.add_artist(mpl.patches.Rectangle((.49, .43), .26, .09, color=C[2], alpha=.3))\\n\",\n    \"ax.text(.05, .55, \\\"Plot(data, 'x', 'y', color='var1')\\\", size=fontsize, color=\\\".2\\\")\\n\",\n    \"ax.text(.05, .45, \\\".add(Dot(pointsize=10), marker='var2')\\\", size=fontsize, color=\\\".2\\\")\\n\",\n    \"annots = [\\n\",\n    \"    (\\\"Mapped\\\\nin all layers\\\", (.35, .65), (0, 45)),\\n\",\n    \"    (\\\"Set directly\\\", (.35, .4), (0, -45)),\\n\",\n    \"    (\\\"Mapped\\\\nin this layer\\\", (.63, .4), (0, -45)),\\n\",\n    \"]\\n\",\n    \"for i, (text, xy, xytext) in enumerate(annots):\\n\",\n    \"    ax.annotate(\\n\",\n    \"        text, xy, xytext,\\n\",\n    \"        textcoords=\\\"offset points\\\", fontsize=14, ha=\\\"center\\\", va=\\\"center\\\",\\n\",\n    \"        arrowprops=dict(arrowstyle=\\\"->\\\", color=C[i]), color=C[i],\\n\",\n    \"    )\\n\",\n    \"ax.set_axis_off()\\n\",\n    \"f.subplots_adjust(0, 0, 1, 1)\\n\",\n    \"f.savefig(s:=StringIO(), format=\\\"svg\\\")\\n\",\n    \"SVG(s.getvalue())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"cf2d8e39-d332-41f4-b327-2ac352878e58\",\n   \"metadata\": {},\n   \"source\": [\n    \"Faceting and pairing subplots\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"As with seaborn's figure-level functions (:func:`seaborn.displot`, :func:`seaborn.catplot`, etc.), the :class:`Plot` interface can also produce figures with multiple \\\"facets\\\", or subplots containing subsets of data. This is accomplished with the :meth:`Plot.facet` method:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"af737dfd-1cb2-418d-9f52-1deb93154a92\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"flipper_length_mm\\\")\\n\",\n    \"    .facet(\\\"species\\\")\\n\",\n    \"    .add(so.Bars(), so.Hist())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"81c2a445-5ae1-4272-8a6c-8bfe1f3b907f\",\n   \"metadata\": {},\n   \"source\": [\n    \"Call :meth:`Plot.facet` with the variables that should be used to define the columns and/or rows of the plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b7b3495f-9a38-4976-b718-ce3672b8c186\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"flipper_length_mm\\\")\\n\",\n    \"    .facet(col=\\\"species\\\", row=\\\"sex\\\")\\n\",\n    \"    .add(so.Bars(), so.Hist())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"8b7fe085-acd2-46d2-81f6-a806dec338d3\",\n   \"metadata\": {},\n   \"source\": [\n    \"You can facet using a variable with a larger number of levels by \\\"wrapping\\\" across the other dimension:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d62d2310-ae33-4b42-bdea-7b7456afd640\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(healthexp, x=\\\"Year\\\", y=\\\"Life_Expectancy\\\")\\n\",\n    \"    .facet(col=\\\"Country\\\", wrap=3)\\n\",\n    \"    .add(so.Line())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"86ecbeee-3ac2-41eb-b79e-9d6ed026061d\",\n   \"metadata\": {},\n   \"source\": [\n    \"All layers will be faceted unless you explicitly exclude them, which can be useful for providing additional context on each subplot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c38be724-8564-4fa0-861c-1d96ffbbda20\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(healthexp, x=\\\"Year\\\", y=\\\"Life_Expectancy\\\")\\n\",\n    \"    .facet(\\\"Country\\\", wrap=3)\\n\",\n    \"    .add(so.Line(alpha=.3), group=\\\"Country\\\", col=None)\\n\",\n    \"    .add(so.Line(linewidth=3))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"f97dad75-65e6-47fd-9fc4-08a8f2cb49ee\",\n   \"metadata\": {},\n   \"source\": [\n    \"An alternate way to produce subplots is :meth:`Plot.pair`. Like :class:`seaborn.PairGrid`, this draws all of the data on each subplot, using different variables for the x and/or y coordinates:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"d6350e99-2c70-4a96-87eb-74756a0fa335\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, y=\\\"body_mass_g\\\", color=\\\"species\\\")\\n\",\n    \"    .pair(x=[\\\"bill_length_mm\\\", \\\"bill_depth_mm\\\"])\\n\",\n    \"    .add(so.Dots())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"4deea650-b4b9-46ea-876c-2e5a3a258649\",\n   \"metadata\": {},\n   \"source\": [\n    \"You can combine faceting and pairing so long as the operations add subplots on opposite dimensions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"9de7948c-4c43-4116-956c-cbcb84d8652c\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, y=\\\"body_mass_g\\\", color=\\\"species\\\")\\n\",\n    \"    .pair(x=[\\\"bill_length_mm\\\", \\\"bill_depth_mm\\\"])\\n\",\n    \"    .facet(row=\\\"sex\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"0a0febe3-9daf-4271-aef9-9637d59aaf10\",\n   \"metadata\": {},\n   \"source\": [\n    \"Integrating with matplotlib\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"There may be cases where you want multiple subplots to appear in a figure with a more complex structure than what :meth:`Plot.facet` or :meth:`Plot.pair` can provide. The current solution is to delegate figure setup to matplotlib and to supply the matplotlib object that :class:`Plot` should use with the :meth:`Plot.on` method. This object can be either a :class:`matplotlib.axes.Axes`, :class:`matplotlib.figure.Figure`, or :class:`matplotlib.figure.SubFigure`; the latter is most useful for constructing bespoke subplot layouts:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b046466d-f6c2-43fa-9ae9-f40a292a82b7\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f = mpl.figure.Figure(figsize=(8, 4))\\n\",\n    \"sf1, sf2 = f.subfigures(1, 2)\\n\",\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"body_mass_g\\\", y=\\\"flipper_length_mm\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \"    .on(sf1)\\n\",\n    \"    .plot()\\n\",\n    \")\\n\",\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"body_mass_g\\\")\\n\",\n    \"    .facet(row=\\\"sex\\\")\\n\",\n    \"    .add(so.Bars(), so.Hist())\\n\",\n    \"    .on(sf2)\\n\",\n    \"    .plot()\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"7074f599-8b9f-4b77-9e15-55349592c747\",\n   \"metadata\": {},\n   \"source\": [\n    \"Building and displaying the plot\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"An important thing to know is that :class:`Plot` methods clone the object they are called on and return that clone instead of updating the object in place. This means that you can define a common plot spec and then produce several variations on it.\\n\",\n    \"\\n\",\n    \"So, take this basic specification:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b79b2148-b867-4e96-9b84-b3fc44ad0c82\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p = so.Plot(healthexp, \\\"Year\\\", \\\"Spending_USD\\\", color=\\\"Country\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"135f89e5-c41e-4c6c-9865-5413787bdc62\",\n   \"metadata\": {},\n   \"source\": [\n    \"We could use it to draw a line plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"10722a20-dc8c-4421-a433-8ff21fed9495\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Line())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"f9db1184-f352-41b8-a45a-02ff6eb85071\",\n   \"metadata\": {},\n   \"source\": [\n    \"Or perhaps a stacked area plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"ea2ad629-c718-44a9-92af-144728094cd5\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Area(), so.Stack())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"17fb2676-6199-4a2c-9f10-3d5aebb7a285\",\n   \"metadata\": {},\n   \"source\": [\n    \"The :class:`Plot` methods are fully declarative. Calling them updates the plot spec, but it doesn't actually do any plotting. One consequence of this is that methods can be called in any order, and many of them can be called multiple times.\\n\",\n    \"\\n\",\n    \"When does the plot actually get rendered? :class:`Plot` is optimized for use in notebook environments. The rendering is automatically triggered when the :class:`Plot` gets displayed in the Jupyter REPL. That's why we didn't see anything in the example above, where we defined a :class:`Plot` but assigned it to `p` rather than letting it return out to the REPL.\\n\",\n    \"\\n\",\n    \"To see a plot in a notebook, either return it from the final line of a cell or call Jupyter's built-in `display` function on the object. The notebook integration bypasses :mod:`matplotlib.pyplot` entirely, but you can use its figure-display machinery in other contexts by calling :meth:`Plot.show`.\\n\",\n    \"\\n\",\n    \"You can also save the plot to a file (or buffer) by calling :meth:`Plot.save`.\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"abfa0384-af88-4409-a119-912601a14f13\",\n   \"metadata\": {},\n   \"source\": [\n    \"Customizing the appearance\\n\",\n    \"--------------------------\\n\",\n    \"\\n\",\n    \"The new interface aims to support a deep amount of customization through :class:`Plot`, reducing the need to switch gears and use matplotlib functionality directly. (But please be patient; not all of the features needed to achieve this goal have been implemented!)\\n\",\n    \"\\n\",\n    \"Parameterizing scales\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"All of the data-dependent properties are controlled by the concept of a :class:`Scale` and the :meth:`Plot.scale` method. This method accepts several different types of arguments. One possibility, which is closest to the use of scales in matplotlib, is to pass the name of a function that transforms the coordinates:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"5acfe6d2-144a-462d-965b-2900fb619eac\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(diamonds, x=\\\"carat\\\", y=\\\"price\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \"    .scale(y=\\\"log\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"ccff884b-53cb-4c15-aab2-f5d4e5551d72\",\n   \"metadata\": {},\n   \"source\": [\n    \":meth:`Plot.scale` can also control the mappings for semantic properties like `color`. You can directly pass it any argument that you would pass to the `palette` parameter in seaborn's function interface:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4f243a31-d7da-43d2-8dc4-aad1b584ff48\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(diamonds, x=\\\"carat\\\", y=\\\"price\\\", color=\\\"clarity\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \"    .scale(color=\\\"flare\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"4fdf291e-a008-4a8e-8ced-a24f78d9b49f\",\n   \"metadata\": {},\n   \"source\": [\n    \"Another option is to provide a tuple of `(min, max)` values, controlling the range that the scale should map into. This works both for numeric properties and for colors:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4cdc12ee-83f9-4472-b198-85bfe5cf0e4f\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(diamonds, x=\\\"carat\\\", y=\\\"price\\\", color=\\\"clarity\\\", pointsize=\\\"carat\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \"    .scale(color=(\\\"#88c\\\", \\\"#555\\\"), pointsize=(2, 10))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"e326bf46-a296-4997-8e91-6531a7eef304\",\n   \"metadata\": {},\n   \"source\": [\n    \"For additional control, you can pass a :class:`Scale` object. There are several different types of :class:`Scale`, each with appropriate parameters. For example, :class:`Continuous` lets you define the input domain (`norm`), the output range (`values`), and the function that maps between them (`trans`), while :class:`Nominal` allows you to specify an ordering:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"53682db4-2ba4-4dfd-80c2-1fef466cfab2\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(diamonds, x=\\\"carat\\\", y=\\\"price\\\", color=\\\"carat\\\", marker=\\\"cut\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \"    .scale(\\n\",\n    \"        color=so.Continuous(\\\"crest\\\", norm=(0, 3), trans=\\\"sqrt\\\"),\\n\",\n    \"        marker=so.Nominal([\\\"o\\\", \\\"+\\\", \\\"x\\\"], order=[\\\"Ideal\\\", \\\"Premium\\\", \\\"Good\\\"]),\\n\",\n    \"    )\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"7bf112fe-136d-4e63-a397-1e7d2ff4f543\",\n   \"metadata\": {},\n   \"source\": [\n    \"Customizing legends and ticks\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"The :class:`Scale` objects are also how you specify which values should appear as tick labels / in the legend, along with how they appear. For example, the :meth:`Continuous.tick` method lets you control the density or locations of the ticks, and the :meth:`Continuous.label` method lets you modify the format:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4f8e821f-bd19-4af1-bb66-488593b3c968\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(diamonds, x=\\\"carat\\\", y=\\\"price\\\", color=\\\"carat\\\")\\n\",\n    \"    .add(so.Dots())\\n\",\n    \"    .scale(\\n\",\n    \"        x=so.Continuous().tick(every=0.5),\\n\",\n    \"        y=so.Continuous().label(like=\\\"${x:.0f}\\\"),\\n\",\n    \"        color=so.Continuous().tick(at=[1, 2, 3, 4]),\\n\",\n    \"    )\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"4f6646c9-084b-49ae-ad6f-39c0bd12fc4e\",\n   \"metadata\": {},\n   \"source\": [\n    \"Customizing limits, labels, and titles\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \":class:`Plot` has a number of methods for simple customization, including :meth:`Plot.label`, :meth:`Plot.limit`, and :meth:`Plot.share`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e9586669-35ea-4784-9594-ea375a06aec0\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"body_mass_g\\\", y=\\\"species\\\", color=\\\"island\\\")\\n\",\n    \"    .facet(col=\\\"sex\\\")\\n\",\n    \"    .add(so.Dot(), so.Jitter(.5))\\n\",\n    \"    .share(x=False)\\n\",\n    \"    .limit(y=(2.5, -.5))\\n\",\n    \"    .label(\\n\",\n    \"        x=\\\"Body mass (g)\\\", y=\\\"\\\",\\n\",\n    \"        color=str.capitalize,\\n\",\n    \"        title=\\\"{} penguins\\\".format,\\n\",\n    \"    )\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"3b38607a-9b41-49c0-8031-e05bc87701c8\",\n   \"metadata\": {},\n   \"source\": [\n    \"Theme customization\\n\",\n    \"~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"Finally, :class:`Plot` supports data-independent theming through the :class:`Plot.theme` method. Currently, this method accepts a dictionary of matplotlib rc parameters. You can set them directly and/or pass a package of parameters from seaborn's theming functions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2df40831-fd41-4b76-90ff-042aecd694d4\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"from seaborn import axes_style\\n\",\n    \"so.Plot().theme({**axes_style(\\\"whitegrid\\\"), \\\"grid.linestyle\\\": \\\":\\\"})\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"8ac5e809-e4a0-4c08-b9c0-fa78bd93eb82\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"col":4,"comment":"null","endLoc":336,"header":"def default_scale(self, data: Series) -> Nominal","id":2219,"name":"default_scale","nodeType":"Function","startLoc":335,"text":"def default_scale(self, data: Series) -> Nominal:\n        return Nominal()"},{"id":2221,"name":"README.md","nodeType":"TextFile","path":"doc","text":"Building the seaborn docs\n=========================\n\nBuilding the docs requires additional dependencies; they can be installed with `pip install seaborn[stats,docs]`.\n\nThe build process involves conversion of Jupyter notebooks to `rst` files. To facilitate this, you may need to set `NB_KERNEL` environment variable to the name of a kernel on your machine (e.g. `export NB_KERNEL=\"python3\"`). To get a list of available Python kernels, run `jupyter kernelspec list`.\n\nAfter you're set up, run `make notebooks html` from the `doc` directory to convert all notebooks, generate all gallery examples, and build the documentation itself. The site will live in `_build/html`.\n\nRun `make clean` to delete the built site and all intermediate files. Run `make -C docstrings clean` or `make -C tutorial clean` to remove intermediate files for the API or tutorial components.\n\nIf your goal is to obtain an offline copy of the docs for a released version, it may be easier to clone the [website repository](https://github.com/seaborn/seaborn.github.io) or to download a zipfile corresponding to a [specific version](https://github.com/seaborn/seaborn.github.io/tags).\n"},{"col":4,"comment":"null","endLoc":262,"header":"def test_histogram_multiple(self, long_df, triple_args)","id":2222,"name":"test_histogram_multiple","nodeType":"Function","startLoc":253,"text":"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))"},{"id":2223,"name":"objects.Line.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2923956c-f141-4ecb-ab08-e819099f0fa9\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"dowjones = load_dataset(\\\"dowjones\\\")\\n\",\n    \"fmri = load_dataset(\\\"fmri\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"05468ecf-d2f5-46f0-ba43-ea13aba0ebd2\",\n   \"metadata\": {},\n   \"source\": [\n    \"The mark draws a connecting line between sorted observations:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"acd5788f-e62b-497c-a109-f0bc02b8cae9\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"so.Plot(dowjones, \\\"Date\\\", \\\"Price\\\").add(so.Line())\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"94efb077-49a5-4214-891a-c68f89c79926\",\n   \"metadata\": {},\n   \"source\": [\n    \"Change the orientation to connect observations along the opposite axis (`orient=\\\"y\\\"` is redundant here; the plot would detect that the date variable has a lower orientation priority than the price variable):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4c5db48f-1c88-4905-a5f5-2ae96ceb0f95\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"so.Plot(dowjones, x=\\\"Price\\\", y=\\\"Date\\\").add(so.Line(), orient=\\\"y\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"77bd0b1e-d9d1-4741-9821-83cec708e877\",\n   \"metadata\": {},\n   \"source\": [\n    \"To replicate the same line multiple times, assign a `group` variable (but consider using :class:`Lines` here instead):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2c1b699c-4e42-4461-a7fb-0d664ef8fe1b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    fmri\\n\",\n    \"    .query(\\\"region == 'parietal' and event == 'stim'\\\")\\n\",\n    \"    .pipe(so.Plot, \\\"timepoint\\\", \\\"signal\\\")\\n\",\n    \"    .add(so.Line(color=\\\".2\\\", linewidth=1), group=\\\"subject\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"c09cc6a1-a86b-48b7-b276-e0e9125d279e\",\n   \"metadata\": {},\n   \"source\": [\n    \"When mapping variables to properties like `color` or `linestyle`, stat transforms are computed within each grouping:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"83b8c68d-a1ae-4bfb-b3dc-4a11bbe85cbc\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p = so.Plot(fmri, \\\"timepoint\\\", \\\"signal\\\", color=\\\"region\\\", linestyle=\\\"event\\\")\\n\",\n    \"p.add(so.Line(), so.Agg())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"c9390f58-0fb1-47ba-8b86-bde4c41e6d1d\",\n   \"metadata\": {},\n   \"source\": [\n    \"Combine with :class:`Band` to show an error bar:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b6ab0006-0f28-4992-b687-41889a424684\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    p\\n\",\n    \"    .add(so.Line(), so.Agg())\\n\",\n    \"    .add(so.Band(), so.Est(), group=\\\"event\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"e567df5c-6675-423f-bcd8-94cb3a400251\",\n   \"metadata\": {},\n   \"source\": [\n    \"Add markers to indicate values where the data were sampled:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2541701c-1a2c-44dd-b300-6551861c8b98\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Line(marker=\\\"o\\\", edgecolor=\\\"w\\\"), so.Agg(), linestyle=None)\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a25d0379-b374-4539-82a4-00ce37245e1b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"col":4,"comment":"null","endLoc":81,"header":"def test_mapped_alignment(self)","id":2224,"name":"test_mapped_alignment","nodeType":"Function","startLoc":72,"text":"def test_mapped_alignment(self):\n\n        x = [1, 2]\n        p = Plot(x=x, y=x, halign=x, valign=x, text=x).add(Text()).plot()\n        ax = p._figure.axes[0]\n        t1, t2 = self.get_texts(ax)\n        assert t1.get_horizontalalignment() == \"left\"\n        assert t2.get_horizontalalignment() == \"right\"\n        assert t1.get_verticalalignment() == \"top\"\n        assert t2.get_verticalalignment() == \"bottom\""},{"col":4,"comment":"null","endLoc":77,"header":"def _legend_artist(self, variables, value, scales)","id":2225,"name":"_legend_artist","nodeType":"Function","startLoc":72,"text":"def _legend_artist(self, variables, value, scales):\n\n        a = mpl.lines.Line2D([], [])\n        a.variables = variables\n        a.value = value\n        return a"},{"attributeType":"list","col":4,"comment":"null","endLoc":49,"id":2226,"name":"_grouping_props","nodeType":"Attribute","startLoc":49,"text":"_grouping_props"},{"attributeType":"int","col":8,"comment":"null","endLoc":59,"id":2228,"name":"n_splits","nodeType":"Attribute","startLoc":59,"text":"self.n_splits"},{"attributeType":"list","col":8,"comment":"null","endLoc":55,"id":2229,"name":"passed_data","nodeType":"Attribute","startLoc":55,"text":"self.passed_data"},{"attributeType":"None","col":8,"comment":"null","endLoc":58,"id":2230,"name":"passed_orient","nodeType":"Attribute","startLoc":58,"text":"self.passed_orient"},{"attributeType":"null","col":4,"comment":"null","endLoc":8,"id":2233,"name":"regexp","nodeType":"Attribute","startLoc":8,"text":"regexp"},{"attributeType":"null","col":16,"comment":"null","endLoc":2,"id":2234,"name":"np","nodeType":"Attribute","startLoc":2,"text":"np"},{"id":2235,"name":"v0.5.0.rst","nodeType":"TextFile","path":"doc/whatsnew","text":"\nv0.5.0 (November 2014)\n--------------------------\n\nThis is a major release from 0.4. Highlights include new functions for plotting heatmaps, possibly while applying clustering algorithms to discover structured relationships. These functions are complemented by new custom colormap functions and a full set of IPython widgets that allow interactive selection of colormap parameters. The palette tutorial has been rewritten to cover these new tools and more generally provide guidance on how to use color in visualizations. There are also a number of smaller changes and bugfixes.\n\nPlotting functions\n~~~~~~~~~~~~~~~~~~\n\n- Added the :func:`heatmap` function for visualizing a matrix of data by color-encoding the values. See the docs for more information.\n\n- Added the :func:`clustermap` function for clustering and visualizing a matrix of data, with options to label individual rows and columns by colors. See the docs for more information. This work was lead by Olga Botvinnik.\n\n- :func:`lmplot` and :func:`pairplot` get a new keyword argument, ``markers``. This can be a single kind of marker or a list of different markers for each level of the ``hue`` variable. Using different markers for different hues should let plots be more comprehensible when reproduced to black-and-white (i.e. when printed). See the `github pull request (#323) `_ for examples.\n\n- More generally, there is a new keyword argument in :class:`FacetGrid` and :class:`PairGrid`, ``hue_kws``. This similarly lets plot aesthetics vary across the levels of the hue variable, but more flexibly. ``hue_kws`` should be a dictionary that maps the name of keyword arguments to lists of values that are as long as the number of levels of the hue variable.\n\n- The argument ``subplot_kws`` has been added to ``FacetGrid``. This allows for faceted plots with custom projections, including `maps with Cartopy `_.\n\nColor palettes\n~~~~~~~~~~~~~~\n\n- Added two new functions to create custom color palettes. For sequential palettes, you can use the :func:`light_palette` function, which takes a seed color and creates a ramp from a very light, desaturated variant of it. For diverging palettes, you can use the :func:`diverging_palette` function to create a balanced ramp between two endpoints to a light or dark midpoint. See the :ref:`palette tutorial ` for more information.\n\n- Added the ability to specify the seed color for :func:`light_palette` and :func:`dark_palette` as a tuple of ``husl`` or ``hls`` space values or as a named ``xkcd`` color. The interpretation of the seed color is now provided by the new ``input`` parameter to these functions.\n\n- Added several new interactive palette widgets: :func:`choose_colorbrewer_palette`, :func:`choose_light_palette`, :func:`choose_dark_palette`, and :func:`choose_diverging_palette`. For consistency, renamed the cubehelix widget to :func:`choose_cubehelix_palette` (and fixed a bug where the cubehelix palette was reversed). These functions also now return either a color palette list or a matplotlib colormap when called, and that object will be live-updated as you play with the widget. This should make it easy to iterate over a plot until you find a good representation for the data. See the `Github pull request `_ or `this notebook (download it to use the widgets) `_ for more information.\n\n- Overhauled the color :ref:`palette tutorial ` to organize the discussion by class of color palette and provide more motivation behind the various choices one might make when choosing colors for their data.\n\nBug fixes\n~~~~~~~~~\n- Fixed a bug in :class:`PairGrid` that gave incorrect results (or a crash) when the input DataFrame has a non-default index.\n\n- Fixed a bug in :class:`PairGrid` where passing columns with a date-like datatype raised an exception.\n\n- Fixed a bug where :func:`lmplot` would show a legend when the hue variable was also used on either the rows or columns (making the legend redundant).\n\n- Worked around a matplotlib bug that was forcing outliers in :func:`boxplot` to appear as blue.\n\n- :func:`kdeplot` now accepts pandas Series for the ``data`` and ``data2`` arguments.\n\n- Using a non-default correlation method in :func:`corrplot` now implies ``sig_stars=False`` as the permutation test used to significance values for the correlations uses a pearson metric.\n\n- Removed ``pdf.fonttype`` from the style definitions, as the value used in version 0.4 resulted in very large PDF files.\n"},{"attributeType":"null","col":17,"comment":"null","endLoc":3,"id":2236,"name":"pd","nodeType":"Attribute","startLoc":3,"text":"pd"},{"attributeType":"null","col":8,"comment":"null","endLoc":23,"id":2237,"name":"entries","nodeType":"Attribute","startLoc":23,"text":"self.entries"},{"attributeType":"None","col":8,"comment":"null","endLoc":57,"id":2238,"name":"passed_scales","nodeType":"Attribute","startLoc":57,"text":"self.passed_scales"},{"id":2239,"name":"color_palette.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme()\\n\",\n    \"sns.palettes._patch_colormap_display()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Calling with no arguments returns all colors from the current default\\n\",\n    \"color cycle:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Other variants on the seaborn categorical color palette can be referenced by name:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette(\\\"pastel\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return a specified number of evenly spaced hues in the \\\"HUSL\\\" system:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette(\\\"husl\\\", 9)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return all unique colors in a categorical Color Brewer palette:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette(\\\"Set2\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return a diverging Color Brewer palette as a continuous colormap:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette(\\\"Spectral\\\", as_cmap=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return one of the perceptually-uniform palettes included in seaborn as a discrete palette:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette(\\\"flare\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return one of the perceptually-uniform palettes included in seaborn as a continuous colormap:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette(\\\"flare\\\", as_cmap=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return a customized cubehelix color palette:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette(\\\"ch:s=.25,rot=-.25\\\", as_cmap=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return a light sequential gradient:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette(\\\"light:#5A9\\\", as_cmap=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return a reversed dark sequential gradient:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette(\\\"dark:#5A9_r\\\", as_cmap=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Return a blend gradient between two endpoints:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.color_palette(\\\"blend:#7AB,#EDA\\\", as_cmap=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use as a context manager to change the default qualitative color palette:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"x, y = list(range(10)), [0] * 10\\n\",\n    \"hue = list(map(str, x))\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"with sns.color_palette(\\\"Set3\\\"):\\n\",\n    \"    sns.relplot(x=x, y=y, hue=hue, s=500, legend=False, height=1.3, aspect=4)\\n\",\n    \"\\n\",\n    \"sns.relplot(x=x, y=y, hue=hue, s=500, legend=False, height=1.3, aspect=4)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"See the underlying color values as hex codes:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"show-output\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"print(sns.color_palette(\\\"pastel6\\\").as_hex())\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":194,"id":2240,"name":"_core_docs","nodeType":"Attribute","startLoc":194,"text":"_core_docs"},{"fileName":"scatterplot_matrix.py","filePath":"examples","id":2241,"nodeType":"File","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\")\n"},{"attributeType":"list","col":8,"comment":"null","endLoc":56,"id":2242,"name":"passed_axes","nodeType":"Attribute","startLoc":56,"text":"self.passed_axes"},{"attributeType":"list","col":8,"comment":"null","endLoc":54,"id":2243,"name":"passed_keys","nodeType":"Attribute","startLoc":54,"text":"self.passed_keys"},{"className":"TestInit","col":0,"comment":"null","endLoc":187,"id":2244,"nodeType":"Class","startLoc":80,"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\"]\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\")"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":2245,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"id":2246,"name":"objects.Range.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"2923956c-f141-4ecb-ab08-e819099f0fa9\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"penguins = load_dataset(\\\"penguins\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"576cbc86-f869-47b5-a98f-6ee727287a8b\",\n   \"metadata\": {},\n   \"source\": [\n    \"This mark will often be used in the context of a stat transform that adds an errorbar interval:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"f6217b85-7479-49fd-aeda-9f435aa0473a\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"body_mass_g\\\", y=\\\"species\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Dot(), so.Agg(), so.Dodge())\\n\",\n    \"    .add(so.Range(), so.Est(errorbar=\\\"sd\\\"), so.Dodge())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"e156ea24-d8b4-4d67-acb5-750034be4dde\",\n   \"metadata\": {},\n   \"source\": [\n    \"One feature (or potential gotcha) is that the mark will pick up properties like `linestyle` and `linewidth`; exclude those properties from the relevant layer if this behavior is undesired:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4bb63ebb-7733-4313-844c-cb7613298da3\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"sex\\\", y=\\\"body_mass_g\\\", linestyle=\\\"species\\\")\\n\",\n    \"    .facet(\\\"species\\\")\\n\",\n    \"    .add(so.Line(marker=\\\"o\\\"), so.Agg())\\n\",\n    \"    .add(so.Range(), so.Est(errorbar=\\\"sd\\\"))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"5387e049-b343-49ea-a943-7dd9c090f184\",\n   \"metadata\": {},\n   \"source\": [\n    \"It's also possible to directly assign the minimum and maximum values for the range:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"4e795770-4481-4e23-a49b-e828a1f5cbbd\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    penguins\\n\",\n    \"    .rename_axis(index=\\\"penguin\\\")\\n\",\n    \"    .pipe(so.Plot, x=\\\"penguin\\\", ymin=\\\"bill_depth_mm\\\", ymax=\\\"bill_length_mm\\\")\\n\",\n    \"    .add(so.Range(), color=\\\"island\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"2191bec6-a02e-48e0-b92c-69c38826049d\",\n   \"metadata\": {},\n   \"source\": [\n    \"When `min`/`max` variables are neither computed as part of a transform or explicitly assigned, the range will cover the full extent of the data at each unique observation on the orient axis:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"63c6352e-4ef5-4cff-940e-35fa5804b2c7\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(penguins, x=\\\"sex\\\", y=\\\"body_mass_g\\\")\\n\",\n    \"    .facet(\\\"species\\\")\\n\",\n    \"    .add(so.Dots(pointsize=6))\\n\",\n    \"    .add(so.Range(linewidth=2))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"c215deb1-e510-4631-b999-737f5f41cae2\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"className":"FacetGrid","col":0,"comment":"Multi-plot grid for plotting conditional relationships.","endLoc":1169,"id":2247,"nodeType":"Class","startLoc":363,"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)\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)\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\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.items()]\n\n            # Some matplotlib functions don't handle pandas objects correctly\n            if func_module.startswith(\"matplotlib\"):\n                plot_args = [v.values for v in plot_args]\n\n            # Draw the plot\n            self._facet_plot(func, ax, plot_args, kwargs)\n\n        # Finalize the annotations and layout\n        self._finalize_grid(args[:2])\n\n        return self\n\n    def map_dataframe(self, func, *args, **kwargs):\n        \"\"\"Like ``.map`` but passes args as strings and inserts data in kwargs.\n\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\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)\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\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\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 column variable when titles are drawn on the grid\n            margins. Must have {col_var} and {col_name} formatting keys.\n\n        Returns\n        -------\n        self: object\n            Returns self.\n\n        \"\"\"\n        args = dict(row_var=self._row_var, col_var=self._col_var)\n        kwargs[\"size\"] = kwargs.pop(\"size\", mpl.rcParams[\"axes.labelsize\"])\n\n        # Establish default templates\n        if row_template is None:\n            row_template = \"{row_var} = {row_name}\"\n        if col_template is None:\n            col_template = \"{col_var} = {col_name}\"\n        if template is None:\n            if self._row_var is None:\n                template = col_template\n            elif self._col_var is None:\n                template = row_template\n            else:\n                template = \" | \".join([row_template, col_template])\n\n        row_template = utils.to_utf8(row_template)\n        col_template = utils.to_utf8(col_template)\n        template = utils.to_utf8(template)\n\n        if self._margin_titles:\n\n            # Remove any existing title texts\n            for text in self._margin_titles_texts:\n                text.remove()\n            self._margin_titles_texts = []\n\n            if self.row_names is not None:\n                # Draw the row titles on the right edge of the grid\n                for i, row_name in enumerate(self.row_names):\n                    ax = self.axes[i, -1]\n                    args.update(dict(row_name=row_name))\n                    title = row_template.format(**args)\n                    text = ax.annotate(\n                        title, xy=(1.02, .5), xycoords=\"axes fraction\",\n                        rotation=270, ha=\"left\", va=\"center\",\n                        **kwargs\n                    )\n                    self._margin_titles_texts.append(text)\n\n            if self.col_names is not None:\n                # Draw the column titles  as normal titles\n                for j, col_name in enumerate(self.col_names):\n                    args.update(dict(col_name=col_name))\n                    title = col_template.format(**args)\n                    self.axes[0, j].set_title(title, **kwargs)\n\n            return self\n\n        # Otherwise title each facet with all the necessary information\n        if (self._row_var is not None) and (self._col_var is not None):\n            for i, row_name in enumerate(self.row_names):\n                for j, col_name in enumerate(self.col_names):\n                    args.update(dict(row_name=row_name, col_name=col_name))\n                    title = template.format(**args)\n                    self.axes[i, j].set_title(title, **kwargs)\n        elif self.row_names is not None and len(self.row_names):\n            for i, row_name in enumerate(self.row_names):\n                args.update(dict(row_name=row_name))\n                title = template.format(**args)\n                self.axes[i, 0].set_title(title, **kwargs)\n        elif self.col_names is not None and len(self.col_names):\n            for i, col_name in enumerate(self.col_names):\n                args.update(dict(col_name=col_name))\n                title = template.format(**args)\n                # Index the flat array so col_wrap works\n                self.axes.flat[i].set_title(title, **kwargs)\n        return self\n\n    def refline(self, *, x=None, y=None, color='.5', linestyle='--', **line_kws):\n        \"\"\"Add a reference line(s) to each facet.\n\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\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\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\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\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\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"},{"col":4,"comment":"null","endLoc":86,"header":"def test_empty(self)","id":2248,"name":"test_empty","nodeType":"Function","startLoc":82,"text":"def test_empty(self):\n\n        p = Plot()\n        assert p._data.source_data is None\n        assert p._data.source_vars == {}"},{"col":4,"comment":"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        ","endLoc":675,"header":"def facet_data(self)","id":2249,"name":"facet_data","nodeType":"Function","startLoc":637,"text":"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"},{"col":0,"comment":"","endLoc":6,"header":"structured_heatmap.py#","id":2250,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nDiscovering structure in heatmap data\n=====================================\n\n_thumb: .3, .25\n\"\"\"\n\nsns.set_theme()\n\ndf = sns.load_dataset(\"brain_networks\", header=[0, 1, 2], index_col=0)\n\nused_networks = [1, 5, 6, 7, 8, 12, 13, 17]\n\nused_columns = (df.columns.get_level_values(\"network\")\n                          .astype(int)\n                          .isin(used_networks))\n\ndf = df.loc[:, used_columns]\n\nnetwork_pal = sns.husl_palette(8, s=.45)\n\nnetwork_lut = dict(zip(map(str, used_networks), network_pal))\n\nnetworks = df.columns.get_level_values(\"network\")\n\nnetwork_colors = pd.Series(networks, index=df.columns).map(network_lut)\n\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()"},{"col":4,"comment":"Find which variables in a DataFrame are numeric.","endLoc":1670,"header":"def _find_numeric_cols(self, data)","id":2251,"name":"_find_numeric_cols","nodeType":"Function","startLoc":1664,"text":"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"},{"col":4,"comment":"null","endLoc":92,"header":"def test_data_only(self, long_df)","id":2252,"name":"test_data_only","nodeType":"Function","startLoc":88,"text":"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 == {}"},{"col":0,"comment":"\n    Plot a matrix dataset as a hierarchically-clustered heatmap.\n\n    This function requires scipy to be available.\n\n    Parameters\n    ----------\n    data : 2D array-like\n        Rectangular data for clustering. Cannot contain NAs.\n    pivot_kws : dict, optional\n        If `data` is a tidy dataframe, can provide keyword arguments for\n        pivot to create a rectangular dataframe.\n    method : str, optional\n        Linkage method to use for calculating clusters. See\n        :func:`scipy.cluster.hierarchy.linkage` documentation for more\n        information.\n    metric : str, optional\n        Distance metric to use for the data. See\n        :func:`scipy.spatial.distance.pdist` documentation for more options.\n        To use different metrics (or methods) for rows and columns, you may\n        construct each linkage matrix yourself and provide them as\n        `{row,col}_linkage`.\n    z_score : int or None, optional\n        Either 0 (rows) or 1 (columns). Whether or not to calculate z-scores\n        for the rows or the columns. Z scores are: z = (x - mean)/std, so\n        values in each row (column) will get the mean of the row (column)\n        subtracted, then divided by the standard deviation of the row (column).\n        This ensures that each row (column) has mean of 0 and variance of 1.\n    standard_scale : int or None, optional\n        Either 0 (rows) or 1 (columns). Whether or not to standardize that\n        dimension, meaning for each row or column, subtract the minimum and\n        divide each by its maximum.\n    figsize : tuple of (width, height), optional\n        Overall size of the figure.\n    cbar_kws : dict, optional\n        Keyword arguments to pass to `cbar_kws` in :func:`heatmap`, e.g. to\n        add a label to the colorbar.\n    {row,col}_cluster : bool, optional\n        If ``True``, cluster the {rows, columns}.\n    {row,col}_linkage : :class:`numpy.ndarray`, optional\n        Precomputed linkage matrix for the rows or columns. See\n        :func:`scipy.cluster.hierarchy.linkage` for specific formats.\n    {row,col}_colors : list-like or pandas DataFrame/Series, optional\n        List of colors to label for either the rows or columns. Useful to evaluate\n        whether samples within a group are clustered together. Can use nested lists or\n        DataFrame for multiple color levels of labeling. If given as a\n        :class:`pandas.DataFrame` or :class:`pandas.Series`, labels for the colors are\n        extracted from the DataFrames column names or from the name of the Series.\n        DataFrame/Series colors are also matched to the data by their index, ensuring\n        colors are drawn in the correct order.\n    mask : bool array or DataFrame, optional\n        If passed, data will not be shown in cells where `mask` is True.\n        Cells with missing values are automatically masked. Only used for\n        visualizing, not for calculating.\n    {dendrogram,colors}_ratio : float, or pair of floats, optional\n        Proportion of the figure size devoted to the two marginal elements. If\n        a pair is given, they correspond to (row, col) ratios.\n    cbar_pos : tuple of (left, bottom, width, height), optional\n        Position of the colorbar axes in the figure. Setting to ``None`` will\n        disable the colorbar.\n    tree_kws : dict, optional\n        Parameters for the :class:`matplotlib.collections.LineCollection`\n        that is used to plot the lines of the dendrogram tree.\n    kwargs : other keyword arguments\n        All other keyword arguments are passed to :func:`heatmap`.\n\n    Returns\n    -------\n    :class:`ClusterGrid`\n        A :class:`ClusterGrid` instance.\n\n    See Also\n    --------\n    heatmap : Plot rectangular data as a color-encoded matrix.\n\n    Notes\n    -----\n    The returned object has a ``savefig`` method that should be used if you\n    want to save the figure object without clipping the dendrograms.\n\n    To access the reordered row indices, use:\n    ``clustergrid.dendrogram_row.reordered_ind``\n\n    Column indices, use:\n    ``clustergrid.dendrogram_col.reordered_ind``\n\n    Examples\n    --------\n\n    .. include:: ../docstrings/clustermap.rst\n\n    ","endLoc":1262,"header":"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)","id":2253,"name":"clustermap","nodeType":"Function","startLoc":1146,"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    .. include:: ../docstrings/clustermap.rst\n\n    \"\"\"\n    if _no_scipy:\n        raise RuntimeError(\"clustermap requires scipy to be available\")\n\n    plotter = ClusterGrid(data, pivot_kws=pivot_kws, figsize=figsize,\n                          row_colors=row_colors, col_colors=col_colors,\n                          z_score=z_score, standard_scale=standard_scale,\n                          mask=mask, dendrogram_ratio=dendrogram_ratio,\n                          colors_ratio=colors_ratio, cbar_pos=cbar_pos)\n\n    return plotter.plot(metric=metric, method=method,\n                        colorbar_kws=cbar_kws,\n                        row_cluster=row_cluster, col_cluster=col_cluster,\n                        row_linkage=row_linkage, col_linkage=col_linkage,\n                        tree_kws=tree_kws, **kwargs)"},{"attributeType":"null","col":0,"comment":"null","endLoc":10,"id":2254,"name":"df","nodeType":"Attribute","startLoc":10,"text":"df"},{"col":4,"comment":"null","endLoc":101,"header":"def test_df_and_named_variables(self, long_df)","id":2255,"name":"test_df_and_named_variables","nodeType":"Function","startLoc":94,"text":"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()"},{"col":4,"comment":"null","endLoc":178,"header":"def __getitem__(self, key)","id":2256,"name":"__getitem__","nodeType":"Function","startLoc":177,"text":"def __getitem__(self, key):\n        return self._parsed_data[key]"},{"col":4,"comment":"null","endLoc":184,"header":"def __setitem__(self, key, val)","id":2257,"name":"__setitem__","nodeType":"Function","startLoc":180,"text":"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"},{"col":4,"comment":"null","endLoc":187,"header":"def __iter__(self)","id":2259,"name":"__iter__","nodeType":"Function","startLoc":186,"text":"def __iter__(self):\n        return iter(self._parsed_data)"},{"col":0,"comment":"","endLoc":6,"header":"scatterplot_matrix.py#","id":2260,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nScatterplot Matrix\n==================\n\n_thumb: .3, .2\n\"\"\"\n\nsns.set_theme(style=\"ticks\")\n\ndf = sns.load_dataset(\"penguins\")\n\nsns.pairplot(df, hue=\"species\")"},{"col":0,"comment":"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    ","endLoc":2176,"header":"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)","id":2261,"name":"pairplot","nodeType":"Function","startLoc":2005,"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    # Avoid circular import\n    from .distributions import histplot, kdeplot\n\n    # Handle deprecations\n    if size is not None:\n        height = size\n        msg = (\"The `size` parameter has been renamed to `height`; \"\n               \"please update your code.\")\n        warnings.warn(msg, UserWarning)\n\n    if not isinstance(data, pd.DataFrame):\n        raise TypeError(\n            f\"'data' must be pandas DataFrame object, not: {type(data)}\")\n\n    plot_kws = {} if plot_kws is None else plot_kws.copy()\n    diag_kws = {} if diag_kws is None else diag_kws.copy()\n    grid_kws = {} if grid_kws is None else grid_kws.copy()\n\n    # Resolve \"auto\" diag kind\n    if diag_kind == \"auto\":\n        if hue is None:\n            diag_kind = \"kde\" if kind == \"kde\" else \"hist\"\n        else:\n            diag_kind = \"hist\" if kind == \"hist\" else \"kde\"\n\n    # Set up the PairGrid\n    grid_kws.setdefault(\"diag_sharey\", diag_kind == \"hist\")\n    grid = PairGrid(data, vars=vars, x_vars=x_vars, y_vars=y_vars, hue=hue,\n                    hue_order=hue_order, palette=palette, corner=corner,\n                    height=height, aspect=aspect, dropna=dropna, **grid_kws)\n\n    # Add the markers here as PairGrid has figured out how many levels of the\n    # hue variable are needed and we don't want to duplicate that process\n    if markers is not None:\n        if kind == \"reg\":\n            # Needed until regplot supports style\n            if grid.hue_names is None:\n                n_markers = 1\n            else:\n                n_markers = len(grid.hue_names)\n            if not isinstance(markers, list):\n                markers = [markers] * n_markers\n            if len(markers) != n_markers:\n                raise ValueError(\"markers must be a singleton or a list of \"\n                                 \"markers for each level of the hue variable\")\n            grid.hue_kws = {\"marker\": markers}\n        elif kind == \"scatter\":\n            if isinstance(markers, str):\n                plot_kws[\"marker\"] = markers\n            elif hue is not None:\n                plot_kws[\"style\"] = data[hue]\n                plot_kws[\"markers\"] = markers\n\n    # Draw the marginal plots on the diagonal\n    diag_kws = diag_kws.copy()\n    diag_kws.setdefault(\"legend\", False)\n    if diag_kind == \"hist\":\n        grid.map_diag(histplot, **diag_kws)\n    elif diag_kind == \"kde\":\n        diag_kws.setdefault(\"fill\", True)\n        diag_kws.setdefault(\"warn_singular\", False)\n        grid.map_diag(kdeplot, **diag_kws)\n\n    # Maybe plot on the off-diagonals\n    if diag_kind is not None:\n        plotter = grid.map_offdiag\n    else:\n        plotter = grid.map\n\n    if kind == \"scatter\":\n        from .relational import scatterplot  # Avoid circular import\n        plotter(scatterplot, **plot_kws)\n    elif kind == \"reg\":\n        from .regression import regplot  # Avoid circular import\n        plotter(regplot, **plot_kws)\n    elif kind == \"kde\":\n        from .distributions import kdeplot  # Avoid circular import\n        plot_kws.setdefault(\"warn_singular\", False)\n        plotter(kdeplot, **plot_kws)\n    elif kind == \"hist\":\n        from .distributions import histplot  # Avoid circular import\n        plotter(histplot, **plot_kws)\n\n    # Add a legend\n    if hue is not None:\n        grid.add_legend()\n\n    grid.tight_layout()\n\n    return grid"},{"col":4,"comment":"null","endLoc":190,"header":"def __len__(self)","id":2262,"name":"__len__","nodeType":"Function","startLoc":189,"text":"def __len__(self):\n        return len(self._parsed_data)"},{"fileName":"appdirs.py","filePath":"seaborn/external","id":2263,"nodeType":"File","text":"#!/usr/bin/env python3\n# Copyright (c) 2005-2010 ActiveState Software Inc.\n# Copyright (c) 2013 Eddy Petrișor\n\n# flake8: noqa\n\n\"\"\"\nThis file is directly from\nhttps://github.com/ActiveState/appdirs/blob/3fe6a83776843a46f20c2e5587afcffe05e03b39/appdirs.py\n\nThe license of https://github.com/ActiveState/appdirs copied below:\n\n\n# This is the MIT license\n\nCopyright (c) 2010 ActiveState Software Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\"\"\"\n\n\"\"\"Utilities for determining application-specific dirs.\n\nSee  for details and usage.\n\"\"\"\n# Dev Notes:\n# - MSDN on where to store app data files:\n#   http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120\n# - Mac OS X: http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/index.html\n# - XDG spec for Un*x: https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html\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\n\n\ndef user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):\n    r\"\"\"Return full path to the user-specific cache dir for this application.\n\n        \"appname\" is the name of application.\n            If None, just the system directory is returned.\n        \"appauthor\" (only used on Windows) is the name of the\n            appauthor or distributing body for this application. Typically\n            it is the owning company name. This falls back to appname. You may\n            pass False to disable it.\n        \"version\" is an optional version path element to append to the\n            path. You might want to use this if you want multiple versions\n            of your app to be able to run independently. If used, this\n            would typically be \".\".\n            Only applied when appname is present.\n        \"opinion\" (boolean) can be False to disable the appending of\n            \"Cache\" to the base app data dir for Windows. See\n            discussion below.\n\n    Typical user cache directories are:\n        Mac OS X:   ~/Library/Caches/\n        Unix:       ~/.cache/ (XDG default)\n        Win XP:     C:\\Documents and Settings\\\\Local Settings\\Application Data\\\\\\Cache\n        Vista:      C:\\Users\\\\AppData\\Local\\\\\\Cache\n\n    On Windows the only suggestion in the MSDN docs is that local settings go in\n    the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming\n    app data dir (the default returned by `user_data_dir` above). Apps typically\n    put cache data somewhere *under* the given dir here. Some examples:\n        ...\\Mozilla\\Firefox\\Profiles\\\\Cache\n        ...\\Acme\\SuperApp\\Cache\\1.0\n    OPINION: This function appends \"Cache\" to the `CSIDL_LOCAL_APPDATA` value.\n    This can be disabled with the `opinion=False` option.\n    \"\"\"\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\n\n\n#---- 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\n\n\ndef _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\n\n\ndef _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\n\ndef _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\n"},{"col":4,"comment":"null","endLoc":446,"header":"def _str_header(self, name, symbol='-')","id":2264,"name":"_str_header","nodeType":"Function","startLoc":445,"text":"def _str_header(self, name, symbol='-'):\n        return [name, len(name)*symbol]"},{"col":4,"comment":"null","endLoc":452,"header":"def _str_indent(self, doc, indent=4)","id":2267,"name":"_str_indent","nodeType":"Function","startLoc":448,"text":"def _str_indent(self, doc, indent=4):\n        out = []\n        for line in doc:\n            out += [' '*indent + line]\n        return out"},{"col":4,"comment":"null","endLoc":458,"header":"def _str_signature(self)","id":2268,"name":"_str_signature","nodeType":"Function","startLoc":454,"text":"def _str_signature(self):\n        if self['Signature']:\n            return [self['Signature'].replace('*', r'\\*')] + ['']\n        else:\n            return ['']"},{"col":4,"comment":"\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        ","endLoc":601,"header":"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","id":2269,"name":"facet","nodeType":"Function","startLoc":542,"text":"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: dict[str, VariableSpec] = {}\n        if col is not None:\n            variables[\"col\"] = col\n        if row is not None:\n            variables[\"row\"] = row\n\n        structure = {}\n        if isinstance(order, dict):\n            for dim in [\"col\", \"row\"]:\n                dim_order = order.get(dim)\n                if dim_order is not None:\n                    structure[dim] = list(dim_order)\n        elif order is not None:\n            if col is not None and row is not None:\n                err = \" \".join([\n                    \"When faceting on both col= and row=, passing `order` as a list\"\n                    \"is ambiguous. Use a dict with 'col' and/or 'row' keys instead.\"\n                ])\n                raise RuntimeError(err)\n            elif col is not None:\n                structure[\"col\"] = list(order)\n            elif row is not None:\n                structure[\"row\"] = list(order)\n\n        spec: FacetSpec = {\n            \"variables\": variables,\n            \"structure\": structure,\n            \"wrap\": wrap,\n        }\n\n        new = self._clone()\n        new._facet_spec.update(spec)\n\n        return new"},{"attributeType":"str","col":0,"comment":"null","endLoc":48,"id":2271,"name":"__version__","nodeType":"Attribute","startLoc":48,"text":"__version__"},{"attributeType":"(int, ...)","col":0,"comment":"null","endLoc":49,"id":2272,"name":"__version_info__","nodeType":"Attribute","startLoc":49,"text":"__version_info__"},{"col":4,"comment":"null","endLoc":371,"header":"def test_both_facet_dims(self)","id":2273,"name":"test_both_facet_dims","nodeType":"Function","startLoc":338,"text":"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\""},{"col":4,"comment":"Grid object for organizing clustered heatmap input on to axes","endLoc":772,"header":"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)","id":2274,"name":"__init__","nodeType":"Function","startLoc":698,"text":"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"},{"col":4,"comment":"null","endLoc":339,"header":"def infer_scale(self, arg: Any, data: Series) -> Nominal","id":2275,"name":"infer_scale","nodeType":"Function","startLoc":338,"text":"def infer_scale(self, arg: Any, data: Series) -> Nominal:\n        return Nominal(arg)"},{"col":4,"comment":"null","endLoc":464,"header":"def _str_summary(self)","id":2276,"name":"_str_summary","nodeType":"Function","startLoc":460,"text":"def _str_summary(self):\n        if self['Summary']:\n            return self['Summary'] + ['']\n        else:\n            return []"},{"col":4,"comment":"null","endLoc":470,"header":"def _str_extended_summary(self)","id":2277,"name":"_str_extended_summary","nodeType":"Function","startLoc":466,"text":"def _str_extended_summary(self):\n        if self['Extended Summary']:\n            return self['Extended Summary'] + ['']\n        else:\n            return []"},{"col":4,"comment":"null","endLoc":486,"header":"def _str_param_list(self, name)","id":2278,"name":"_str_param_list","nodeType":"Function","startLoc":472,"text":"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"},{"col":4,"comment":"Define mapping as lookup into list of object values.","endLoc":372,"header":"def get_mapping(\n        self, scale: Scale, data: Series,\n    ) -> Callable[[ArrayLike], list]","id":2279,"name":"get_mapping","nodeType":"Function","startLoc":341,"text":"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"},{"col":4,"comment":"null","endLoc":91,"header":"def test_identity_fontsize(self)","id":2281,"name":"test_identity_fontsize","nodeType":"Function","startLoc":83,"text":"def test_identity_fontsize(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        fs = [5, 8, 12]\n        p = Plot(x, y, text=s, fontsize=fs).add(Text()).scale(fontsize=None).plot()\n        ax = p._figure.axes[0]\n        for i, text in enumerate(self.get_texts(ax)):\n            assert text.get_fontsize() == fs[i]"},{"col":4,"comment":"null","endLoc":44,"header":"def __call__(self, data, groupby, orient, scales)","id":2282,"name":"__call__","nodeType":"Function","startLoc":39,"text":"def __call__(self, data, groupby, orient, scales):\n\n        return (\n            groupby\n            .apply(data.dropna(subset=[\"x\", \"y\"]), self._fit_predict)\n        )"},{"col":4,"comment":"null","endLoc":98,"header":"def test_unfilled(self)","id":2283,"name":"test_unfilled","nodeType":"Function","startLoc":91,"text":"def test_unfilled(self):\n\n        x, y = [1, 2, 3], [1, 2, 1]\n        c = \".5\"\n        p = Plot(x=x, y=y).add(Area(fill=False, color=c)).plot()\n        ax = p._figure.axes[0]\n        poly = ax.patches[0]\n        assert poly.get_facecolor() == to_rgba(c, 0)"},{"col":0,"comment":"Handle backwards compatability with setting matplotlib scale.","endLoc":127,"header":"def set_scale_obj(ax, axis, scale)","id":2284,"name":"set_scale_obj","nodeType":"Function","startLoc":108,"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})"},{"col":4,"comment":"Given data, initialize appropriate scale class.","endLoc":723,"header":"def default_scale(self, data: Series) -> Nominal","id":2285,"name":"default_scale","nodeType":"Function","startLoc":721,"text":"def default_scale(self, data: Series) -> Nominal:\n        \"\"\"Given data, initialize appropriate scale class.\"\"\"\n        return Nominal()"},{"col":4,"comment":"Given data and a scaling argument, initialize appropriate scale class.","endLoc":728,"header":"def infer_scale(self, arg: Any, data: Series) -> Scale","id":2286,"name":"infer_scale","nodeType":"Function","startLoc":725,"text":"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)"},{"col":0,"comment":"Test that different length args raise ValueError.","endLoc":121,"header":"def test_bootstrap_arglength()","id":2287,"name":"test_bootstrap_arglength","nodeType":"Function","startLoc":118,"text":"def 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))"},{"col":4,"comment":"Return a function that maps each data value to True or False.","endLoc":762,"header":"def get_mapping(\n        self, scale: Scale, data: Series\n    ) -> Callable[[ArrayLike], ArrayLike]","id":2289,"name":"get_mapping","nodeType":"Function","startLoc":730,"text":"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"},{"col":4,"comment":"Extract variables from data or use directly.","endLoc":834,"header":"def format_data(self, data, pivot_kws, z_score=None,\n                    standard_scale=None)","id":2290,"name":"format_data","nodeType":"Function","startLoc":816,"text":"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"},{"attributeType":"int","col":4,"comment":"null","endLoc":19,"id":2291,"name":"order","nodeType":"Attribute","startLoc":19,"text":"order"},{"attributeType":"int","col":4,"comment":"null","endLoc":20,"id":2292,"name":"gridsize","nodeType":"Attribute","startLoc":20,"text":"gridsize"},{"className":"OLSFit","col":0,"comment":"null","endLoc":50,"id":2293,"nodeType":"Class","startLoc":47,"text":"@dataclass\nclass OLSFit(Stat):\n\n    ..."},{"attributeType":"null","col":16,"comment":"null","endLoc":4,"id":2294,"name":"np","nodeType":"Attribute","startLoc":4,"text":"np"},{"attributeType":"null","col":17,"comment":"null","endLoc":5,"id":2295,"name":"pd","nodeType":"Attribute","startLoc":5,"text":"pd"},{"col":4,"comment":"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        ","endLoc":864,"header":"@staticmethod\n    def z_score(data2d, axis=1)","id":2296,"name":"z_score","nodeType":"Function","startLoc":836,"text":"@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"},{"col":0,"comment":"Test that named numpy methods are the same as the numpy function.","endLoc":137,"header":"def test_bootstrap_string_func()","id":2297,"name":"test_bootstrap_string_func","nodeType":"Function","startLoc":124,"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\")"},{"col":4,"comment":"null","endLoc":494,"header":"def _str_section(self, name)","id":2298,"name":"_str_section","nodeType":"Function","startLoc":488,"text":"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"},{"col":4,"comment":"null","endLoc":526,"header":"def _str_see_also(self, func_role)","id":2299,"name":"_str_see_also","nodeType":"Function","startLoc":496,"text":"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"},{"col":4,"comment":"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        ","endLoc":898,"header":"@staticmethod\n    def standard_scale(data2d, axis=1)","id":2300,"name":"standard_scale","nodeType":"Function","startLoc":866,"text":"@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"},{"className":"TestBand","col":0,"comment":"null","endLoc":128,"id":2302,"nodeType":"Class","startLoc":101,"text":"class TestBand:\n\n    def test_range(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)\n\n    def test_auto_range(self):\n\n        x = [1, 1, 2, 2, 2]\n        y = [1, 2, 3, 4, 5]\n        p = Plot(x=x, y=y).add(Band()).plot()\n        ax = p._figure.axes[0]\n        verts = ax.patches[0].get_path().vertices.T\n\n        expected_x = [1, 2, 2, 1, 1]\n        assert_array_equal(verts[0], expected_x)\n\n        expected_y = [1, 3, 5, 2, 1]\n        assert_array_equal(verts[1], expected_y)"},{"col":4,"comment":"null","endLoc":114,"header":"def test_range(self)","id":2303,"name":"test_range","nodeType":"Function","startLoc":103,"text":"def test_range(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)"},{"col":4,"comment":"Preprocess {row/col}_colors to extract labels and convert colors.","endLoc":814,"header":"def _preprocess_colors(self, data, colors, axis)","id":2304,"name":"_preprocess_colors","nodeType":"Function","startLoc":774,"text":"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"},{"fileName":"scales.py","filePath":"seaborn/_core","id":2305,"nodeType":"File","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, 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\nfrom seaborn._core.typing import Default, default\n\nfrom typing import TYPE_CHECKING\nif TYPE_CHECKING:\n    from seaborn._core.properties import Property\n    from numpy.typing import ArrayLike, NDArray\n\n    TransFuncs = Tuple[\n        Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]\n    ]\n\n    # TODO Reverting typing to Any as it was proving too complicated to\n    # work out the right way to communicate the types to mypy. Revisit!\n    Pipeline = Sequence[Optional[Callable[[Any], Any]]]\n\n\nclass 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()\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))\n\n    def _spacing(self, x: Series) -> float:\n        space = self._spacer(x)\n        if np.isnan(space):\n            # This happens when there is no variance in the orient coordinate data\n            # Not exactly clear what the right default is, but 1 seems reasonable?\n            return 1\n        return space\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        trans_data: Series | NDArray | list\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            trans_data = np.array([data])\n        else:\n            trans_data = data\n\n        for func in self._pipeline:\n            if func is not None:\n                trans_data = func(trans_data)\n\n        if scalar_data:\n            return trans_data[0]\n        else:\n            return trans_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()\n\n\n@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, otypes=[\"object\"])\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        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\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\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    ...\n\n\n@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(str(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            # Avoid having an offset / scientific notation in a legend\n            # as we don't represent that anywhere so it ends up incorrect.\n            # This could become an option (e.g. Continuous.label(offset=True))\n            # in which case we would need to figure out how to show it.\n            if hasattr(axis.major.formatter, \"set_useOffset\"):\n                axis.major.formatter.set_useOffset(False)\n            if hasattr(axis.major.formatter, \"set_scientific\"):\n                axis.major.formatter.set_scientific(False)\n            labels = axis.major.formatter.format_ticks(locs)\n            new._legend = list(locs), list(labels)\n\n        return new\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}\")\n\n\n@dataclass\nclass Continuous(ContinuousBase):\n    \"\"\"\n    A numeric scale supporting norms and functional transforms.\n    \"\"\"\n    values: tuple | str | None = None\n    trans: str | TransFuncs | 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 = 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\n\n    def label(\n        self,\n        formatter: Formatter | None = None, *,\n        like: str | Callable | None = None,\n        base: int | None | Default = default,\n        unit: str | None = None,\n    ) -> Continuous:\n        \"\"\"\n        Configure the appearance of tick labels for the scale's axis or legend.\n\n        Parameters\n        ----------\n        formatter : :class:`matplotlib.ticker.Formatter` subclass\n            Pre-configured formatter to use; other parameters will be ignored.\n        like : str or callable\n            Either a format pattern (e.g., `\".2f\"`), a format string with fields named\n            `x` and/or `pos` (e.g., `\"${x:.2f}\"`), or a callable 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            Set to `None` to override the default formatter with a log transform.\n        unit : str or (str, str) tuple\n            Use  SI prefixes with these units (e.g., with `unit=\"g\"`, a tick value\n            of 5000 will appear as `5 kg`). When a tuple, the first element gives the\n            separator between the number and unit.\n\n        Returns\n        -------\n        scale\n            Copy of self with new label configuration.\n\n        \"\"\"\n        # Input checks\n        if formatter is not None and not isinstance(formatter, Formatter):\n            raise TypeError(\n                f\"Label formatter must be an instance of {Formatter!r}, \"\n                f\"not {type(formatter)!r}\"\n            )\n        if like is not None and not (isinstance(like, str) or callable(like)):\n            msg = f\"`like` must be a string or callable, not {type(like).__name__}.\"\n            raise TypeError(msg)\n\n        new = copy(self)\n        new._label_params = {\n            \"formatter\": formatter,\n            \"like\": like,\n            \"base\": base,\n            \"unit\": unit,\n        }\n        return new\n\n    def _parse_for_log_params(\n        self, trans: str | TransFuncs | None\n    ) -> 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\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\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 default:\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\n\n\n@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\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\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\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\n\n\n# ----------------------------------------------------------------------------------- #\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\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()\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()\n\n\n# ------------------------------------------------------------------------------------ #\n# Transform function creation\n\n\ndef _make_identity_transforms() -> TransFuncs:\n\n    def identity(x):\n        return x\n\n    return identity, identity\n\n\ndef _make_logit_transforms(base: float | None = None) -> TransFuncs:\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\n\n\ndef _make_log_transforms(base: float | None = None) -> TransFuncs:\n\n    fs: TransFuncs\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: ArrayLike) -> ArrayLike:\n        with np.errstate(invalid=\"ignore\", divide=\"ignore\"):\n            return fs[0](x)\n\n    def exp(x: ArrayLike) -> ArrayLike:\n        with np.errstate(invalid=\"ignore\", divide=\"ignore\"):\n            return fs[1](x)\n\n    return log, exp\n\n\ndef _make_symlog_transforms(c: float = 1, base: float = 10) -> TransFuncs:\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\n\n\ndef _make_sqrt_transforms() -> TransFuncs:\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) -> TransFuncs:\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\n"},{"col":4,"comment":"null","endLoc":544,"header":"def _str_index(self)","id":2306,"name":"_str_index","nodeType":"Function","startLoc":528,"text":"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 ''"},{"col":4,"comment":"Estimate a KDE for a vector of data with flexible bandwidth.","endLoc":1065,"header":"def fit_kde(self, x, bw)","id":2307,"name":"fit_kde","nodeType":"Function","startLoc":1052,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":39,"id":2308,"name":"default","nodeType":"Attribute","startLoc":39,"text":"default"},{"className":"Ordinal","col":0,"comment":"null","endLoc":307,"id":2310,"nodeType":"Class","startLoc":304,"text":"@dataclass\nclass Ordinal(Scale):\n    # Categorical (convert to strings), sortable, can skip ticklabels\n    ..."},{"className":"Discrete","col":0,"comment":"null","endLoc":313,"id":2312,"nodeType":"Class","startLoc":310,"text":"@dataclass\nclass Discrete(Scale):\n    # Numeric, integral, can skip ticks/ticklabels\n    ..."},{"attributeType":"null","col":4,"comment":"null","endLoc":45,"id":2313,"name":"TransFuncs","nodeType":"Attribute","startLoc":45,"text":"TransFuncs"},{"col":4,"comment":"null","endLoc":561,"header":"def __str__(self, func_role='')","id":2314,"name":"__str__","nodeType":"Function","startLoc":546,"text":"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)"},{"attributeType":"str","col":8,"comment":"null","endLoc":29,"id":2315,"name":"title","nodeType":"Attribute","startLoc":29,"text":"title"},{"col":0,"comment":"","endLoc":6,"header":"pairgrid_dotplot.py#","id":2316,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nDot plot with several variables\n===============================\n\n_thumb: .3, .3\n\"\"\"\n\nsns.set_theme(style=\"whitegrid\")\n\ncrashes = sns.load_dataset(\"car_crashes\")\n\ng = sns.PairGrid(crashes.sort_values(\"total\", ascending=False),\n                 x_vars=crashes.columns[:-3], y_vars=[\"abbrev\"],\n                 height=10, aspect=.25)\n\ng.map(sns.stripplot, size=10, orient=\"h\", jitter=False,\n      palette=\"flare_r\", linewidth=1, edgecolor=\"w\")\n\ng.set(xlim=(0, 25), xlabel=\"Crashes\", ylabel=\"\")\n\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)"},{"col":4,"comment":"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        ","endLoc":1375,"header":"def map(self, func, **kwargs)","id":2317,"name":"map","nodeType":"Function","startLoc":1360,"text":"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"},{"col":4,"comment":"\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        ","endLoc":649,"header":"def share(self, **shares: bool | str) -> Plot","id":2318,"name":"share","nodeType":"Function","startLoc":632,"text":"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"},{"col":4,"comment":"null","endLoc":113,"header":"def test_df_and_mixed_variables(self, long_df)","id":2319,"name":"test_df_and_mixed_variables","nodeType":"Function","startLoc":103,"text":"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()"},{"col":4,"comment":"\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        ","endLoc":670,"header":"def limit(self, **limits: tuple[Any, Any]) -> Plot","id":2320,"name":"limit","nodeType":"Function","startLoc":651,"text":"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"},{"attributeType":"null","col":4,"comment":"null","endLoc":51,"id":2321,"name":"Pipeline","nodeType":"Attribute","startLoc":51,"text":"Pipeline"},{"col":4,"comment":"\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        ","endLoc":698,"header":"def label(self, *, title=None, **variables: str | Callable[[str], str]) -> Plot","id":2323,"name":"label","nodeType":"Function","startLoc":672,"text":"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"},{"col":0,"comment":"","endLoc":1,"header":"scales.py#","id":2324,"name":"","nodeType":"Function","startLoc":1,"text":"if TYPE_CHECKING:\n    from seaborn._core.properties import Property\n    from numpy.typing import ArrayLike, NDArray\n\n    TransFuncs = Tuple[\n        Callable[[ArrayLike], ArrayLike], Callable[[ArrayLike], ArrayLike]\n    ]\n\n    # TODO Reverting typing to Any as it was proving too complicated to\n    # work out the right way to communicate the types to mypy. Revisit!\n    Pipeline = Sequence[Optional[Callable[[Any], Any]]]"},{"attributeType":"null","col":4,"comment":"null","endLoc":143,"id":2325,"name":"sections","nodeType":"Attribute","startLoc":143,"text":"sections"},{"attributeType":"null","col":4,"comment":"null","endLoc":279,"id":2326,"name":"_role","nodeType":"Attribute","startLoc":279,"text":"_role"},{"col":4,"comment":"\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        ","endLoc":741,"header":"def layout(\n        self,\n        *,\n        size: tuple[float, float] | Default = default,\n        engine: str | None | Default = default,\n    ) -> Plot","id":2327,"name":"layout","nodeType":"Function","startLoc":700,"text":"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"},{"attributeType":"null","col":4,"comment":"null","endLoc":280,"id":2328,"name":"_funcbacktick","nodeType":"Attribute","startLoc":280,"text":"_funcbacktick"},{"attributeType":"null","col":4,"comment":"null","endLoc":281,"id":2329,"name":"_funcplain","nodeType":"Attribute","startLoc":281,"text":"_funcplain"},{"attributeType":"null","col":4,"comment":"null","endLoc":282,"id":2330,"name":"_funcname","nodeType":"Attribute","startLoc":282,"text":"_funcname"},{"col":4,"comment":"\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        ","endLoc":776,"header":"def theme(self, *args: dict[str, Any]) -> Plot","id":2331,"name":"theme","nodeType":"Function","startLoc":745,"text":"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"},{"attributeType":"null","col":4,"comment":"null","endLoc":283,"id":2332,"name":"_funcnamenext","nodeType":"Attribute","startLoc":283,"text":"_funcnamenext"},{"col":4,"comment":"null","endLoc":101,"header":"def test_offset_centered(self)","id":2334,"name":"test_offset_centered","nodeType":"Function","startLoc":93,"text":"def test_offset_centered(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        p = Plot(x, y, text=s).add(Text()).plot()\n        ax = p._figure.axes[0]\n        ax_trans = ax.transData.get_matrix()\n        for text in self.get_texts(ax):\n            assert_array_almost_equal(text.get_transform().get_matrix(), ax_trans)"},{"attributeType":"null","col":4,"comment":"null","endLoc":284,"id":2335,"name":"_funcnamenext","nodeType":"Attribute","startLoc":284,"text":"_funcnamenext"},{"id":2336,"name":"data_structure.ipynb","nodeType":"TextFile","path":"doc/_tutorial","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _data_tutorial:\\n\",\n    \"\\n\",\n    \".. currentmodule:: seaborn\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Data structures accepted by seaborn\\n\",\n    \"===================================\\n\",\n    \"\\n\",\n    \"As a data visualization library, seaborn requires that you provide it with data. This chapter explains the various ways to accomplish that task. Seaborn supports several different dataset formats, and most functions accept data represented with objects from the `pandas `_ or `numpy `_ libraries as well as built-in Python types like lists and dictionaries. Understanding the usage patterns associated with these different options will help you quickly create useful visualizations for nearly any dataset.\\n\",\n    \"\\n\",\n    \".. note::\\n\",\n    \"   As of current writing (v0.11.0), the full breadth of options covered here are supported by only a subset of the modules in seaborn (namely, the :ref:`relational ` and :ref:`distribution ` modules). The other modules offer much of the same flexibility, but have some exceptions (e.g., :func:`catplot` and :func:`lmplot` are limited to long-form data with named variables). The data-ingest code will be standardized over the next few release cycles, but until that point, be mindful of the specific documentation for each function if it is not doing what you expect with your dataset.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import numpy as np\\n\",\n    \"import pandas as pd\\n\",\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Long-form vs. wide-form data\\n\",\n    \"----------------------------\\n\",\n    \"\\n\",\n    \"Most plotting functions in seaborn are oriented towards *vectors* of data. When plotting ``x`` against ``y``, each variable should be a vector. Seaborn accepts data *sets* that have more than one vector organized in some tabular fashion. There is a fundamental distinction between \\\"long-form\\\" and \\\"wide-form\\\" data tables, and seaborn will treat each differently.\\n\",\n    \"\\n\",\n    \"Long-form data\\n\",\n    \"~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"A long-form data table has the following characteristics:\\n\",\n    \"\\n\",\n    \"- Each variable is a column\\n\",\n    \"- Each observation is a row\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"As a simple example, consider the \\\"flights\\\" dataset, which records the number of airline passengers who flew in each month from 1949 to 1960. This dataset has three variables (*year*, *month*, and number of *passengers*):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"flights = sns.load_dataset(\\\"flights\\\")\\n\",\n    \"flights.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"With long-form data, columns in the table are given roles in the plot by explicitly assigning them to one of the variables. For example, making a monthly plot of the number of passengers per year looks like this:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.relplot(data=flights, x=\\\"year\\\", y=\\\"passengers\\\", hue=\\\"month\\\", kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The advantage of long-form data is that it lends itself well to this explicit specification of the plot. It can accommodate datasets of arbitrary complexity, so long as the variables and observations can be clearly defined. But this format takes some getting used to, because it is often not the model of the data that one has in their head.\\n\",\n    \"\\n\",\n    \"Wide-form data\\n\",\n    \"~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"For simple datasets, it is often more intuitive to think about data the way it might be viewed in a spreadsheet, where the columns and rows contain *levels* of different variables. For example, we can convert the flights dataset into a wide-form organization by  \\\"pivoting\\\" it so that each column has each month's time series over years:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"flights_wide = flights.pivot(index=\\\"year\\\", columns=\\\"month\\\", values=\\\"passengers\\\")\\n\",\n    \"flights_wide.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Here we have the same three variables, but they are organized differently. The variables in this dataset are linked to the *dimensions* of the table, rather than to named fields. Each observation is defined by both the value at a cell in the table and the coordinates of that cell with respect to the row and column indices.\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"With long-form data, we can access variables in the dataset by their name. That is not the case with wide-form data. Nevertheless, because there is a clear association between the dimensions of the table and the variable in the dataset, seaborn is able to assign those variables roles in the plot.\\n\",\n    \"\\n\",\n    \".. note::\\n\",\n    \"   Seaborn treats the argument to ``data`` as wide form when neither ``x`` nor ``y`` are assigned.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.relplot(data=flights_wide, kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"This plot looks very  similar to the one before. Seaborn has assigned the index of the dataframe to ``x``, the values of the dataframe to ``y``, and it has drawn a separate line for each month. There is a notable difference between the two plots, however. When the dataset went through the \\\"pivot\\\" operation that converted it from long-form to wide-form, the information about what the values mean was lost. As a result, there is no y axis label. (The lines also have dashes here, because :func:`relplot` has mapped the column variable to both the ``hue`` and ``style`` semantic so that the plot is more accessible. We didn't do that in the long-form case, but we could have by setting ``style=\\\"month\\\"``).\\n\",\n    \"\\n\",\n    \"Thus far, we did much less typing while using wide-form data and made nearly the same plot. This seems easier! But a big advantage of long-form data is that, once you have the data in the correct format, you no longer need to think about its *structure*. You can design your plots by thinking only about the variables contained within it. For example, to draw lines that represent the monthly time series for each year, simply reassign the variables:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.relplot(data=flights, x=\\\"month\\\", y=\\\"passengers\\\", hue=\\\"year\\\", kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"To achieve the same remapping with the wide-form dataset, we would need to transpose the table:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.relplot(data=flights_wide.transpose(), kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"(This example also illustrates another wrinkle, which is that seaborn currently considers the column variable in a wide-form dataset to be categorical regardless of its datatype, whereas, because the long-form variable is numeric, it is assigned a quantitative color palette and legend. This may change in the future).\\n\",\n    \"\\n\",\n    \"The absence of explicit variable assignments also means that each plot type needs to define a fixed mapping between the dimensions of the wide-form data and the roles in the plot. Because this natural mapping may vary across plot types, the results are less predictable when using wide-form data. For example, the :ref:`categorical ` plots assign the *column* dimension of the table to ``x`` and then aggregate across the rows (ignoring the index):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.catplot(data=flights_wide, kind=\\\"box\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"When using pandas to represent wide-form data, you are limited to just a few variables (no more than three). This is because seaborn does not make use of multi-index information, which is how pandas represents additional variables in a tabular format. The `xarray `_ project offers labeled N-dimensional array objects, which can be considered a generalization of wide-form data to higher dimensions. At present, seaborn does not directly support objects from ``xarray``, but they can be transformed into a long-form :class:`pandas.DataFrame` using the ``to_pandas`` method and then plotted in seaborn like any other long-form data set.\\n\",\n    \"\\n\",\n    \"In summary, we can think of long-form and wide-form datasets as looking something like this:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide-input\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import matplotlib.pyplot as plt\\n\",\n    \"f = plt.figure(figsize=(7, 5))\\n\",\n    \"\\n\",\n    \"gs = plt.GridSpec(\\n\",\n    \"    ncols=6, nrows=2, figure=f,\\n\",\n    \"    left=0, right=.35, bottom=0, top=.9,\\n\",\n    \"    height_ratios=(1, 20),\\n\",\n    \"    wspace=.1, hspace=.01\\n\",\n    \")\\n\",\n    \"\\n\",\n    \"colors = [c + (.5,) for c in sns.color_palette()]\\n\",\n    \"\\n\",\n    \"f.add_subplot(gs[0, :], facecolor=\\\".8\\\")\\n\",\n    \"[\\n\",\n    \"    f.add_subplot(gs[1:, i], facecolor=colors[i])\\n\",\n    \"    for i in range(gs.ncols)\\n\",\n    \"]\\n\",\n    \"\\n\",\n    \"gs = plt.GridSpec(\\n\",\n    \"    ncols=2, nrows=2, figure=f,\\n\",\n    \"    left=.4, right=1, bottom=.2, top=.8,\\n\",\n    \"    height_ratios=(1, 8), width_ratios=(1, 11),\\n\",\n    \"    wspace=.015, hspace=.02\\n\",\n    \")\\n\",\n    \"\\n\",\n    \"f.add_subplot(gs[0, 1:], facecolor=colors[2])\\n\",\n    \"f.add_subplot(gs[1:, 0], facecolor=colors[1])\\n\",\n    \"f.add_subplot(gs[1, 1], facecolor=colors[0])\\n\",\n    \"\\n\",\n    \"for ax in f.axes:\\n\",\n    \"    ax.set(xticks=[], yticks=[])\\n\",\n    \"\\n\",\n    \"f.text(.35 / 2, .91, \\\"Long-form\\\", ha=\\\"center\\\", va=\\\"bottom\\\", size=15)\\n\",\n    \"f.text(.7, .81, \\\"Wide-form\\\", ha=\\\"center\\\", va=\\\"bottom\\\", size=15)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Messy data\\n\",\n    \"~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"Many datasets cannot be clearly interpreted using either long-form or wide-form rules. If datasets that are clearly long-form or wide-form are `\\\"tidy\\\" `_, we might say that these more ambiguous datasets are \\\"messy\\\". In a messy dataset, the variables are neither uniquely defined by the keys nor by the dimensions of the table. This often occurs with *repeated-measures* data, where it is natural to organize a table such that each row corresponds to the *unit* of data collection. Consider this simple dataset from a psychology experiment in which twenty subjects performed a memory task where they studied anagrams while their attention was either divided or focused:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"anagrams = sns.load_dataset(\\\"anagrams\\\")\\n\",\n    \"anagrams\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The attention variable is *between-subjects*, but there is also a *within-subjects* variable: the number of possible solutions to the anagrams, which varied from 1 to 3. The dependent measure is a score of memory performance. These two variables (number and score) are jointly encoded across several columns. As a result, the whole dataset is neither clearly long-form nor clearly wide-form.\\n\",\n    \"\\n\",\n    \"How might we tell seaborn to plot the average score as a function of attention and number of solutions? We'd first need to coerce the data into one of our two structures. Let's transform it to a tidy long-form table, such that each variable is a column and each row is an observation. We can use the method :meth:`pandas.DataFrame.melt` to accomplish this task:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"anagrams_long = anagrams.melt(id_vars=[\\\"subidr\\\", \\\"attnr\\\"], var_name=\\\"solutions\\\", value_name=\\\"score\\\")\\n\",\n    \"anagrams_long.head()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Now we can make the plot that we want:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.catplot(data=anagrams_long, x=\\\"solutions\\\", y=\\\"score\\\", hue=\\\"attnr\\\", kind=\\\"point\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Further reading and take-home points\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"For a longer discussion about tabular data structures, you could read the `\\\"Tidy Data\\\" `_ paper by Hadley Whickham. Note that seaborn uses a slightly different set of concepts than are defined in the paper. While the paper associates tidyness with long-form structure, we have drawn a distinction between \\\"tidy wide-form\\\" data, where there is a clear mapping between variables in the dataset and the dimensions of the table, and \\\"messy data\\\", where no such mapping exists.\\n\",\n    \"\\n\",\n    \"The long-form structure has clear advantages. It allows you to create figures by explicitly assigning variables in the dataset to roles in plot, and you can do so with more than three variables. When possible, try to represent your data with a long-form structure when embarking on serious analysis. Most of the examples in the seaborn documentation will use long-form data. But in cases where it is more natural to keep the dataset wide, remember that seaborn can remain useful.\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Options for visualizing long-form data\\n\",\n    \"--------------------------------------\\n\",\n    \"\\n\",\n    \"While long-form data has a precise definition, seaborn is fairly flexible in terms of how it is actually organized across the data structures in memory. The examples in the rest of the documentation will typically use :class:`pandas.DataFrame` objects and reference variables in them by assigning names of their columns to the variables in the plot. But it is also possible to store vectors in a Python dictionary or a class that implements that interface:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"flights_dict = flights.to_dict()\\n\",\n    \"sns.relplot(data=flights_dict, x=\\\"year\\\", y=\\\"passengers\\\", hue=\\\"month\\\", kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Many pandas operations, such as the split-apply-combine operations of a group-by, will produce a dataframe where information has moved from the columns of the input dataframe to the index of the output. So long as the name is retained, you can still reference the data as normal:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"flights_avg = flights.groupby(\\\"year\\\").mean()\\n\",\n    \"sns.relplot(data=flights_avg, x=\\\"year\\\", y=\\\"passengers\\\", kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Additionally, it's possible to pass vectors of data directly as arguments to ``x``, ``y``, and other plotting variables. If these vectors are pandas objects, the ``name`` attribute will be used to label the plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"year = flights_avg.index\\n\",\n    \"passengers = flights_avg[\\\"passengers\\\"]\\n\",\n    \"sns.relplot(x=year, y=passengers, kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Numpy arrays and other objects that implement the Python sequence interface work too, but if they don't have names, the plot will not be as informative without further tweaking:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.relplot(x=year.to_numpy(), y=passengers.to_list(), kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Options for visualizing wide-form data\\n\",\n    \"--------------------------------------\\n\",\n    \"\\n\",\n    \"The options for passing wide-form data are even more flexible. As with long-form data, pandas objects are preferable because the name (and, in some cases, index) information can be used. But in essence, any format that can be viewed as a single vector or a collection of vectors can be passed to ``data``, and a valid plot can usually be constructed.\\n\",\n    \"\\n\",\n    \"The example we saw above used a rectangular :class:`pandas.DataFrame`, which can be thought of as a collection of its columns. A dict or list of pandas objects will also work, but we'll lose the axis labels:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"flights_wide_list = [col for _, col in flights_wide.items()]\\n\",\n    \"sns.relplot(data=flights_wide_list, kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The vectors in a collection do not need to have the same length. If they have an ``index``, it will be used to align them:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"two_series = [flights_wide.loc[:1955, \\\"Jan\\\"], flights_wide.loc[1952:, \\\"Aug\\\"]]\\n\",\n    \"sns.relplot(data=two_series, kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Whereas an ordinal index will be used for numpy arrays or simple Python sequences:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"two_arrays = [s.to_numpy() for s in two_series]\\n\",\n    \"sns.relplot(data=two_arrays, kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"But a dictionary of such vectors will at least use the keys:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"two_arrays_dict = {s.name: s.to_numpy() for s in two_series}\\n\",\n    \"sns.relplot(data=two_arrays_dict, kind=\\\"line\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Rectangular numpy arrays are treated just like a dataframe without index information, so they are viewed as a collection of column vectors. Note that this is different from how numpy indexing operations work, where a single indexer will access a row. But it is consistent with how pandas would turn the array into a dataframe or how matplotlib would plot it:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"flights_array = flights_wide.to_numpy()\\n\",\n    \"sns.relplot(data=flights_array, kind=\\\"line\\\")\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"attributeType":"null","col":4,"comment":"null","endLoc":285,"id":2337,"name":"_description","nodeType":"Attribute","startLoc":285,"text":"_description"},{"attributeType":"null","col":4,"comment":"null","endLoc":286,"id":2338,"name":"_func_rgx","nodeType":"Attribute","startLoc":286,"text":"_func_rgx"},{"attributeType":"null","col":4,"comment":"null","endLoc":287,"id":2339,"name":"_line_rgx","nodeType":"Attribute","startLoc":287,"text":"_line_rgx"},{"attributeType":"null","col":4,"comment":"null","endLoc":297,"id":2340,"name":"empty_description","nodeType":"Attribute","startLoc":297,"text":"empty_description"},{"attributeType":"null","col":8,"comment":"null","endLoc":168,"id":2341,"name":"_doc","nodeType":"Attribute","startLoc":168,"text":"self._doc"},{"attributeType":"null","col":8,"comment":"null","endLoc":169,"id":2342,"name":"_parsed_data","nodeType":"Attribute","startLoc":169,"text":"self._parsed_data"},{"id":2343,"name":"displot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns; sns.set_theme(style=\\\"ticks\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The default plot kind is a histogram:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"penguins = sns.load_dataset(\\\"penguins\\\")\\n\",\n    \"sns.displot(data=penguins, x=\\\"flipper_length_mm\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use the ``kind`` parameter to select a different representation:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(data=penguins, x=\\\"flipper_length_mm\\\", kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"There are three main plot kinds; in addition to histograms and kernel density estimates (KDEs), you can also draw empirical cumulative distribution functions (ECDFs):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(data=penguins, x=\\\"flipper_length_mm\\\", kind=\\\"ecdf\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"While in histogram mode, it is also possible to add a KDE curve:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(data=penguins, x=\\\"flipper_length_mm\\\", kde=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"To draw a bivariate plot, assign both ``x`` and ``y``:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(data=penguins, x=\\\"flipper_length_mm\\\", y=\\\"bill_length_mm\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Currently, bivariate plots are available only for histograms and KDEs:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(data=penguins, x=\\\"flipper_length_mm\\\", y=\\\"bill_length_mm\\\", kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"For each kind of plot, you can also show individual observations with a marginal \\\"rug\\\":\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"g = sns.displot(data=penguins, x=\\\"flipper_length_mm\\\", y=\\\"bill_length_mm\\\", kind=\\\"kde\\\", rug=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Each kind of plot can be drawn separately for subsets of data using ``hue`` mapping:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(data=penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"metadata\": {},\n   \"source\": [\n    \"Additional keyword arguments are passed to the appropriate underlying plotting function, allowing for further customization:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(data=penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", multiple=\\\"stack\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The figure is constructed using a :class:`FacetGrid`, meaning that you can also show subsets on distinct subplots, or \\\"facets\\\":\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(data=penguins, x=\\\"flipper_length_mm\\\", hue=\\\"species\\\", col=\\\"sex\\\", kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Because the figure is drawn with a :class:`FacetGrid`, you control its size and shape with the ``height`` and ``aspect`` parameters:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(\\n\",\n    \"    data=penguins, y=\\\"flipper_length_mm\\\", hue=\\\"sex\\\", col=\\\"species\\\",\\n\",\n    \"    kind=\\\"ecdf\\\", height=4, aspect=.7,\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The function returns the :class:`FacetGrid` object with the plot, and you can use the methods on this object to customize it further:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"g = sns.displot(\\n\",\n    \"    data=penguins, y=\\\"flipper_length_mm\\\", hue=\\\"sex\\\", col=\\\"species\\\",\\n\",\n    \"    kind=\\\"kde\\\", height=4, aspect=.7,\\n\",\n    \")\\n\",\n    \"g.set_axis_labels(\\\"Density (a.u.)\\\", \\\"Flipper length (mm)\\\")\\n\",\n    \"g.set_titles(\\\"{col_name} penguins\\\")\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"col":4,"comment":"null","endLoc":128,"header":"def test_auto_range(self)","id":2344,"name":"test_auto_range","nodeType":"Function","startLoc":116,"text":"def test_auto_range(self):\n\n        x = [1, 1, 2, 2, 2]\n        y = [1, 2, 3, 4, 5]\n        p = Plot(x=x, y=y).add(Band()).plot()\n        ax = p._figure.axes[0]\n        verts = ax.patches[0].get_path().vertices.T\n\n        expected_x = [1, 2, 2, 1, 1]\n        assert_array_equal(verts[0], expected_x)\n\n        expected_y = [1, 3, 5, 2, 1]\n        assert_array_equal(verts[1], expected_y)"},{"fileName":"multiple_bivariate_kde.py","filePath":"examples","id":2345,"nodeType":"File","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)\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":2346,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"col":0,"comment":"Handle changes to auto layout engine interface in 3.6","endLoc":155,"header":"def set_layout_engine(fig, engine)","id":2347,"name":"set_layout_engine","nodeType":"Function","startLoc":147,"text":"def 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)"},{"col":4,"comment":"\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        ","endLoc":794,"header":"def save(self, loc, **kwargs) -> Plot","id":2348,"name":"save","nodeType":"Function","startLoc":778,"text":"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"},{"col":0,"comment":"Convert either a list of colors or nested lists of colors to RGB.","endLoc":57,"header":"def _convert_colors(colors)","id":2349,"name":"_convert_colors","nodeType":"Function","startLoc":47,"text":"def _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]"},{"attributeType":"TypedDict","col":0,"comment":"null","endLoc":69,"id":2350,"name":"_core_params","nodeType":"Attribute","startLoc":69,"text":"_core_params"},{"attributeType":"null","col":28,"comment":"null","endLoc":8,"id":2351,"name":"plt","nodeType":"Attribute","startLoc":8,"text":"plt"},{"attributeType":"null","col":0,"comment":"null","endLoc":11,"id":2352,"name":"iris","nodeType":"Attribute","startLoc":11,"text":"iris"},{"col":0,"comment":"Test that bootstrapping uses the internal random state.","endLoc":151,"header":"def test_bootstrap_reproducibility(random)","id":2353,"name":"test_bootstrap_reproducibility","nodeType":"Function","startLoc":140,"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)"},{"col":4,"comment":"null","endLoc":892,"header":"def save(self, loc, **kwargs) -> Plotter","id":2354,"name":"save","nodeType":"Function","startLoc":884,"text":"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"},{"col":4,"comment":"Define a grid of support for the violin.","endLoc":1071,"header":"def kde_support(self, x, bw, cut, gridsize)","id":2355,"name":"kde_support","nodeType":"Function","startLoc":1067,"text":"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)"},{"attributeType":"null","col":0,"comment":"null","endLoc":14,"id":2356,"name":"f","nodeType":"Attribute","startLoc":14,"text":"f"},{"attributeType":"null","col":3,"comment":"null","endLoc":14,"id":2357,"name":"ax","nodeType":"Attribute","startLoc":14,"text":"ax"},{"col":0,"comment":"","endLoc":6,"header":"multiple_bivariate_kde.py#","id":2358,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nMultiple bivariate KDE plots\n============================\n\n_thumb: .6, .45\n\"\"\"\n\nsns.set_theme(style=\"darkgrid\")\n\niris = sns.load_dataset(\"iris\")\n\nf, ax = plt.subplots(figsize=(8, 8))\n\nax.set_aspect(\"equal\")\n\nsns.kdeplot(\n    data=iris.query(\"species != 'versicolor'\"),\n    x=\"sepal_width\",\n    y=\"sepal_length\",\n    hue=\"species\",\n    thresh=.1,\n)"},{"id":2359,"name":"aesthetics.ipynb","nodeType":"TextFile","path":"doc/_tutorial","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _aesthetics_tutorial:\\n\",\n    \"\\n\",\n    \".. currentmodule:: seaborn\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Controlling figure aesthetics\\n\",\n    \"=============================\\n\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Drawing attractive figures is important. When making figures for yourself, as you explore a dataset, it's nice to have plots that are pleasant to look at. Visualizations are also central to communicating quantitative insights to an audience, and in that setting it's even more necessary to have figures that catch the attention and draw a viewer in.\\n\",\n    \"\\n\",\n    \"Matplotlib is highly customizable, but it can be hard to know what settings to tweak to achieve an attractive plot. Seaborn comes with a number of customized themes and a high-level interface for controlling the look of matplotlib figures.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"import numpy as np\\n\",\n    \"import seaborn as sns\\n\",\n    \"import matplotlib.pyplot as plt\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"%matplotlib inline\\n\",\n    \"np.random.seed(sum(map(ord, \\\"aesthetics\\\")))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Let's define a simple function to plot some offset sine waves, which will help us see the different stylistic parameters we can tweak.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"def sinplot(n=10, flip=1):\\n\",\n    \"    x = np.linspace(0, 14, 100)\\n\",\n    \"    for i in range(1, n + 1):\\n\",\n    \"        plt.plot(x, np.sin(x + i * .5) * (n + 2 - i) * flip)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"This is what the plot looks like with matplotlib defaults:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sinplot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"To switch to seaborn defaults, simply call the :func:`set_theme` function.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_theme()\\n\",\n    \"sinplot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"(Note that in versions of seaborn prior to 0.8, :func:`set_theme` was called on import. On later versions, it must be explicitly invoked).\\n\",\n    \"\\n\",\n    \"Seaborn splits matplotlib parameters into two independent groups. The first group sets the aesthetic style of the plot, and the second scales various elements of the figure so that it can be easily incorporated into different contexts.\\n\",\n    \"\\n\",\n    \"The interface for manipulating these parameters are two pairs of functions. To control the style, use the :func:`axes_style` and :func:`set_style` functions. To scale the plot, use the :func:`plotting_context` and :func:`set_context` functions. In both cases, the first function returns a dictionary of parameters and the second sets the matplotlib defaults.\\n\",\n    \"\\n\",\n    \".. _axes_style:\\n\",\n    \"\\n\",\n    \"Seaborn figure styles\\n\",\n    \"---------------------\\n\",\n    \"\\n\",\n    \"There are five preset seaborn themes: ``darkgrid``, ``whitegrid``, ``dark``, ``white``, and ``ticks``. They are each suited to different applications and personal preferences. The default theme is ``darkgrid``. As mentioned above, the grid helps the plot serve as a lookup table for quantitative information, and the white-on grey helps to keep the grid from competing with lines that represent data. The ``whitegrid`` theme is similar, but it is better suited to plots with heavy data elements:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_style(\\\"whitegrid\\\")\\n\",\n    \"data = np.random.normal(size=(20, 6)) + np.arange(6) / 2\\n\",\n    \"sns.boxplot(data=data);\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"For many plots, (especially for settings like talks, where you primarily want to use figures to provide impressions of patterns in the data), the grid is less necessary.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_style(\\\"dark\\\")\\n\",\n    \"sinplot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_style(\\\"white\\\")\\n\",\n    \"sinplot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Sometimes you might want to give a little extra structure to the plots, which is where ticks come in handy:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_style(\\\"ticks\\\")\\n\",\n    \"sinplot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _remove_spines:\\n\",\n    \"\\n\",\n    \"Removing axes spines\\n\",\n    \"--------------------\\n\",\n    \"\\n\",\n    \"Both the ``white`` and ``ticks`` styles can benefit from removing the top and right axes spines, which are not needed. The seaborn function :func:`despine` can be called to remove them:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sinplot()\\n\",\n    \"sns.despine()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Some plots benefit from offsetting the spines away from the data, which can also be done when calling :func:`despine`. When the ticks don't cover the whole range of the axis, the ``trim`` parameter will limit the range of the surviving spines.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f, ax = plt.subplots()\\n\",\n    \"sns.violinplot(data=data)\\n\",\n    \"sns.despine(offset=10, trim=True);\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"You can also control which spines are removed with additional arguments to :func:`despine`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_style(\\\"whitegrid\\\")\\n\",\n    \"sns.boxplot(data=data, palette=\\\"deep\\\")\\n\",\n    \"sns.despine(left=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Temporarily setting figure style\\n\",\n    \"--------------------------------\\n\",\n    \"\\n\",\n    \"Although it's easy to switch back and forth, you can also use the :func:`axes_style` function in a ``with`` statement to temporarily set plot parameters. This also allows you to make figures with differently-styled axes:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"f = plt.figure(figsize=(6, 6))\\n\",\n    \"gs = f.add_gridspec(2, 2)\\n\",\n    \"\\n\",\n    \"with sns.axes_style(\\\"darkgrid\\\"):\\n\",\n    \"    ax = f.add_subplot(gs[0, 0])\\n\",\n    \"    sinplot(6)\\n\",\n    \"    \\n\",\n    \"with sns.axes_style(\\\"white\\\"):\\n\",\n    \"    ax = f.add_subplot(gs[0, 1])\\n\",\n    \"    sinplot(6)\\n\",\n    \"\\n\",\n    \"with sns.axes_style(\\\"ticks\\\"):\\n\",\n    \"    ax = f.add_subplot(gs[1, 0])\\n\",\n    \"    sinplot(6)\\n\",\n    \"\\n\",\n    \"with sns.axes_style(\\\"whitegrid\\\"):\\n\",\n    \"    ax = f.add_subplot(gs[1, 1])\\n\",\n    \"    sinplot(6)\\n\",\n    \"    \\n\",\n    \"f.tight_layout()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Overriding elements of the seaborn styles\\n\",\n    \"-----------------------------------------\\n\",\n    \"\\n\",\n    \"If you want to customize the seaborn styles, you can pass a dictionary of parameters to the ``rc`` argument of :func:`axes_style` and :func:`set_style`. Note that you can only override the parameters that are part of the style definition through this method. (However, the higher-level :func:`set_theme` function takes a dictionary of any matplotlib parameters).\\n\",\n    \"\\n\",\n    \"If you want to see what parameters are included, you can just call the function with no arguments, which will return the current settings:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.axes_style()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"You can then set different versions of these parameters:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_style(\\\"darkgrid\\\", {\\\"axes.facecolor\\\": \\\".9\\\"})\\n\",\n    \"sinplot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _plotting_context:\\n\",\n    \"\\n\",\n    \"Scaling plot elements\\n\",\n    \"---------------------\\n\",\n    \"\\n\",\n    \"A separate set of parameters control the scale of plot elements, which should let you use the same code to make plots that are suited for use in settings where larger or smaller plots are appropriate.\\n\",\n    \"\\n\",\n    \"First let's reset the default parameters by calling :func:`set_theme`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_theme()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The four preset contexts, in order of relative size, are ``paper``, ``notebook``, ``talk``, and ``poster``. The ``notebook`` style is the default, and was used in the plots above.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_context(\\\"paper\\\")\\n\",\n    \"sinplot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_context(\\\"talk\\\")\\n\",\n    \"sinplot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_context(\\\"poster\\\")\\n\",\n    \"sinplot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Most of what you now know about the style functions should transfer to the context functions.\\n\",\n    \"\\n\",\n    \"You can call :func:`set_context` with one of these names to set the parameters, and you can override the parameters by providing a dictionary of parameter values.\\n\",\n    \"\\n\",\n    \"You can also independently scale the size of the font elements when changing the context. (This option is also available through the top-level :func:`set` function).\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_context(\\\"notebook\\\", font_scale=1.5, rc={\\\"lines.linewidth\\\": 2.5})\\n\",\n    \"sinplot()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Similarly, you can temporarily control the scale of figures nested under a ``with`` statement.\\n\",\n    \"\\n\",\n    \"Both the style and the context can be quickly configured with the :func:`set` function. This function also sets the default color palette, but that will be covered in more detail in the :ref:`next section ` of the tutorial.\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"celltoolbar\": \"Tags\",\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"col":4,"comment":"\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        ","endLoc":814,"header":"def show(self, **kwargs) -> None","id":2361,"name":"show","nodeType":"Function","startLoc":796,"text":"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)"},{"attributeType":"null","col":21,"comment":"null","endLoc":2,"id":2362,"name":"mpl","nodeType":"Attribute","startLoc":2,"text":"mpl"},{"col":0,"comment":"null","endLoc":177,"header":"@pytest.mark.skipif(Version(np.__version__) < Version(\"1.17\"),\n                    reason=\"Tests new numpy random functionality\")\ndef test_seed_new()","id":2363,"name":"test_seed_new","nodeType":"Function","startLoc":154,"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"},{"col":4,"comment":"null","endLoc":265,"header":"@pytest.mark.skipif(_no_statsmodels, reason=\"no statsmodels\")\n    def test_regress_without_bootstrap(self)","id":2364,"name":"test_regress_without_bootstrap","nodeType":"Function","startLoc":249,"text":"@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"},{"col":4,"comment":"\n        Display the plot by hooking into pyplot.\n\n        This method calls :func:`matplotlib.pyplot.show` with any keyword parameters.\n\n        ","endLoc":905,"header":"def show(self, **kwargs) -> None","id":2365,"name":"show","nodeType":"Function","startLoc":894,"text":"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)"},{"id":2366,"name":"pairplot.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"sns.set_theme(style=\\\"ticks\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The simplest invocation uses :func:`scatterplot` for each pairing of the variables and :func:`histplot` for the marginal plots along the diagonal:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"penguins = sns.load_dataset(\\\"penguins\\\")\\n\",\n    \"sns.pairplot(penguins)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Assigning a ``hue`` variable adds a semantic mapping and changes the default marginal plot to a layered kernel density estimate (KDE):\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(penguins, hue=\\\"species\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"It's possible to force marginal histograms:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(penguins, hue=\\\"species\\\", diag_kind=\\\"hist\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The ``kind`` parameter determines both the diagonal and off-diagonal plotting style. Several options are available, including using :func:`kdeplot` to draw KDEs:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(penguins, kind=\\\"kde\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Or :func:`histplot` to draw both bivariate and univariate histograms:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(penguins, kind=\\\"hist\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The ``markers`` parameter applies a style mapping on the off-diagonal axes. Currently, it will be redundant with the ``hue`` variable:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(penguins, hue=\\\"species\\\", markers=[\\\"o\\\", \\\"s\\\", \\\"D\\\"])\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"As with other figure-level functions, the size of the figure is controlled by setting the ``height`` of each individual subplot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(penguins, height=1.5)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Use ``vars`` or ``x_vars`` and ``y_vars`` to select the variables to plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(\\n\",\n    \"    penguins,\\n\",\n    \"    x_vars=[\\\"bill_length_mm\\\", \\\"bill_depth_mm\\\", \\\"flipper_length_mm\\\"],\\n\",\n    \"    y_vars=[\\\"bill_length_mm\\\", \\\"bill_depth_mm\\\"],\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Set ``corner=True`` to plot only the lower triangle:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(penguins, corner=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The ``plot_kws`` and ``diag_kws`` parameters accept dicts of keyword arguments to customize the off-diagonal and diagonal plots, respectively:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(\\n\",\n    \"    penguins,\\n\",\n    \"    plot_kws=dict(marker=\\\"+\\\", linewidth=1),\\n\",\n    \"    diag_kws=dict(fill=False),\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The return object is the underlying :class:`PairGrid`, which can be used to further customize the plot:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"g = sns.pairplot(penguins, diag_kind=\\\"kde\\\")\\n\",\n    \"g.map_lower(sns.kdeplot, levels=4, color=\\\".2\\\")\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"fileName":"anscombes_quartet.py","filePath":"examples","id":2367,"nodeType":"File","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)\n"},{"id":2368,"name":"set_theme.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"flush-block\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn as sns\\n\",\n    \"import matplotlib.pyplot as plt\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"remarkable-confirmation\",\n   \"metadata\": {},\n   \"source\": [\n    \"By default, seaborn plots will be made with the current values of the matplotlib rcParams:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"viral-highway\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.barplot(x=[\\\"A\\\", \\\"B\\\", \\\"C\\\"], y=[1, 3, 2])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"hungarian-poster\",\n   \"metadata\": {},\n   \"source\": [\n    \"Calling this function with no arguments will activate seaborn's \\\"default\\\" theme:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"front-february\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_theme()\\n\",\n    \"sns.barplot(x=[\\\"A\\\", \\\"B\\\", \\\"C\\\"], y=[1, 3, 2])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"daily-mills\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note that this will take effect for *all* matplotlib plots, including those not made using seaborn:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"essential-replica\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"plt.bar([\\\"A\\\", \\\"B\\\", \\\"C\\\"], [1, 3, 2])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"naughty-edgar\",\n   \"metadata\": {},\n   \"source\": [\n    \"The seaborn theme is decomposed into several distinct sets of parameters that you can control independently:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"latin-conversion\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_theme(style=\\\"whitegrid\\\", palette=\\\"pastel\\\")\\n\",\n    \"sns.barplot(x=[\\\"A\\\", \\\"B\\\", \\\"C\\\"], y=[1, 3, 2])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"durable-cycling\",\n   \"metadata\": {},\n   \"source\": [\n    \"Pass `None` to preserve the current values for a given set of parameters:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"blessed-chuck\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_theme(style=\\\"white\\\", palette=None)\\n\",\n    \"sns.barplot(x=[\\\"A\\\", \\\"B\\\", \\\"C\\\"], y=[1, 3, 2])\"\n   ]\n  },\n  {\n   \"cell_type\": \"markdown\",\n   \"id\": \"present-writing\",\n   \"metadata\": {},\n   \"source\": [\n    \"You can also override any seaborn parameters or define additional parameters that are part of the matplotlib rc system but not included in the seaborn themes:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"floppy-effectiveness\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"custom_params = {\\\"axes.spines.right\\\": False, \\\"axes.spines.top\\\": False}\\n\",\n    \"sns.set_theme(style=\\\"ticks\\\", rc=custom_params)\\n\",\n    \"sns.barplot(x=[\\\"A\\\", \\\"B\\\", \\\"C\\\"], y=[1, 3, 2])\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"large-transfer\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"attributeType":"null","col":18,"comment":"null","endLoc":7,"id":2369,"name":"sns","nodeType":"Attribute","startLoc":7,"text":"sns"},{"fileName":"__init__.py","filePath":"seaborn/external","id":2370,"nodeType":"File","text":""},{"attributeType":"PlotData","col":4,"comment":"null","endLoc":184,"id":2372,"name":"_data","nodeType":"Attribute","startLoc":184,"text":"_data"},{"attributeType":"list","col":4,"comment":"null","endLoc":185,"id":2373,"name":"_layers","nodeType":"Attribute","startLoc":185,"text":"_layers"},{"fileName":"typing.py","filePath":"seaborn/_core","id":2374,"nodeType":"File","text":"from __future__ import annotations\n\nfrom datetime import date, datetime, timedelta\nfrom typing import Any, Optional, Union, Mapping, Tuple, List, Dict\nfrom collections.abc import Hashable, Iterable\n\nfrom numpy import ndarray  # TODO use ArrayLike?\nfrom pandas import DataFrame, Series, Index, Timestamp, Timedelta\nfrom matplotlib.colors import Colormap, Normalize\n\n\nColumnName = Union[\n    str, bytes, date, datetime, timedelta, bool, complex, Timestamp, Timedelta\n]\nVector = Union[Series, Index, ndarray]\n\nVariableSpec = Union[ColumnName, Vector, None]\nVariableSpecList = Union[List[VariableSpec], Index, None]\n\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\nPaletteSpec = Union[str, list, dict, Colormap, None]\nDiscreteValueSpec = Union[dict, list, None]\nContinuousValueSpec = Union[\n    Tuple[float, float], List[float], Dict[Any, float], None,\n]\n\n\nclass Default:\n    def __repr__(self):\n        return \"\"\n\n\ndefault = Default()\n"},{"className":"timedelta","col":0,"comment":"null","endLoc":227,"id":2375,"nodeType":"Class","startLoc":181,"text":"class timedelta:\n    min: ClassVar[timedelta]\n    max: ClassVar[timedelta]\n    resolution: ClassVar[timedelta]\n    def __new__(\n        cls,\n        days: float = ...,\n        seconds: float = ...,\n        microseconds: float = ...,\n        milliseconds: float = ...,\n        minutes: float = ...,\n        hours: float = ...,\n        weeks: float = ...,\n    ) -> Self: ...\n    @property\n    def days(self) -> int: ...\n    @property\n    def seconds(self) -> int: ...\n    @property\n    def microseconds(self) -> int: ...\n    def total_seconds(self) -> float: ...\n    def __add__(self, __value: timedelta) -> timedelta: ...\n    def __radd__(self, __value: timedelta) -> timedelta: ...\n    def __sub__(self, __value: timedelta) -> timedelta: ...\n    def __rsub__(self, __value: timedelta) -> timedelta: ...\n    def __neg__(self) -> timedelta: ...\n    def __pos__(self) -> timedelta: ...\n    def __abs__(self) -> timedelta: ...\n    def __mul__(self, __value: float) -> timedelta: ...\n    def __rmul__(self, __value: float) -> timedelta: ...\n    @overload\n    def __floordiv__(self, __value: timedelta) -> int: ...\n    @overload\n    def __floordiv__(self, __value: int) -> timedelta: ...\n    @overload\n    def __truediv__(self, __value: timedelta) -> float: ...\n    @overload\n    def __truediv__(self, __value: float) -> timedelta: ...\n    def __mod__(self, __value: timedelta) -> timedelta: ...\n    def __divmod__(self, __value: timedelta) -> tuple[int, timedelta]: ...\n    def __le__(self, __value: timedelta) -> bool: ...\n    def __lt__(self, __value: timedelta) -> bool: ...\n    def __ge__(self, __value: timedelta) -> bool: ...\n    def __gt__(self, __value: timedelta) -> bool: ...\n    def __eq__(self, __value: object) -> bool: ...\n    def __bool__(self) -> bool: ...\n    def __hash__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":194,"header":"def __new__(\n        cls,\n        days: float = ...,\n        seconds: float = ...,\n        microseconds: float = ...,\n        milliseconds: float = ...,\n        minutes: float = ...,\n        hours: float = ...,\n        weeks: float = ...,\n    ) -> Self","id":2376,"name":"__new__","nodeType":"Function","startLoc":185,"text":"def __new__(\n        cls,\n        days: float = ...,\n        seconds: float = ...,\n        microseconds: float = ...,\n        milliseconds: float = ...,\n        minutes: float = ...,\n        hours: float = ...,\n        weeks: float = ...,\n    ) -> Self: ..."},{"col":4,"comment":"null","endLoc":196,"header":"@property\n    def days(self) -> int","id":2377,"name":"days","nodeType":"Function","startLoc":195,"text":"@property\n    def days(self) -> int: ..."},{"col":4,"comment":"null","endLoc":198,"header":"@property\n    def seconds(self) -> int","id":2378,"name":"seconds","nodeType":"Function","startLoc":197,"text":"@property\n    def seconds(self) -> int: ..."},{"col":4,"comment":"null","endLoc":200,"header":"@property\n    def microseconds(self) -> int","id":2379,"name":"microseconds","nodeType":"Function","startLoc":199,"text":"@property\n    def microseconds(self) -> int: ..."},{"col":4,"comment":"null","endLoc":201,"header":"def total_seconds(self) -> float","id":2380,"name":"total_seconds","nodeType":"Function","startLoc":201,"text":"def total_seconds(self) -> float: ..."},{"col":4,"comment":"null","endLoc":202,"header":"def __add__(self, __value: timedelta) -> timedelta","id":2381,"name":"__add__","nodeType":"Function","startLoc":202,"text":"def __add__(self, __value: timedelta) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":203,"header":"def __radd__(self, __value: timedelta) -> timedelta","id":2382,"name":"__radd__","nodeType":"Function","startLoc":203,"text":"def __radd__(self, __value: timedelta) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":204,"header":"def __sub__(self, __value: timedelta) -> timedelta","id":2383,"name":"__sub__","nodeType":"Function","startLoc":204,"text":"def __sub__(self, __value: timedelta) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":205,"header":"def __rsub__(self, __value: timedelta) -> timedelta","id":2384,"name":"__rsub__","nodeType":"Function","startLoc":205,"text":"def __rsub__(self, __value: timedelta) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":206,"header":"def __neg__(self) -> timedelta","id":2385,"name":"__neg__","nodeType":"Function","startLoc":206,"text":"def __neg__(self) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":207,"header":"def __pos__(self) -> timedelta","id":2386,"name":"__pos__","nodeType":"Function","startLoc":207,"text":"def __pos__(self) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":208,"header":"def __abs__(self) -> timedelta","id":2387,"name":"__abs__","nodeType":"Function","startLoc":208,"text":"def __abs__(self) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":209,"header":"def __mul__(self, __value: float) -> timedelta","id":2388,"name":"__mul__","nodeType":"Function","startLoc":209,"text":"def __mul__(self, __value: float) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":210,"header":"def __rmul__(self, __value: float) -> timedelta","id":2389,"name":"__rmul__","nodeType":"Function","startLoc":210,"text":"def __rmul__(self, __value: float) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":212,"header":"@overload\n    def __floordiv__(self, __value: timedelta) -> int","id":2390,"name":"__floordiv__","nodeType":"Function","startLoc":211,"text":"@overload\n    def __floordiv__(self, __value: timedelta) -> int: ..."},{"col":4,"comment":"null","endLoc":214,"header":"@overload\n    def __floordiv__(self, __value: int) -> timedelta","id":2391,"name":"__floordiv__","nodeType":"Function","startLoc":213,"text":"@overload\n    def __floordiv__(self, __value: int) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":216,"header":"@overload\n    def __truediv__(self, __value: timedelta) -> float","id":2392,"name":"__truediv__","nodeType":"Function","startLoc":215,"text":"@overload\n    def __truediv__(self, __value: timedelta) -> float: ..."},{"col":4,"comment":"null","endLoc":218,"header":"@overload\n    def __truediv__(self, __value: float) -> timedelta","id":2393,"name":"__truediv__","nodeType":"Function","startLoc":217,"text":"@overload\n    def __truediv__(self, __value: float) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":219,"header":"def __mod__(self, __value: timedelta) -> timedelta","id":2394,"name":"__mod__","nodeType":"Function","startLoc":219,"text":"def __mod__(self, __value: timedelta) -> timedelta: ..."},{"col":4,"comment":"null","endLoc":220,"header":"def __divmod__(self, __value: timedelta) -> tuple[int, timedelta]","id":2395,"name":"__divmod__","nodeType":"Function","startLoc":220,"text":"def __divmod__(self, __value: timedelta) -> tuple[int, timedelta]: ..."},{"col":4,"comment":"null","endLoc":221,"header":"def __le__(self, __value: timedelta) -> bool","id":2396,"name":"__le__","nodeType":"Function","startLoc":221,"text":"def __le__(self, __value: timedelta) -> bool: ..."},{"col":4,"comment":"null","endLoc":222,"header":"def __lt__(self, __value: timedelta) -> bool","id":2397,"name":"__lt__","nodeType":"Function","startLoc":222,"text":"def __lt__(self, __value: timedelta) -> bool: ..."},{"col":4,"comment":"null","endLoc":223,"header":"def __ge__(self, __value: timedelta) -> bool","id":2398,"name":"__ge__","nodeType":"Function","startLoc":223,"text":"def __ge__(self, __value: timedelta) -> bool: ..."},{"col":4,"comment":"null","endLoc":224,"header":"def __gt__(self, __value: timedelta) -> bool","id":2399,"name":"__gt__","nodeType":"Function","startLoc":224,"text":"def __gt__(self, __value: timedelta) -> bool: ..."},{"col":4,"comment":"null","endLoc":225,"header":"def __eq__(self, __value: object) -> bool","id":2400,"name":"__eq__","nodeType":"Function","startLoc":225,"text":"def __eq__(self, __value: object) -> bool: ..."},{"col":4,"comment":"null","endLoc":226,"header":"def __bool__(self) -> bool","id":2401,"name":"__bool__","nodeType":"Function","startLoc":226,"text":"def __bool__(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":227,"header":"def __hash__(self) -> int","id":2402,"name":"__hash__","nodeType":"Function","startLoc":227,"text":"def __hash__(self) -> int: ..."},{"attributeType":"timedelta","col":4,"comment":"null","endLoc":182,"id":2403,"name":"min","nodeType":"Attribute","startLoc":182,"text":"min"},{"attributeType":"null","col":0,"comment":"null","endLoc":11,"id":2404,"name":"df","nodeType":"Attribute","startLoc":11,"text":"df"},{"col":4,"comment":"null","endLoc":277,"header":"def test_regress_bootstrap_seed(self)","id":2405,"name":"test_regress_bootstrap_seed","nodeType":"Function","startLoc":267,"text":"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)"},{"col":0,"comment":"","endLoc":6,"header":"anscombes_quartet.py#","id":2407,"name":"","nodeType":"Function","startLoc":1,"text":"\"\"\"\nAnscombe's quartet\n==================\n\n_thumb: .4, .4\n\"\"\"\n\nsns.set_theme(style=\"ticks\")\n\ndf = sns.load_dataset(\"anscombe\")\n\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)"},{"attributeType":"timedelta","col":4,"comment":"null","endLoc":183,"id":2408,"name":"max","nodeType":"Attribute","startLoc":183,"text":"max"},{"col":4,"comment":"null","endLoc":115,"header":"def test_offset_valign(self)","id":2410,"name":"test_offset_valign","nodeType":"Function","startLoc":103,"text":"def test_offset_valign(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        m = Text(valign=\"bottom\", fontsize=5, offset=.1)\n        p = Plot(x, y, text=s).add(m).plot()\n        ax = p._figure.axes[0]\n        expected_shift_matrix = np.zeros((3, 3))\n        expected_shift_matrix[1, -1] = m.offset * ax.figure.dpi / 72\n        ax_trans = ax.transData.get_matrix()\n        for text in self.get_texts(ax):\n            shift_matrix = text.get_transform().get_matrix() - ax_trans\n            assert_array_almost_equal(shift_matrix, expected_shift_matrix)"},{"attributeType":"timedelta","col":4,"comment":"null","endLoc":184,"id":2411,"name":"resolution","nodeType":"Attribute","startLoc":184,"text":"resolution"},{"attributeType":"list","col":0,"comment":"null","endLoc":304,"id":2412,"name":"List","nodeType":"Attribute","startLoc":304,"text":"List"},{"id":2413,"name":"introduction.ipynb","nodeType":"TextFile","path":"doc/_tutorial","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _introduction:\\n\",\n    \"\\n\",\n    \".. currentmodule:: seaborn\\n\",\n    \"\\n\",\n    \"An introduction to seaborn\\n\",\n    \"==========================\\n\",\n    \"\\n\",\n    \"Seaborn is a library for making statistical graphics in Python. It builds on top of `matplotlib `_ and integrates closely with `pandas `_ data structures.\\n\",\n    \"\\n\",\n    \"Seaborn helps you explore and understand your data. Its plotting functions operate on dataframes and arrays containing whole datasets and internally perform the necessary semantic mapping and statistical aggregation to produce informative plots. Its dataset-oriented, declarative API lets you focus on what the different elements of your plots mean, rather than on the details of how to draw them.\\n\",\n    \"\\n\",\n    \"Here's an example of what seaborn can do:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"# Import seaborn\\n\",\n    \"import seaborn as sns\\n\",\n    \"\\n\",\n    \"# Apply the default theme\\n\",\n    \"sns.set_theme()\\n\",\n    \"\\n\",\n    \"# Load an example dataset\\n\",\n    \"tips = sns.load_dataset(\\\"tips\\\")\\n\",\n    \"\\n\",\n    \"# Create a visualization\\n\",\n    \"sns.relplot(\\n\",\n    \"    data=tips,\\n\",\n    \"    x=\\\"total_bill\\\", y=\\\"tip\\\", col=\\\"time\\\",\\n\",\n    \"    hue=\\\"smoker\\\", style=\\\"smoker\\\", size=\\\"size\\\",\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"A few things have happened here. Let's go through them one by one:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide-output\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# Import seaborn\\n\",\n    \"import seaborn as sns\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Seaborn is the only library we need to import for this simple example. By convention, it is imported with the shorthand ``sns``.\\n\",\n    \"\\n\",\n    \"Behind the scenes, seaborn uses matplotlib to draw its plots. For interactive work, it's recommended to use a Jupyter/IPython interface in `matplotlib mode `_, or else you'll have to call :func:`matplotlib.pyplot.show` when you want to see the plot.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide-output\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# Apply the default theme\\n\",\n    \"sns.set_theme()\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"This uses the matplotlib rcParam system and will affect how all matplotlib plots look, even if you don't make them with seaborn. Beyond the default theme, there are :doc:`several other options `, and you can independently control the style and scaling of the plot to quickly translate your work between presentation contexts (e.g., making a version of your figure that will have readable fonts when projected during a talk). If you like the matplotlib defaults or prefer a different theme, you can skip this step and still use the seaborn plotting functions.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide-output\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# Load an example dataset\\n\",\n    \"tips = sns.load_dataset(\\\"tips\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Most code in the docs will use the :func:`load_dataset` function to get quick access to an example dataset. There's nothing special about these datasets: they are just pandas dataframes, and we could have loaded them with :func:`pandas.read_csv` or built them by hand. Most of the examples in the documentation will specify data using pandas dataframes, but seaborn is very flexible about the :doc:`data structures ` that it accepts.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide-output\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"# Create a visualization\\n\",\n    \"sns.relplot(\\n\",\n    \"    data=tips,\\n\",\n    \"    x=\\\"total_bill\\\", y=\\\"tip\\\", col=\\\"time\\\",\\n\",\n    \"    hue=\\\"smoker\\\", style=\\\"smoker\\\", size=\\\"size\\\",\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"This plot shows the relationship between five variables in the tips dataset using a single call to the seaborn function :func:`relplot`. Notice how we provided only the names of the variables and their roles in the plot. Unlike when using matplotlib directly, it wasn't necessary to specify attributes of the plot elements in terms of the color values or marker codes. Behind the scenes, seaborn handled the translation from values in the dataframe to arguments that matplotlib understands. This declarative approach lets you stay focused on the questions that you want to answer, rather than on the details of how to control matplotlib.\\n\",\n    \"\\n\",\n    \".. _intro_api_abstraction:\\n\",\n    \"\\n\",\n    \"A high-level API for statistical graphics\\n\",\n    \"-----------------------------------------\\n\",\n    \"\\n\",\n    \"There is no universally best way to visualize data. Different questions are best answered by different plots. Seaborn makes it easy to switch between different visual representations by using a consistent dataset-oriented API.\\n\",\n    \"\\n\",\n    \"The function :func:`relplot` is named that way because it is designed to visualize many different statistical *relationships*. While scatter plots are often effective, relationships where one variable represents a measure of time are better represented by a line. The :func:`relplot` function has a convenient ``kind`` parameter that lets you easily switch to this alternate representation:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"dots = sns.load_dataset(\\\"dots\\\")\\n\",\n    \"sns.relplot(\\n\",\n    \"    data=dots, kind=\\\"line\\\",\\n\",\n    \"    x=\\\"time\\\", y=\\\"firing_rate\\\", col=\\\"align\\\",\\n\",\n    \"    hue=\\\"choice\\\", size=\\\"coherence\\\", style=\\\"choice\\\",\\n\",\n    \"    facet_kws=dict(sharex=False),\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Notice how the ``size`` and ``style`` parameters are used in both the scatter and line plots, but they affect the two visualizations differently: changing the marker area and symbol in the scatter plot vs the line width and dashing in the line plot. We did not need to keep those details in mind, letting us focus on the overall structure of the plot and the information we want it to convey.\\n\",\n    \"\\n\",\n    \".. _intro_stat_estimation:\\n\",\n    \"\\n\",\n    \"Statistical estimation\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"Often, we are interested in the *average* value of one variable as a function of other variables. Many seaborn functions will automatically perform the statistical estimation that is necessary to answer these questions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"fmri = sns.load_dataset(\\\"fmri\\\")\\n\",\n    \"sns.relplot(\\n\",\n    \"    data=fmri, kind=\\\"line\\\",\\n\",\n    \"    x=\\\"timepoint\\\", y=\\\"signal\\\", col=\\\"region\\\",\\n\",\n    \"    hue=\\\"event\\\", style=\\\"event\\\",\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"When statistical values are estimated, seaborn will use bootstrapping to compute confidence intervals and draw error bars representing the uncertainty of the estimate.\\n\",\n    \"\\n\",\n    \"Statistical estimation in seaborn goes beyond descriptive statistics. For example, it is possible to enhance a scatterplot by including a linear regression model (and its uncertainty) using :func:`lmplot`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(data=tips, x=\\\"total_bill\\\", y=\\\"tip\\\", col=\\\"time\\\", hue=\\\"smoker\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _intro_distributions:\\n\",\n    \"\\n\",\n    \"\\n\",\n    \"Distributional representations\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"Statistical analyses require knowledge about the distribution of variables in your dataset. The seaborn function :func:`displot` supports several approaches to visualizing distributions. These include classic techniques like histograms and computationally-intensive approaches like kernel density estimation:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(data=tips, x=\\\"total_bill\\\", col=\\\"time\\\", kde=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Seaborn also tries to promote techniques that are powerful but less familiar, such as calculating and plotting the empirical cumulative distribution function of the data:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.displot(data=tips, kind=\\\"ecdf\\\", x=\\\"total_bill\\\", col=\\\"time\\\", hue=\\\"smoker\\\", rug=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _intro_categorical:\\n\",\n    \"\\n\",\n    \"Plots for categorical data\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"Several specialized plot types in seaborn are oriented towards visualizing categorical data. They can be accessed through :func:`catplot`. These plots offer different levels of granularity. At the finest level, you may wish to see every observation by drawing a \\\"swarm\\\" plot: a scatter plot that adjusts the positions of the points along the categorical axis so that they don't overlap:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.catplot(data=tips, kind=\\\"swarm\\\", x=\\\"day\\\", y=\\\"total_bill\\\", hue=\\\"smoker\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Alternately, you could use kernel density estimation to represent the underlying distribution that the points are sampled from:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.catplot(data=tips, kind=\\\"violin\\\", x=\\\"day\\\", y=\\\"total_bill\\\", hue=\\\"smoker\\\", split=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Or you could show only the mean value and its confidence interval within each nested category:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.catplot(data=tips, kind=\\\"bar\\\", x=\\\"day\\\", y=\\\"total_bill\\\", hue=\\\"smoker\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _intro_dataset_funcs:\\n\",\n    \"\\n\",\n    \"Multivariate views on complex datasets\\n\",\n    \"--------------------------------------\\n\",\n    \"\\n\",\n    \"Some seaborn functions combine multiple kinds of plots to quickly give informative summaries of a dataset. One, :func:`jointplot`, focuses on a single relationship. It plots the joint distribution between two variables along with each variable's marginal distribution:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"penguins = sns.load_dataset(\\\"penguins\\\")\\n\",\n    \"sns.jointplot(data=penguins, x=\\\"flipper_length_mm\\\", y=\\\"bill_length_mm\\\", hue=\\\"species\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The other, :func:`pairplot`, takes a broader view: it shows joint and marginal distributions for all pairwise relationships and for each variable, respectively:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(data=penguins, hue=\\\"species\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _intro_figure_classes:\\n\",\n    \"\\n\",\n    \"Lower-level tools for building figures\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"These tools work by combining :doc:`axes-level ` plotting functions with objects that manage the layout of the figure, linking the structure of a dataset to a :doc:`grid of axes `. Both elements are part of the public API, and you can use them directly to create complex figures with only a few more lines of code:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"g = sns.PairGrid(penguins, hue=\\\"species\\\", corner=True)\\n\",\n    \"g.map_lower(sns.kdeplot, hue=None, levels=5, color=\\\".2\\\")\\n\",\n    \"g.map_lower(sns.scatterplot, marker=\\\"+\\\")\\n\",\n    \"g.map_diag(sns.histplot, element=\\\"step\\\", linewidth=0, kde=True)\\n\",\n    \"g.add_legend(frameon=True)\\n\",\n    \"g.legend.set_bbox_to_anchor((.61, .6))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _intro_defaults:\\n\",\n    \"\\n\",\n    \"Opinionated defaults and flexible customization\\n\",\n    \"-----------------------------------------------\\n\",\n    \"\\n\",\n    \"Seaborn creates complete graphics with a single function call: when possible, its functions will automatically add informative axis labels and legends that explain the semantic mappings in the plot.\\n\",\n    \"\\n\",\n    \"In many cases, seaborn will also choose default values for its parameters based on characteristics of the data. For example, the :doc:`color mappings ` that we have seen so far used distinct hues (blue, orange, and sometimes green) to represent different levels of the categorical variables assigned to ``hue``. When mapping a numeric variable, some functions will switch to a continuous gradient:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.relplot(\\n\",\n    \"    data=penguins,\\n\",\n    \"    x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", hue=\\\"body_mass_g\\\"\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"When you're ready to share or publish your work, you'll probably want to polish the figure beyond what the defaults achieve. Seaborn allows for several levels of customization. It defines multiple built-in :doc:`themes ` that apply to all figures, its functions have standardized parameters that can modify the semantic mappings for each plot, and additional keyword arguments are passed down to the underlying matplotlib artists, allowing even more control. Once you've created a plot, its properties can be modified through both the seaborn API and by dropping down to the matplotlib layer for fine-grained tweaking:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.set_theme(style=\\\"ticks\\\", font_scale=1.25)\\n\",\n    \"g = sns.relplot(\\n\",\n    \"    data=penguins,\\n\",\n    \"    x=\\\"bill_length_mm\\\", y=\\\"bill_depth_mm\\\", hue=\\\"body_mass_g\\\",\\n\",\n    \"    palette=\\\"crest\\\", marker=\\\"x\\\", s=100,\\n\",\n    \")\\n\",\n    \"g.set_axis_labels(\\\"Bill length (mm)\\\", \\\"Bill depth (mm)\\\", labelpad=10)\\n\",\n    \"g.legend.set_title(\\\"Body mass (g)\\\")\\n\",\n    \"g.figure.set_size_inches(6.5, 4.5)\\n\",\n    \"g.ax.margins(.15)\\n\",\n    \"g.despine(trim=True)\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _intro_matplotlib:\\n\",\n    \"\\n\",\n    \"Relationship to matplotlib\\n\",\n    \"~~~~~~~~~~~~~~~~~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"Seaborn's integration with matplotlib allows you to use it across the many environments that matplotlib supports, including exploratory analysis in notebooks, real-time interaction in GUI applications, and archival output in a number of raster and vector formats.\\n\",\n    \"\\n\",\n    \"While you can be productive using only seaborn functions, full customization of your graphics will require some knowledge of matplotlib's concepts and API. One aspect of the learning curve for new users of seaborn will be knowing when dropping down to the matplotlib layer is necessary to achieve a particular customization. On the other hand, users coming from matplotlib will find that much of their knowledge transfers.\\n\",\n    \"\\n\",\n    \"Matplotlib has a comprehensive and powerful API; just about any attribute of the figure can be changed to your liking. A combination of seaborn's high-level interface and matplotlib's deep customizability will allow you both to quickly explore your data and to create graphics that can be tailored into a `publication quality `_ final product.\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _intro_next_steps:\\n\",\n    \"\\n\",\n    \"Next steps\\n\",\n    \"~~~~~~~~~~\\n\",\n    \"\\n\",\n    \"You have a few options for where to go next. You might first want to learn how to :doc:`install seaborn `. Once that's done, you can browse the :doc:`example gallery ` to get a broader sense for what kind of graphics seaborn can produce. Or you can read through the rest of the :doc:`user guide and tutorial ` for a deeper discussion of the different tools and what they are designed to accomplish. If you have a specific plot in mind and want to know how to make it, you could check out the :doc:`API reference `, which documents each function's parameters and shows many examples to illustrate usage.\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"celltoolbar\": \"Tags\",\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"attributeType":"dict","col":0,"comment":"null","endLoc":305,"id":2414,"name":"Dict","nodeType":"Attribute","startLoc":305,"text":"Dict"},{"className":"Hashable","col":0,"comment":"null","endLoc":381,"id":2415,"nodeType":"Class","startLoc":375,"text":"@runtime_checkable\nclass Hashable(Protocol, metaclass=ABCMeta):\n    # TODO: This is special, in that a subclass of a hashable class may not be hashable\n    #   (for example, list vs. object). It's not obvious how to represent this. This class\n    #   is currently mostly useless for static checking.\n    @abstractmethod\n    def __hash__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":381,"header":"@abstractmethod\n    def __hash__(self) -> int","id":2417,"name":"__hash__","nodeType":"Function","startLoc":380,"text":"@abstractmethod\n    def __hash__(self) -> int: ..."},{"id":2418,"name":"objects.Plot.add.ipynb","nodeType":"TextFile","path":"doc/_docstrings","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"9252d5a5-8af1-4f99-b799-ee044329fb23\",\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import seaborn.objects as so\\n\",\n    \"from seaborn import load_dataset\\n\",\n    \"tips = load_dataset(\\\"tips\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"33cd5d3c-d3ad-4e3b-bdac-350f8e104594\",\n   \"metadata\": {},\n   \"source\": [\n    \"Every layer must be defined with a :class:`Mark`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"43d0401a-d7d5-4746-a02f-a48f8b5fd1f2\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p = so.Plot(tips, \\\"total_bill\\\", \\\"tip\\\").add(so.Dot())\\n\",\n    \"p\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"34b4f581-6126-4d57-ac76-8821c5daa97b\",\n   \"metadata\": {},\n   \"source\": [\n    \"Call :class:`Plot.add` multiple times to add multiple layers. In addition to the :class:`Mark`, layers can also be defined with :class:`Stat` or :class:`Move` transforms:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"693c461e-1dc2-4b44-a9e5-c07b1bf0108b\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"p.add(so.Line(), so.PolyFit())\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"96a61426-0de2-4f4b-a373-0006da6fcceb\",\n   \"metadata\": {},\n   \"source\": [\n    \"Multiple transforms can be stacked into a pipeline. \"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"b22623a7-bfde-493c-8593-76b145fa1e84\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, y=\\\"day\\\", color=\\\"sex\\\")\\n\",\n    \"    .add(so.Bar(), so.Hist(), so.Dodge())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"aa8e6bde-c86c-4bd8-abbe-e0fc64103114\",\n   \"metadata\": {},\n   \"source\": [\n    \"Layers have an \\\"orientation\\\", which affects the transforms and some marks. The orientation is typically inferred from the variable types assigned to `x` and `y`, but it can be specified when it would otherwise be ambiguous:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"42be495b-e41b-4883-b061-0973c0e8b496\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, x=\\\"total_bill\\\", y=\\\"size\\\", color=\\\"time\\\")\\n\",\n    \"    .add(so.Dot(alpha=.5), so.Dodge(), so.Jitter(.4), orient=\\\"y\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"0d2a77f2-6a21-4fe6-a8b1-66978f4f072b\",\n   \"metadata\": {},\n   \"source\": [\n    \"Variables can be assigned to a specific layer. Note the distinction between how `pointsize` is passed to :class:`Plot.add` — so it is *mapped* by a scale — while `color` and `linewidth` are passed directly to :class:`Line`, so they directly set the line's color and width:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"e42c3699-c468-4c21-b417-3952311735eb\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, \\\"total_bill\\\", \\\"tip\\\")\\n\",\n    \"    .add(so.Dots(), pointsize=\\\"size\\\")\\n\",\n    \"    .add(so.Line(color=\\\".3\\\", linewidth=3), so.PolyFit())\\n\",\n    \"    .scale(pointsize=(2, 10))\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"d61908e5-9074-443d-9160-2c3101a39bcd\",\n   \"metadata\": {},\n   \"source\": [\n    \"Variables that would otherwise apply to the entire plot can also be *excluded* from a specific layer by setting their value to `None`:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a095ecca-b428-4bad-a9ab-4d4f05cf61e0\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, \\\"total_bill\\\", \\\"tip\\\", color=\\\"day\\\")\\n\",\n    \"    .facet(col=\\\"day\\\")\\n\",\n    \"    .add(so.Dot(color=\\\"#aabc\\\"), col=None, color=None)\\n\",\n    \"    .add(so.Dot())\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"60f94773-668e-441e-9634-41473c26d3bd\",\n   \"metadata\": {},\n   \"source\": [\n    \"Variables used only by the transforms *must* be passed at the layer level:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"0d1ac7e8-5bbd-4a1a-a207-197a4251c2d3\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, \\\"day\\\")\\n\",\n    \"    .add(so.Bar(), so.Hist(), weight=\\\"size\\\")\\n\",\n    \"    .label(y=\\\"Total patrons\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"id\": \"8a7a5ff7-c0f5-4787-8908-3cb13ea7a047\",\n   \"metadata\": {},\n   \"source\": [\n    \"Each layer can be provided with its own data source. If a data source was provided in the constructor, the layer data will be joined using its index:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"45690aaa-1abf-40ae-be3b-1ab648f8be62\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"(\\n\",\n    \"    so.Plot(tips, \\\"total_bill\\\", \\\"tip\\\")\\n\",\n    \"    .add(so.Dot(color=\\\"#aabc\\\"))\\n\",\n    \"    .add(so.Dot(), data=tips.query(\\\"size == 2\\\"), color=\\\"time\\\")\\n\",\n    \")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"id\": \"a403012a-e895-4e5b-b690-dc27efbeccad\",\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": []\n  }\n ],\n \"metadata\": {\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"},{"attributeType":"null","col":0,"comment":"null","endLoc":12,"id":2419,"name":"ColumnName","nodeType":"Attribute","startLoc":12,"text":"ColumnName"},{"col":4,"comment":"null","endLoc":284,"header":"def test_numeric_bins(self)","id":2420,"name":"test_numeric_bins","nodeType":"Function","startLoc":279,"text":"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)"},{"col":4,"comment":"null","endLoc":122,"header":"def test_vector_variables_only(self, long_df)","id":2421,"name":"test_vector_variables_only","nodeType":"Function","startLoc":115,"text":"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()"},{"col":4,"comment":"Get the proportions of the figure taken up by each axes.","endLoc":916,"header":"def dim_ratios(self, colors, dendrogram_ratio, colors_ratio)","id":2422,"name":"dim_ratios","nodeType":"Function","startLoc":900,"text":"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"},{"attributeType":"null","col":0,"comment":"null","endLoc":17,"id":2423,"name":"VariableSpec","nodeType":"Attribute","startLoc":17,"text":"VariableSpec"},{"col":4,"comment":"Draw titles either above each facet or on the grid margins.\n\n        Parameters\n        ----------\n        template : string\n            Template for all titles with the formatting keys {col_var} and\n            {col_name} (if using a `col` faceting variable) and/or {row_var}\n            and {row_name} (if using a `row` faceting variable).\n        row_template:\n            Template for the row variable when titles are drawn on the grid\n            margins. Must have {row_var} and {row_name} formatting keys.\n        col_template:\n            Template for the column variable when titles are drawn on the grid\n            margins. Must have {col_var} and {col_name} formatting keys.\n\n        Returns\n        -------\n        self: object\n            Returns self.\n\n        ","endLoc":1028,"header":"def set_titles(self, template=None, row_template=None, col_template=None,\n                   **kwargs)","id":2425,"name":"set_titles","nodeType":"Function","startLoc":938,"text":"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 column variable when titles are drawn on the grid\n            margins. Must have {col_var} and {col_name} formatting keys.\n\n        Returns\n        -------\n        self: object\n            Returns self.\n\n        \"\"\"\n        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"},{"col":4,"comment":"null","endLoc":290,"header":"def test_provided_bins(self)","id":2426,"name":"test_provided_bins","nodeType":"Function","startLoc":286,"text":"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)"},{"attributeType":"null","col":0,"comment":"null","endLoc":18,"id":2427,"name":"VariableSpecList","nodeType":"Attribute","startLoc":18,"text":"VariableSpecList"},{"col":4,"comment":"null","endLoc":132,"header":"def test_vector_variables_no_index(self, long_df)","id":2428,"name":"test_vector_variables_no_index","nodeType":"Function","startLoc":124,"text":"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()"},{"attributeType":"null","col":0,"comment":"null","endLoc":20,"id":2429,"name":"DataSource","nodeType":"Attribute","startLoc":20,"text":"DataSource"},{"col":4,"comment":"Draw a bivariate plot on the indicated axes.","endLoc":1572,"header":"def _map_bivariate(self, func, indices, **kwargs)","id":2431,"name":"_map_bivariate","nodeType":"Function","startLoc":1552,"text":"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)"},{"col":4,"comment":"null","endLoc":297,"header":"def test_bin_results(self)","id":2432,"name":"test_bin_results","nodeType":"Function","startLoc":292,"text":"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()"},{"attributeType":"str","col":0,"comment":"null","endLoc":55,"id":2433,"name":"unicode","nodeType":"Attribute","startLoc":55,"text":"unicode"},{"attributeType":"str","col":4,"comment":"null","endLoc":59,"id":2434,"name":"os_name","nodeType":"Attribute","startLoc":59,"text":"os_name"},{"attributeType":"null","col":0,"comment":"null","endLoc":22,"id":2435,"name":"OrderSpec","nodeType":"Attribute","startLoc":22,"text":"OrderSpec"},{"col":4,"comment":"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        ","endLoc":266,"header":"def evaluate(self, points)","id":2436,"name":"evaluate","nodeType":"Function","startLoc":212,"text":"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"},{"attributeType":"TypedDict","col":0,"comment":"null","endLoc":114,"id":2437,"name":"_core_returns","nodeType":"Attribute","startLoc":114,"text":"_core_returns"},{"attributeType":"null","col":0,"comment":"null","endLoc":23,"id":2438,"name":"NormSpec","nodeType":"Attribute","startLoc":23,"text":"NormSpec"},{"col":4,"comment":"Draw a bivariate plot on the specified axes.","endLoc":1611,"header":"def _plot_bivariate(self, x_var, y_var, ax, func, **kwargs)","id":2439,"name":"_plot_bivariate","nodeType":"Function","startLoc":1574,"text":"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)"},{"col":4,"comment":"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        ","endLoc":1093,"header":"def scale_area(self, density, max_density, scale_hue)","id":2440,"name":"scale_area","nodeType":"Function","startLoc":1073,"text":"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"},{"col":4,"comment":"null","endLoc":138,"header":"def test_data_only_named(self, long_df)","id":2441,"name":"test_data_only_named","nodeType":"Function","startLoc":134,"text":"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 == {}"},{"attributeType":"dict","col":4,"comment":"null","endLoc":187,"id":2442,"name":"_scales","nodeType":"Attribute","startLoc":187,"text":"_scales"},{"col":4,"comment":"Draw a bivariate plot while iterating over hue subsets.","endLoc":1655,"header":"def _plot_bivariate_iter_hue(self, x_var, y_var, ax, func, **kwargs)","id":2443,"name":"_plot_bivariate_iter_hue","nodeType":"Function","startLoc":1613,"text":"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)"},{"col":4,"comment":"null","endLoc":129,"header":"def test_offset_halign(self)","id":2444,"name":"test_offset_halign","nodeType":"Function","startLoc":117,"text":"def test_offset_halign(self):\n\n        x = y = [1, 2, 3]\n        s = list(\"abc\")\n        m = Text(halign=\"right\", fontsize=10, offset=.5)\n        p = Plot(x, y, text=s).add(m).plot()\n        ax = p._figure.axes[0]\n        expected_shift_matrix = np.zeros((3, 3))\n        expected_shift_matrix[0, -1] = -m.offset * ax.figure.dpi / 72\n        ax_trans = ax.transData.get_matrix()\n        for text in self.get_texts(ax):\n            shift_matrix = text.get_transform().get_matrix() - ax_trans\n            assert_array_almost_equal(shift_matrix, expected_shift_matrix)"},{"col":4,"comment":"null","endLoc":144,"header":"def test_positional_and_named_data(self, long_df)","id":2445,"name":"test_positional_and_named_data","nodeType":"Function","startLoc":140,"text":"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)"},{"attributeType":"null","col":0,"comment":"null","endLoc":27,"id":2446,"name":"PaletteSpec","nodeType":"Attribute","startLoc":27,"text":"PaletteSpec"},{"attributeType":"dict","col":4,"comment":"null","endLoc":188,"id":2447,"name":"_shares","nodeType":"Attribute","startLoc":188,"text":"_shares"},{"col":4,"comment":"Determine colors when the hue variable is quantitative.","endLoc":288,"header":"def numeric_mapping(self, data, palette, norm)","id":2448,"name":"numeric_mapping","nodeType":"Function","startLoc":247,"text":"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"},{"attributeType":"dict","col":4,"comment":"null","endLoc":189,"id":2449,"name":"_limits","nodeType":"Attribute","startLoc":189,"text":"_limits"},{"attributeType":"TypedDict","col":0,"comment":"null","endLoc":137,"id":2450,"name":"_seealso_blurbs","nodeType":"Attribute","startLoc":137,"text":"_seealso_blurbs"},{"col":4,"comment":"null","endLoc":151,"header":"@pytest.mark.parametrize(\"var\", [\"x\", \"y\"])\n    def test_positional_and_named_xy(self, long_df, var)","id":2451,"name":"test_positional_and_named_xy","nodeType":"Function","startLoc":146,"text":"@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\"})"},{"col":4,"comment":"Scale each density curve to the same height.","endLoc":1103,"header":"def scale_width(self, density)","id":2452,"name":"scale_width","nodeType":"Function","startLoc":1095,"text":"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()"},{"col":4,"comment":"null","endLoc":157,"header":"def test_positional_data_x_y(self, long_df)","id":2453,"name":"test_positional_data_x_y","nodeType":"Function","startLoc":153,"text":"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\"]"},{"attributeType":"dict","col":4,"comment":"null","endLoc":190,"id":2454,"name":"_labels","nodeType":"Attribute","startLoc":190,"text":"_labels"},{"col":0,"comment":"\n    Gives a new shape to an array without changing its data.\n\n    Parameters\n    ----------\n    a : array_like\n        Array to be reshaped.\n    newshape : int or tuple of ints\n        The new shape should be compatible with the original shape. If\n        an integer, then the result will be a 1-D array of that length.\n        One shape dimension can be -1. In this case, the value is\n        inferred from the length of the array and remaining dimensions.\n    order : {'C', 'F', 'A'}, optional\n        Read the elements of `a` using this index order, and place the\n        elements into the reshaped array using this index order.  'C'\n        means to read / write the elements using C-like index order,\n        with the last axis index changing fastest, back to the first\n        axis index changing slowest. 'F' means to read / write the\n        elements using Fortran-like index order, with the first index\n        changing fastest, and the last index changing slowest. Note that\n        the 'C' and 'F' options take no account of the memory layout of\n        the underlying array, and only refer to the order of indexing.\n        'A' means to read / write the elements in Fortran-like index\n        order if `a` is Fortran *contiguous* in memory, C-like order\n        otherwise.\n\n    Returns\n    -------\n    reshaped_array : ndarray\n        This will be a new view object if possible; otherwise, it will\n        be a copy.  Note there is no guarantee of the *memory layout* (C- or\n        Fortran- contiguous) of the returned array.\n\n    See Also\n    --------\n    ndarray.reshape : Equivalent method.\n\n    Notes\n    -----\n    It is not always possible to change the shape of an array without\n    copying the data. If you want an error to be raise if the data is copied,\n    you should assign the new shape to the shape attribute of the array::\n\n     >>> a = np.zeros((10, 2))\n     # A transpose make the array non-contiguous\n     >>> b = a.T\n     # Taking a view makes it possible to modify the shape without modifying\n     # the initial object.\n     >>> c = b.view()\n     >>> c.shape = (20)\n     AttributeError: incompatible shape for a non-contiguous array\n\n    The `order` keyword gives the index ordering both for *fetching* the values\n    from `a`, and then *placing* the values into the output array.\n    For example, let's say you have an array:\n\n    >>> a = np.arange(6).reshape((3, 2))\n    >>> a\n    array([[0, 1],\n           [2, 3],\n           [4, 5]])\n\n    You can think of reshaping as first raveling the array (using the given\n    index order), then inserting the elements from the raveled array into the\n    new array using the same kind of index ordering as was used for the\n    raveling.\n\n    >>> np.reshape(a, (2, 3)) # C-like index ordering\n    array([[0, 1, 2],\n           [3, 4, 5]])\n    >>> np.reshape(np.ravel(a), (2, 3)) # equivalent to C ravel then C reshape\n    array([[0, 1, 2],\n           [3, 4, 5]])\n    >>> np.reshape(a, (2, 3), order='F') # Fortran-like index ordering\n    array([[0, 4, 3],\n           [2, 1, 5]])\n    >>> np.reshape(np.ravel(a, order='F'), (2, 3), order='F')\n    array([[0, 4, 3],\n           [2, 1, 5]])\n\n    Examples\n    --------\n    >>> a = np.array([[1,2,3], [4,5,6]])\n    >>> np.reshape(a, 6)\n    array([1, 2, 3, 4, 5, 6])\n    >>> np.reshape(a, 6, order='F')\n    array([1, 4, 2, 5, 3, 6])\n\n    >>> np.reshape(a, (3,-1))       # the unspecified value is inferred to be 2\n    array([[1, 2],\n           [3, 4],\n           [5, 6]])\n    ","endLoc":232,"header":"def reshape(a, newshape, order='C')","id":2456,"name":"reshape","nodeType":"Function","startLoc":138,"text":"def reshape(a, newshape, order='C'):\n    \"\"\"\n    Gives a new shape to an array without changing its data.\n\n    Parameters\n    ----------\n    a : array_like\n        Array to be reshaped.\n    newshape : int or tuple of ints\n        The new shape should be compatible with the original shape. If\n        an integer, then the result will be a 1-D array of that length.\n        One shape dimension can be -1. In this case, the value is\n        inferred from the length of the array and remaining dimensions.\n    order : {'C', 'F', 'A'}, optional\n        Read the elements of `a` using this index order, and place the\n        elements into the reshaped array using this index order.  'C'\n        means to read / write the elements using C-like index order,\n        with the last axis index changing fastest, back to the first\n        axis index changing slowest. 'F' means to read / write the\n        elements using Fortran-like index order, with the first index\n        changing fastest, and the last index changing slowest. Note that\n        the 'C' and 'F' options take no account of the memory layout of\n        the underlying array, and only refer to the order of indexing.\n        'A' means to read / write the elements in Fortran-like index\n        order if `a` is Fortran *contiguous* in memory, C-like order\n        otherwise.\n\n    Returns\n    -------\n    reshaped_array : ndarray\n        This will be a new view object if possible; otherwise, it will\n        be a copy.  Note there is no guarantee of the *memory layout* (C- or\n        Fortran- contiguous) of the returned array.\n\n    See Also\n    --------\n    ndarray.reshape : Equivalent method.\n\n    Notes\n    -----\n    It is not always possible to change the shape of an array without\n    copying the data. If you want an error to be raise if the data is copied,\n    you should assign the new shape to the shape attribute of the array::\n\n     >>> a = np.zeros((10, 2))\n     # A transpose make the array non-contiguous\n     >>> b = a.T\n     # Taking a view makes it possible to modify the shape without modifying\n     # the initial object.\n     >>> c = b.view()\n     >>> c.shape = (20)\n     AttributeError: incompatible shape for a non-contiguous array\n\n    The `order` keyword gives the index ordering both for *fetching* the values\n    from `a`, and then *placing* the values into the output array.\n    For example, let's say you have an array:\n\n    >>> a = np.arange(6).reshape((3, 2))\n    >>> a\n    array([[0, 1],\n           [2, 3],\n           [4, 5]])\n\n    You can think of reshaping as first raveling the array (using the given\n    index order), then inserting the elements from the raveled array into the\n    new array using the same kind of index ordering as was used for the\n    raveling.\n\n    >>> np.reshape(a, (2, 3)) # C-like index ordering\n    array([[0, 1, 2],\n           [3, 4, 5]])\n    >>> np.reshape(np.ravel(a), (2, 3)) # equivalent to C ravel then C reshape\n    array([[0, 1, 2],\n           [3, 4, 5]])\n    >>> np.reshape(a, (2, 3), order='F') # Fortran-like index ordering\n    array([[0, 4, 3],\n           [2, 1, 5]])\n    >>> np.reshape(np.ravel(a, order='F'), (2, 3), order='F')\n    array([[0, 4, 3],\n           [2, 1, 5]])\n\n    Examples\n    --------\n    >>> a = np.array([[1,2,3], [4,5,6]])\n    >>> np.reshape(a, 6)\n    array([1, 2, 3, 4, 5, 6])\n    >>> np.reshape(a, 6, order='F')\n    array([1, 4, 2, 5, 3, 6])\n\n    >>> np.reshape(a, (3,-1))       # the unspecified value is inferred to be 2\n    array([[1, 2],\n           [3, 4],\n           [5, 6]])\n    \"\"\"\n    return _wrapfunc(a, 'reshape', newshape, order=order)"},{"attributeType":"null","col":0,"comment":"null","endLoc":28,"id":2457,"name":"DiscreteValueSpec","nodeType":"Attribute","startLoc":28,"text":"DiscreteValueSpec"},{"col":4,"comment":"Scale each density curve by the number of observations.","endLoc":1126,"header":"def scale_count(self, density, counts, scale_hue)","id":2458,"name":"scale_count","nodeType":"Function","startLoc":1105,"text":"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"},{"col":4,"comment":"null","endLoc":320,"header":"def test_scatter_data(self)","id":2459,"name":"test_scatter_data","nodeType":"Function","startLoc":299,"text":"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)))"},{"col":0,"comment":"","endLoc":1,"header":"_docstrings.py#","id":2460,"name":"","nodeType":"Function","startLoc":1,"text":"_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_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)\n\n_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_core_docs = dict(\n    params=DocstringComponents(_core_params),\n    returns=DocstringComponents(_core_returns),\n    seealso=DocstringComponents(_seealso_blurbs),\n)"},{"attributeType":"null","col":0,"comment":"null","endLoc":29,"id":2461,"name":"ContinuousValueSpec","nodeType":"Attribute","startLoc":29,"text":"ContinuousValueSpec"},{"id":2462,"name":"regression.ipynb","nodeType":"TextFile","path":"doc/_tutorial","text":"{\n \"cells\": [\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \".. _regression_tutorial:\\n\",\n    \"\\n\",\n    \".. currentmodule:: seaborn\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Estimating regression fits\\n\",\n    \"==========================\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Many datasets contain multiple quantitative variables, and the goal of an analysis is often to relate those variables to each other. We :ref:`previously discussed ` functions that can accomplish this by showing the joint distribution of two variables. It can be very helpful, though, to use statistical models to estimate a simple relationship between two noisy sets of observations. The functions discussed in this chapter will do so through the common framework of linear regression.\\n\",\n    \"\\n\",\n    \"In the spirit of Tukey, the regression plots in seaborn are primarily intended to add a visual guide that helps to emphasize patterns in a dataset during exploratory data analyses. That is to say that seaborn is not itself a package for statistical analysis. To obtain quantitative measures related to the fit of regression models, you should use `statsmodels `_. The goal of seaborn, however, is to make exploring a dataset through visualization quick and easy, as doing so is just as (if not more) important than exploring a dataset through tables of statistics.\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {\n    \"tags\": [\n     \"hide\"\n    ]\n   },\n   \"outputs\": [],\n   \"source\": [\n    \"import numpy as np\\n\",\n    \"import seaborn as sns\\n\",\n    \"import matplotlib.pyplot as plt\\n\",\n    \"sns.set_theme(color_codes=True)\\n\",\n    \"np.random.seed(sum(map(ord, \\\"regression\\\")))\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Functions for drawing linear regression models\\n\",\n    \"----------------------------------------------\\n\",\n    \"\\n\",\n    \"The two functions that can be used to visualize a linear fit are :func:`regplot` and :func:`lmplot`.\\n\",\n    \"\\n\",\n    \"In the simplest invocation, both functions draw a scatterplot of two variables, ``x`` and ``y``, and then fit the regression model ``y ~ x`` and plot the resulting regression line and a 95% confidence interval for that regression:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"tips = sns.load_dataset(\\\"tips\\\")\\n\",\n    \"sns.regplot(x=\\\"total_bill\\\", y=\\\"tip\\\", data=tips);\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"total_bill\\\", y=\\\"tip\\\", data=tips);\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"These functions draw similar plots, but :func:`regplot` is an :doc:`axes-level function `, and :func:`lmplot` is a figure-level function. Additionally, :func:`regplot` accepts the ``x`` and ``y`` variables in a variety of formats including simple numpy arrays, :class:`pandas.Series` objects, or as references to variables in a :class:`pandas.DataFrame` object passed to `data`. In contrast, :func:`lmplot` has `data` as a required parameter and the `x` and `y` variables must be specified as strings. Finally, only :func:`lmplot` has `hue` as a parameter.\\n\",\n    \"\\n\",\n    \"The core functionality is otherwise similar, though, so this tutorial will focus on :func:`lmplot`:.\\n\",\n    \"\\n\",\n    \"It's possible to fit a linear regression when one of the variables takes discrete values, however, the simple scatterplot produced by this kind of dataset is often not optimal:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"size\\\", y=\\\"tip\\\", data=tips);\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"One option is to add some random noise (\\\"jitter\\\") to the discrete values to make the distribution of those values more clear. Note that jitter is applied only to the scatterplot data and does not influence the regression line fit itself:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"size\\\", y=\\\"tip\\\", data=tips, x_jitter=.05);\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"A second option is to collapse over the observations in each discrete bin to plot an estimate of central tendency along with a confidence interval:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"size\\\", y=\\\"tip\\\", data=tips, x_estimator=np.mean);\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Fitting different kinds of models\\n\",\n    \"---------------------------------\\n\",\n    \"\\n\",\n    \"The simple linear regression model used above is very simple to fit, however, it is not appropriate for some kinds of datasets. The `Anscombe's quartet `_ dataset shows a few examples where simple linear regression provides an identical estimate of a relationship where simple visual inspection clearly shows differences. For example, in the first case, the linear regression is a good model:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"anscombe = sns.load_dataset(\\\"anscombe\\\")\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"x\\\", y=\\\"y\\\", data=anscombe.query(\\\"dataset == 'I'\\\"),\\n\",\n    \"           ci=None, scatter_kws={\\\"s\\\": 80});\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The linear relationship in the second dataset is the same, but the plot clearly shows that this is not a good model:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"x\\\", y=\\\"y\\\", data=anscombe.query(\\\"dataset == 'II'\\\"),\\n\",\n    \"           ci=None, scatter_kws={\\\"s\\\": 80});\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"In the presence of these kind of higher-order relationships, :func:`lmplot` and :func:`regplot` can fit a polynomial regression model to explore simple kinds of nonlinear trends in the dataset:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"x\\\", y=\\\"y\\\", data=anscombe.query(\\\"dataset == 'II'\\\"),\\n\",\n    \"           order=2, ci=None, scatter_kws={\\\"s\\\": 80});\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"A different problem is posed by \\\"outlier\\\" observations that deviate for some reason other than the main relationship under study:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"x\\\", y=\\\"y\\\", data=anscombe.query(\\\"dataset == 'III'\\\"),\\n\",\n    \"           ci=None, scatter_kws={\\\"s\\\": 80});\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"In the presence of outliers, it can be useful to fit a robust regression, which uses a different loss function to downweight relatively large residuals:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"x\\\", y=\\\"y\\\", data=anscombe.query(\\\"dataset == 'III'\\\"),\\n\",\n    \"           robust=True, ci=None, scatter_kws={\\\"s\\\": 80});\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"When the ``y`` variable is binary, simple linear regression also \\\"works\\\" but provides implausible predictions:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"tips[\\\"big_tip\\\"] = (tips.tip / tips.total_bill) > .15\\n\",\n    \"sns.lmplot(x=\\\"total_bill\\\", y=\\\"big_tip\\\", data=tips,\\n\",\n    \"           y_jitter=.03);\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The solution in this case is to fit a logistic regression, such that the regression line shows the estimated probability of ``y = 1`` for a given value of ``x``:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"total_bill\\\", y=\\\"big_tip\\\", data=tips,\\n\",\n    \"           logistic=True, y_jitter=.03);\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Note that the logistic regression estimate is considerably more computationally intensive (this is true of robust regression as well). As the confidence interval around the regression line is computed using a bootstrap procedure, you may wish to turn this off for faster iteration (using ``ci=None``).\\n\",\n    \"\\n\",\n    \"An altogether different approach is to fit a nonparametric regression using a `lowess smoother `_. This approach has the fewest assumptions, although it is computationally intensive and so currently confidence intervals are not computed at all:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"total_bill\\\", y=\\\"tip\\\", data=tips,\\n\",\n    \"           lowess=True, line_kws={\\\"color\\\": \\\"C1\\\"});\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"The :func:`residplot` function can be a useful tool for checking whether the simple regression model is appropriate for a dataset. It fits and removes a simple linear regression and then plots the residual values for each observation. Ideally, these values should be randomly scattered around ``y = 0``:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.residplot(x=\\\"x\\\", y=\\\"y\\\", data=anscombe.query(\\\"dataset == 'I'\\\"),\\n\",\n    \"              scatter_kws={\\\"s\\\": 80});\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"If there is structure in the residuals, it suggests that simple linear regression is not appropriate:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.residplot(x=\\\"x\\\", y=\\\"y\\\", data=anscombe.query(\\\"dataset == 'II'\\\"),\\n\",\n    \"              scatter_kws={\\\"s\\\": 80});\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Conditioning on other variables\\n\",\n    \"-------------------------------\\n\",\n    \"\\n\",\n    \"The plots above show many ways to explore the relationship between a pair of variables. Often, however, a more interesting question is \\\"how does the relationship between these two variables change as a function of a third variable?\\\" This is where the main differences between :func:`regplot` and :func:`lmplot` appear. While :func:`regplot` always shows a single relationship, :func:`lmplot` combines :func:`regplot` with :class:`FacetGrid` to show multiple fits using `hue` mapping or faceting.\\n\",\n    \"\\n\",\n    \"The best way to separate out a relationship is to plot both levels on the same axes and to use color to distinguish them:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"smoker\\\", data=tips);\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Unlike :func:`relplot`, it's not possible to map a distinct variable to the style properties of the scatter plot, but you can redundantly code the `hue` variable with marker shape:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"smoker\\\", data=tips,\\n\",\n    \"           markers=[\\\"o\\\", \\\"x\\\"], palette=\\\"Set1\\\");\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"To add another variable, you can draw multiple \\\"facets\\\" with each level of the variable appearing in the rows or columns of the grid:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"smoker\\\", col=\\\"time\\\", data=tips);\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.lmplot(x=\\\"total_bill\\\", y=\\\"tip\\\", hue=\\\"smoker\\\",\\n\",\n    \"           col=\\\"time\\\", row=\\\"sex\\\", data=tips, height=3);\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Plotting a regression in other contexts\\n\",\n    \"---------------------------------------\\n\",\n    \"\\n\",\n    \"A few other seaborn functions use :func:`regplot` in the context of a larger, more complex plot. The first is the :func:`jointplot` function that we introduced in the :ref:`distributions tutorial `. In addition to the plot styles previously discussed, :func:`jointplot` can use :func:`regplot` to show the linear regression fit on the joint axes by passing ``kind=\\\"reg\\\"``:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.jointplot(x=\\\"total_bill\\\", y=\\\"tip\\\", data=tips, kind=\\\"reg\\\");\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Using the :func:`pairplot` function with ``kind=\\\"reg\\\"`` combines :func:`regplot` and :class:`PairGrid` to show the linear relationship between variables in a dataset. Take care to note how this is different from :func:`lmplot`. In the figure below, the two axes don't show the same relationship conditioned on two levels of a third variable; rather, :func:`PairGrid` is used to show multiple relationships between different pairings of the variables in a dataset:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(tips, x_vars=[\\\"total_bill\\\", \\\"size\\\"], y_vars=[\\\"tip\\\"],\\n\",\n    \"             height=5, aspect=.8, kind=\\\"reg\\\");\"\n   ]\n  },\n  {\n   \"cell_type\": \"raw\",\n   \"metadata\": {},\n   \"source\": [\n    \"Conditioning on an additional categorical variable is built into both of these functions using the ``hue`` parameter:\"\n   ]\n  },\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n    \"sns.pairplot(tips, x_vars=[\\\"total_bill\\\", \\\"size\\\"], y_vars=[\\\"tip\\\"],\\n\",\n    \"             hue=\\\"smoker\\\", height=5, aspect=.8, kind=\\\"reg\\\");\"\n   ]\n  }\n ],\n \"metadata\": {\n  \"celltoolbar\": \"Tags\",\n  \"kernelspec\": {\n   \"display_name\": \"py310\",\n   \"language\": \"python\",\n   \"name\": \"py310\"\n  },\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_extension\": \".py\",\n   \"mimetype\": \"text/x-python\",\n   \"name\": \"python\",\n   \"nbconvert_exporter\": \"python\",\n   \"pygments_lexer\": \"ipython3\",\n   \"version\": \"3.10.0\"\n  }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"},{"attributeType":"dict","col":4,"comment":"null","endLoc":191,"id":2463,"name":"_theme","nodeType":"Attribute","startLoc":191,"text":"_theme"},{"attributeType":"FacetSpec","col":4,"comment":"null","endLoc":193,"id":2464,"name":"_facet_spec","nodeType":"Attribute","startLoc":193,"text":"_facet_spec"},{"attributeType":"PairSpec","col":4,"comment":"null","endLoc":194,"id":2465,"name":"_pair_spec","nodeType":"Attribute","startLoc":194,"text":"_pair_spec"},{"attributeType":"dict","col":4,"comment":"null","endLoc":196,"id":2466,"name":"_figure_spec","nodeType":"Attribute","startLoc":196,"text":"_figure_spec"},{"attributeType":"dict","col":4,"comment":"null","endLoc":197,"id":2467,"name":"_subplot_spec","nodeType":"Attribute","startLoc":197,"text":"_subplot_spec"},{"attributeType":"dict","col":4,"comment":"null","endLoc":198,"id":2469,"name":"_layout_spec","nodeType":"Attribute","startLoc":198,"text":"_layout_spec"},{"attributeType":"PlotData","col":8,"comment":"null","endLoc":215,"id":2470,"name":"_data","nodeType":"Attribute","startLoc":215,"text":"self._data"},{"attributeType":"dict","col":8,"comment":"null","endLoc":221,"id":2471,"name":"_limits","nodeType":"Attribute","startLoc":221,"text":"self._limits"},{"col":4,"comment":"null","endLoc":163,"header":"def test_positional_x_y(self, long_df)","id":2472,"name":"test_positional_x_y","nodeType":"Function","startLoc":159,"text":"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\"]"},{"attributeType":"dict","col":8,"comment":"null","endLoc":230,"id":2473,"name":"_layout_spec","nodeType":"Attribute","startLoc":230,"text":"self._layout_spec"},{"col":0,"comment":"","endLoc":1,"header":"typing.py#","id":2474,"name":"","nodeType":"Function","startLoc":1,"text":"ColumnName = Union[\n    str, bytes, date, datetime, timedelta, bool, complex, Timestamp, Timedelta\n]\n\nVector = Union[Series, Index, ndarray]\n\nVariableSpec = Union[ColumnName, Vector, None]\n\nVariableSpecList = Union[List[VariableSpec], Index, None]\n\nDataSource = Union[DataFrame, Mapping[Hashable, Vector], None]\n\nOrderSpec = Union[Iterable, None]  # TODO technically str is iterable\n\nNormSpec = Union[Tuple[Optional[float], Optional[float]], Normalize, None]\n\nPaletteSpec = Union[str, list, dict, Colormap, None]\n\nDiscreteValueSpec = Union[dict, list, None]\n\nContinuousValueSpec = Union[\n    Tuple[float, float], List[float], Dict[Any, float], None,\n]\n\ndefault = Default()"},{"attributeType":"dict","col":8,"comment":"null","endLoc":223,"id":2475,"name":"_theme","nodeType":"Attribute","startLoc":223,"text":"self._theme"},{"attributeType":"dict","col":8,"comment":"null","endLoc":219,"id":2476,"name":"_scales","nodeType":"Attribute","startLoc":219,"text":"self._scales"},{"attributeType":"dict","col":8,"comment":"null","endLoc":220,"id":2477,"name":"_shares","nodeType":"Attribute","startLoc":220,"text":"self._shares"},{"attributeType":"PairSpec","col":8,"comment":"null","endLoc":226,"id":2478,"name":"_pair_spec","nodeType":"Attribute","startLoc":226,"text":"self._pair_spec"},{"attributeType":"list","col":8,"comment":"null","endLoc":217,"id":2479,"name":"_layers","nodeType":"Attribute","startLoc":217,"text":"self._layers"},{"attributeType":"dict","col":8,"comment":"null","endLoc":229,"id":2480,"name":"_subplot_spec","nodeType":"Attribute","startLoc":229,"text":"self._subplot_spec"},{"attributeType":"str","col":8,"comment":"null","endLoc":61,"id":2481,"name":"system","nodeType":"Attribute","startLoc":61,"text":"system"},{"attributeType":"str","col":8,"comment":"null","endLoc":63,"id":2482,"name":"system","nodeType":"Attribute","startLoc":63,"text":"system"},{"attributeType":"str","col":8,"comment":"null","endLoc":68,"id":2483,"name":"system","nodeType":"Attribute","startLoc":68,"text":"system"},{"attributeType":"dict","col":8,"comment":"null","endLoc":228,"id":2484,"name":"_figure_spec","nodeType":"Attribute","startLoc":228,"text":"self._figure_spec"},{"attributeType":"str","col":4,"comment":"null","endLoc":70,"id":2485,"name":"system","nodeType":"Attribute","startLoc":70,"text":"system"},{"attributeType":"dict","col":8,"comment":"null","endLoc":222,"id":2486,"name":"_labels","nodeType":"Attribute","startLoc":222,"text":"self._labels"},{"attributeType":"function","col":8,"comment":"null","endLoc":235,"id":2487,"name":"_get_win_folder","nodeType":"Attribute","startLoc":235,"text":"_get_win_folder"},{"col":0,"comment":"","endLoc":36,"header":"appdirs.py#","id":2488,"name":"","nodeType":"Function","startLoc":7,"text":"\"\"\"\nThis file is directly from\nhttps://github.com/ActiveState/appdirs/blob/3fe6a83776843a46f20c2e5587afcffe05e03b39/appdirs.py\n\nThe license of https://github.com/ActiveState/appdirs copied below:\n\n\n# This is the MIT license\n\nCopyright (c) 2010 ActiveState Software Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\"\"\"\n\n\"\"\"Utilities for determining application-specific dirs.\n\nSee  for details and usage.\n\"\"\"\n\n__version__ = \"1.4.4\"\n\n__version_info__ = tuple(int(segment) for segment in __version__.split(\".\"))\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\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"},{"attributeType":"FacetSpec","col":8,"comment":"null","endLoc":225,"id":2490,"name":"_facet_spec","nodeType":"Attribute","startLoc":225,"text":"self._facet_spec"},{"fileName":"test_docstrings.py","filePath":"tests","id":2491,"nodeType":"File","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.\"\n"},{"attributeType":"null","col":8,"comment":"null","endLoc":232,"id":2492,"name":"_target","nodeType":"Attribute","startLoc":232,"text":"self._target"},{"className":"ExampleClass","col":0,"comment":"null","endLoc":21,"id":2493,"nodeType":"Class","startLoc":12,"text":"class ExampleClass:\n    def example_method(self):\n        \"\"\"An example method.\n\n        Parameters\n        ----------\n        a : str\n           A method parameter.\n\n        \"\"\""},{"col":4,"comment":"An example method.\n\n        Parameters\n        ----------\n        a : str\n           A method parameter.\n\n        ","endLoc":21,"header":"def example_method(self)","id":2494,"name":"example_method","nodeType":"Function","startLoc":13,"text":"def example_method(self):\n        \"\"\"An example method.\n\n        Parameters\n        ----------\n        a : str\n           A method parameter.\n\n        \"\"\""},{"className":"TestDocstringComponents","col":0,"comment":"null","endLoc":58,"id":2495,"nodeType":"Class","startLoc":35,"text":"class 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.\""},{"col":4,"comment":"null","endLoc":169,"header":"def test_positional_data_x(self, long_df)","id":2496,"name":"test_positional_data_x","nodeType":"Function","startLoc":165,"text":"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\"]"},{"col":4,"comment":"null","endLoc":40,"header":"def test_from_dict(self)","id":2497,"name":"test_from_dict","nodeType":"Function","startLoc":37,"text":"def test_from_dict(self):\n\n        obj = DocstringComponents(EXAMPLE_DICT)\n        assert obj.param_a == \"a : str\\n    The first parameter.\""},{"attributeType":"null","col":16,"comment":"null","endLoc":2,"id":2498,"name":"np","nodeType":"Attribute","startLoc":2,"text":"np"},{"attributeType":"null","col":36,"comment":"null","endLoc":4,"id":2499,"name":"MPLText","nodeType":"Attribute","startLoc":4,"text":"MPLText"},{"attributeType":"null","col":4,"comment":"null","endLoc":700,"id":2500,"name":"legend","nodeType":"Attribute","startLoc":700,"text":"legend"},{"attributeType":"null","col":4,"comment":"null","endLoc":701,"id":2501,"name":"normed","nodeType":"Attribute","startLoc":701,"text":"normed"},{"col":4,"comment":"null","endLoc":46,"header":"def test_from_nested_components(self)","id":2503,"name":"test_from_nested_components","nodeType":"Function","startLoc":42,"text":"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.\""},{"col":0,"comment":"null","endLoc":194,"header":"@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)","id":2504,"name":"test_seed_old","nodeType":"Function","startLoc":180,"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"},{"className":"LineStyle","col":0,"comment":"Dash pattern for line-type marks.","endLoc":513,"id":2505,"nodeType":"Class","startLoc":419,"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]\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"},{"className":"TestPath","col":0,"comment":"null","endLoc":136,"id":2506,"nodeType":"Class","startLoc":13,"text":"class 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])\n\n    def test_shared_colors_direct(self):\n\n        x = y = [1, 2, 3]\n        color = \".44\"\n        m = Path(color=color)\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(), color)\n        assert same_color(line.get_markeredgecolor(), color)\n        assert same_color(line.get_markerfacecolor(), color)\n\n    def test_separate_colors_direct(self):\n\n        x = y = [1, 2, 3]\n        y = [1, 2, 3]\n        m = Path(color=\".22\", edgecolor=\".55\", fillcolor=\".77\")\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)\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        colors = p._theme[\"axes.prop_cycle\"].by_key()[\"color\"]\n        for i, line in enumerate(ax.get_lines()):\n            assert same_color(line.get_color(), colors[i])\n            assert same_color(line.get_markeredgecolor(), colors[i])\n            assert same_color(line.get_markerfacecolor(), colors[i])\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        colors = p._theme[\"axes.prop_cycle\"].by_key()[\"color\"]\n        for i, line in enumerate(ax.get_lines()):\n            assert same_color(line.get_color(), colors[i // 2])\n            assert same_color(line.get_markeredgecolor(), colors[i // 2])\n            assert same_color(line.get_markerfacecolor(), colors[i % 2])\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)\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))\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\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()\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\""},{"col":4,"comment":"null","endLoc":424,"header":"def standardize(self, val: str | DashPattern) -> DashPatternWithOffset","id":2507,"name":"standardize","nodeType":"Function","startLoc":423,"text":"def standardize(self, val: str | DashPattern) -> DashPatternWithOffset:\n        return self._get_dash_pattern(val)"},{"col":4,"comment":"null","endLoc":26,"header":"def test_xy_data(self)","id":2508,"name":"test_xy_data","nodeType":"Function","startLoc":15,"text":"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])"},{"col":4,"comment":"null","endLoc":51,"header":"def test_from_function(self)","id":2509,"name":"test_from_function","nodeType":"Function","startLoc":48,"text":"def test_from_function(self):\n\n        obj = DocstringComponents.from_function_params(example_func)\n        assert obj.a == \"a : str\\n    A function parameter.\""},{"col":4,"comment":"null","endLoc":58,"header":"def test_from_method(self)","id":2510,"name":"test_from_method","nodeType":"Function","startLoc":53,"text":"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.\""},{"col":4,"comment":"Convert linestyle arguments to dash pattern with offset.","endLoc":513,"header":"@staticmethod\n    def _get_dash_pattern(style: str | DashPattern) -> DashPatternWithOffset","id":2511,"name":"_get_dash_pattern","nodeType":"Function","startLoc":469,"text":"@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"},{"col":0,"comment":"An example function.\n\n    Parameters\n    ----------\n    a : str\n        A function parameter.\n\n    ","endLoc":32,"header":"def example_func()","id":2512,"name":"example_func","nodeType":"Function","startLoc":24,"text":"def example_func():\n    \"\"\"An example function.\n\n    Parameters\n    ----------\n    a : str\n        A function parameter.\n\n    \"\"\""},{"attributeType":"dict","col":0,"comment":"null","endLoc":4,"id":2513,"name":"EXAMPLE_DICT","nodeType":"Attribute","startLoc":4,"text":"EXAMPLE_DICT"},{"col":4,"comment":"null","endLoc":175,"header":"def test_positional_x(self, long_df)","id":2514,"name":"test_positional_x","nodeType":"Function","startLoc":171,"text":"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\"]"},{"col":0,"comment":"\n    Raises an AssertionError if two array_like objects are not ordered by less\n    than.\n\n    Given two array_like objects, check that the shape is equal and all\n    elements of the first object are strictly smaller than those of the\n    second object. An exception is raised at shape mismatch or incorrectly\n    ordered values. Shape mismatch does not raise if an object has zero\n    dimension. In contrast to the standard usage in numpy, NaNs are\n    compared, no assertion is raised if both objects have NaNs in the same\n    positions.\n\n\n\n    Parameters\n    ----------\n    x : array_like\n      The smaller object to check.\n    y : array_like\n      The larger object to compare.\n    err_msg : string\n      The error message to be printed in case of failure.\n    verbose : bool\n        If True, the conflicting values are appended to the error message.\n\n    Raises\n    ------\n    AssertionError\n      If actual and desired objects are not equal.\n\n    See Also\n    --------\n    assert_array_equal: tests objects for equality\n    assert_array_almost_equal: test objects for equality up to precision\n\n\n\n    Examples\n    --------\n    >>> np.testing.assert_array_less([1.0, 1.0, np.nan], [1.1, 2.0, np.nan])\n    >>> np.testing.assert_array_less([1.0, 1.0, np.nan], [1, 2.0, np.nan])\n    ...\n    :\n    Arrays are not less-ordered\n    (mismatch 50.0%)\n     x: array([  1.,   1.,  NaN])\n     y: array([  1.,   2.,  NaN])\n\n    >>> np.testing.assert_array_less([1.0, 4.0], 3)\n    ...\n    :\n    Arrays are not less-ordered\n    (mismatch 50.0%)\n     x: array([ 1.,  4.])\n     y: array(3)\n\n    >>> np.testing.assert_array_less([1.0, 2.0, 3.0], [4])\n    ...\n    :\n    Arrays are not less-ordered\n    (shapes (3,), (1,) mismatch)\n     x: array([ 1.,  2.,  3.])\n     y: array([4])\n\n    ","endLoc":1051,"header":"def assert_array_less(x, y, err_msg='', verbose=True)","id":2515,"name":"assert_array_less","nodeType":"Function","startLoc":982,"text":"def assert_array_less(x, y, err_msg='', verbose=True):\n    \"\"\"\n    Raises an AssertionError if two array_like objects are not ordered by less\n    than.\n\n    Given two array_like objects, check that the shape is equal and all\n    elements of the first object are strictly smaller than those of the\n    second object. An exception is raised at shape mismatch or incorrectly\n    ordered values. Shape mismatch does not raise if an object has zero\n    dimension. In contrast to the standard usage in numpy, NaNs are\n    compared, no assertion is raised if both objects have NaNs in the same\n    positions.\n\n\n\n    Parameters\n    ----------\n    x : array_like\n      The smaller object to check.\n    y : array_like\n      The larger object to compare.\n    err_msg : string\n      The error message to be printed in case of failure.\n    verbose : bool\n        If True, the conflicting values are appended to the error message.\n\n    Raises\n    ------\n    AssertionError\n      If actual and desired objects are not equal.\n\n    See Also\n    --------\n    assert_array_equal: tests objects for equality\n    assert_array_almost_equal: test objects for equality up to precision\n\n\n\n    Examples\n    --------\n    >>> np.testing.assert_array_less([1.0, 1.0, np.nan], [1.1, 2.0, np.nan])\n    >>> np.testing.assert_array_less([1.0, 1.0, np.nan], [1, 2.0, np.nan])\n    ...\n    :\n    Arrays are not less-ordered\n    (mismatch 50.0%)\n     x: array([  1.,   1.,  NaN])\n     y: array([  1.,   2.,  NaN])\n\n    >>> np.testing.assert_array_less([1.0, 4.0], 3)\n    ...\n    :\n    Arrays are not less-ordered\n    (mismatch 50.0%)\n     x: array([ 1.,  4.])\n     y: array(3)\n\n    >>> np.testing.assert_array_less([1.0, 2.0, 3.0], [4])\n    ...\n    :\n    Arrays are not less-ordered\n    (shapes (3,), (1,) mismatch)\n     x: array([ 1.,  2.,  3.])\n     y: array([4])\n\n    \"\"\"\n    __tracebackhide__ = True  # Hide traceback for py.test\n    assert_array_compare(operator.__lt__, x, y, err_msg=err_msg,\n                         verbose=verbose,\n                         header='Arrays are not less-ordered')"},{"col":4,"comment":"null","endLoc":1021,"header":"def insert(self, __index: SupportsIndex, __object: _T) -> None","id":2516,"name":"insert","nodeType":"Function","startLoc":1021,"text":"def insert(self, __index: SupportsIndex, __object: _T) -> None: ..."},{"fileName":"palettes.py","filePath":"seaborn","id":2517,"nodeType":"File","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)\n\n\nMPL_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())\n\n\nclass _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)\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\n\n\ndef _patch_colormap_display():\n    \"\"\"Simplify the rich display of matplotlib color maps in a notebook.\"\"\"\n    def _repr_png_(self):\n        \"\"\"Generate a PNG representation of the Colormap.\"\"\"\n        import io\n        from PIL import Image\n        import numpy as np\n        IMAGE_SIZE = (400, 50)\n        X = np.tile(np.linspace(0, 1, IMAGE_SIZE[0]), (IMAGE_SIZE[1], 1))\n        pixels = self(X, bytes=True)\n        png_bytes = io.BytesIO()\n        Image.fromarray(pixels).save(png_bytes, format='png')\n        return png_bytes.getvalue()\n\n    def _repr_html_(self):\n        \"\"\"Generate an HTML representation of the Colormap.\"\"\"\n        import base64\n        png_bytes = self._repr_png_()\n        png_base64 = base64.b64encode(png_bytes).decode('ascii')\n        return ('')\n\n    mpl.colors.Colormap._repr_png_ = _repr_png_\n    mpl.colors.Colormap._repr_html_ = _repr_html_\n\n\ndef color_palette(palette=None, n_colors=None, desat=None, as_cmap=False):\n    \"\"\"Return a list of colors or continuous colormap defining a palette.\n\n    Possible ``palette`` values include:\n        - Name of a seaborn palette (deep, muted, bright, pastel, dark, colorblind)\n        - Name of matplotlib colormap\n        - 'husl' or 'hls'\n        - 'ch:'\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.ListedColormap`.\n\n    Returns\n    -------\n    list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    set_palette : Set the default color cycle for all plots.\n    set_color_codes : Reassign color codes like ``\"b\"``, ``\"g\"``, etc. to\n                      colors from one of the seaborn palettes.\n\n    Examples\n    --------\n\n    .. include:: ../docstrings/color_palette.rst\n\n    \"\"\"\n    if palette is None:\n        palette = get_color_cycle()\n        if n_colors is None:\n            n_colors = len(palette)\n\n    elif not isinstance(palette, str):\n        palette = palette\n        if n_colors is None:\n            n_colors = len(palette)\n    else:\n\n        if n_colors is None:\n            # Use all colors in a qualitative palette or 6 of another kind\n            n_colors = QUAL_PALETTE_SIZES.get(palette, 6)\n\n        if palette in SEABORN_PALETTES:\n            # Named \"seaborn variant\" of matplotlib default color cycle\n            palette = SEABORN_PALETTES[palette]\n\n        elif palette == \"hls\":\n            # Evenly spaced colors in cylindrical RGB space\n            palette = hls_palette(n_colors, as_cmap=as_cmap)\n\n        elif palette == \"husl\":\n            # Evenly spaced colors in cylindrical Lab space\n            palette = husl_palette(n_colors, as_cmap=as_cmap)\n\n        elif palette.lower() == \"jet\":\n            # Paternalism\n            raise ValueError(\"No.\")\n\n        elif palette.startswith(\"ch:\"):\n            # Cubehelix palette with params specified in string\n            args, kwargs = _parse_cubehelix_args(palette)\n            palette = cubehelix_palette(n_colors, *args, **kwargs, as_cmap=as_cmap)\n\n        elif palette.startswith(\"light:\"):\n            # light palette to color specified in string\n            _, color = palette.split(\":\")\n            reverse = color.endswith(\"_r\")\n            if reverse:\n                color = color[:-2]\n            palette = light_palette(color, n_colors, reverse=reverse, as_cmap=as_cmap)\n\n        elif palette.startswith(\"dark:\"):\n            # light palette to color specified in string\n            _, color = palette.split(\":\")\n            reverse = color.endswith(\"_r\")\n            if reverse:\n                color = color[:-2]\n            palette = dark_palette(color, n_colors, reverse=reverse, as_cmap=as_cmap)\n\n        elif palette.startswith(\"blend:\"):\n            # blend palette between colors specified in string\n            _, colors = palette.split(\":\")\n            colors = colors.split(\",\")\n            palette = blend_palette(colors, n_colors, as_cmap=as_cmap)\n\n        else:\n            try:\n                # Perhaps a named matplotlib colormap?\n                palette = mpl_palette(palette, n_colors, as_cmap=as_cmap)\n            except (ValueError, KeyError):  # Error class changed in mpl36\n                raise ValueError(f\"{palette!r} is not a valid palette name\")\n\n    if desat is not None:\n        palette = [desaturate(c, desat) for c in palette]\n\n    if not as_cmap:\n\n        # Always return as many colors as we asked for\n        pal_cycle = cycle(palette)\n        palette = [next(pal_cycle) for _ in range(n_colors)]\n\n        # Always return in r, g, b tuple format\n        try:\n            palette = map(mpl.colors.colorConverter.to_rgb, palette)\n            palette = _ColorPalette(palette)\n        except ValueError:\n            raise ValueError(f\"Could not generate a palette for {palette}\")\n\n    return palette\n\n\ndef hls_palette(n_colors=6, h=.01, l=.6, s=.65, as_cmap=False):  # noqa\n    \"\"\"\n    Return hues with constant lightness and saturation in the HLS system.\n\n    The hues are evenly sampled along a circular path. The resulting palette will be\n    appropriate for categorical or cyclical data.\n\n    The `h`, `l`, and `s` values should be between 0 and 1.\n\n    .. note::\n        While the separation of the resulting colors will be mathematically\n        constant, the HLS system does not construct a perceptually-uniform space,\n        so their apparent intensity will vary.\n\n    Parameters\n    ----------\n    n_colors : int\n        Number of colors in the palette.\n    h : float\n        The value of the first hue.\n    l : float\n        The lightness value.\n    s : float\n        The saturation intensity.\n    as_cmap : bool\n        If True, return a matplotlib colormap object.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    husl_palette : Make a palette using evenly spaced hues in the HUSL system.\n\n    Examples\n    --------\n    .. include:: ../docstrings/hls_palette.rst\n\n    \"\"\"\n    if as_cmap:\n        n_colors = 256\n    hues = np.linspace(0, 1, int(n_colors) + 1)[:-1]\n    hues += h\n    hues %= 1\n    hues -= hues.astype(int)\n    palette = [colorsys.hls_to_rgb(h_i, l, s) for h_i in hues]\n    if as_cmap:\n        return mpl.colors.ListedColormap(palette, \"hls\")\n    else:\n        return _ColorPalette(palette)\n\n\ndef husl_palette(n_colors=6, h=.01, s=.9, l=.65, as_cmap=False):  # noqa\n    \"\"\"\n    Return hues with constant lightness and saturation in the HUSL system.\n\n    The hues are evenly sampled along a circular path. The resulting palette will be\n    appropriate for categorical or cyclical data.\n\n    The `h`, `l`, and `s` values should be between 0 and 1.\n\n    This function is similar to :func:`hls_palette`, but it uses a nonlinear color\n    space that is more perceptually uniform.\n\n    Parameters\n    ----------\n    n_colors : int\n        Number of colors in the palette.\n    h : float\n        The value of the first hue.\n    l : float\n        The lightness value.\n    s : float\n        The saturation intensity.\n    as_cmap : bool\n        If True, return a matplotlib colormap object.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    hls_palette : Make a palette using evenly spaced hues in the HSL system.\n\n    Examples\n    --------\n    .. include:: ../docstrings/husl_palette.rst\n\n    \"\"\"\n    if as_cmap:\n        n_colors = 256\n    hues = np.linspace(0, 1, int(n_colors) + 1)[:-1]\n    hues += h\n    hues %= 1\n    hues *= 359\n    s *= 99\n    l *= 99  # noqa\n    palette = [_color_to_rgb((h_i, s, l), input=\"husl\") for h_i in hues]\n    if as_cmap:\n        return mpl.colors.ListedColormap(palette, \"hsl\")\n    else:\n        return _ColorPalette(palette)\n\n\ndef mpl_palette(name, n_colors=6, as_cmap=False):\n    \"\"\"\n    Return a palette or colormap from the matplotlib registry.\n\n    For continuous palettes, evenly-spaced discrete samples are chosen while\n    excluding the minimum and maximum value in the colormap to provide better\n    contrast at the extremes.\n\n    For qualitative palettes (e.g. those from colorbrewer), exact values are\n    indexed (rather than interpolated), but fewer than `n_colors` can be returned\n    if the palette does not define that many.\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.ListedColormap`\n\n    Examples\n    --------\n    .. include: ../docstrings/mpl_palette.rst\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)\n\n\ndef dark_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\"):\n    \"\"\"Make a sequential palette that blends from dark to ``color``.\n\n    This kind of palette is good for data that range between relatively\n    uninteresting low values and interesting high values.\n\n    The ``color`` parameter can be specified in a number of ways, including\n    all options for defining a color in matplotlib and several additional\n    color spaces that are handled by seaborn. You can also use the database\n    of named colors from the XKCD color survey.\n\n    If you are using the IPython notebook, you can also choose this palette\n    interactively with the :func:`choose_dark_palette` function.\n\n    Parameters\n    ----------\n    color : base color for high values\n        hex, rgb-tuple, or html color name\n    n_colors : int, optional\n        number of colors in the palette\n    reverse : bool, optional\n        if True, reverse the direction of the blend\n    as_cmap : bool, optional\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n    input : {'rgb', 'hls', 'husl', xkcd'}\n        Color space to interpret the input color. The first three options\n        apply to tuple inputs and the latter applies to string inputs.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    light_palette : Create a sequential palette with bright low values.\n    diverging_palette : Create a diverging palette with two colors.\n\n    Examples\n    --------\n    .. include:: ../docstrings/dark_palette.rst\n\n    \"\"\"\n    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)\n\n\ndef light_palette(color, n_colors=6, reverse=False, as_cmap=False, input=\"rgb\"):\n    \"\"\"Make a sequential palette that blends from light to ``color``.\n\n    The ``color`` parameter can be specified in a number of ways, including\n    all options for defining a color in matplotlib and several additional\n    color spaces that are handled by seaborn. You can also use the database\n    of named colors from the XKCD color survey.\n\n    If you are using a Jupyter notebook, you can also choose this palette\n    interactively with the :func:`choose_light_palette` function.\n\n    Parameters\n    ----------\n    color : base color for high values\n        hex code, html color name, or tuple in `input` space.\n    n_colors : int, optional\n        number of colors in the palette\n    reverse : bool, optional\n        if True, reverse the direction of the blend\n    as_cmap : bool, optional\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n    input : {'rgb', 'hls', 'husl', xkcd'}\n        Color space to interpret the input color. The first three options\n        apply to tuple inputs and the latter applies to string inputs.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    dark_palette : Create a sequential palette with dark low values.\n    diverging_palette : Create a diverging palette with two colors.\n\n    Examples\n    --------\n    .. include:: ../docstrings/light_palette.rst\n\n    \"\"\"\n    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)\n\n\ndef diverging_palette(h_neg, h_pos, s=75, l=50, sep=1, n=6,  # noqa\n                      center=\"light\", as_cmap=False):\n    \"\"\"Make a diverging palette between two HUSL colors.\n\n    If you are using the IPython notebook, you can also choose this palette\n    interactively with the :func:`choose_diverging_palette` function.\n\n    Parameters\n    ----------\n    h_neg, h_pos : float in [0, 359]\n        Anchor hues for negative and positive extents of the map.\n    s : float in [0, 100], optional\n        Anchor saturation for both extents of the map.\n    l : float in [0, 100], optional\n        Anchor lightness for both extents of the map.\n    sep : int, optional\n        Size of the intermediate region.\n    n : int, optional\n        Number of colors in the palette (if not returning a cmap)\n    center : {\"light\", \"dark\"}, optional\n        Whether the center of the palette is light or dark\n    as_cmap : bool, optional\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    dark_palette : Create a sequential palette with dark values.\n    light_palette : Create a sequential palette with light values.\n\n    Examples\n    --------\n    .. include: ../docstrings/diverging_palette.rst\n\n    \"\"\"\n    palfunc = dict(dark=dark_palette, light=light_palette)[center]\n    n_half = int(128 - (sep // 2))\n    neg = palfunc((h_neg, s, l), n_half, reverse=True, input=\"husl\")\n    pos = palfunc((h_pos, s, l), n_half, input=\"husl\")\n    midpoint = dict(light=[(.95, .95, .95)], dark=[(.133, .133, .133)])[center]\n    mid = midpoint * sep\n    pal = blend_palette(np.concatenate([neg, mid, pos]), n, as_cmap=as_cmap)\n    return pal\n\n\ndef blend_palette(colors, n_colors=6, as_cmap=False, input=\"rgb\"):\n    \"\"\"Make a palette that blends between a list of colors.\n\n    Parameters\n    ----------\n    colors : sequence of colors in various formats interpreted by `input`\n        hex code, html color name, or tuple in `input` space.\n    n_colors : int, optional\n        Number of colors in the palette.\n    as_cmap : bool, optional\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    Examples\n    --------\n    .. include: ../docstrings/blend_palette.rst\n\n    \"\"\"\n    colors = [_color_to_rgb(color, input) for color in colors]\n    name = \"blend\"\n    pal = mpl.colors.LinearSegmentedColormap.from_list(name, colors)\n    if not as_cmap:\n        rgb_array = pal(np.linspace(0, 1, int(n_colors)))[:, :3]  # no alpha\n        pal = _ColorPalette(map(tuple, rgb_array))\n    return pal\n\n\ndef xkcd_palette(colors):\n    \"\"\"Make a palette with color names from the xkcd color survey.\n\n    See xkcd for the full list of colors: https://xkcd.com/color/rgb/\n\n    This is just a simple wrapper around the `seaborn.xkcd_rgb` dictionary.\n\n    Parameters\n    ----------\n    colors : list of strings\n        List of keys in the `seaborn.xkcd_rgb` dictionary.\n\n    Returns\n    -------\n    palette\n        A list of colors as RGB tuples.\n\n    See Also\n    --------\n    crayon_palette : Make a palette with Crayola crayon colors.\n\n    \"\"\"\n    palette = [xkcd_rgb[name] for name in colors]\n    return color_palette(palette, len(palette))\n\n\ndef crayon_palette(colors):\n    \"\"\"Make a palette with color names from Crayola crayons.\n\n    Colors are taken from here:\n    https://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors\n\n    This is just a simple wrapper around the `seaborn.crayons` dictionary.\n\n    Parameters\n    ----------\n    colors : list of strings\n        List of keys in the `seaborn.crayons` dictionary.\n\n    Returns\n    -------\n    palette\n        A list of colors as RGB tuples.\n\n    See Also\n    --------\n    xkcd_palette : Make a palette with named colors from the XKCD color survey.\n\n    \"\"\"\n    palette = [crayons[name] for name in colors]\n    return color_palette(palette, len(palette))\n\n\ndef cubehelix_palette(n_colors=6, start=0, rot=.4, gamma=1.0, hue=0.8,\n                      light=.85, dark=.15, reverse=False, as_cmap=False):\n    \"\"\"Make a sequential palette from the cubehelix system.\n\n    This produces a colormap with linearly-decreasing (or increasing)\n    brightness. That means that information will be preserved if printed to\n    black and white or viewed by someone who is colorblind.  \"cubehelix\" is\n    also available as a matplotlib-based palette, but this function gives the\n    user more control over the look of the palette and has a different set of\n    defaults.\n\n    In addition to using this function, it is also possible to generate a\n    cubehelix palette generally in seaborn using a string starting with\n    `ch:` and containing other parameters (e.g. `\"ch:s=.25,r=-.5\"`).\n\n    Parameters\n    ----------\n    n_colors : int\n        Number of colors in the palette.\n    start : float, 0 <= start <= 3\n        The hue value at the start of the helix.\n    rot : float\n        Rotations around the hue wheel over the range of the palette.\n    gamma : float 0 <= gamma\n        Nonlinearity to emphasize dark (gamma < 1) or light (gamma > 1) colors.\n    hue : float, 0 <= hue <= 1\n        Saturation of the colors.\n    dark : float 0 <= dark <= 1\n        Intensity of the darkest color in the palette.\n    light : float 0 <= light <= 1\n        Intensity of the lightest color in the palette.\n    reverse : bool\n        If True, the palette will go from dark to light.\n    as_cmap : bool\n        If True, return a :class:`matplotlib.colors.ListedColormap`.\n\n    Returns\n    -------\n    palette\n        list of RGB tuples or :class:`matplotlib.colors.ListedColormap`\n\n    See Also\n    --------\n    choose_cubehelix_palette : Launch an interactive widget to select cubehelix\n                               palette parameters.\n    dark_palette : Create a sequential palette with dark low values.\n    light_palette : Create a sequential palette with bright low values.\n\n    References\n    ----------\n    Green, D. A. (2011). \"A colour scheme for the display of astronomical\n    intensity images\". Bulletin of the Astromical Society of India, Vol. 39,\n    p. 289-295.\n\n    Examples\n    --------\n    .. include:: ../docstrings/cubehelix_palette.rst\n\n    \"\"\"\n    def get_color_function(p0, p1):\n        # Copied from matplotlib because it lives in private module\n        def color(x):\n            # Apply gamma factor to emphasise low or high intensity values\n            xg = x ** gamma\n\n            # Calculate amplitude and angle of deviation from the black\n            # to white diagonal in the plane of constant\n            # perceived intensity.\n            a = hue * xg * (1 - xg) / 2\n\n            phi = 2 * np.pi * (start / 3 + rot * x)\n\n            return xg + a * (p0 * np.cos(phi) + p1 * np.sin(phi))\n        return color\n\n    cdict = {\n        \"red\": get_color_function(-0.14861, 1.78277),\n        \"green\": get_color_function(-0.29227, -0.90649),\n        \"blue\": get_color_function(1.97294, 0.0),\n    }\n\n    cmap = mpl.colors.LinearSegmentedColormap(\"cubehelix\", cdict)\n\n    x = np.linspace(light, dark, int(n_colors))\n    pal = cmap(x)[:, :3].tolist()\n    if reverse:\n        pal = pal[::-1]\n\n    if as_cmap:\n        x_256 = np.linspace(light, dark, 256)\n        if reverse:\n            x_256 = x_256[::-1]\n        pal_256 = cmap(x_256)\n        cmap = mpl.colors.ListedColormap(pal_256, \"seaborn_cubehelix\")\n        return cmap\n    else:\n        return _ColorPalette(pal)\n\n\ndef _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\n\n\ndef set_color_codes(palette=\"deep\"):\n    \"\"\"Change how matplotlib color shorthands are interpreted.\n\n    Calling this will change how shorthand codes like \"b\" or \"g\"\n    are interpreted by matplotlib in subsequent plots.\n\n    Parameters\n    ----------\n    palette : {deep, muted, pastel, dark, bright, colorblind}\n        Named seaborn palette to use as the source of colors.\n\n    See Also\n    --------\n    set : Color codes can be set through the high-level seaborn style\n          manager.\n    set_palette : Color codes can also be set through the function that\n                  sets the matplotlib color cycle.\n\n    \"\"\"\n    if palette == \"reset\":\n        colors = [\n            (0., 0., 1.),\n            (0., .5, 0.),\n            (1., 0., 0.),\n            (.75, 0., .75),\n            (.75, .75, 0.),\n            (0., .75, .75),\n            (0., 0., 0.)\n        ]\n    elif not isinstance(palette, str):\n        err = \"set_color_codes requires a named seaborn palette\"\n        raise TypeError(err)\n    elif palette in SEABORN_PALETTES:\n        if not palette.endswith(\"6\"):\n            palette = palette + \"6\"\n        colors = SEABORN_PALETTES[palette] + [(.1, .1, .1)]\n    else:\n        err = f\"Cannot set colors with palette '{palette}'\"\n        raise ValueError(err)\n\n    for code, color in zip(\"bgrmyck\", colors):\n        rgb = mpl.colors.colorConverter.to_rgb(color)\n        mpl.colors.colorConverter.colors[code] = rgb\n        mpl.colors.colorConverter.cache[code] = rgb\n"},{"className":"cycle","col":0,"comment":"null","endLoc":39,"id":2518,"nodeType":"Class","startLoc":36,"text":"class cycle(Iterator[_T], Generic[_T]):\n    def __init__(self, __iterable: Iterable[_T]) -> None: ...\n    def __next__(self) -> _T: ...\n    def __iter__(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":181,"header":"def test_positional_too_many(self, long_df)","id":2519,"name":"test_positional_too_many","nodeType":"Function","startLoc":177,"text":"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\")"},{"col":4,"comment":"null","endLoc":38,"header":"def __next__(self) -> _T","id":2520,"name":"__next__","nodeType":"Function","startLoc":38,"text":"def __next__(self) -> _T: ..."},{"col":4,"comment":"null","endLoc":39,"header":"def __iter__(self) -> Self","id":2521,"name":"__iter__","nodeType":"Function","startLoc":39,"text":"def __iter__(self) -> Self: ..."},{"className":"cycle","col":0,"comment":"\n    cycle(iterable) --> cycle object\n    \n    Return elements from the iterable until it is exhausted.\n    Then repeat the sequence indefinitely.\n    ","endLoc":316,"id":2522,"nodeType":"Class","startLoc":283,"text":"class cycle(object):\n    \"\"\"\n    cycle(iterable) --> cycle object\n    \n    Return elements from the iterable until it is exhausted.\n    Then repeat the sequence indefinitely.\n    \"\"\"\n    def __getattribute__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Return getattr(self, name). \"\"\"\n        pass\n\n    def __init__(self, iterable): # real signature unknown; restored from __doc__\n        pass\n\n    def __iter__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Implement iter(self). \"\"\"\n        pass\n\n    @staticmethod # known case of __new__\n    def __new__(*args, **kwargs): # real signature unknown\n        \"\"\" Create and return a new object.  See help(type) for accurate signature. \"\"\"\n        pass\n\n    def __next__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Implement next(self). \"\"\"\n        pass\n\n    def __reduce__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Return state information for pickling. \"\"\"\n        pass\n\n    def __setstate__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Set state information for unpickling. \"\"\"\n        pass"},{"col":4,"comment":" Return getattr(self, name). ","endLoc":292,"header":"def __getattribute__(self, *args, **kwargs)","id":2523,"name":"__getattribute__","nodeType":"Function","startLoc":290,"text":"def __getattribute__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Return getattr(self, name). \"\"\"\n        pass"},{"col":4,"comment":"null","endLoc":295,"header":"def __init__(self, iterable)","id":2524,"name":"__init__","nodeType":"Function","startLoc":294,"text":"def __init__(self, iterable): # real signature unknown; restored from __doc__\n        pass"},{"col":4,"comment":" Implement iter(self). ","endLoc":299,"header":"def __iter__(self, *args, **kwargs)","id":2525,"name":"__iter__","nodeType":"Function","startLoc":297,"text":"def __iter__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Implement iter(self). \"\"\"\n        pass"},{"col":4,"comment":" Create and return a new object.  See help(type) for accurate signature. ","endLoc":304,"header":"@staticmethod # known case of __new__\n    def __new__(*args, **kwargs)","id":2526,"name":"__new__","nodeType":"Function","startLoc":301,"text":"@staticmethod # known case of __new__\n    def __new__(*args, **kwargs): # real signature unknown\n        \"\"\" Create and return a new object.  See help(type) for accurate signature. \"\"\"\n        pass"},{"col":4,"comment":" Implement next(self). ","endLoc":308,"header":"def __next__(self, *args, **kwargs)","id":2527,"name":"__next__","nodeType":"Function","startLoc":306,"text":"def __next__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Implement next(self). \"\"\"\n        pass"},{"col":4,"comment":" Return state information for pickling. ","endLoc":312,"header":"def __reduce__(self, *args, **kwargs)","id":2528,"name":"__reduce__","nodeType":"Function","startLoc":310,"text":"def __reduce__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Return state information for pickling. \"\"\"\n        pass"},{"col":4,"comment":" Set state information for unpickling. ","endLoc":316,"header":"def __setstate__(self, *args, **kwargs)","id":2529,"name":"__setstate__","nodeType":"Function","startLoc":314,"text":"def __setstate__(self, *args, **kwargs): # real signature unknown\n        \"\"\" Set state information for unpickling. \"\"\"\n        pass"},{"col":4,"comment":"null","endLoc":187,"header":"def test_unknown_keywords(self, long_df)","id":2530,"name":"test_unknown_keywords","nodeType":"Function","startLoc":183,"text":"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\")"},{"className":"_ColorPalette","col":0,"comment":"Set the color palette in a with statement, otherwise be a list.","endLoc":91,"id":2531,"nodeType":"Class","startLoc":61,"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)\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"},{"className":"list","col":0,"comment":"null","endLoc":1061,"id":2532,"nodeType":"Class","startLoc":1008,"text":"class list(MutableSequence[_T], Generic[_T]):\n    @overload\n    def __init__(self) -> None: ...\n    @overload\n    def __init__(self, __iterable: Iterable[_T]) -> None: ...\n    def copy(self) -> list[_T]: ...\n    def append(self, __object: _T) -> None: ...\n    def extend(self, __iterable: Iterable[_T]) -> None: ...\n    def pop(self, __index: SupportsIndex = -1) -> _T: ...\n    # Signature of `list.index` should be kept in line with `collections.UserList.index()`\n    # and multiprocessing.managers.ListProxy.index()\n    def index(self, __value: _T, __start: SupportsIndex = 0, __stop: SupportsIndex = sys.maxsize) -> int: ...\n    def count(self, __value: _T) -> int: ...\n    def insert(self, __index: SupportsIndex, __object: _T) -> None: ...\n    def remove(self, __value: _T) -> None: ...\n    # Signature of `list.sort` should be kept inline with `collections.UserList.sort()`\n    # and multiprocessing.managers.ListProxy.sort()\n    #\n    # Use list[SupportsRichComparisonT] for the first overload rather than [SupportsRichComparison]\n    # to work around invariance\n    @overload\n    def sort(self: list[SupportsRichComparisonT], *, key: None = None, reverse: bool = False) -> None: ...\n    @overload\n    def sort(self, *, key: Callable[[_T], SupportsRichComparison], reverse: bool = False) -> None: ...\n    def __len__(self) -> int: ...\n    def __iter__(self) -> Iterator[_T]: ...\n    __hash__: ClassVar[None]  # type: ignore[assignment]\n    @overload\n    def __getitem__(self, __i: SupportsIndex) -> _T: ...\n    @overload\n    def __getitem__(self, __s: slice) -> list[_T]: ...\n    @overload\n    def __setitem__(self, __key: SupportsIndex, __value: _T) -> None: ...\n    @overload\n    def __setitem__(self, __key: slice, __value: Iterable[_T]) -> None: ...\n    def __delitem__(self, __key: SupportsIndex | slice) -> None: ...\n    # Overloading looks unnecessary, but is needed to work around complex mypy problems\n    @overload\n    def __add__(self, __value: list[_T]) -> list[_T]: ...\n    @overload\n    def __add__(self, __value: list[_S]) -> list[_S | _T]: ...\n    def __iadd__(self, __value: Iterable[_T]) -> Self: ...  # type: ignore[misc]\n    def __mul__(self, __value: SupportsIndex) -> list[_T]: ...\n    def __rmul__(self, __value: SupportsIndex) -> list[_T]: ...\n    def __imul__(self, __value: SupportsIndex) -> Self: ...\n    def __contains__(self, __key: object) -> bool: ...\n    def __reversed__(self) -> Iterator[_T]: ...\n    def __gt__(self, __value: list[_T]) -> bool: ...\n    def __ge__(self, __value: list[_T]) -> bool: ...\n    def __lt__(self, __value: list[_T]) -> bool: ...\n    def __le__(self, __value: list[_T]) -> bool: ...\n    def __eq__(self, __value: object) -> bool: ...\n    if sys.version_info >= (3, 9):\n        def __class_getitem__(cls, __item: Any) -> GenericAlias: ..."},{"className":"TestLayerAddition","col":0,"comment":"null","endLoc":331,"id":2533,"nodeType":"Class","startLoc":190,"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])\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            )\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\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\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\"]\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())"},{"col":4,"comment":"null","endLoc":196,"header":"def test_without_data(self, long_df)","id":2534,"name":"test_without_data","nodeType":"Function","startLoc":192,"text":"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)"},{"col":4,"comment":"null","endLoc":331,"header":"def test_estimate_data(self)","id":2535,"name":"test_estimate_data","nodeType":"Function","startLoc":322,"text":"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])"},{"col":4,"comment":"null","endLoc":400,"header":"@pytest.mark.parametrize(\"var\", [\"x\", \"y\"])\n    def test_single_paired_var(self, var)","id":2536,"name":"test_single_paired_var","nodeType":"Function","startLoc":373,"text":"@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"},{"col":4,"comment":"null","endLoc":204,"header":"def test_with_new_variable_by_name(self, long_df)","id":2537,"name":"test_with_new_variable_by_name","nodeType":"Function","startLoc":198,"text":"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])"},{"col":4,"comment":"null","endLoc":1013,"header":"def copy(self) -> list[_T]","id":2538,"name":"copy","nodeType":"Function","startLoc":1013,"text":"def copy(self) -> list[_T]: ..."},{"col":4,"comment":"null","endLoc":1020,"header":"def count(self, __value: _T) -> int","id":2539,"name":"count","nodeType":"Function","startLoc":1020,"text":"def count(self, __value: _T) -> int: ..."},{"col":4,"comment":"null","endLoc":1022,"header":"def remove(self, __value: _T) -> None","id":2540,"name":"remove","nodeType":"Function","startLoc":1022,"text":"def remove(self, __value: _T) -> None: ..."},{"col":4,"comment":"null","endLoc":1029,"header":"@overload\n    def sort(self: list[SupportsRichComparisonT], *, key: None = None, reverse: bool = False) -> None","id":2541,"name":"sort","nodeType":"Function","startLoc":1028,"text":"@overload\n    def sort(self: list[SupportsRichComparisonT], *, key: None = None, reverse: bool = False) -> None: ..."},{"col":4,"comment":"null","endLoc":1031,"header":"@overload\n    def sort(self, *, key: Callable[[_T], SupportsRichComparison], reverse: bool = False) -> None","id":2542,"name":"sort","nodeType":"Function","startLoc":1030,"text":"@overload\n    def sort(self, *, key: Callable[[_T], SupportsRichComparison], reverse: bool = False) -> None: ..."},{"col":4,"comment":"null","endLoc":1032,"header":"def __len__(self) -> int","id":2543,"name":"__len__","nodeType":"Function","startLoc":1032,"text":"def __len__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":1033,"header":"def __iter__(self) -> Iterator[_T]","id":2544,"name":"__iter__","nodeType":"Function","startLoc":1033,"text":"def __iter__(self) -> Iterator[_T]: ..."},{"col":4,"comment":"null","endLoc":1036,"header":"@overload\n    def __getitem__(self, __i: SupportsIndex) -> _T","id":2545,"name":"__getitem__","nodeType":"Function","startLoc":1035,"text":"@overload\n    def __getitem__(self, __i: SupportsIndex) -> _T: ..."},{"col":4,"comment":"null","endLoc":1038,"header":"@overload\n    def __getitem__(self, __s: slice) -> list[_T]","id":2546,"name":"__getitem__","nodeType":"Function","startLoc":1037,"text":"@overload\n    def __getitem__(self, __s: slice) -> list[_T]: ..."},{"col":4,"comment":"null","endLoc":1040,"header":"@overload\n    def __setitem__(self, __key: SupportsIndex, __value: _T) -> None","id":2547,"name":"__setitem__","nodeType":"Function","startLoc":1039,"text":"@overload\n    def __setitem__(self, __key: SupportsIndex, __value: _T) -> None: ..."},{"col":4,"comment":"null","endLoc":1042,"header":"@overload\n    def __setitem__(self, __key: slice, __value: Iterable[_T]) -> None","id":2548,"name":"__setitem__","nodeType":"Function","startLoc":1041,"text":"@overload\n    def __setitem__(self, __key: slice, __value: Iterable[_T]) -> None: ..."},{"col":4,"comment":"null","endLoc":1043,"header":"def __delitem__(self, __key: SupportsIndex | slice) -> None","id":2549,"name":"__delitem__","nodeType":"Function","startLoc":1043,"text":"def __delitem__(self, __key: SupportsIndex | slice) -> None: ..."},{"col":4,"comment":"null","endLoc":1046,"header":"@overload\n    def __add__(self, __value: list[_T]) -> list[_T]","id":2550,"name":"__add__","nodeType":"Function","startLoc":1045,"text":"@overload\n    def __add__(self, __value: list[_T]) -> list[_T]: ..."},{"col":4,"comment":"null","endLoc":1048,"header":"@overload\n    def __add__(self, __value: list[_S]) -> list[_S | _T]","id":2551,"name":"__add__","nodeType":"Function","startLoc":1047,"text":"@overload\n    def __add__(self, __value: list[_S]) -> list[_S | _T]: ..."},{"col":4,"comment":"null","endLoc":1049,"header":"def __iadd__(self, __value: Iterable[_T]) -> Self","id":2552,"name":"__iadd__","nodeType":"Function","startLoc":1049,"text":"def __iadd__(self, __value: Iterable[_T]) -> Self: ...  # type: ignore[misc]"},{"col":4,"comment":"null","endLoc":1050,"header":"def __mul__(self, __value: SupportsIndex) -> list[_T]","id":2553,"name":"__mul__","nodeType":"Function","startLoc":1050,"text":"def __mul__(self, __value: SupportsIndex) -> list[_T]: ..."},{"col":4,"comment":"null","endLoc":1051,"header":"def __rmul__(self, __value: SupportsIndex) -> list[_T]","id":2554,"name":"__rmul__","nodeType":"Function","startLoc":1051,"text":"def __rmul__(self, __value: SupportsIndex) -> list[_T]: ..."},{"col":4,"comment":"null","endLoc":1052,"header":"def __imul__(self, __value: SupportsIndex) -> Self","id":2555,"name":"__imul__","nodeType":"Function","startLoc":1052,"text":"def __imul__(self, __value: SupportsIndex) -> Self: ..."},{"col":4,"comment":"null","endLoc":1053,"header":"def __contains__(self, __key: object) -> bool","id":2556,"name":"__contains__","nodeType":"Function","startLoc":1053,"text":"def __contains__(self, __key: object) -> bool: ..."},{"col":4,"comment":"null","endLoc":1054,"header":"def __reversed__(self) -> Iterator[_T]","id":2557,"name":"__reversed__","nodeType":"Function","startLoc":1054,"text":"def __reversed__(self) -> Iterator[_T]: ..."},{"col":4,"comment":"null","endLoc":1055,"header":"def __gt__(self, __value: list[_T]) -> bool","id":2558,"name":"__gt__","nodeType":"Function","startLoc":1055,"text":"def __gt__(self, __value: list[_T]) -> bool: ..."},{"col":4,"comment":"null","endLoc":1056,"header":"def __ge__(self, __value: list[_T]) -> bool","id":2559,"name":"__ge__","nodeType":"Function","startLoc":1056,"text":"def __ge__(self, __value: list[_T]) -> bool: ..."},{"col":4,"comment":"null","endLoc":1057,"header":"def __lt__(self, __value: list[_T]) -> bool","id":2560,"name":"__lt__","nodeType":"Function","startLoc":1057,"text":"def __lt__(self, __value: list[_T]) -> bool: ..."},{"col":4,"comment":"null","endLoc":1058,"header":"def __le__(self, __value: list[_T]) -> bool","id":2561,"name":"__le__","nodeType":"Function","startLoc":1058,"text":"def __le__(self, __value: list[_T]) -> bool: ..."},{"col":4,"comment":"null","endLoc":1059,"header":"def __eq__(self, __value: object) -> bool","id":2562,"name":"__eq__","nodeType":"Function","startLoc":1059,"text":"def __eq__(self, __value: object) -> bool: ..."},{"col":8,"comment":"null","endLoc":1061,"header":"def __class_getitem__(cls, __item: Any) -> GenericAlias","id":2563,"name":"__class_getitem__","nodeType":"Function","startLoc":1061,"text":"def __class_getitem__(cls, __item: Any) -> GenericAlias: ..."},{"attributeType":"None","col":4,"comment":"null","endLoc":1034,"id":2564,"name":"__hash__","nodeType":"Attribute","startLoc":1034,"text":"__hash__"},{"col":0,"comment":"\n    exp(x[, out])\n    \n    Calculate the exponential of all elements in the input array.\n    \n    Parameters\n    ----------\n    x : array_like\n        Input values.\n    \n    Returns\n    -------\n    out : ndarray\n        Output array, element-wise exponential of `x`.\n    \n    See Also\n    --------\n    expm1 : Calculate ``exp(x) - 1`` for all elements in the array.\n    exp2  : Calculate ``2**x`` for all elements in the array.\n    \n    Notes\n    -----\n    The irrational number ``e`` is also known as Euler's number.  It is\n    approximately 2.718281, and is the base of the natural logarithm,\n    ``ln`` (this means that, if :math:`x = \\ln y = \\log_e y`,\n    then :math:`e^x = y`. For real input, ``exp(x)`` is always positive.\n    \n    For complex arguments, ``x = a + ib``, we can write\n    :math:`e^x = e^a e^{ib}`.  The first term, :math:`e^a`, is already\n    known (it is the real argument, described above).  The second term,\n    :math:`e^{ib}`, is :math:`\\cos b + i \\sin b`, a function with\n    magnitude 1 and a periodic phase.\n    \n    References\n    ----------\n    .. [1] Wikipedia, \"Exponential function\",\n           http://en.wikipedia.org/wiki/Exponential_function\n    .. [2] M. Abramovitz and I. A. Stegun, \"Handbook of Mathematical Functions\n           with Formulas, Graphs, and Mathematical Tables,\" Dover, 1964, p. 69,\n           http://www.math.sfu.ca/~cbm/aands/page_69.htm\n    \n    Examples\n    --------\n    Plot the magnitude and phase of ``exp(x)`` in the complex plane:\n    \n    >>> import matplotlib.pyplot as plt\n    \n    >>> x = np.linspace(-2*np.pi, 2*np.pi, 100)\n    >>> xx = x + 1j * x[:, np.newaxis] # a + ib over complex plane\n    >>> out = np.exp(xx)\n    \n    >>> plt.subplot(121)\n    >>> plt.imshow(np.abs(out),\n    ...            extent=[-2*np.pi, 2*np.pi, -2*np.pi, 2*np.pi])\n    >>> plt.title('Magnitude of exp(x)')\n    \n    >>> plt.subplot(122)\n    >>> plt.imshow(np.angle(out),\n    ...            extent=[-2*np.pi, 2*np.pi, -2*np.pi, 2*np.pi])\n    >>> plt.title('Phase (angle) of exp(x)')\n    >>> plt.show()\n    ","endLoc":1193,"header":"def exp(x, out=None)","id":2566,"name":"exp","nodeType":"Function","startLoc":1130,"text":"def exp(x, out=None): # real signature unknown; restored from __doc__\n    \"\"\"\n    exp(x[, out])\n    \n    Calculate the exponential of all elements in the input array.\n    \n    Parameters\n    ----------\n    x : array_like\n        Input values.\n    \n    Returns\n    -------\n    out : ndarray\n        Output array, element-wise exponential of `x`.\n    \n    See Also\n    --------\n    expm1 : Calculate ``exp(x) - 1`` for all elements in the array.\n    exp2  : Calculate ``2**x`` for all elements in the array.\n    \n    Notes\n    -----\n    The irrational number ``e`` is also known as Euler's number.  It is\n    approximately 2.718281, and is the base of the natural logarithm,\n    ``ln`` (this means that, if :math:`x = \\ln y = \\log_e y`,\n    then :math:`e^x = y`. For real input, ``exp(x)`` is always positive.\n    \n    For complex arguments, ``x = a + ib``, we can write\n    :math:`e^x = e^a e^{ib}`.  The first term, :math:`e^a`, is already\n    known (it is the real argument, described above).  The second term,\n    :math:`e^{ib}`, is :math:`\\cos b + i \\sin b`, a function with\n    magnitude 1 and a periodic phase.\n    \n    References\n    ----------\n    .. [1] Wikipedia, \"Exponential function\",\n           http://en.wikipedia.org/wiki/Exponential_function\n    .. [2] M. Abramovitz and I. A. Stegun, \"Handbook of Mathematical Functions\n           with Formulas, Graphs, and Mathematical Tables,\" Dover, 1964, p. 69,\n           http://www.math.sfu.ca/~cbm/aands/page_69.htm\n    \n    Examples\n    --------\n    Plot the magnitude and phase of ``exp(x)`` in the complex plane:\n    \n    >>> import matplotlib.pyplot as plt\n    \n    >>> x = np.linspace(-2*np.pi, 2*np.pi, 100)\n    >>> xx = x + 1j * x[:, np.newaxis] # a + ib over complex plane\n    >>> out = np.exp(xx)\n    \n    >>> plt.subplot(121)\n    >>> plt.imshow(np.abs(out),\n    ...            extent=[-2*np.pi, 2*np.pi, -2*np.pi, 2*np.pi])\n    >>> plt.title('Magnitude of exp(x)')\n    \n    >>> plt.subplot(122)\n    >>> plt.imshow(np.angle(out),\n    ...            extent=[-2*np.pi, 2*np.pi, -2*np.pi, 2*np.pi])\n    >>> plt.title('Phase (angle) of exp(x)')\n    >>> plt.show()\n    \"\"\"\n    pass"},{"col":4,"comment":"null","endLoc":37,"header":"def test_shared_colors_direct(self)","id":2567,"name":"test_shared_colors_direct","nodeType":"Function","startLoc":28,"text":"def test_shared_colors_direct(self):\n\n        x = y = [1, 2, 3]\n        color = \".44\"\n        m = Path(color=color)\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(), color)\n        assert same_color(line.get_markeredgecolor(), color)\n        assert same_color(line.get_markerfacecolor(), color)"},{"id":2568,"name":"doc/sphinxext","nodeType":"Package"},{"fileName":"tutorial_builder.py","filePath":"doc/sphinxext","id":2569,"nodeType":"File","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\"\"\"\n\n\ndef 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\")\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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\n\n\ndef 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)\n"},{"className":"Path","col":0,"comment":"null","endLoc":237,"id":2570,"nodeType":"Class","startLoc":95,"text":"class Path(PurePath):\n    def __new__(cls, *args: StrPath, **kwargs: Any) -> Self: ...\n    def __enter__(self) -> Self: ...\n    def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ...\n    @classmethod\n    def cwd(cls) -> Self: ...\n    if sys.version_info >= (3, 10):\n        def stat(self, *, follow_symlinks: bool = True) -> stat_result: ...\n        def chmod(self, mode: int, *, follow_symlinks: bool = True) -> None: ...\n    else:\n        def stat(self) -> stat_result: ...\n        def chmod(self, mode: int) -> None: ...\n\n    if sys.version_info >= (3, 12):\n        def exists(self, *, follow_symlinks: bool = True) -> bool: ...\n        def glob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self, None, None]: ...\n        def rglob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self, None, None]: ...\n    else:\n        def exists(self) -> bool: ...\n        def glob(self, pattern: str) -> Generator[Self, None, None]: ...\n        def rglob(self, pattern: str) -> Generator[Self, None, None]: ...\n\n    def is_dir(self) -> bool: ...\n    def is_file(self) -> bool: ...\n    def is_symlink(self) -> bool: ...\n    def is_socket(self) -> bool: ...\n    def is_fifo(self) -> bool: ...\n    def is_block_device(self) -> bool: ...\n    def is_char_device(self) -> bool: ...\n    if sys.version_info >= (3, 12):\n        def is_junction(self) -> bool: ...\n\n    def iterdir(self) -> Generator[Self, None, None]: ...\n    def lchmod(self, mode: int) -> None: ...\n    def lstat(self) -> stat_result: ...\n    def mkdir(self, mode: int = 0o777, parents: bool = False, exist_ok: bool = False) -> None: ...\n    # Adapted from builtins.open\n    # Text mode: always returns a TextIOWrapper\n    # The Traversable .open in stdlib/importlib/abc.pyi should be kept in sync with this.\n    @overload\n    def open(\n        self,\n        mode: OpenTextMode = \"r\",\n        buffering: int = -1,\n        encoding: str | None = None,\n        errors: str | None = None,\n        newline: str | None = None,\n    ) -> TextIOWrapper: ...\n    # Unbuffered binary mode: returns a FileIO\n    @overload\n    def open(\n        self, mode: OpenBinaryMode, buffering: Literal[0], encoding: None = None, errors: None = None, newline: None = None\n    ) -> FileIO: ...\n    # Buffering is on: return BufferedRandom, BufferedReader, or BufferedWriter\n    @overload\n    def open(\n        self,\n        mode: OpenBinaryModeUpdating,\n        buffering: Literal[-1, 1] = -1,\n        encoding: None = None,\n        errors: None = None,\n        newline: None = None,\n    ) -> BufferedRandom: ...\n    @overload\n    def open(\n        self,\n        mode: OpenBinaryModeWriting,\n        buffering: Literal[-1, 1] = -1,\n        encoding: None = None,\n        errors: None = None,\n        newline: None = None,\n    ) -> BufferedWriter: ...\n    @overload\n    def open(\n        self,\n        mode: OpenBinaryModeReading,\n        buffering: Literal[-1, 1] = -1,\n        encoding: None = None,\n        errors: None = None,\n        newline: None = None,\n    ) -> BufferedReader: ...\n    # Buffering cannot be determined: fall back to BinaryIO\n    @overload\n    def open(\n        self, mode: OpenBinaryMode, buffering: int = -1, encoding: None = None, errors: None = None, newline: None = None\n    ) -> BinaryIO: ...\n    # Fallback if mode is not specified\n    @overload\n    def open(\n        self, mode: str, buffering: int = -1, encoding: str | None = None, errors: str | None = None, newline: str | None = None\n    ) -> IO[Any]: ...\n    if sys.platform != \"win32\":\n        # These methods do \"exist\" on Windows, but they always raise NotImplementedError,\n        # so it's safer to pretend they don't exist\n        def owner(self) -> str: ...\n        def group(self) -> str: ...\n\n    # This method does \"exist\" on Windows on <3.12, but always raises NotImplementedError\n    # On py312+, it works properly on Windows, as with all other platforms\n    if sys.platform != \"win32\" or sys.version_info >= (3, 12):\n        def is_mount(self) -> bool: ...\n\n    if sys.version_info >= (3, 9):\n        def readlink(self) -> Self: ...\n    if sys.version_info >= (3, 8):\n        def rename(self, target: str | PurePath) -> Self: ...\n        def replace(self, target: str | PurePath) -> Self: ...\n    else:\n        def rename(self, target: str | PurePath) -> None: ...\n        def replace(self, target: str | PurePath) -> None: ...\n\n    def resolve(self, strict: bool = False) -> Self: ...\n    def rmdir(self) -> None: ...\n    def symlink_to(self, target: StrOrBytesPath, target_is_directory: bool = False) -> None: ...\n    if sys.version_info >= (3, 10):\n        def hardlink_to(self, target: StrOrBytesPath) -> None: ...\n\n    def touch(self, mode: int = 0o666, exist_ok: bool = True) -> None: ...\n    if sys.version_info >= (3, 8):\n        def unlink(self, missing_ok: bool = False) -> None: ...\n    else:\n        def unlink(self) -> None: ...\n\n    @classmethod\n    def home(cls) -> Self: ...\n    def absolute(self) -> Self: ...\n    def expanduser(self) -> Self: ...\n    def read_bytes(self) -> bytes: ...\n    def read_text(self, encoding: str | None = None, errors: str | None = None) -> str: ...\n    def samefile(self, other_path: StrPath) -> bool: ...\n    def write_bytes(self, data: ReadableBuffer) -> int: ...\n    if sys.version_info >= (3, 10):\n        def write_text(\n            self, data: str, encoding: str | None = None, errors: str | None = None, newline: str | None = None\n        ) -> int: ...\n    else:\n        def write_text(self, data: str, encoding: str | None = None, errors: str | None = None) -> int: ...\n    if sys.version_info >= (3, 8) and sys.version_info < (3, 12):\n        def link_to(self, target: StrOrBytesPath) -> None: ...\n    if sys.version_info >= (3, 12):\n        def walk(\n            self, top_down: bool = ..., on_error: Callable[[OSError], object] | None = ..., follow_symlinks: bool = ...\n        ) -> Iterator[tuple[Self, list[str], list[str]]]: ..."},{"col":4,"comment":"Open the context.","endLoc":68,"header":"def __enter__(self)","id":2571,"name":"__enter__","nodeType":"Function","startLoc":63,"text":"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"},{"col":4,"comment":"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        ","endLoc":467,"header":"def _default_values(self, n: int) -> list[DashPatternWithOffset]","id":2572,"name":"_default_values","nodeType":"Function","startLoc":426,"text":"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]"},{"id":2573,"name":"tutorial.yaml","nodeType":"TextFile","path":"doc","text":"- title:\n  pages:\n    - introduction\n- title: API Overview\n  pages:\n    - function_overview\n    - data_structure\n- title: Objects interface\n  pages:\n    - objects_interface\n    - properties\n- title: Plotting functions\n  pages:\n    - relational\n    - distributions\n    - categorical\n- title: Statistical operations\n  pages:\n    - error_bars\n    - regression\n- title: Multi-plot grids\n  pages:\n    - axis_grids\n- title: Figure aesthetics\n  pages:\n    - aesthetics\n    - color_palettes\n"},{"col":4,"comment":"Close the context.","endLoc":73,"header":"def __exit__(self, *args)","id":2574,"name":"__exit__","nodeType":"Function","startLoc":70,"text":"def __exit__(self, *args):\n        \"\"\"Close the context.\"\"\"\n        from .rcmod import set_palette\n        set_palette(self._orig_palette)"},{"col":4,"comment":"Return a color palette with hex codes instead of RGB values.","endLoc":78,"header":"def as_hex(self)","id":2575,"name":"as_hex","nodeType":"Function","startLoc":75,"text":"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)"},{"col":4,"comment":"null","endLoc":161,"header":"def test_despine_specific_axes(self)","id":2576,"name":"test_despine_specific_axes","nodeType":"Function","startLoc":150,"text":"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()"},{"col":4,"comment":"null","endLoc":212,"header":"def test_with_new_variable_by_vector(self, long_df)","id":2577,"name":"test_with_new_variable_by_vector","nodeType":"Function","startLoc":206,"text":"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])"},{"fileName":"test_palettes.py","filePath":"tests","id":2578,"nodeType":"File","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()\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\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)\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]))\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)\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\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)))\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)))\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\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\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)\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)\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)\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]\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\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)\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_repr(self):\n\n        pal = palettes.color_palette()\n        html = pal._repr_html_()\n        for color in pal.as_hex():\n            assert color in html\n\n    def test_colormap_display_patch(self):\n\n        orig_repr_png = getattr(mpl.colors.Colormap, \"_repr_png_\", None)\n        orig_repr_html = getattr(mpl.colors.Colormap, \"_repr_html_\", None)\n\n        try:\n            palettes._patch_colormap_display()\n            cmap = mpl.cm.Reds\n            assert cmap._repr_html_().startswith('\"Reds')\n.\"\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\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_format_disabled(self, x):\n\n        s = Continuous(trans=\"log\").label(base=None)._setup(x, Coordinate())\n        a = PseudoAxis(s._matplotlib_scale)\n        a.set_view_interval(20, 20000)\n        labels = a.major.formatter.format_ticks(a.major.locator())\n        for text in labels:\n            assert re.match(r\"^\\d+$\", text)\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)\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\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)"},{"className":"TestColorPalettes","col":0,"comment":"null","endLoc":439,"id":2585,"nodeType":"Class","startLoc":14,"text":"class 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()\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\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)\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]))\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)\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\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)))\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)))\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\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\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)\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)\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)\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]\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\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)\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_repr(self):\n\n        pal = palettes.color_palette()\n        html = pal._repr_html_()\n        for color in pal.as_hex():\n            assert color in html\n\n    def test_colormap_display_patch(self):\n\n        orig_repr_png = getattr(mpl.colors.Colormap, \"_repr_png_\", None)\n        orig_repr_html = getattr(mpl.colors.Colormap, \"_repr_html_\", None)\n\n        try:\n            palettes._patch_colormap_display()\n            cmap = mpl.cm.Reds\n            assert cmap._repr_html_().startswith('\"Reds')\n tuple[str, ...]: ...\n    @property\n    def drive(self) -> str: ...\n    @property\n    def root(self) -> str: ...\n    @property\n    def anchor(self) -> str: ...\n    @property\n    def name(self) -> str: ...\n    @property\n    def suffix(self) -> str: ...\n    @property\n    def suffixes(self) -> list[str]: ...\n    @property\n    def stem(self) -> str: ...\n    if sys.version_info >= (3, 12):\n        def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ...\n        def __init__(self, *args: StrPath) -> None: ...\n    else:\n        def __new__(cls, *args: StrPath) -> Self: ...\n\n    def __hash__(self) -> int: ...\n    def __fspath__(self) -> str: ...\n    def __lt__(self, other: PurePath) -> bool: ...\n    def __le__(self, other: PurePath) -> bool: ...\n    def __gt__(self, other: PurePath) -> bool: ...\n    def __ge__(self, other: PurePath) -> bool: ...\n    def __truediv__(self, key: StrPath) -> Self: ...\n    def __rtruediv__(self, key: StrPath) -> Self: ...\n    def __bytes__(self) -> bytes: ...\n    def as_posix(self) -> str: ...\n    def as_uri(self) -> str: ...\n    def is_absolute(self) -> bool: ...\n    def is_reserved(self) -> bool: ...\n    if sys.version_info >= (3, 12):\n        def is_relative_to(self, __other: StrPath, *_deprecated: StrPath) -> bool: ...\n    elif sys.version_info >= (3, 9):\n        def is_relative_to(self, *other: StrPath) -> bool: ...\n\n    if sys.version_info >= (3, 12):\n        def match(self, path_pattern: str, *, case_sensitive: bool | None = None) -> bool: ...\n    else:\n        def match(self, path_pattern: str) -> bool: ...\n\n    if sys.version_info >= (3, 12):\n        def relative_to(self, __other: StrPath, *_deprecated: StrPath, walk_up: bool = False) -> Self: ...\n    else:\n        def relative_to(self, *other: StrPath) -> Self: ...\n\n    def with_name(self, name: str) -> Self: ...\n    if sys.version_info >= (3, 9):\n        def with_stem(self, stem: str) -> Self: ...\n\n    def with_suffix(self, suffix: str) -> Self: ...\n    def joinpath(self, *other: StrPath) -> Self: ...\n    @property\n    def parents(self) -> Sequence[Self]: ...\n    @property\n    def parent(self) -> Self: ...\n    if sys.version_info >= (3, 9) and sys.version_info < (3, 11):\n        def __class_getitem__(cls, type: Any) -> GenericAlias: ...\n\n    if sys.version_info >= (3, 12):\n        def with_segments(self, *args: StrPath) -> Self: ..."},{"col":0,"comment":"\n    Alias for :func:`set_theme`, which is the preferred interface.\n\n    This function may be removed in the future.\n    ","endLoc":132,"header":"def set(*args, **kwargs)","id":2594,"name":"set","nodeType":"Function","startLoc":126,"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)"},{"col":4,"comment":"null","endLoc":31,"header":"def test_palette_context(self)","id":2595,"name":"test_palette_context","nodeType":"Function","startLoc":23,"text":"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"},{"col":4,"comment":"null","endLoc":27,"header":"@property\n    def parts(self) -> tuple[str, ...]","id":2596,"name":"parts","nodeType":"Function","startLoc":26,"text":"@property\n    def parts(self) -> tuple[str, ...]: ..."},{"col":4,"comment":"null","endLoc":29,"header":"@property\n    def drive(self) -> str","id":2597,"name":"drive","nodeType":"Function","startLoc":28,"text":"@property\n    def drive(self) -> str: ..."},{"col":4,"comment":"null","endLoc":31,"header":"@property\n    def root(self) -> str","id":2598,"name":"root","nodeType":"Function","startLoc":30,"text":"@property\n    def root(self) -> str: ..."},{"col":4,"comment":"null","endLoc":33,"header":"@property\n    def anchor(self) -> str","id":2599,"name":"anchor","nodeType":"Function","startLoc":32,"text":"@property\n    def anchor(self) -> str: ..."},{"col":4,"comment":"null","endLoc":35,"header":"@property\n    def name(self) -> str","id":2600,"name":"name","nodeType":"Function","startLoc":34,"text":"@property\n    def name(self) -> str: ..."},{"col":4,"comment":"null","endLoc":37,"header":"@property\n    def suffix(self) -> str","id":2601,"name":"suffix","nodeType":"Function","startLoc":36,"text":"@property\n    def suffix(self) -> str: ..."},{"col":4,"comment":"null","endLoc":39,"header":"@property\n    def suffixes(self) -> list[str]","id":2602,"name":"suffixes","nodeType":"Function","startLoc":38,"text":"@property\n    def suffixes(self) -> list[str]: ..."},{"col":4,"comment":"null","endLoc":41,"header":"@property\n    def stem(self) -> str","id":2603,"name":"stem","nodeType":"Function","startLoc":40,"text":"@property\n    def stem(self) -> str: ..."},{"col":8,"comment":"null","endLoc":43,"header":"def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self","id":2604,"name":"__new__","nodeType":"Function","startLoc":43,"text":"def __new__(cls, *args: StrPath, **kwargs: Unused) -> Self: ..."},{"col":8,"comment":"null","endLoc":46,"header":"def __new__(cls, *args: StrPath) -> Self","id":2605,"name":"__new__","nodeType":"Function","startLoc":46,"text":"def __new__(cls, *args: StrPath) -> Self: ..."},{"col":8,"comment":"null","endLoc":44,"header":"def __init__(self, *args: StrPath) -> None","id":2606,"name":"__init__","nodeType":"Function","startLoc":44,"text":"def __init__(self, *args: StrPath) -> None: ..."},{"col":4,"comment":"null","endLoc":48,"header":"def __hash__(self) -> int","id":2607,"name":"__hash__","nodeType":"Function","startLoc":48,"text":"def __hash__(self) -> int: ..."},{"col":4,"comment":"null","endLoc":49,"header":"def __fspath__(self) -> str","id":2608,"name":"__fspath__","nodeType":"Function","startLoc":49,"text":"def __fspath__(self) -> str: ..."},{"col":4,"comment":"null","endLoc":50,"header":"def __lt__(self, other: PurePath) -> bool","id":2609,"name":"__lt__","nodeType":"Function","startLoc":50,"text":"def __lt__(self, other: PurePath) -> bool: ..."},{"col":4,"comment":"null","endLoc":51,"header":"def __le__(self, other: PurePath) -> bool","id":2610,"name":"__le__","nodeType":"Function","startLoc":51,"text":"def __le__(self, other: PurePath) -> bool: ..."},{"col":4,"comment":"null","endLoc":52,"header":"def __gt__(self, other: PurePath) -> bool","id":2611,"name":"__gt__","nodeType":"Function","startLoc":52,"text":"def __gt__(self, other: PurePath) -> bool: ..."},{"col":4,"comment":"null","endLoc":53,"header":"def __ge__(self, other: PurePath) -> bool","id":2612,"name":"__ge__","nodeType":"Function","startLoc":53,"text":"def __ge__(self, other: PurePath) -> bool: ..."},{"col":4,"comment":"null","endLoc":54,"header":"def __truediv__(self, key: StrPath) -> Self","id":2613,"name":"__truediv__","nodeType":"Function","startLoc":54,"text":"def __truediv__(self, key: StrPath) -> Self: ..."},{"col":4,"comment":"null","endLoc":55,"header":"def __rtruediv__(self, key: StrPath) -> Self","id":2614,"name":"__rtruediv__","nodeType":"Function","startLoc":55,"text":"def __rtruediv__(self, key: StrPath) -> Self: ..."},{"col":4,"comment":"null","endLoc":56,"header":"def __bytes__(self) -> bytes","id":2615,"name":"__bytes__","nodeType":"Function","startLoc":56,"text":"def __bytes__(self) -> bytes: ..."},{"col":4,"comment":"null","endLoc":57,"header":"def as_posix(self) -> str","id":2616,"name":"as_posix","nodeType":"Function","startLoc":57,"text":"def as_posix(self) -> str: ..."},{"col":4,"comment":"null","endLoc":58,"header":"def as_uri(self) -> str","id":2617,"name":"as_uri","nodeType":"Function","startLoc":58,"text":"def as_uri(self) -> str: ..."},{"col":4,"comment":"null","endLoc":59,"header":"def is_absolute(self) -> bool","id":2618,"name":"is_absolute","nodeType":"Function","startLoc":59,"text":"def is_absolute(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":60,"header":"def is_reserved(self) -> bool","id":2619,"name":"is_reserved","nodeType":"Function","startLoc":60,"text":"def is_reserved(self) -> bool: ..."},{"col":8,"comment":"null","endLoc":62,"header":"def is_relative_to(self, __other: StrPath, *_deprecated: StrPath) -> bool","id":2620,"name":"is_relative_to","nodeType":"Function","startLoc":62,"text":"def is_relative_to(self, __other: StrPath, *_deprecated: StrPath) -> bool: ..."},{"col":8,"comment":"null","endLoc":64,"header":"def is_relative_to(self, *other: StrPath) -> bool","id":2621,"name":"is_relative_to","nodeType":"Function","startLoc":64,"text":"def is_relative_to(self, *other: StrPath) -> bool: ..."},{"col":8,"comment":"null","endLoc":67,"header":"def match(self, path_pattern: str, *, case_sensitive: bool | None = None) -> bool","id":2622,"name":"match","nodeType":"Function","startLoc":67,"text":"def match(self, path_pattern: str, *, case_sensitive: bool | None = None) -> bool: ..."},{"col":8,"comment":"null","endLoc":69,"header":"def match(self, path_pattern: str) -> bool","id":2623,"name":"match","nodeType":"Function","startLoc":69,"text":"def match(self, path_pattern: str) -> bool: ..."},{"col":8,"comment":"null","endLoc":72,"header":"def relative_to(self, __other: StrPath, *_deprecated: StrPath, walk_up: bool = False) -> Self","id":2624,"name":"relative_to","nodeType":"Function","startLoc":72,"text":"def relative_to(self, __other: StrPath, *_deprecated: StrPath, walk_up: bool = False) -> Self: ..."},{"col":8,"comment":"null","endLoc":74,"header":"def relative_to(self, *other: StrPath) -> Self","id":2625,"name":"relative_to","nodeType":"Function","startLoc":74,"text":"def relative_to(self, *other: StrPath) -> Self: ..."},{"col":4,"comment":"null","endLoc":76,"header":"def with_name(self, name: str) -> Self","id":2626,"name":"with_name","nodeType":"Function","startLoc":76,"text":"def with_name(self, name: str) -> Self: ..."},{"col":8,"comment":"null","endLoc":78,"header":"def with_stem(self, stem: str) -> Self","id":2627,"name":"with_stem","nodeType":"Function","startLoc":78,"text":"def with_stem(self, stem: str) -> Self: ..."},{"col":4,"comment":"null","endLoc":80,"header":"def with_suffix(self, suffix: str) -> Self","id":2628,"name":"with_suffix","nodeType":"Function","startLoc":80,"text":"def with_suffix(self, suffix: str) -> Self: ..."},{"col":4,"comment":"null","endLoc":81,"header":"def joinpath(self, *other: StrPath) -> Self","id":2629,"name":"joinpath","nodeType":"Function","startLoc":81,"text":"def joinpath(self, *other: StrPath) -> Self: ..."},{"col":4,"comment":"null","endLoc":83,"header":"@property\n    def parents(self) -> Sequence[Self]","id":2630,"name":"parents","nodeType":"Function","startLoc":82,"text":"@property\n    def parents(self) -> Sequence[Self]: ..."},{"col":4,"comment":"null","endLoc":85,"header":"@property\n    def parent(self) -> Self","id":2631,"name":"parent","nodeType":"Function","startLoc":84,"text":"@property\n    def parent(self) -> Self: ..."},{"col":8,"comment":"null","endLoc":87,"header":"def __class_getitem__(cls, type: Any) -> GenericAlias","id":2632,"name":"__class_getitem__","nodeType":"Function","startLoc":87,"text":"def __class_getitem__(cls, type: Any) -> GenericAlias: ..."},{"col":8,"comment":"null","endLoc":90,"header":"def with_segments(self, *args: StrPath) -> Self","id":2633,"name":"with_segments","nodeType":"Function","startLoc":90,"text":"def with_segments(self, *args: StrPath) -> Self: ..."},{"col":4,"comment":"null","endLoc":97,"header":"def __enter__(self) -> Self","id":2634,"name":"__enter__","nodeType":"Function","startLoc":97,"text":"def __enter__(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":98,"header":"def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None","id":2635,"name":"__exit__","nodeType":"Function","startLoc":98,"text":"def __exit__(self, t: type[BaseException] | None, v: BaseException | None, tb: TracebackType | None) -> None: ..."},{"col":4,"comment":"null","endLoc":100,"header":"@classmethod\n    def cwd(cls) -> Self","id":2636,"name":"cwd","nodeType":"Function","startLoc":99,"text":"@classmethod\n    def cwd(cls) -> Self: ..."},{"col":8,"comment":"null","endLoc":102,"header":"def stat(self, *, follow_symlinks: bool = True) -> stat_result","id":2637,"name":"stat","nodeType":"Function","startLoc":102,"text":"def stat(self, *, follow_symlinks: bool = True) -> stat_result: ..."},{"col":8,"comment":"null","endLoc":105,"header":"def stat(self) -> stat_result","id":2638,"name":"stat","nodeType":"Function","startLoc":105,"text":"def stat(self) -> stat_result: ..."},{"col":8,"comment":"null","endLoc":103,"header":"def chmod(self, mode: int, *, follow_symlinks: bool = True) -> None","id":2639,"name":"chmod","nodeType":"Function","startLoc":103,"text":"def chmod(self, mode: int, *, follow_symlinks: bool = True) -> None: ..."},{"col":4,"comment":"null","endLoc":220,"header":"def test_with_late_data_definition(self, long_df)","id":2640,"name":"test_with_late_data_definition","nodeType":"Function","startLoc":214,"text":"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])"},{"col":8,"comment":"null","endLoc":106,"header":"def chmod(self, mode: int) -> None","id":2641,"name":"chmod","nodeType":"Function","startLoc":106,"text":"def chmod(self, mode: int) -> None: ..."},{"col":8,"comment":"null","endLoc":109,"header":"def exists(self, *, follow_symlinks: bool = True) -> bool","id":2642,"name":"exists","nodeType":"Function","startLoc":109,"text":"def exists(self, *, follow_symlinks: bool = True) -> bool: ..."},{"col":8,"comment":"null","endLoc":113,"header":"def exists(self) -> bool","id":2643,"name":"exists","nodeType":"Function","startLoc":113,"text":"def exists(self) -> bool: ..."},{"col":8,"comment":"null","endLoc":110,"header":"def glob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self, None, None]","id":2644,"name":"glob","nodeType":"Function","startLoc":110,"text":"def glob(self, pattern: str, *, case_sensitive: bool | None = None) -> Generator[Self, None, None]: ..."},{"col":8,"comment":"null","endLoc":114,"header":"def glob(self, pattern: str) -> Generator[Self, None, None]","id":2645,"name":"glob","nodeType":"Function","startLoc":114,"text":"def glob(self, pattern: str) -> Generator[Self, None, None]: ..."},{"col":4,"comment":"null","endLoc":117,"header":"def is_dir(self) -> bool","id":2646,"name":"is_dir","nodeType":"Function","startLoc":117,"text":"def is_dir(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":118,"header":"def is_file(self) -> bool","id":2647,"name":"is_file","nodeType":"Function","startLoc":118,"text":"def is_file(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":119,"header":"def is_symlink(self) -> bool","id":2648,"name":"is_symlink","nodeType":"Function","startLoc":119,"text":"def is_symlink(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":120,"header":"def is_socket(self) -> bool","id":2649,"name":"is_socket","nodeType":"Function","startLoc":120,"text":"def is_socket(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":121,"header":"def is_fifo(self) -> bool","id":2650,"name":"is_fifo","nodeType":"Function","startLoc":121,"text":"def is_fifo(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":122,"header":"def is_block_device(self) -> bool","id":2651,"name":"is_block_device","nodeType":"Function","startLoc":122,"text":"def is_block_device(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":123,"header":"def is_char_device(self) -> bool","id":2652,"name":"is_char_device","nodeType":"Function","startLoc":123,"text":"def is_char_device(self) -> bool: ..."},{"col":8,"comment":"null","endLoc":125,"header":"def is_junction(self) -> bool","id":2653,"name":"is_junction","nodeType":"Function","startLoc":125,"text":"def is_junction(self) -> bool: ..."},{"col":4,"comment":"null","endLoc":127,"header":"def iterdir(self) -> Generator[Self, None, None]","id":2654,"name":"iterdir","nodeType":"Function","startLoc":127,"text":"def iterdir(self) -> Generator[Self, None, None]: ..."},{"col":4,"comment":"null","endLoc":128,"header":"def lchmod(self, mode: int) -> None","id":2655,"name":"lchmod","nodeType":"Function","startLoc":128,"text":"def lchmod(self, mode: int) -> None: ..."},{"col":4,"comment":"null","endLoc":129,"header":"def lstat(self) -> stat_result","id":2656,"name":"lstat","nodeType":"Function","startLoc":129,"text":"def lstat(self) -> stat_result: ..."},{"col":4,"comment":"null","endLoc":130,"header":"def mkdir(self, mode: int = 0o777, parents: bool = False, exist_ok: bool = False) -> None","id":2657,"name":"mkdir","nodeType":"Function","startLoc":130,"text":"def mkdir(self, mode: int = 0o777, parents: bool = False, exist_ok: bool = False) -> None: ..."},{"col":8,"comment":"null","endLoc":189,"header":"def owner(self) -> str","id":2658,"name":"owner","nodeType":"Function","startLoc":189,"text":"def owner(self) -> str: ..."},{"col":8,"comment":"null","endLoc":190,"header":"def group(self) -> str","id":2659,"name":"group","nodeType":"Function","startLoc":190,"text":"def group(self) -> str: ..."},{"col":8,"comment":"null","endLoc":195,"header":"def is_mount(self) -> bool","id":2660,"name":"is_mount","nodeType":"Function","startLoc":195,"text":"def is_mount(self) -> bool: ..."},{"col":8,"comment":"null","endLoc":198,"header":"def readlink(self) -> Self","id":2661,"name":"readlink","nodeType":"Function","startLoc":198,"text":"def readlink(self) -> Self: ..."},{"col":8,"comment":"null","endLoc":200,"header":"def rename(self, target: str | PurePath) -> Self","id":2662,"name":"rename","nodeType":"Function","startLoc":200,"text":"def rename(self, target: str | PurePath) -> Self: ..."},{"col":8,"comment":"null","endLoc":203,"header":"def rename(self, target: str | PurePath) -> None","id":2663,"name":"rename","nodeType":"Function","startLoc":203,"text":"def rename(self, target: str | PurePath) -> None: ..."},{"col":8,"comment":"null","endLoc":201,"header":"def replace(self, target: str | PurePath) -> Self","id":2664,"name":"replace","nodeType":"Function","startLoc":201,"text":"def replace(self, target: str | PurePath) -> Self: ..."},{"col":8,"comment":"null","endLoc":204,"header":"def replace(self, target: str | PurePath) -> None","id":2665,"name":"replace","nodeType":"Function","startLoc":204,"text":"def replace(self, target: str | PurePath) -> None: ..."},{"col":4,"comment":"null","endLoc":206,"header":"def resolve(self, strict: bool = False) -> Self","id":2666,"name":"resolve","nodeType":"Function","startLoc":206,"text":"def resolve(self, strict: bool = False) -> Self: ..."},{"col":4,"comment":"null","endLoc":207,"header":"def rmdir(self) -> None","id":2667,"name":"rmdir","nodeType":"Function","startLoc":207,"text":"def rmdir(self) -> None: ..."},{"col":4,"comment":"null","endLoc":208,"header":"def symlink_to(self, target: StrOrBytesPath, target_is_directory: bool = False) -> None","id":2668,"name":"symlink_to","nodeType":"Function","startLoc":208,"text":"def symlink_to(self, target: StrOrBytesPath, target_is_directory: bool = False) -> None: ..."},{"col":8,"comment":"null","endLoc":210,"header":"def hardlink_to(self, target: StrOrBytesPath) -> None","id":2669,"name":"hardlink_to","nodeType":"Function","startLoc":210,"text":"def hardlink_to(self, target: StrOrBytesPath) -> None: ..."},{"col":4,"comment":"null","endLoc":212,"header":"def touch(self, mode: int = 0o666, exist_ok: bool = True) -> None","id":2670,"name":"touch","nodeType":"Function","startLoc":212,"text":"def touch(self, mode: int = 0o666, exist_ok: bool = True) -> None: ..."},{"col":8,"comment":"null","endLoc":214,"header":"def unlink(self, missing_ok: bool = False) -> None","id":2671,"name":"unlink","nodeType":"Function","startLoc":214,"text":"def unlink(self, missing_ok: bool = False) -> None: ..."},{"col":8,"comment":"null","endLoc":216,"header":"def unlink(self) -> None","id":2672,"name":"unlink","nodeType":"Function","startLoc":216,"text":"def unlink(self) -> None: ..."},{"col":4,"comment":"null","endLoc":219,"header":"@classmethod\n    def home(cls) -> Self","id":2673,"name":"home","nodeType":"Function","startLoc":218,"text":"@classmethod\n    def home(cls) -> Self: ..."},{"col":4,"comment":"null","endLoc":220,"header":"def absolute(self) -> Self","id":2674,"name":"absolute","nodeType":"Function","startLoc":220,"text":"def absolute(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":221,"header":"def expanduser(self) -> Self","id":2675,"name":"expanduser","nodeType":"Function","startLoc":221,"text":"def expanduser(self) -> Self: ..."},{"col":4,"comment":"null","endLoc":222,"header":"def read_bytes(self) -> bytes","id":2676,"name":"read_bytes","nodeType":"Function","startLoc":222,"text":"def read_bytes(self) -> bytes: ..."},{"col":4,"comment":"null","endLoc":223,"header":"def read_text(self, encoding: str | None = None, errors: str | None = None) -> str","id":2677,"name":"read_text","nodeType":"Function","startLoc":223,"text":"def read_text(self, encoding: str | None = None, errors: str | None = None) -> str: ..."},{"col":4,"comment":"null","endLoc":224,"header":"def samefile(self, other_path: StrPath) -> bool","id":2678,"name":"samefile","nodeType":"Function","startLoc":224,"text":"def samefile(self, other_path: StrPath) -> bool: ..."},{"col":4,"comment":"null","endLoc":225,"header":"def write_bytes(self, data: ReadableBuffer) -> int","id":2679,"name":"write_bytes","nodeType":"Function","startLoc":225,"text":"def write_bytes(self, data: ReadableBuffer) -> int: ..."},{"col":8,"comment":"null","endLoc":229,"header":"def write_text(\n            self, data: str, encoding: str | None = None, errors: str | None = None, newline: str | None = None\n        ) -> int","id":2680,"name":"write_text","nodeType":"Function","startLoc":227,"text":"def write_text(\n            self, data: str, encoding: str | None = None, errors: str | None = None, newline: str | None = None\n        ) -> int: ..."},{"col":8,"comment":"null","endLoc":231,"header":"def write_text(self, data: str, encoding: str | None = None, errors: str | None = None) -> int","id":2681,"name":"write_text","nodeType":"Function","startLoc":231,"text":"def write_text(self, data: str, encoding: str | None = None, errors: str | None = None) -> int: ..."},{"col":8,"comment":"null","endLoc":233,"header":"def link_to(self, target: StrOrBytesPath) -> None","id":2682,"name":"link_to","nodeType":"Function","startLoc":233,"text":"def link_to(self, target: StrOrBytesPath) -> None: ..."},{"col":8,"comment":"null","endLoc":237,"header":"def walk(\n            self, top_down: bool = ..., on_error: Callable[[OSError], object] | None = ..., follow_symlinks: bool = ...\n        ) -> Iterator[tuple[Self, list[str], list[str]]]","id":2683,"name":"walk","nodeType":"Function","startLoc":235,"text":"def walk(\n            self, top_down: bool = ..., on_error: Callable[[OSError], object] | None = ..., follow_symlinks: bool = ...\n        ) -> Iterator[tuple[Self, list[str], list[str]]]: ..."},{"col":4,"comment":"null","endLoc":45,"header":"def test_big_palette_context(self)","id":2684,"name":"test_big_palette_context","nodeType":"Function","startLoc":33,"text":"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()"},{"col":4,"comment":"Compute the Silverman factor.\n\n        Returns\n        -------\n        s : float\n            The silverman factor.\n        ","endLoc":288,"header":"def silverman_factor(self)","id":2685,"name":"silverman_factor","nodeType":"Function","startLoc":280,"text":"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))"},{"col":4,"comment":"\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        ","endLoc":364,"header":"def pdf(self, x)","id":2686,"name":"pdf","nodeType":"Function","startLoc":354,"text":"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)"},{"col":4,"comment":"null","endLoc":365,"header":"def test_estimate_units(self)","id":2688,"name":"test_estimate_units","nodeType":"Function","startLoc":351,"text":"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)"},{"col":4,"comment":"null","endLoc":372,"header":"@property\n    def weights(self)","id":2689,"name":"weights","nodeType":"Function","startLoc":366,"text":"@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"},{"col":4,"comment":"null","endLoc":61,"header":"def test_shared_colors_mapped(self)","id":2690,"name":"test_shared_colors_mapped","nodeType":"Function","startLoc":50,"text":"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        colors = p._theme[\"axes.prop_cycle\"].by_key()[\"color\"]\n        for i, line in enumerate(ax.get_lines()):\n            assert same_color(line.get_color(), colors[i])\n            assert same_color(line.get_markeredgecolor(), colors[i])\n            assert same_color(line.get_markerfacecolor(), colors[i])"},{"col":4,"comment":"null","endLoc":205,"header":"def test_despine_with_offset_specific_axes(self)","id":2691,"name":"test_despine_with_offset_specific_axes","nodeType":"Function","startLoc":193,"text":"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"},{"col":4,"comment":"null","endLoc":62,"header":"def test_palette_size(self)","id":2692,"name":"test_palette_size","nodeType":"Function","startLoc":47,"text":"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"},{"col":4,"comment":"null","endLoc":380,"header":"@property\n    def neff(self)","id":2693,"name":"neff","nodeType":"Function","startLoc":374,"text":"@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"},{"col":4,"comment":"Rich display of the color palette in an HTML frontend.","endLoc":91,"header":"def _repr_html_(self)","id":2694,"name":"_repr_html_","nodeType":"Function","startLoc":80,"text":"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"},{"attributeType":"function","col":4,"comment":"null","endLoc":268,"id":2695,"name":"__call__","nodeType":"Attribute","startLoc":268,"text":"__call__"},{"attributeType":"function","col":4,"comment":"null","endLoc":291,"id":2696,"name":"covariance_factor","nodeType":"Attribute","startLoc":291,"text":"covariance_factor"},{"attributeType":"null","col":4,"comment":"null","endLoc":292,"id":2697,"name":"__doc__","nodeType":"Attribute","startLoc":292,"text":"covariance_factor.__doc__"},{"className":"Environment","col":0,"comment":"The core component of Jinja is the `Environment`.  It contains\n    important shared variables like configuration, filters, tests,\n    globals and others.  Instances of this class may be modified if\n    they are not shared and if no template was loaded so far.\n    Modifications on environments after the first template was loaded\n    will lead to surprising effects and undefined behavior.\n\n    Here are the possible initialization parameters:\n\n        `block_start_string`\n            The string marking the beginning of a block.  Defaults to ``'{%'``.\n\n        `block_end_string`\n            The string marking the end of a block.  Defaults to ``'%}'``.\n\n        `variable_start_string`\n            The string marking the beginning of a print statement.\n            Defaults to ``'{{'``.\n\n        `variable_end_string`\n            The string marking the end of a print statement.  Defaults to\n            ``'}}'``.\n\n        `comment_start_string`\n            The string marking the beginning of a comment.  Defaults to ``'{#'``.\n\n        `comment_end_string`\n            The string marking the end of a comment.  Defaults to ``'#}'``.\n\n        `line_statement_prefix`\n            If given and a string, this will be used as prefix for line based\n            statements.  See also :ref:`line-statements`.\n\n        `line_comment_prefix`\n            If given and a string, this will be used as prefix for line based\n            comments.  See also :ref:`line-statements`.\n\n            .. versionadded:: 2.2\n\n        `trim_blocks`\n            If this is set to ``True`` the first newline after a block is\n            removed (block, not variable tag!).  Defaults to `False`.\n\n        `lstrip_blocks`\n            If this is set to ``True`` leading spaces and tabs are stripped\n            from the start of a line to a block.  Defaults to `False`.\n\n        `newline_sequence`\n            The sequence that starts a newline.  Must be one of ``'\\r'``,\n            ``'\\n'`` or ``'\\r\\n'``.  The default is ``'\\n'`` which is a\n            useful default for Linux and OS X systems as well as web\n            applications.\n\n        `keep_trailing_newline`\n            Preserve the trailing newline when rendering templates.\n            The default is ``False``, which causes a single newline,\n            if present, to be stripped from the end of the template.\n\n            .. versionadded:: 2.7\n\n        `extensions`\n            List of Jinja extensions to use.  This can either be import paths\n            as strings or extension classes.  For more information have a\n            look at :ref:`the extensions documentation `.\n\n        `optimized`\n            should the optimizer be enabled?  Default is ``True``.\n\n        `undefined`\n            :class:`Undefined` or a subclass of it that is used to represent\n            undefined values in the template.\n\n        `finalize`\n            A callable that can be used to process the result of a variable\n            expression before it is output.  For example one can convert\n            ``None`` implicitly into an empty string here.\n\n        `autoescape`\n            If set to ``True`` the XML/HTML autoescaping feature is enabled by\n            default.  For more details about autoescaping see\n            :class:`~markupsafe.Markup`.  As of Jinja 2.4 this can also\n            be a callable that is passed the template name and has to\n            return ``True`` or ``False`` depending on autoescape should be\n            enabled by default.\n\n            .. versionchanged:: 2.4\n               `autoescape` can now be a function\n\n        `loader`\n            The template loader for this environment.\n\n        `cache_size`\n            The size of the cache.  Per default this is ``400`` which means\n            that if more than 400 templates are loaded the loader will clean\n            out the least recently used template.  If the cache size is set to\n            ``0`` templates are recompiled all the time, if the cache size is\n            ``-1`` the cache will not be cleaned.\n\n            .. versionchanged:: 2.8\n               The cache size was increased to 400 from a low 50.\n\n        `auto_reload`\n            Some loaders load templates from locations where the template\n            sources may change (ie: file system or database).  If\n            ``auto_reload`` is set to ``True`` (default) every time a template is\n            requested the loader checks if the source changed and if yes, it\n            will reload the template.  For higher performance it's possible to\n            disable that.\n\n        `bytecode_cache`\n            If set to a bytecode cache object, this object will provide a\n            cache for the internal Jinja bytecode so that templates don't\n            have to be parsed if they were not changed.\n\n            See :ref:`bytecode-cache` for more information.\n\n        `enable_async`\n            If set to true this enables async template execution which allows\n            you to take advantage of newer Python features.  This requires\n            Python 3.6 or later.\n    ","endLoc":947,"id":2698,"nodeType":"Class","startLoc":141,"text":"class Environment(object):\n    r\"\"\"The core component of Jinja is the `Environment`.  It contains\n    important shared variables like configuration, filters, tests,\n    globals and others.  Instances of this class may be modified if\n    they are not shared and if no template was loaded so far.\n    Modifications on environments after the first template was loaded\n    will lead to surprising effects and undefined behavior.\n\n    Here are the possible initialization parameters:\n\n        `block_start_string`\n            The string marking the beginning of a block.  Defaults to ``'{%'``.\n\n        `block_end_string`\n            The string marking the end of a block.  Defaults to ``'%}'``.\n\n        `variable_start_string`\n            The string marking the beginning of a print statement.\n            Defaults to ``'{{'``.\n\n        `variable_end_string`\n            The string marking the end of a print statement.  Defaults to\n            ``'}}'``.\n\n        `comment_start_string`\n            The string marking the beginning of a comment.  Defaults to ``'{#'``.\n\n        `comment_end_string`\n            The string marking the end of a comment.  Defaults to ``'#}'``.\n\n        `line_statement_prefix`\n            If given and a string, this will be used as prefix for line based\n            statements.  See also :ref:`line-statements`.\n\n        `line_comment_prefix`\n            If given and a string, this will be used as prefix for line based\n            comments.  See also :ref:`line-statements`.\n\n            .. versionadded:: 2.2\n\n        `trim_blocks`\n            If this is set to ``True`` the first newline after a block is\n            removed (block, not variable tag!).  Defaults to `False`.\n\n        `lstrip_blocks`\n            If this is set to ``True`` leading spaces and tabs are stripped\n            from the start of a line to a block.  Defaults to `False`.\n\n        `newline_sequence`\n            The sequence that starts a newline.  Must be one of ``'\\r'``,\n            ``'\\n'`` or ``'\\r\\n'``.  The default is ``'\\n'`` which is a\n            useful default for Linux and OS X systems as well as web\n            applications.\n\n        `keep_trailing_newline`\n            Preserve the trailing newline when rendering templates.\n            The default is ``False``, which causes a single newline,\n            if present, to be stripped from the end of the template.\n\n            .. versionadded:: 2.7\n\n        `extensions`\n            List of Jinja extensions to use.  This can either be import paths\n            as strings or extension classes.  For more information have a\n            look at :ref:`the extensions documentation `.\n\n        `optimized`\n            should the optimizer be enabled?  Default is ``True``.\n\n        `undefined`\n            :class:`Undefined` or a subclass of it that is used to represent\n            undefined values in the template.\n\n        `finalize`\n            A callable that can be used to process the result of a variable\n            expression before it is output.  For example one can convert\n            ``None`` implicitly into an empty string here.\n\n        `autoescape`\n            If set to ``True`` the XML/HTML autoescaping feature is enabled by\n            default.  For more details about autoescaping see\n            :class:`~markupsafe.Markup`.  As of Jinja 2.4 this can also\n            be a callable that is passed the template name and has to\n            return ``True`` or ``False`` depending on autoescape should be\n            enabled by default.\n\n            .. versionchanged:: 2.4\n               `autoescape` can now be a function\n\n        `loader`\n            The template loader for this environment.\n\n        `cache_size`\n            The size of the cache.  Per default this is ``400`` which means\n            that if more than 400 templates are loaded the loader will clean\n            out the least recently used template.  If the cache size is set to\n            ``0`` templates are recompiled all the time, if the cache size is\n            ``-1`` the cache will not be cleaned.\n\n            .. versionchanged:: 2.8\n               The cache size was increased to 400 from a low 50.\n\n        `auto_reload`\n            Some loaders load templates from locations where the template\n            sources may change (ie: file system or database).  If\n            ``auto_reload`` is set to ``True`` (default) every time a template is\n            requested the loader checks if the source changed and if yes, it\n            will reload the template.  For higher performance it's possible to\n            disable that.\n\n        `bytecode_cache`\n            If set to a bytecode cache object, this object will provide a\n            cache for the internal Jinja bytecode so that templates don't\n            have to be parsed if they were not changed.\n\n            See :ref:`bytecode-cache` for more information.\n\n        `enable_async`\n            If set to true this enables async template execution which allows\n            you to take advantage of newer Python features.  This requires\n            Python 3.6 or later.\n    \"\"\"\n\n    #: if this environment is sandboxed.  Modifying this variable won't make\n    #: the environment sandboxed though.  For a real sandboxed environment\n    #: have a look at jinja2.sandbox.  This flag alone controls the code\n    #: generation by the compiler.\n    sandboxed = False\n\n    #: True if the environment is just an overlay\n    overlayed = False\n\n    #: the environment this environment is linked to if it is an overlay\n    linked_to = None\n\n    #: shared environments have this set to `True`.  A shared environment\n    #: must not be modified\n    shared = False\n\n    #: the class that is used for code generation.  See\n    #: :class:`~jinja2.compiler.CodeGenerator` for more information.\n    code_generator_class = CodeGenerator\n\n    #: the context class thatis used for templates.  See\n    #: :class:`~jinja2.runtime.Context` for more information.\n    context_class = Context\n\n    def __init__(\n        self,\n        block_start_string=BLOCK_START_STRING,\n        block_end_string=BLOCK_END_STRING,\n        variable_start_string=VARIABLE_START_STRING,\n        variable_end_string=VARIABLE_END_STRING,\n        comment_start_string=COMMENT_START_STRING,\n        comment_end_string=COMMENT_END_STRING,\n        line_statement_prefix=LINE_STATEMENT_PREFIX,\n        line_comment_prefix=LINE_COMMENT_PREFIX,\n        trim_blocks=TRIM_BLOCKS,\n        lstrip_blocks=LSTRIP_BLOCKS,\n        newline_sequence=NEWLINE_SEQUENCE,\n        keep_trailing_newline=KEEP_TRAILING_NEWLINE,\n        extensions=(),\n        optimized=True,\n        undefined=Undefined,\n        finalize=None,\n        autoescape=False,\n        loader=None,\n        cache_size=400,\n        auto_reload=True,\n        bytecode_cache=None,\n        enable_async=False,\n    ):\n        # !!Important notice!!\n        #   The constructor accepts quite a few arguments that should be\n        #   passed by keyword rather than position.  However it's important to\n        #   not change the order of arguments because it's used at least\n        #   internally in those cases:\n        #       -   spontaneous environments (i18n extension and Template)\n        #       -   unittests\n        #   If parameter changes are required only add parameters at the end\n        #   and don't change the arguments (or the defaults!) of the arguments\n        #   existing already.\n\n        # lexer / parser information\n        self.block_start_string = block_start_string\n        self.block_end_string = block_end_string\n        self.variable_start_string = variable_start_string\n        self.variable_end_string = variable_end_string\n        self.comment_start_string = comment_start_string\n        self.comment_end_string = comment_end_string\n        self.line_statement_prefix = line_statement_prefix\n        self.line_comment_prefix = line_comment_prefix\n        self.trim_blocks = trim_blocks\n        self.lstrip_blocks = lstrip_blocks\n        self.newline_sequence = newline_sequence\n        self.keep_trailing_newline = keep_trailing_newline\n\n        # runtime information\n        self.undefined = undefined\n        self.optimized = optimized\n        self.finalize = finalize\n        self.autoescape = autoescape\n\n        # defaults\n        self.filters = DEFAULT_FILTERS.copy()\n        self.tests = DEFAULT_TESTS.copy()\n        self.globals = DEFAULT_NAMESPACE.copy()\n\n        # set the loader provided\n        self.loader = loader\n        self.cache = create_cache(cache_size)\n        self.bytecode_cache = bytecode_cache\n        self.auto_reload = auto_reload\n\n        # configurable policies\n        self.policies = DEFAULT_POLICIES.copy()\n\n        # load extensions\n        self.extensions = load_extensions(self, extensions)\n\n        self.enable_async = enable_async\n        self.is_async = self.enable_async and have_async_gen\n        if self.is_async:\n            # runs patch_all() to enable async support\n            from . import asyncsupport  # noqa: F401\n\n        _environment_sanity_check(self)\n\n    def add_extension(self, extension):\n        \"\"\"Adds an extension after the environment was created.\n\n        .. versionadded:: 2.5\n        \"\"\"\n        self.extensions.update(load_extensions(self, [extension]))\n\n    def extend(self, **attributes):\n        \"\"\"Add the items to the instance of the environment if they do not exist\n        yet.  This is used by :ref:`extensions ` to register\n        callbacks and configuration values without breaking inheritance.\n        \"\"\"\n        for key, value in iteritems(attributes):\n            if not hasattr(self, key):\n                setattr(self, key, value)\n\n    def overlay(\n        self,\n        block_start_string=missing,\n        block_end_string=missing,\n        variable_start_string=missing,\n        variable_end_string=missing,\n        comment_start_string=missing,\n        comment_end_string=missing,\n        line_statement_prefix=missing,\n        line_comment_prefix=missing,\n        trim_blocks=missing,\n        lstrip_blocks=missing,\n        extensions=missing,\n        optimized=missing,\n        undefined=missing,\n        finalize=missing,\n        autoescape=missing,\n        loader=missing,\n        cache_size=missing,\n        auto_reload=missing,\n        bytecode_cache=missing,\n    ):\n        \"\"\"Create a new overlay environment that shares all the data with the\n        current environment except for cache and the overridden attributes.\n        Extensions cannot be removed for an overlayed environment.  An overlayed\n        environment automatically gets all the extensions of the environment it\n        is linked to plus optional extra extensions.\n\n        Creating overlays should happen after the initial environment was set\n        up completely.  Not all attributes are truly linked, some are just\n        copied over so modifications on the original environment may not shine\n        through.\n        \"\"\"\n        args = dict(locals())\n        del args[\"self\"], args[\"cache_size\"], args[\"extensions\"]\n\n        rv = object.__new__(self.__class__)\n        rv.__dict__.update(self.__dict__)\n        rv.overlayed = True\n        rv.linked_to = self\n\n        for key, value in iteritems(args):\n            if value is not missing:\n                setattr(rv, key, value)\n\n        if cache_size is not missing:\n            rv.cache = create_cache(cache_size)\n        else:\n            rv.cache = copy_cache(self.cache)\n\n        rv.extensions = {}\n        for key, value in iteritems(self.extensions):\n            rv.extensions[key] = value.bind(rv)\n        if extensions is not missing:\n            rv.extensions.update(load_extensions(rv, extensions))\n\n        return _environment_sanity_check(rv)\n\n    lexer = property(get_lexer, doc=\"The lexer for this environment.\")\n\n    def iter_extensions(self):\n        \"\"\"Iterates over the extensions by priority.\"\"\"\n        return iter(sorted(self.extensions.values(), key=lambda x: x.priority))\n\n    def getitem(self, obj, argument):\n        \"\"\"Get an item or attribute of an object but prefer the item.\"\"\"\n        try:\n            return obj[argument]\n        except (AttributeError, TypeError, LookupError):\n            if isinstance(argument, string_types):\n                try:\n                    attr = str(argument)\n                except Exception:\n                    pass\n                else:\n                    try:\n                        return getattr(obj, attr)\n                    except AttributeError:\n                        pass\n            return self.undefined(obj=obj, name=argument)\n\n    def getattr(self, obj, attribute):\n        \"\"\"Get an item or attribute of an object but prefer the attribute.\n        Unlike :meth:`getitem` the attribute *must* be a bytestring.\n        \"\"\"\n        try:\n            return getattr(obj, attribute)\n        except AttributeError:\n            pass\n        try:\n            return obj[attribute]\n        except (TypeError, LookupError, AttributeError):\n            return self.undefined(obj=obj, name=attribute)\n\n    def call_filter(\n        self, name, value, args=None, kwargs=None, context=None, eval_ctx=None\n    ):\n        \"\"\"Invokes a filter on a value the same way the compiler does it.\n\n        Note that on Python 3 this might return a coroutine in case the\n        filter is running from an environment in async mode and the filter\n        supports async execution.  It's your responsibility to await this\n        if needed.\n\n        .. versionadded:: 2.7\n        \"\"\"\n        func = self.filters.get(name)\n        if func is None:\n            fail_for_missing_callable(\"no filter named %r\", name)\n        args = [value] + list(args or ())\n        if getattr(func, \"contextfilter\", False) is True:\n            if context is None:\n                raise TemplateRuntimeError(\n                    \"Attempted to invoke context filter without context\"\n                )\n            args.insert(0, context)\n        elif getattr(func, \"evalcontextfilter\", False) is True:\n            if eval_ctx is None:\n                if context is not None:\n                    eval_ctx = context.eval_ctx\n                else:\n                    eval_ctx = EvalContext(self)\n            args.insert(0, eval_ctx)\n        elif getattr(func, \"environmentfilter\", False) is True:\n            args.insert(0, self)\n        return func(*args, **(kwargs or {}))\n\n    def call_test(self, name, value, args=None, kwargs=None):\n        \"\"\"Invokes a test on a value the same way the compiler does it.\n\n        .. versionadded:: 2.7\n        \"\"\"\n        func = self.tests.get(name)\n        if func is None:\n            fail_for_missing_callable(\"no test named %r\", name)\n        return func(value, *(args or ()), **(kwargs or {}))\n\n    @internalcode\n    def parse(self, source, name=None, filename=None):\n        \"\"\"Parse the sourcecode and return the abstract syntax tree.  This\n        tree of nodes is used by the compiler to convert the template into\n        executable source- or bytecode.  This is useful for debugging or to\n        extract information from templates.\n\n        If you are :ref:`developing Jinja extensions `\n        this gives you a good overview of the node tree generated.\n        \"\"\"\n        try:\n            return self._parse(source, name, filename)\n        except TemplateSyntaxError:\n            self.handle_exception(source=source)\n\n    def _parse(self, source, name, filename):\n        \"\"\"Internal parsing function used by `parse` and `compile`.\"\"\"\n        return Parser(self, source, name, encode_filename(filename)).parse()\n\n    def lex(self, source, name=None, filename=None):\n        \"\"\"Lex the given sourcecode and return a generator that yields\n        tokens as tuples in the form ``(lineno, token_type, value)``.\n        This can be useful for :ref:`extension development `\n        and debugging templates.\n\n        This does not perform preprocessing.  If you want the preprocessing\n        of the extensions to be applied you have to filter source through\n        the :meth:`preprocess` method.\n        \"\"\"\n        source = text_type(source)\n        try:\n            return self.lexer.tokeniter(source, name, filename)\n        except TemplateSyntaxError:\n            self.handle_exception(source=source)\n\n    def preprocess(self, source, name=None, filename=None):\n        \"\"\"Preprocesses the source with all extensions.  This is automatically\n        called for all parsing and compiling methods but *not* for :meth:`lex`\n        because there you usually only want the actual source tokenized.\n        \"\"\"\n        return reduce(\n            lambda s, e: e.preprocess(s, name, filename),\n            self.iter_extensions(),\n            text_type(source),\n        )\n\n    def _tokenize(self, source, name, filename=None, state=None):\n        \"\"\"Called by the parser to do the preprocessing and filtering\n        for all the extensions.  Returns a :class:`~jinja2.lexer.TokenStream`.\n        \"\"\"\n        source = self.preprocess(source, name, filename)\n        stream = self.lexer.tokenize(source, name, filename, state)\n        for ext in self.iter_extensions():\n            stream = ext.filter_stream(stream)\n            if not isinstance(stream, TokenStream):\n                stream = TokenStream(stream, name, filename)\n        return stream\n\n    def _generate(self, source, name, filename, defer_init=False):\n        \"\"\"Internal hook that can be overridden to hook a different generate\n        method in.\n\n        .. versionadded:: 2.5\n        \"\"\"\n        return generate(\n            source,\n            self,\n            name,\n            filename,\n            defer_init=defer_init,\n            optimized=self.optimized,\n        )\n\n    def _compile(self, source, filename):\n        \"\"\"Internal hook that can be overridden to hook a different compile\n        method in.\n\n        .. versionadded:: 2.5\n        \"\"\"\n        return compile(source, filename, \"exec\")\n\n    @internalcode\n    def compile(self, source, name=None, filename=None, raw=False, defer_init=False):\n        \"\"\"Compile a node or template source code.  The `name` parameter is\n        the load name of the template after it was joined using\n        :meth:`join_path` if necessary, not the filename on the file system.\n        the `filename` parameter is the estimated filename of the template on\n        the file system.  If the template came from a database or memory this\n        can be omitted.\n\n        The return value of this method is a python code object.  If the `raw`\n        parameter is `True` the return value will be a string with python\n        code equivalent to the bytecode returned otherwise.  This method is\n        mainly used internally.\n\n        `defer_init` is use internally to aid the module code generator.  This\n        causes the generated code to be able to import without the global\n        environment variable to be set.\n\n        .. versionadded:: 2.4\n           `defer_init` parameter added.\n        \"\"\"\n        source_hint = None\n        try:\n            if isinstance(source, string_types):\n                source_hint = source\n                source = self._parse(source, name, filename)\n            source = self._generate(source, name, filename, defer_init=defer_init)\n            if raw:\n                return source\n            if filename is None:\n                filename = \"