python - 需要找到黑点

标签 python pandas numpy scipy

我有一个带有 x 和 y 的二维数组。我需要提取图表上显示的黑点。 点是突然增加之前。 我还粘贴了 x、y 的数据。

有人知道如何得到这一点吗?

x = [50,30,40,40,60,70,80,90,100,110,120,130,140,160,170,180,200,210,220,240,250,270,280,300,320,340,350,370,390,410,430,450,470,490,510,530,550,570,590,610,620,650,670,690,710,730,760,780,800,820,840,860,890,910,930,950,980,1000,1020,1040,1060,1090,1110,1130,1150,1170,1200,1220,1240,1260,1280,1300,1320,1340,1360,1380,1400,1420,1440,1460,1480,1500,1510,1530,1550,1570,1590,1600,1620,1630,1650,1660,1680,1690,1710,1720,1730,1740,1760,1770,1780,1790,1800,1810,1820,1830,1830,1840,1850,1860,1860,1870,1880,1880,1890,1890,1890,1900,1900,1900,1910,1910,1910,1910,1910,1910,1910,1910,1910,1900,1900,1900,1900,1890,1890,1890,1880,1880,1870,1870,1860,1850,1850,1840,1830,1830,1820,1810,1800,1800,1790,1780,1770,1760,1750,1740,1720,1710,1700,1690,1680,1660,1650,1640,1630,1610,1600,1590,1570,1550,1540,1520,1510,1490,1470,1460,1440,1420,1410,1390,1370,1350,1330,1310,1240,1290,1280,1250,1220,1200,1180,1160,1140,1110,1090,1070,1050,1030,1010,980,960,940,920,890,870,850,820,810,780,760,740,710,690,670,640,620,600,580,560,530,510,490,460,440,420,400,380,360,340,320,300,280,260,250,230,210,200,180,170,150,140,130,110,100,90,80,70,60,50,40,40,30,20,20,20,10,10,10,10,0,0,0,0,10,10,10,20,20,30]

y = [3220,3160,3180,3200,3230,3250,3270,3290,3300,3320,3340,3360,3390,3440,3480,3500,3520,3550,3580,3610,3640,3670,3710,3740,3780,3840,3880,3910,3950,4000,4050,4090,4140,4190,4250,4310,4390,4440,4490,4540,4600,4600,4590,4560,4540,4510,4470,4440,4420,4400,4390,4360,4370,4390,4410,4420,4450,4470,4490,4500,4500,4500,4510,4500,4490,4470,4450,4430,4400,4390,4380,4380,4390,4390,4390,4410,4420,4430,4440,4460,4470,4470,4470,4460,4450,4440,4430,4410,4400,4390,4360,4340,4350,4350,4360,4370,4380,4400,4410,4420,4440,4450,4460,4460,4450,4440,4430,4410,4400,4380,4370,4360,4360,4350,4360,4370,4380,4400,4420,4420,4390,4370,4360,4350,4340,4330,4300,4290,4290,4300,4290,4260,4230,4200,4160,4150,4140,4140,4110,4100,4090,4070,4040,4010,3990,3950,3920,3910,3900,3870,3850,3830,3780,3740,3680,3630,3590,3560,3520,3470,3430,3380,3330,3270,3220,3160,3110,3070,3030,2970,2920,2870,2870,2890,2920,2940,2980,3000,3010,3020,3030,3040,3050,3040,2940,3020,3000,2970,2920,2920,2920,2920,2910,2910,2920,2930,2950,2970,2990,3010,3010,3010,3000,3000,3000,2990,2970,2950,2930,2910,2890,2890,2900,2910,2920,2920,2930,2950,2960,2990,3010,3030,3030,3020,3010,3000,2990,2980,2970,2970,2960,2950,2950,2950,2960,2970,2990,3010,3020,3040,3040,3050,3060,3070,3070,3060,3050,3040,3030,3020,3020,3010,3010,3010,3010,3020,3020,3030,3050,3060,3080,3120,3160,3170,3170,3160,3160,3160,3170]

更多数据:

x1 = [40,30,30,30,40,50,50,50,60,60,70,70,80,80,90,90,100,100,110,120,120,130,140,140,150,160,160,170,180,190,190,200,210,220,220,230,240,250,260,260,270,280,290,300,310,310,320,330,340,350,350,360,370,380,390,400,410,420,430,430,440,450,460,470,480,490,500,510,510,520,530,540,550,560,570,580,580,590,600,610,620,630,630,640,650,660,670,670,680,690,700,700,710,710,720,730,730,740,750,750,760,760,770,780,780,790,790,800,810,810,820,820,820,830,830,840,840,850,850,850,860,860,860,870,870,870,880,880,880,880,890,890,890,890,890,890,890,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,900,890,890,890,890,890,890,890,880,880,880,880,880,870,870,870,860,870,860,860,850,850,850,840,840,840,830,830,820,820,820,810,810,800,800,790,790,780,780,770,770,760,760,750,740,740,730,730,720,720,710,700,700,700,690,680,680,670,660,660,650,640,640,630,620,620,610,600,590,590,580,570,560,560,550,540,530,520,520,510,500,490,480,470,470,460,450,440,430,420,410,400,400,390,380,370,360,350,350,340,330,320,310,310,300,290,280,270,260,260,250,240,230,220,220,210,200,190,180,180,170,160,150,150,140,130,130,120,110,110,100,90,90,80,80,70,70,60,60,50,50,40,40,40,30,30,30,20,20,20,20,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,20,20,20,20]
y1 = [110,2070,2080,2090,2090,2130,2140,2160,2170,2200,2220,2240,2270,2300,2320,2320,2310,2280,2270,2260,2240,2220,2220,2240,2250,2270,2280,2300,2300,2310,2310,2290,2270,2250,2250,2240,2240,2240,2250,2270,2280,2290,2300,2300,2300,2280,2280,2260,2250,2250,2250,2250,2260,2270,2280,2290,2300,2300,2300,2290,2280,2280,2270,2260,2270,2270,2270,2280,2290,2300,2310,2310,2300,2300,2300,2290,2280,2280,2280,2280,2290,2290,2300,2300,2310,2310,2310,2300,2300,2290,2290,2280,2280,2280,2290,2290,2290,2300,2300,2300,2300,2300,2300,2290,2290,2280,2290,2280,2280,2280,2290,2300,2300,2300,2290,2300,2290,2290,2280,2280,2280,2280,2290,2290,2290,2290,2290,2290,2290,2290,2290,2290,2290,2280,2280,2280,2280,2280,2280,2280,2280,2290,2280,2280,2280,2280,2270,2240,2230,2230,2220,2220,2220,2220,2220,2220,2220,2220,2220,2220,2220,2220,2220,2210,2210,2210,2210,2210,2200,2200,2200,2200,2200,2200,2200,2200,2200,2200,2200,2200,2200,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2190,2180,2180,2180,2180,2180,2180,2180,2180,2180,2180,2180,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2160,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2170,2060,2030,2040,1990,1990,1980,1990,1960,1900,1920,1900,1900,1900,1910,1910,1880,1880,1880,1880,1880,1890,1890,1900,1930,1960,1970,1980,1990,2000,2000,2010,2020,2030,2040,2050,2060,2070,2080]

x2 = [30,20,30,30,40,40,50,50,60,60,70,70,80,90,90,100,110,110,120,130,140,140,150,160,170,180,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400,410,420,440,450,460,470,480,490,510,520,530,540,550,560,580,590,600,610,620,640,650,660,670,680,700,700,710,730,740,750,760,770,780,790,810,820,830,840,850,860,870,880,890,900,910,920,930,940,950,960,970,980,980,990,1000,1010,1020,1030,1030,1040,1050,1060,1060,1060,1070,1080,1080,1090,1090,1100,1110,1110,1120,1120,1130,1130,1130,1140,1140,1140,1150,1150,1150,1160,1160,1160,1160,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1170,1160,1160,1160,1160,1160,1160,1150,1150,1150,1150,1140,1140,1140,1130,1130,1130,1120,1120,1100,1120,1110,1110,1100,1090,1090,1080,1080,1080,1070,1070,1060,1060,1050,1050,1040,1040,1030,1030,1020,1010,1010,1000,990,990,980,970,970,960,950,940,940,930,920,910,910,900,890,880,870,870,860,850,840,830,820,810,800,800,790,780,770,760,750,740,730,720,710,700,690,680,670,660,650,640,630,620,600,590,580,570,560,550,540,530,510,500,490,480,470,460,450,430,420,410,400,390,380,370,350,350,340,320,310,300,290,280,270,260,250,240,230,220,210,200,190,180,170,160,150,140,140,130,120,110,100,100,90,80,80,70,60,60,50,50,40,40,30,30,20,20,20,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,20,20]
y2 = [2450,2410,2420,2430,2470,2490,2510,2530,2560,2570,2600,2630,2650,2680,2680,2670,2670,2660,2650,2650,2640,2630,2630,2640,2640,2650,2650,2660,2670,2670,2670,2670,2660,2660,2660,2650,2650,2650,2650,2650,2660,2660,2670,2670,2680,2680,2680,2680,2680,2680,2680,2680,2680,2680,2680,2680,2680,2690,2690,2690,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2690,2690,2690,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2710,2710,2710,2710,2710,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2700,2690,2690,2690,2690,2690,2690,2680,2680,2680,2680,2680,2670,2670,2670,2670,2670,2670,2670,2670,2660,2660,2660,2650,2650,2650,2650,2650,2650,2650,2640,2640,2640,2640,2630,2630,2630,2620,2620,2620,2600,2560,2540,2530,2520,2510,2510,2500,2490,2480,2470,2460,2450,2440,2430,2430,2410,2400,2380,2370,2360,2340,2330,2310,2300,2280,2260,2250,2250,2250,2250,2260,2260,2260,2270,2270,2260,2250,2250,2250,2240,2240,2240,2240,2240,2240,2240,2230,2240,2240,2240,2230,2220,2220,2220,2220,2210,2210,2210,2210,2210,2200,2200,2200,2200,2200,2200,2200,2200,2200,2200,2190,2190,2190,2190,2190,2190,2190,2180,2190,2180,2180,2180,2170,2170,2170,2170,2170,2160,2160,2160,2160,2150,2150,2140,2140,2140,2140,2140,2140,2140,2130,2130,2130,2130,2120,2120,2120,2120,2120,2120,2120,2120,2120,2120,2120,2130,2120,2120,2130,2120,2130,2130,2130,2130,2130,2130,2130,2130,2130,2140,2140,2140,2140,2140,2140,2140,2140,2140,2140,2150,2150,2150,2150,2160,2160,2160,2170,2170,2170,2170,2170,2180,2180,2180,2180,2190,2190,2190,2190,2200,2200,2200,2210,2210,2210,2220,2220,2230,2230,2240,2260,2300,2300,2320,2320,2330,2340,2350,2360,2380,2390,2400,2410]

x3 = [60,30,40,40,50,70,90,100,110,130,140,160,180,200,210,230,250,270,290,310,330,350,370,400,420,440,470,490,520,540,560,590,620,640,670,690,710,740,770,790,820,850,870,900,920,950,980,1000,1030,1050,1070,1100,1120,1150,1170,1190,1220,1240,1260,1280,1300,1320,1340,1360,1380,1400,1410,1430,1440,1450,1470,1480,1490,1500,1510,1520,1530,1540,1540,1550,1550,1560,1560,1560,1570,1570,1570,1570,1570,1560,1560,1560,1560,1550,1550,1550,1540,1540,1530,1530,1520,1510,1510,1500,1490,1480,1470,1460,1460,1450,1440,1420,1410,1410,1390,1380,1370,1360,1340,1330,1320,1300,1290,1270,1260,1240,1220,1210,1190,1170,1150,1130,1120,1100,1080,1060,1040,1020,1000,970,950,930,900,880,850,830,800,780,750,720,620,700,670,640,590,560,530,500,470,440,410,380,360,340,310,280,260,240,210,190,170,150,130,110,100,80,70,50,40,30,20,20,10,10,0,0,0,0,0,0,0,10,10,20]
y3 = [2550,2470,2480,2490,2520,2610,2680,2720,2780,2770,2760,2730,2710,2660,2620,2600,2570,2580,2590,2630,2640,2670,2680,2690,2700,2690,2670,2640,2630,2610,2610,2600,2610,2610,2640,2650,2660,2670,2660,2660,2640,2630,2600,2590,2580,2580,2580,2590,2600,2610,2630,2640,2640,2640,2630,2610,2600,2580,2570,2570,2570,2570,2580,2570,2570,2570,2580,2570,2560,2550,2550,2560,2570,2560,2550,2560,2560,2570,2570,2570,2560,2560,2570,2570,2570,2560,2570,2570,2550,2520,2520,2520,2520,2520,2530,2490,2470,2470,2460,2440,2430,2410,2410,2400,2360,2310,2280,2250,2230,2220,2230,2230,2270,2310,2320,2340,2350,2340,2330,2320,2280,2250,2230,2220,2220,2230,2240,2250,2290,2310,2330,2320,2330,2310,2290,2270,2250,2220,2200,2210,2210,2230,2240,2280,2290,2300,2320,2310,2310,2280,2230,2270,2240,2240,2230,2230,2240,2270,2270,2290,2290,2340,2360,2360,2350,2330,2340,2350,2370,2340,2310,2310,2340,2360,2370,2370,2360,2380,2410,2430,2410,2390,2380,2380,2390,2380,2360,2330,2370,2410,2420,2430,2420,2430]

x、y 的图像 enter image description here

x1、y1 的图像 enter image description here

x2、y2 的图像 Image for x2, y2

x3、y3 的图像 enter image description here

最佳答案

min(zip(y, x))

这将产生具有最小 y 坐标的点的 yx 坐标。

关于python - 需要找到黑点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72376652/

相关文章:

python - 强制数组中非零元素之间的最小间距

python - Numpy.unique - 获得深度一致的输出

python - 将 CSV 文件的内容转换为字典

python - 值错误 : NULL COM pointer access

Python gekko 方程定义中的换行符

python-3.x - 如何在 Debian Buster 上安装 pandas 和 numpy?

python - 加速 Pandas cummin/cummax

python - 如何从输入音频流中提取频率信息(使用 PortAudio)?

python - Numpy 和 Pandas - 用零填充 reshape

python - float64 与 Pandas to_csv