Large Datsample: failing to better visualize data point using matplotlib plot - python

The size of the data samples is very large, making it difficult to visualise the data points using a matplotlib plot.
Sample Code:
import matplotlib.pyplot as plt
plt.plot(myList_timestamps, myList_fitnessValues)
plt.xlabel('Timestamps (seconds)')
#plt.xticks(range(1, 51)
#plt.xticks(range(1, 53, 5))
plt.ylabel('WATT - MSU Fitness Values')
plt.title('Evolutionary Optimization - Execution Time')
plt.show()
Output:
I have 9113 candidates solutions as data samples to plot against 9113 data samples as fitness values. How should I plot this large data using python to better visualize the data?
Data Sample:
myList_timestamps = [[0.06160092353820801,
0.07070684432983398,
0.0794517993927002,
0.08730483055114746,
0.09506797790527344,
0.10278487205505371,
0.11050796508789062,
0.11819696426391602,
0.12598776817321777,
0.13364410400390625,
0.1412339210510254,
0.14882898330688477,
0.15642499923706055,
0.16405892372131348,
0.171644926071167,
0.17924880981445312,
0.1868269443511963,
0.1943988800048828,
0.2020108699798584,
0.21060776710510254,
0.219498872756958,
0.22813701629638672,
0.23638296127319336,
0.24529194831848145,
0.25347185134887695,
0.26166296005249023,
0.2696189880371094,
0.2773740291595459,
0.2849307060241699,
0.2925240993499756,
0.30014586448669434,
0.3077728748321533,
0.31533288955688477,
0.32283592224121094,
0.3303370475769043,
0.3378570079803467,
0.34534668922424316,
0.352841854095459,
0.36031174659729004,
0.3678579330444336,
0.3753628730773926,
0.3828439712524414,
0.3903648853302002,
0.39795589447021484,
0.40547990798950195,
0.412992000579834,
0.42046594619750977,
0.42803382873535156,
0.435579776763916,
0.44308996200561523,
0.450577974319458,
0.45802807807922363,
0.4655318260192871,
0.4730229377746582,
0.48052191734313965,
0.488048791885376,
0.49558186531066895,
0.5031087398529053,
0.5106048583984375,
0.5181560516357422,
0.525662899017334,
0.5331556797027588,
0.5406389236450195,
0.5481007099151611,
0.5555720329284668,
0.563060998916626,
0.5705769062042236,
0.578115701675415,
0.5856177806854248,
0.5931298732757568,
0.6006178855895996,
0.6081528663635254,
0.6156718730926514,
0.6231448650360107,
0.6306188106536865,
0.6381428241729736,
0.6456358432769775,
0.6531088352203369,
0.6606647968292236,
0.6682088375091553,
0.6756858825683594,
0.6832168102264404,
0.6907000541687012,
0.6981749534606934,
0.7056229114532471,
0.7130780220031738,
0.7205479145050049,
0.728065013885498,
0.7355530261993408,
0.743027925491333,
0.7505538463592529,
0.7580459117889404,
0.7654819488525391,
0.7729947566986084,
0.7804989814758301,
0.7879579067230225,
0.7954659461975098,
0.8029458522796631,
0.8104219436645508,
0.8179588317871094,
0.8254818916320801,
0.8329558372497559,
0.840451717376709,
0.8479418754577637,
0.8554189205169678,
0.8629167079925537,
0.8704218864440918,
0.8782069683074951,
0.8857617378234863,
0.8933010101318359,
0.9008169174194336,
0.9083929061889648,
0.9159009456634521,
0.923414945602417,
0.9309487342834473,
0.9386038780212402,
0.9461567401885986,
0.9536347389221191,
0.9610898494720459,
0.9685368537902832,
0.9759769439697266,
0.983414888381958,
0.9908480644226074,
0.9982888698577881,
1.0057227611541748,
1.01314377784729,
1.0205698013305664,
1.0280189514160156,
1.035449743270874,
1.0429389476776123,
1.0503628253936768,
1.0578010082244873,
1.0658130645751953,
1.0734107494354248,
1.081054925918579,
1.0888869762420654,
1.0964579582214355,
1.1040010452270508,
1.1115117073059082,
1.1190118789672852,
1.1264939308166504,
1.1339750289916992,
1.141474723815918,
1.1489946842193604,
1.156526803970337,
1.164029836654663,
1.1716160774230957,
1.1790966987609863,
1.1865930557250977,
1.1940937042236328,
1.2019388675689697,
1.2094628810882568,
1.216930866241455,
1.2243878841400146,
1.2318336963653564,
1.2393128871917725,
1.2467608451843262,
1.2542097568511963,
1.2619950771331787,
1.2704198360443115,
1.2786128520965576,
1.2871167659759521,
1.2947309017181396,
1.302293062210083,
1.309783697128296,
1.3177897930145264,
1.3256456851959229,
1.3331577777862549,
1.340836763381958,
1.348417043685913,
1.355942964553833,
1.3635058403015137,
1.3709850311279297,
1.3785638809204102,
1.3860559463500977,
1.3935277462005615,
1.4009969234466553,
1.408479928970337,
1.415954828262329,
1.423440933227539,
1.4309158325195312,
1.4383947849273682,
1.4458889961242676,
1.453355073928833,
1.4608356952667236,
1.468317985534668,
1.4757959842681885,
1.4833028316497803,
1.4908149242401123,
1.4983007907867432,
1.505788803100586,
1.5132827758789062,
1.520780086517334,
1.5282917022705078,
1.5357389450073242,
1.5432488918304443,
1.5507168769836426,
1.5581979751586914,
1.565687656402588,
1.5731756687164307,
1.58066987991333,
1.5881669521331787,
1.5956358909606934,
1.6031649112701416,
1.6106679439544678,
1.6181929111480713,
1.6265389919281006,
1.634814977645874,
1.6424179077148438,
1.6499037742614746,
1.657348871231079,
1.6648588180541992,
1.6722848415374756,
1.6797456741333008,
1.6871848106384277,
1.6946487426757812,
1.7022688388824463,
1.7098469734191895,
1.7173528671264648,
1.724863052368164,
1.73232102394104,
1.7397880554199219,
1.7472498416900635,
1.7546827793121338,
1.762143850326538,
1.7696146965026855,
1.777108907699585,
1.7845828533172607,
1.7920348644256592,
1.7994859218597412,
1.806952953338623,
1.8144299983978271,
1.8218896389007568,
1.8293559551239014,
1.8368110656738281,
1.8442790508270264,
1.851726770401001,
1.8592119216918945,
1.86667799949646,
1.8741397857666016,
1.8815827369689941,
1.8890256881713867,
1.8964788913726807,
1.9039208889007568,
1.911383867263794,
1.918832778930664,
1.9262988567352295,
1.9337799549102783,
1.94124174118042,
1.948828935623169,
1.9562938213348389,
1.9637949466705322,
1.9712047576904297,
1.9786548614501953,
1.986097812652588,
1.9935338497161865,
2.000976800918579,
2.0084168910980225,
2.016091823577881,
2.023655891418457,
2.031132936477661,
2.038616895675659,
2.0460739135742188,
2.053546905517578,
2.060973882675171,
2.0684218406677246,
2.0758438110351562,
2.083289861679077,
2.0906968116760254,
2.0981409549713135,
2.1055638790130615,
2.1129748821258545,
2.1203808784484863,
2.1278228759765625,
2.1352219581604004,
2.1426548957824707,
2.1502327919006348,
2.1577627658843994,
2.165205955505371,
2.1726489067077637,
2.180156946182251,
2.1876187324523926,
2.195056915283203,
2.202542781829834,
2.210002899169922,
2.217458963394165,
2.2249059677124023,
2.232353925704956,
2.2398228645324707,
2.247271776199341,
2.2547237873077393,
2.262202739715576,
2.269657850265503,
2.277296781539917,
2.284979820251465,
2.2924628257751465,
2.2999508380889893,
2.3074228763580322,
2.3148908615112305,
2.3223717212677,
2.329817771911621,
2.3372578620910645,
2.34472393989563,
2.3521809577941895,
2.359632968902588,
2.367115020751953,
2.374567985534668,
2.382063865661621,
2.38950777053833,
2.3970019817352295,
2.404465913772583,
2.4119558334350586,
2.4194018840789795,
2.4268767833709717,
2.4343249797821045,
2.441788911819458,
2.4492337703704834,
2.45668888092041,
2.4641637802124023,
2.471620798110962,
2.479109764099121,
2.48657488822937,
2.494025945663452,
2.501471996307373,
2.508949041366577,
2.5164427757263184,
2.523920774459839,
2.531388998031616,
2.53886079788208,
2.5463309288024902,
2.5537829399108887,
2.5612847805023193,
2.568727731704712,
2.576223850250244,
2.583711862564087,
2.591172933578491,
2.598625898361206,
2.6060757637023926,
2.6135129928588867,
2.621011972427368,
2.628448963165283,
2.635972738265991,
2.643435001373291,
2.650902032852173,
2.6583468914031982,
2.665862798690796,
2.673314094543457,
2.680816888809204,
2.688267946243286,
2.6957550048828125,
2.7032127380371094,
2.7106738090515137,
2.7181079387664795,
2.725554943084717,
2.732996940612793,
2.740450859069824,
2.747886896133423,
2.7553389072418213,
2.7627639770507812,
2.7702107429504395,
2.777662992477417,
2.7851169109344482,
2.7925288677215576,
2.80000376701355,
2.8074288368225098,
2.8148789405822754,
2.8223319053649902,
2.8297858238220215,
2.8372128009796143,
2.84466290473938,
2.852128028869629,
2.85958194732666,
2.8670127391815186,
2.8744797706604004,
2.8819189071655273,
2.8893797397613525,
2.896803855895996,
2.9042470455169678,
2.911679983139038,
2.919153928756714,
2.9266068935394287,
2.9340579509735107,
2.9415018558502197,
2.9490177631378174,
2.9564428329467773,
2.9638688564300537,
2.9712448120117188,
2.9786460399627686,
2.986050844192505,
2.9934427738189697,
3.0008530616760254,
3.0082297325134277,
3.015631914138794,
3.023007869720459,
3.030390977859497,
3.0377516746520996,
3.04512882232666,
3.052503824234009,
3.0598559379577637,
3.067525863647461,
3.074979782104492,
3.082453966140747,
3.089857816696167,
3.0973098278045654,
3.104733943939209,
3.1121609210968018,
3.11958384513855,
3.1270148754119873,
3.1344220638275146,
3.141826868057251,
3.1492297649383545,
3.1566479206085205,
3.1641108989715576,
3.1720409393310547,
3.18062686920166,
3.188631772994995,
3.19647479057312,
3.2040579319000244,
3.211491823196411,
3.2189619541168213,
3.2264137268066406,
3.2338807582855225,
3.241302013397217,
3.248771905899048,
3.256213903427124,
3.263671875,
3.2710888385772705,
3.2785208225250244,
3.285946846008301,
3.293437957763672,
3.3010239601135254,
3.3086907863616943,
3.3162219524383545,
3.3237030506134033,
3.3311376571655273,
3.3386118412017822,
3.3460726737976074,
3.3535208702087402,
3.3609509468078613,
3.368414878845215,
3.3758559226989746,
3.3833189010620117,
3.3907477855682373,
3.3982179164886475,
3.405695915222168,
3.413137912750244,
3.420606851577759,
3.4280447959899902,
3.435490846633911,
3.4429378509521484,
3.4504079818725586,
3.4578518867492676,
3.4652678966522217,
3.4726951122283936,
3.4801628589630127,
3.4876327514648438,
3.4950459003448486,
3.502520799636841,
3.5099668502807617,
3.5174667835235596,
3.5249149799346924,
3.532382011413574,
3.5398058891296387,
3.547271966934204,
3.554724931716919,
3.5621488094329834,
3.5695910453796387,
3.5770299434661865,
3.5844788551330566,
3.5919089317321777,
3.599360942840576,
3.6068217754364014,
3.6142799854278564,
3.6217379570007324,
3.6291840076446533,
3.636641025543213,
3.6440939903259277,
3.651533842086792,
3.658979892730713,
3.6664540767669678,
3.67389178276062,
3.681334972381592,
3.688839912414551,
3.6963768005371094,
3.7038447856903076,
3.711305856704712,
3.718761920928955,
3.726195812225342,
3.7336368560791016,
3.741126775741577,
3.7485568523406982,
3.7559916973114014,
3.763450860977173,
3.770900011062622,
3.778341770172119,
3.785810947418213,
3.7932307720184326,
3.800668954849243,
3.808100938796997,
3.8155479431152344,
3.82303786277771,
3.8304550647735596,
3.8379018306732178,
3.845344066619873,
3.852766990661621,
3.860213041305542,
3.867640733718872,
3.8750839233398438,
3.8825418949127197,
3.8900070190429688,
3.897446870803833,
3.9049458503723145,
3.9123809337615967,
3.919834852218628,
3.927325963973999,
3.934762954711914,
3.9422247409820557,
3.9497127532958984,
3.957167863845825,
3.9645960330963135,
3.972066879272461,
3.9795138835906982,
3.9869298934936523,
3.9943947792053223,
4.001836776733398,
4.0092689990997314,
4.016718864440918,
4.0241899490356445,
4.031642913818359,
4.039106845855713,
4.046592950820923,
4.05404806137085,
4.061479806900024,
4.068920850753784,
4.076357841491699,
4.083805799484253,
4.0912556648254395,
4.098691701889038,
4.106162786483765,
4.1136109828948975,
4.121060848236084,
4.128498792648315,
4.135960817337036,
4.143415689468384,
4.15084171295166,
4.158272981643677,
4.16582989692688,
4.173282861709595,
4.180737733840942,
4.188170909881592,
4.195602893829346,
4.203077793121338,
4.210502862930298,
4.2179529666900635,
4.225406885147095,
4.232857704162598,
4.240309000015259,
4.247731924057007,
4.255206823348999,
4.262646913528442]
myList_fitnessValues = [1.177397872785327,
1.1838368070851042,
1.198426283830517,
1.1971495165606483,
1.1300637485336795,
1.2187992912454821,
1.2145353817939883,
1.0729413153620015,
1.2521284084941269,
1.2183068116189408,
1.195634989638366,
1.1613388860470966,
1.2217006054348303,
1.206234560770683,
1.2372446068751055,
1.187058775523,
1.1872546511295015,
1.1966112517544802,
1.2145107120984742,
1.2421864845871378,
1.1890153127520433,
1.1674951340729436,
1.2251505016710167,
1.1958552931582382,
1.2080607542394712,
1.201035514597457,
1.092659066061191,
1.2306418318602446,
1.1995437445068218,
1.2449192292367206,
1.2106208502011808,
1.2112721352650087,
1.1196669840676667,
1.1134332262454683,
1.1197768644022856,
1.2261263457543805,
1.231366828628176,
1.2196350828703688,
1.08741318320004,
1.2032137535738274,
1.2024228903569536,
1.2137572975032105,
1.0738592164216931,
1.1738526733756591,
1.1544974613440897,
1.160844467172908,
1.2187677280979918,
1.162505454897613,
1.2021549705530339,
1.229063908531223,
1.214924462090727,
1.1411833735549284,
1.1883797211741252,
1.1342311436728563,
1.2194421521815677,
1.1237953059433416,
1.185322478323287,
1.1688528378709393,
1.138039592406455,
1.1855580350049484,
1.2303222163698007,
1.2140360262028758,
1.09912727836326,
1.0982013456663848,
1.2074961979865895,
1.2130674992213648,
1.1064772919391566,
1.2183787053226458,
1.2387016873859218,
1.1316362444070998,
1.0955985789217237,
1.2295510887027803,
1.2321228706728062,
1.2291667095487586,
1.1943183790667353,
1.1806877475400122,
1.0821097661565597,
1.1885871916833606,
1.2287827776186633,
1.1245075536475073,
1.246567313324614,
1.1968924804246073,
1.2357189468661003,
1.0798212767853532,
1.210981845170037,
1.1949578119730175,
1.0745447494722138,
1.1842984199966768,
1.1885233082136473,
1.1404877293427729,
1.176750616683678,
1.2322331744279031,
1.2008328893267939,
1.1839763301938666,
1.1740540064695157,
1.1215709455350205,
1.1838699168837248,
1.2190806980658488,
1.2187178223617976,
1.188198435991883,
1.2420874742392598,
1.1936975325903234,
1.145645140863139,
1.1896439998849606,
1.0901724022621744,
1.2214054198855253,
1.202183913330283,
1.2214232388980968,
1.2451547757149166,
1.1542504637802762,
1.2150818383252948,
1.1551718106916113,
1.180265276583371,
1.2259447669065064,
1.23970172148869,
1.2195702465867029,
1.2121212076750423,
1.1196861951049026,
1.084233317578786,
1.2184195145467944,
1.2019297900082373,
1.2197546777584807,
1.1806877475400122,
1.1935874583246553,
1.1947324698675565,
1.1949174251388859,
1.1859323990481676,
1.0906342354229615,
1.1176255050944655,
1.1496417617749741,
1.214221309853014,
1.1871680736265695,
1.1915179673491303,
1.2025838867023781,
1.197499571598236,
1.1366803103334713,
1.2085395261620986,
1.211657983876409,
1.2119904284994945,
1.1499635839213362,
1.2048809684531807,
1.18988003425591,
1.162958419973022,
1.2117707427085584,
1.1243944753618493,
1.1744385678325748,
1.1903600159926122,
1.2016224458259388,
1.211296343777177,
1.1349759574949243,
1.0718396654449382,
1.1964735952940981,
1.2321228706728062,
1.240538488513929,
1.137008792662425,
1.118080518441783,
1.2179995323083854,
1.2332167673456187,
1.2299392260321718,
1.229455434517842,
1.0945646172721897,
1.1684574384092985,
1.2216592587636825,
1.1473954661560457,
1.0972316717042851,
1.2069927716927877,
1.145655054243576,
1.1709533542017871,
1.2399276594736448,
1.0571702762640665,
1.1289925835126173,
1.1978661608433139,
1.1751549861474675,
1.189320827332064,
1.114652077172573,
1.0855461561951376,
1.114545327811882,
1.213725567748654,
1.20353452440095,
1.1820774536021856,
1.186462718947463,
1.1889690769217898,
1.2018835746505774,
1.211090224753304,
1.1831781914671817,
1.1773466438721967,
1.197092394238814,
1.2041535500147282,
1.163132237400184,
1.168563226082197,
1.1678829662040073,
1.1363664937760698,
1.1083990267935506,
1.2031778809291547,
1.0676216251859287,
1.2177599264089978,
1.0990307312997643,
1.21049553896777,
1.1599270669137582,
1.2328076437831437,
1.0972099959852455,
1.2158413254752458,
1.1858591862647971,
1.160354488282236,
1.1885987402151457,
1.242744809392655,
1.180804379621974,
1.1948754664090295,
1.1999708176480794,
1.0863273779101585,
1.1865571118556641,
1.2247520706088966,
1.1902065318111597,
1.1769933798289114,
1.1908864309517615,
1.2057410331253477,
1.2364890730379687,
1.1663675183275037,
1.1088393200653563,
1.20706966917313,
1.2442896235721,
1.1069454133505705,
1.2628901213116968,
1.1207013243831028,
1.1582247278576716,
1.0708548471205084,
1.2155678255250282,
1.1986370029163065,
1.1459855041681286,
1.2054266674604792,
1.192257639008284,
1.197672089140054,
1.198202892392417,
1.1025040708024108,
1.121321746966252,
1.2149674581109837,
1.2123920496821512,
1.227103878165898,
1.189101851528379,
1.253525044950779,
1.2498189114548643,
1.173845452730351,
1.2083118238298576,
1.2030549929175092,
1.2271213348837007,
1.1478325884552891,
1.1960780932197772,
1.1902259956766275,
1.2467831992009593,
1.0792760733500293,
1.1869221700876043,
1.0824793309140637,
1.1955662830576248,
1.1080499423655457,
1.2006240107240815,
1.0880807583848786,
1.2157448455744477,
1.1521531149930204,
1.240280892270902,
1.1238415805874602,
1.1828435837181859,
1.1712592947196425,
1.2137283926841305,
1.2424701024482705,
1.2263538380098462,
1.2070290285031617,
1.1631224185724471,
1.0794787639871248,
1.093670630714558,
1.1265887464291346,
1.2318408943741077,
1.1936771541321396,
1.2169441544187152,
1.198506382581772,
1.186458880174174,
1.2103524823669856,
1.2285778509901992,
1.1200216208405227,
1.1387896672101574,
1.0908173539816957,
1.2308851210556966,
1.2035466664307617,
1.1001905414241768,
1.1424185494658932,
1.2269161990482325,
1.1999656325314627,
1.1967207679880325,
1.1600771097377474,
1.2069027992929418,
1.1385148138423051,
1.1489017335157772,
1.1068267732858115,
1.2205880980904533,
1.218044294574066,
1.2529730847546638,
1.186660925630313,
1.2060697606531923,
1.2045284746581517,
1.1642166388713013,
1.1103498769950435,
1.1756364918041724,
1.1065195117330475,
1.185722908999943,
1.2160505306065248,
1.1583256484574564,
1.1826392418072076,
1.178493074752072,
1.1177123697895326,
1.2412795138296302,
1.2170991263240316,
1.1378564491277,
1.2598329438516054,
1.1594168596923815,
1.067412768958962,
1.0681905031107433,
1.1088495388520627,
1.2260312346475448,
1.1845181121770647,
1.0908462423974803,
1.2254157975354272,
1.1726057354383534,
1.2463105895418234,
1.1938360058317639,
1.1809949387357708,
1.214965669951487,
1.1806096453015262,
1.2120442182541238,
1.2039396191666214,
1.2241011795101584,
1.1835653941636586,
1.1872311824740118,
1.2049867769183018,
1.1032492996465715,
1.2459948771640978,
1.210714791333494,
1.2017638381896383,
1.2082205245581055,
1.2100706475737704,
1.1777593480571773,
1.2463816959419804,
1.1956288937602344,
1.2250384673113388,
1.2232925845822948,
1.2271097732217437,
1.2041158407114751,
1.1731142176012719,
1.089562181699617,
1.2065580430236436,
1.1286176112592208,
1.214260708902002,
1.100397749837259,
1.1634968104491086,
1.2031492654249205,
1.241916873584268,
1.128692464375822,
1.2438405074344832,
1.221942545955605,
1.2122284632985285,
1.2196872139542247,
1.1963958742294165,
1.211163602848183,
1.1876392875222728,
1.1120181290701372,
1.1928622611586417,
1.2310597744441403,
1.0909886287400576,
1.1746761873370748,
1.086400046407615,
1.1948938617215121,
1.237389733833963,
1.2002584041594944,
1.1634829773569397,
1.1560999466513606,
1.1517515881362235,
1.18561959209192,
1.1243333063590204,
1.168110787112396,
1.252233283674239,
1.1809616018853473,
1.1172192014427276,
1.065718486758231,
1.1735702052275503,
1.2319344426459806,
1.2406551834164845,
1.134545708488982,
1.212394683299605,
1.0839740327133316,
1.154921467945748,
1.1868420784058569,
1.27846759456701,
1.1337877151557247,
1.2090680051988998,
1.111959785928736,
1.2162877159119596,
1.2617090658101289,
1.0746368205192902,
1.082494892236285,
1.12003079427392,
1.2349350980294647,
1.2079171758399385,
1.1540805938938137,
1.1904244522100265,
1.0925561509117376,
1.1130713817081679,
1.1996791615125522,
1.1953376557177446,
1.1721740496775683,
1.1498018407550115,
1.2189399864150035,
1.2174001512005672,
1.1841444791371007,
1.185707384067646,
1.1818600419697818,
1.1487639315280984,
1.187990790473883,
1.2070236352846957,
1.183120704393338,
1.2131486529878408,
1.2230034850431808,
1.2598577318052009,
1.222494513225296,
1.1989335894352298,
1.133213715468035,
1.137460808129861,
1.24270509873175,
1.1877173094601927,
1.2104442602106054,
1.2230272768431958,
1.1848372792316968,
1.1892502628879684,
1.2035024239408367,
1.1289245106213106,
1.1547680583390754,
1.1817062724464646,
1.07460992973405,
1.2424105540969468,
1.2006706347201768,
1.1469299638380548,
1.2003475049998125,
1.2628425996056627,
1.1704529581521437,
1.2318309803876157,
1.0800513855721836,
1.228251341459926,
1.20519927398022,
1.2026116263341706,
1.2267213579299914,
1.1944767555176976,
1.0973340714559194,
1.199844572870176,
1.2167600163050747,
1.1973706771935049,
1.1274929727743968,
1.1847494081385286,
1.2179786952027045,
1.2103068524172256,
1.1648972358845942,
1.2012871447601516,
1.0806169290790832,
1.0638847843439245,
1.1523924483632424,
1.2163186571317048,
1.2318610477915777,
1.1790869269637845,
1.1800511479858375,
1.1828738610906249,
1.1414027009085952,
1.2239157840282788,
1.2163662161977793,
1.0777765284762604,
1.1871756186016387,
1.191419398750568,
1.2077786982792487,
1.1306928350191163,
1.2219862084208202,
1.1704952108872595,
1.1350341511093405,
1.2382530787288621,
1.197672089140054,
1.1634636863060297,
1.2198105693727255,
1.1738029086162305,
1.1866104828955661,
1.2050422293564858,
1.0986376515523584,
1.1639928343093937,
1.22645365263098,
1.0831783532562473,
1.1793732758175444,
1.2095496760640134,
1.1933309580469191,
1.0970298786458046,
1.1494963511728211,
1.1967270644046457,
1.2344818441993706,
1.2272379509433546,
1.1112370068652921,
1.221504646323395,
1.2374620707520216,
1.1180642101127265,
1.2499150575244404,
1.1306307576694052,
1.2043884061922128,
1.2148802673894985,
1.1818496551780364,
1.256060021892613,
1.1922912062142983,
1.1902422382130782,
1.1992276134291726,
1.1710757539172894,
1.123994660195365,
1.2214993644613943,
1.155215069374298,
1.1086344864348479,
1.0910943060265557,
1.2191511677776559,
1.210061225791385,
1.177381635100414,
1.181486384213164,
1.165494009707241,
1.1963931772967231,
1.2102493016491176,
1.101845863755783,
1.2104131731458112,
1.2496346326865795,
1.1918641349127161,
1.2362974006491536,
1.2055345356030078,
1.2285741635823975,
1.2335964200302294,
1.2299260975739024,
1.252639296531916,
1.1816404229058095,
1.0906166413304024,
1.2083432826502967,
1.198686258537757,
1.1415695127122047,
1.092894116614261,
1.2066842100186415,
1.156538986861618,
1.2474806142885053,
1.2187478225293684,
1.2316920790783128,
1.2105404142792078,
1.2045940601752774,
1.1231347496689397,
1.1047593741136272,
1.18129835095779,
1.1835647508539222,
1.2450528028358812,
1.2222158604224076,
1.2150490929276319,
1.1816927028319475,
1.1823015755626682,
1.2708857606096744,
1.1919272687522717,
1.199215576802391,
1.2235538374085948,
1.2001199439086292,
1.1730857828737784,
1.209032518532766,
1.240920756903906,
1.102814033624564,
1.218812306587527,
1.1996553618634807,
1.179606921083769,
1.2017295317409378,
1.2330407322845536,
1.1187392156488476,
1.225736440475797,
1.0995456254389886,
1.1398239919352195,
1.2035675444496818,
1.1586383728042269,
1.2287334286814806,
1.195581908342988,
1.182475780454091,
1.1987430360427977,
1.216557035654513,
1.1996494907287538,
1.2383901831314694,
1.1531934815518878,
1.229216103794829,
1.2106112336572799,
1.1849778997346532,
1.18237184590969,
1.2009038458812764,
1.0961585804850271,
1.178040774021339,
1.1722305560727864,
1.2280646936758626,
1.1730878580889061,
1.1798127065856396,
1.224173817391561,
1.2065293766499958,
1.1997898485636171,
1.2424004246290328,
1.1717570065002927,
1.2338402423416157,
1.2494056527462882,
1.2188644637313981,
1.2212661458082938,
1.2339544318944837,
1.1071211607425422,
1.1606278890869028,
1.2189699753534322,
1.180272917562664,
1.1426456950772235,
1.0522788530258245,
1.1829427275613456,
1.2262188308828839,
1.2251773195743205,
1.1956258209753046,
1.2114920876892714,
1.1953916820234736,
1.23382398473895,
1.1582401755284804,
1.191629137388988,
1.2178006337369847,
1.251136439760085,
1.1365976380520602,
1.174275078234959,
1.0808087704223992,
1.2032740733244425,
1.2103517133973012,
1.11326005536463,
1.1909349869585562,
1.2212796832585389,
1.1075096790834102,
1.2498229141296608,
1.084664865732375,
1.1683357564539953,
1.2082937933568851,
1.252239384886692,
1.2241448948948157,
1.2220195905349323,
1.0755183739777228,
1.2246287887655924,
1.203941883586293,
1.1242510612918695,
1.2235007768884452,
1.1730788382137691,
1.0994391409748683,
1.223672903798066,
1.1273787876886823,
1.2387058055283537,
1.2136671563285772,
1.204874914999746,
1.1863124400411849,
1.2194323539365215,
1.139574455552127,
1.1883768406708517,
1.2000846688283575,
1.1745314981161292,
1.2216393545756357,
1.148559186473642,
1.1276502268015958,
1.1678501220114077,
1.248042556728196,
1.1528823530190904,
1.182349952140096,
1.202872559373987,
1.057656133683926,
1.196122637100774,
1.2031121605191817,
1.1634951499402728,
1.2095000735625363,
1.1901826500944825,
1.1705303635565636,
1.221904684759513,
1.2008426805755377,
1.2191513614245515,
1.2383835946927975,
1.1822466263148794,
1.2000277251766025,
1.0675643227701521,
1.2229772647360104,
1.082493154489034,
1.178347854805873,
1.1940673459489852,
1.1946568831787179,
1.219277339137701,
1.135039734235405,
1.2539824081361624,
1.2267246222664205,
1.0960629129827957,
1.2130669354862218,
1.2300957041596126,
1.1573830982698168,
1.096123662648259,
1.2477729284441184,
1.2135638836890315,
1.220630164390247,
1.2162877159119596,
1.2090167543426475,
1.187489906720505,
1.2275503381344637,
1.1086754622565136,
1.1618707919314104,
1.1070407212315239,
1.1923226787718677,
1.0900666694354006,
1.2262690661499525,
1.2056761416930777,
1.2458301275482253,
1.1732441231849604,
1.2211117817426773,
1.1948872902367709,
1.130818495246797,
1.2026206008072473,
1.2067040095784871,
1.1913340391980174,
1.2398675486238038,
1.1780518996775449,
1.1806804473198347,
1.2154433988507445,
1.2041310140780057,
1.1948521569436659,
1.1658255171990985,
1.2146852320116623,
1.2174547247773808,
1.2307680369014695,
1.1682623391256952,
1.2188082178033945,
1.2423527542349246,
1.13230783361083,
1.2097691357097797,
1.2047969399649594,
1.1517698102978422,
1.2065252124817711,
1.0985349880573572,
1.1426104372808603,
1.2351760150170086,
1.1902473719724727,
1.1791482059371399,
1.1185800577890548,
1.1774186347558009,
1.2397017660770022,
1.1932399219346395,
1.1009298704332167,
1.1104128735371144
]
How should I plot this large data using python to better visualize the data?

A simple and common method to get a better overview about this kind of data is to calculate the moving average (mainly it to see if there are any trends). See this post for different approaches to calculate the moving average in python.
Note 1: You need to decide how much you want to smooth the data by setting a parameter (called N here). You might have to play around a little with N to see which value best suits your data.
Note 2: By calculating the moving average the length of you data changes (it gets N-1 shorter). So the timestamp values must also be shortened.
Using the sample data from the question and choosing N=51:
import numpy as np
N = 51
myList_fitnessValues_ma = np.convolve(myList_fitnessValues, np.ones(N)/N, mode='valid')
myList_timestamps_ma = myList_timestamps[int((N-1)/2):-int((N-1)/2)]
plt.plot(myList_timestamps_ma, myList_fitnessValues_ma)
plt.xlabel('Timestamps (seconds)')
plt.ylabel('WATT - MSU Fitness Values (moving average)')
plt.title('Evolutionary Optimization - Execution Time')
plt.show()

Related

Plot standard deviation with only positive values

I wanted to ask about a problem that I can't find a solution to, I'm quite new to python and programming.
I have my code where I calculate different statistical measurements and in the fourth graph axes [1:1] I am trying to represent the standard deviation of my variable (accumulated daily rainfall in mm) but I have a problem and that is that the standard deviation represents values upwards and below average. Precipitation cannot have negative values and I wanted to know if it is possible to put some kind of filter so that only values equal to or greater than 0 are plotted.
Here I leave my example code and the data that I use
import numpy as np
import pandas as pd
from sklearn.datasets import load_iris
import seaborn as sns
from matplotlib import pyplot as plt
SALIDAS = 'C:/Users/ferfo/Desktop/'
datos = pd.read_excel('C:/Users/ferfo/Desktop/Distribuciones/prueba.xlsx')
datos1 = pd.read_excel('C:/Users/ferfo/Desktop/Distribuciones/lineas.xlsx')
sns.set_style('darkgrid')
fig, axes =plt.subplots(2,2, figsize=(10,6))
sns.ecdfplot(ax=axes[0,0], data=datos)
sns.histplot(ax=axes[0,1], data=datos, fill = True, common_norm=False, alpha=0.2, linewidth=2, element="step")
sns.lineplot(ax=axes[1,0], data=datos1, markers=True, dashes=False,)
sns.barplot(ax=axes[1,1], data=datos, ci = "sd", capsize=0.1, )
axes[0,0].set_ylabel("Probabilidad")
axes[0,0].set_xlabel("mm/día")
axes[0,0].set_ylim(0, 1.1)
axes[0,0].set_yticks([0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1])
axes[0,0].set_xticks([0,50,100,150,200,250,300,350])
axes[0,1].set_xticks([0,50,100,150,200,250,300,350])
axes[0,1].set_yticks([0,50,100,150,200,250,300,350,400,450,500])
axes[0,1].set_ylabel("Frecuencia")
axes[0,1].set_xlabel("mm/día")
axes[0,1].get_legend().remove()
axes[1,0].set_yticks([0,50,100,150,200,250,300])
axes[1,0].set_xlabel("Meses")
axes[1,0].set_ylabel("mm")
axes[1,0].get_legend().remove()
axes[1,0].set_xticks([1,3,5,8,11])
#axes[1,1].set_yticks([-10,30])
axes[1,1].set_xlabel("Producto")
#axes[1,1].set_ylabel("mm/día")
fig.suptitle('lomitas, 2001-2020', fontsize=20)
plt.show()
fig.savefig(SALIDAS + 'graficos', dpi=600, bbox_inches='tight')
prueba.txt
This is my data: https://drive.google.com/file/d/1TSwulKNFerHMvv5Mdhc_m1zqwRac0lYj/view?usp=sharing
The first 1000 rows (that will fit on SO), out of 1831.
Observed data,Imerg data,Persiann Data
33.0,12.70423317,65.75
12.0,13.56632233,31.32
4.0,21.09570122,43.52
1.0,9.74461746,5.77
17.3,1.820376158,6.55
18.0,5.2507658,61.730003
2.0,8.476202965,14.250001
40.0,3.271785736,8.710001
1.0,9.8995018,25.009998
24.0,8.377342225,22.08
1.0,13.10612583,13.53
3.0,7.375349045,14.24
7.0,41.91541291,3.44
68.0,26.54439736,57.81
15.0,4.023840905,2.65
2.0,6.984012125,14.709999
50.0,13.24643517,2.61
35.0,2.314537525,62.61
22.0,4.787216664,47.95
23.0,6.563237665,80.09
41.0,26.61835861,2.73
52.5,87.12622835,35.05
21.0,20.77411652,4.5
5.0,39.9513588,2.77
21.3,34.07968521,46.68
4.0,4.571947575,2.94
21.0,7.785022735,11.190001
7.0,24.5557766,6.7700005
2.0,14.00565529,2.15
14.0,6.835758685,3.9299998
6.0,13.60206604,1.5
1.0,31.71725464,19.919998
7.0,3.962635517,33.16
20.2,1.291003466,12.959999
20.0,55.3718796,1.03
10.0,1.06314838,150.06
2.0,1.467782021,8.41
5.8,4.719767094,7.9300003
2.0,2.669240952,2.72
10.0,17.57000542,17.4
1.0,1.548810959,2.03
8.0,1.151179791,1.37
3.0,20.55989838,3.85
9.0,2.467414141,1.9200001
2.0,1.306825042,2.07
8.0,1.14,2.69
2.0,1.127427101,14.9800005
18.0,1.399605274,2.4500003
10.0,6.10573721,2.1100001
8.0,2.593387604,4.76
16.0,1.714526534,5.64
20.0,7.021852015,1.24
49.0,1.874579191,1.54
3.3,1.057072401,2.88
16.0,5.83480644,3.24
8.0,3.455219269,5.8599997
8.0,1.475891114,2.72
28.0,6.827443125,8.690001
13.0,18.33798981,2.26
4.0,6.57049513,4.49
2.0,31.0540371,1.25
35.0,53.7753334,1.3299999
11.0,21.80572129,2.3899999
6.5,34.6747551,3.56
33.0,1.931889653,2.33
13.0,12.64225388,3.62
5.0,8.975834845,2.33
37.0,1.71813643,15.01
8.0,4.632123471,5.06
16.0,20.17470742,1.51
11.0,27.08102036,3.59
2.0,2.386453629,4.99
1.0,1.059182048,1.5600001
21.0,26.59081078,4.0099998
2.0,12.13219738,7.1099997
45.0,1.741666675,3.78
11.0,1.191877246,2.83
8.0,1.437874556,4.38
36.0,4.313007832,1.56
23.0,43.39625931,2.3700001
1.0,4.652664662,1.39
44.8,2.123159409,7.83
2.0,1.013100386,4.0
4.0,3.444443941,5.9900002
3.0,1.029917956,1.6299999
3.0,64.20615385,1.46
14.0,2.552409411,1.75
15.0,1.070342303,22.1
20.0,19.51611519,14.44
34.0,11.814847,9.370001
20.0,3.378883601,31.640001
17.0,4.592389584,4.62
2.0,5.184751985,4.04
12.0,1.251710058,8.940001
31.0,1.20076859,20.54
3.0,2.656115532,16.52
12.0,3.296927929,22.5
11.0,6.101575375,8.24
37.0,1.621261239,16.720001
47.0,3.146972418,25.58
8.0,23.63509369,3.3600001
5.0,4.09155941,3.7999997
13.0,4.080201626,1.9300001
25.0,13.95099068,13.62
28.5,9.444846155,7.8
4.0,27.48032952,1.25
4.0,38.84066773,42.8
6.0,1.212481141,19.18
5.0,1.080495119,4.09
20.0,40.26078034,2.59
7.0,2.846819878,9.09
4.0,54.2149887,3.52
8.0,13.21701241,18.25
4.0,3.699003458,1.59
5.0,4.130330563,13.790001
5.0,20.58119202,6.25
5.0,6.42111683,4.21
44.0,4.309965134,1.56
10.0,4.79896164,2.24
3.0,7.026090145,1.5999999
3.0,2.08438778,6.4399996
3.0,25.36527062,3.0900002
22.0,24.76248741,23.900002
2.0,26.50693512,56.08
1.0,32.33215714,18.52
4.0,28.11775589,1.8699999
17.0,1.378523588,7.12
11.0,3.523523569,22.32
30.0,5.69707489,16.54
29.0,27.38665581,9.93
1.0,38.52075959,46.18
3.0,1.750359059,4.9399996
1.0,14.85701275,1.88
2.6,41.54547501,37.92
28.0,1.331750036,5.47
16.0,14.75776387,54.08
6.0,3.94290042,13.11
34.0,21.99007416,5.43
12.0,21.82343102,9.42
8.0,2.251169443,18.39
5.0,3.715127945,10.76
24.0,11.68067074,14.76
1.0,8.149575235,10.639999
9.0,3.602071047,11.530001
35.0,35.90866089,27.52
2.0,1.736975193,23.21
8.0,5.936116695,14.05
1.0,2.024060011,24.670002
3.0,7.263765335,21.99
14.0,1.832577467,12.419999
12.0,4.149312973,14.73
15.0,1.578367353,9.52
1.0,1.461082697,3.79
3.0,1.300221563,2.6699998
4.0,3.882947684,6.3
23.0,1.156816244,1.5699999
31.0,1.774330497,3.9099998
1.0,1.081079126,9.86
21.0,63.7815933,1.1
7.0,5.40561533,3.1
38.9,1.916676522,1.3499999
1.0,1.694874764,1.21
2.0,1.020053149,2.6799998
1.0,3.230535031,72.840004
18.0,2.468552113,3.8899999
47.0,2.557238341,1.9
3.0,2.99013114,3.03
1.0,1.321612239,1.81
15.0,11.32548142,1.2
5.0,1.680747986,1.92
2.0,4.724195004,3.9
1.0,3.12424779,2.5700002
1.0,19.96909905,11.53
2.4,38.93196869,1.54
3.0,6.141599655,1.24
2.0,10.2309351,2.06
2.2,1.496399522,1.99
3.0,14.13191891,4.8900003
3.0,6.556683065,2.02
1.0,2.044409514,1.8
7.0,13.88462162,6.32
2.0,2.669220686,2.21
4.0,9.125458715,1.6700001
1.0,5.971014975,4.23
2.0,24.87825394,8.09
40.0,4.818218708,4.5899997
1.0,1.526267767,22.439999
42.0,12.33635044,1.3199999
14.0,6.067589285,7.02
5.0,4.542275429,9.35
14.0,15.26683712,1.36
3.0,2.287184716,1.6099999
27.0,13.89541149,6.42
9.0,2.849863529,5.52
16.0,4.114969254,6.3199997
5.0,2.60952878,2.6299999
7.0,25.81751633,1.12
22.0,7.642860415,54.38
61.0,14.60452652,2.99
3.0,2.860728264,1.4300001
38.0,13.65011311,2.05
24.0,4.403223992,4.0699997
8.0,16.61255455,5.7299995
15.0,1.931255818,1.6700001
4.0,12.71534157,4.97
2.0,13.96313668,1.74
2.0,4.058600903,4.7799997
4.0,4.762280464,2.69
12.0,9.048459055,2.84
7.0,2.783326626,2.87
24.0,2.251889944,5.2999997
17.0,12.83441448,4.16
29.0,11.20629025,1.34
37.0,28.90879059,1.22
4.0,1.714102268,23.29
2.0,1.729247093,1.87
7.0,11.54702091,102.02
14.0,1.603832722,1.26
4.0,48.88271332,3.4900002
5.0,3.357400656,1.33
9.0,26.58070755,1.3499999
7.0,1.279444337,11.709999
52.0,7.07122135,6.92
21.0,4.065811158,1.55
8.0,1.305071712,3.3400002
2.0,33.32134629,34.989998
1.0,25.21928978,5.46
1.0,7.68272543,3.69
8.0,4.058069229,12.27
14.0,1.392273307,31.66
27.0,1.614271045,2.51
1.0,1.43,24.939999
5.0,1.564941883,2.76
1.0,5.490926745,19.510002
2.0,2.741349459,8.51
4.0,1.820300937,7.93
7.0,1.200169325,9.7
27.0,1.227725864,3.3899999
53.0,1.409593702,1.26
13.0,1.020598889,11.91
2.0,1.532613397,10.45
6.0,2.150630713,51.839996
2.0,9.32765293,1.0999999
3.0,3.207234144,27.57
32.0,1.102299214,36.58
4.0,11.28597355,9.549999
1.0,32.67594147,2.3
5.0,17.2740078,15.48
42.0,3.444516182,6.82
10.0,2.200684548,7.47
2.0,42.5202179,30.38
6.0,1.706894517,21.759998
2.0,14.07932759,18.81
11.0,4.025928021,9.6
25.0,16.11277199,2.11
17.0,6.93875265,1.03
9.0,4.846222401,10.18
31.3,1.64617455,6.8199997
18.0,1.422170997,14.7
3.0,2.14275384,16.5
42.0,20.2088604,4.75
28.0,16.17591286,24.34
113.5,1.768956781,5.91
27.0,7.651679995,13.950001
16.0,62.23706435,1.66
40.0,3.120871783,9.92
5.0,1.11462462,1.3499999
25.0,17.13158798,31.470001
1.0,35.90638352,3.34
1.0,11.49289704,30.420002
2.0,1.723016501,3.0900002
7.0,1.727642894,1.8199999
62.5,15.11504936,3.46
15.0,12.78649616,15.449999
6.0,1.142826557,2.9
2.0,4.31261921,1.44
2.0,19.54297829,1.8
5.0,21.42444229,1.17
9.0,1.985171438,5.24
4.0,38.83046723,1.53
3.0,24.3289547,2.63
28.0,21.55071259,8.26
3.0,20.35590744,5.58
18.5,17.1479969,20.69
1.0,2.328164578,6.65
77.0,6.90966034,1.5999999
3.0,8.87460327,4.1
6.0,19.85622978,5.88
18.0,11.50050545,8.62
1.0,2.399034024,4.4399996
13.0,17.8201561,7.3199997
1.0,63.47223665,5.11
5.0,10.70358849,1.9399999
4.0,1.303659797,1.14
5.0,7.051344395,1.2
2.0,1.317322851,2.83
2.0,1.153054357,20.35
1.7,1.288836599,1.0
3.5,6.40096426,2.18
4.7,10.61519242,3.25
2.0,38.07836151,1.4499999
1.0,1.00505364,1.06
5.0,4.601175309,14.140001
13.0,1.059544564,1.11
50.0,1.025045872,1.08
2.4,2.140906573,24.24
5.0,11.28417015,6.04
2.8,1.706882835,1.6299999
15.5,63.1325226,5.55
17.0,5.925836565,2.69
3.0,1.94356668,5.5099998
4.5,9.45316124,12.35
36.0,2.504364014,1.73
1.0,1.470301152,2.85
1.0,1.242533088,3.36
12.1,1.670167685,3.0299997
5.0,57.5176239,1.06
15.0,1.107224822,3.8200002
5.0,3.0542202,6.79
3.0,2.898064137,4.32
7.0,30.05044174,1.75
3.0,3.427459955,1.1800001
4.0,4.624752045,1.04
2.0,11.62128449,1.5600001
8.0,6.490193845,3.7
2.0,1.937290669,2.6000001
7.0,8.65875244,1.4100001
52.0,1.299692512,1.69
5.0,1.855275035,48.739998
1.0,3.769208908,7.24
7.6,4.55385828,6.29
3.5,6.51372051,1.71
1.3,8.0854969,1.21
22.2,1.507522464,109.61
22.5,9.14739609,8.1
7.5,27.17226029,6.6499996
2.0,32.79916382,6.2500005
1.0,1.280574084,1.05
3.5,26.51655007,1.08
2.5,2.701778889,3.1100001
1.0,5.269325735,2.01
8.0,30.63650131,1.4300001
20.0,71.78442385,27.51
32.0,1.373457909,28.66
3.0,12.21031952,21.530003
61.0,35.02967835,2.9800003
7.0,14.67937184,4.88
3.5,4.434751988,2.06
2.0,11.85890293,6.34
35.0,25.02809716,3.44
11.0,3.947379113,21.65
4.5,3.420857191,6.13
31.0,2.146751881,47.380005
2.0,21.10358238,82.47
15.0,2.37749362,6.38
38.0,11.68755818,2.21
6.0,2.17284298,63.430004
21.0,7.695138455,60.98
3.0,11.97859764,30.349998
2.0,14.64129257,1.68
6.0,5.88892269,4.81
13.0,1.734639526,24.029999
5.0,4.035034657,23.36
1.7,1.285043836,1.87
1.5,1.238770008,24.31
5.5,19.83879471,2.27
9.2,4.221150399,10.42
8.0,23.05646897,13.280001
2.0,1.394252658,17.740002
16.0,7.788359165,2.06
4.0,6.4100194,21.4
16.0,67.55716705,11.23
21.0,1.351992965,61.07
5.0,5.084335325,45.9
12.0,12.95212364,4.08
23.0,25.68342018,4.21
6.0,1.988664508,9.7
3.0,3.016326189,10.969999
8.0,2.866974354,25.95
1.0,2.696616888,2.54
1.0,1.581075788,2.5
41.0,2.780577898,4.09
8.0,1.417200446,26.240002
4.0,1.385309816,7.45
10.5,7.5372777,12.17
16.0,7.932168005,69.51
18.0,1.451128483,10.07
11.0,1.840451598,3.63
17.0,1.065397263,2.3
26.0,4.893643856,2.9599998
1.0,1.452208638,2.23
19.0,37.93759156,3.18
4.0,12.90710354,5.83
37.0,6.14060068,1.39
16.4,8.097572325,3.87
5.4,23.57411003,1.8499999
1.0,6.214107035,11.530001
2.9,6.978374005,1.76
5.5,43.03276825,2.3600001
1.0,1.466169358,6.4300003
1.0,1.140809417,3.33
21.5,1.293450475,10.71
7.6,3.49955225,2.32
2.0,14.28147984,1.7900001
1.0,3.699310303,34.33
12.0,4.277731419,2.23
45.0,5.301327705,1.99
69.2,7.982951165,10.09
8.6,3.936149597,10.08
1.0,1.424581647,2.6699998
9.2,4.491571904,46.879997
17.5,2.771928311,1.0
20.0,9.17326832,4.99
3.1,2.072081805,1.12
7.0,5.55553627,1.27
32.7,14.50772381,2.66
26.0,2.33113885,2.65
2.5,5.78749275,48.21
27.3,11.18823529,5.89
49.5,5.236501695,17.56
2.5,7.31285858,8.110001
24.0,1.520752192,1.1600001
9.7,9.462599755,1.9200001
1.6,20.17654228,1.72
3.0,10.11459542,4.84
8.6,27.88303757,4.3
21.0,12.77318192,1.93
1.5,1.652448058,2.9099998
2.3,2.164780855,5.19
1.2,5.11115074,2.9099998
3.1,4.954486847,6.77
4.9,1.114153981,2.13
1.0,2.178640366,2.49
3.8,3.012405396,33.73
22.8,51.1032982,36.66
65.5,11.25961972,72.69
3.0,6.713029385,5.6
14.2,2.496469736,3.9700003
4.0,12.115098,37.68
9.3,2.551826239,2.21
18.2,14.48979855,3.06
24.0,7.24518347,1.51
1.3,21.97145844,79.93
11.3,5.81929302,29.16
2.0,35.17000199,1.5
2.0,21.69516754,10.809999
17.9,8.1897316,2.9
15.0,15.60975838,28.07
33.0,3.585752011,17.85
18.1,7.03698683,26.3
1.0,15.85383892,1.96
5.0,8.665060045,20.49
10.0,5.237526895,7.74
3.0,9.37757492,8.4
11.0,2.525708676,1.0699999
33.0,1.059689999,6.8199997
5.0,1.390462637,62.05
9.0,2.451468468,2.9699998
42.0,1.846368075,12.53
3.0,1.235369563,23.34
3.0,1.421132684,1.9200001
5.0,1.591700435,18.150002
21.0,1.431996823,8.74
3.0,3.120195151,3.44
4.0,10.05565357,9.03
3.0,1.057814002,14.1
22.0,8.63092613,5.19
45.0,11.97591305,42.8
24.0,1.507814646,13.559999
34.0,6.692327025,48.93
8.0,2.86255455,3.81
24.0,3.043321371,25.85
8.5,3.122832775,23.18
1.5,11.90790558,13.000001
9.3,8.271219255,110.89
3.0,14.87175751,5.38
3.5,47.65599442,14.65
11.7,6.447260855,4.29
2.5,16.07569123,8.72
7.0,6.27013159,12.32
3.5,35.76211167,6.0299997
6.0,26.0370102,4.59
1.8,6.6210227,2.03
14.5,6.33511257,1.05
2.5,32.02148819,3.72
5.1,1.203332901,1.84
11.3,11.10483933,1.02
5.3,3.092888594,5.2300005
14.0,41.64496613,3.4299998
4.0,9.58962822,5.64
20.0,1.257387281,4.42
18.0,16.84815598,1.6800001
15.0,15.92509461,3.3799999
5.0,39.24178314,1.0400001
12.0,28.16544533,2.4299998
7.5,4.047671795,5.16
2.0,2.273884535,1.99
11.0,8.58615303,5.0
27.7,22.31294441,1.3499999
2.0,9.67351246,1.05
6.0,17.06152153,2.33
3.0,9.642523765,23.4
25.5,1.165874005,27.91
35.0,11.69623184,52.79
47.0,38.67126847,3.86
2.3,61.18006515,1.7
1.0,7.492923735,1.53
13.5,12.18782616,2.0900002
10.0,17.36215019,10.040001
16.2,9.499432565,2.15
26.0,9.225958825,46.11
1.3,39.28028488,2.56
7.6,3.471356869,1.97
8.5,8.659394265,9.45
17.0,4.660372734,10.440001
36.0,61.9743538,3.2599998
21.7,12.09271908,3.6699998
47.0,24.33893013,4.51
21.0,6.91462612,3.37
27.0,2.297224999,1.51
5.0,1.394450546,1.3599999
5.0,16.00174332,3.46
2.0,14.10092736,11.889999
4.0,22.22217942,1.04
9.0,67.13967135,31.410002
6.0,4.184929371,1.4599999
4.0,6.180713175,19.4
2.0,3.645504713,6.21
5.0,24.17942238,5.4
1.0,11.77395439,11.450001
6.0,16.84624863,5.58
2.0,9.62325859,10.45
6.0,16.02267838,11.73
21.0,13.3161335,6.73
16.0,1.80894053,3.33
4.0,5.394687655,48.8
5.0,24.77208328,17.82
7.0,17.31050492,5.4999995
4.0,9.31569481,96.34
2.0,11.5558157,9.599999
45.0,21.96049881,12.68
34.0,1.795776129,12.01
3.0,4.568071366,2.1299999
64.0,8.809449195,6.38
28.0,17.17154122,14.49
8.0,3.798393965,6.1900005
2.0,3.239580393,14.32
23.0,7.43819666,2.98
3.0,2.554473639,6.05
2.0,7.20397377,3.35
24.0,21.64646912,1.23
28.0,6.8011055,1.65
27.0,51.22446825,1.71
53.0,2.336632967,3.22
14.0,1.857179165,14.05
3.0,3.921233416,14.67
2.0,8.250204085,6.05
33.0,36.43959427,4.37
3.0,35.4586258,2.12
5.0,2.924695492,2.04
17.0,3.519897938,6.7200003
18.0,57.69216535,20.48
11.0,6.79311371,8.83
4.0,2.43661356,10.25
37.0,5.926236155,1.97
2.0,2.30543375,1.2900001
18.0,21.94180298,10.57
1.0,21.24626732,36.19
7.0,4.31278801,3.73
1.0,6.77379656,5.2799997
2.0,5.612919805,17.69
10.0,5.471610545,1.8199999
3.0,5.3090024,2.59
15.0,2.189461708,24.79
20.0,4.415833473,9.45
33.0,2.321558237,9.4
3.0,5.695771215,3.13
44.0,13.87459469,14.059999
14.0,2.366339445,3.52
2.0,3.329537154,5.53
3.0,1.751751542,32.37
4.0,7.689642905,10.49
4.0,1.51193893,1.35
2.0,1.155116558,1.42
1.0,1.199524403,61.78
10.0,3.710379839,7.83
5.0,1.770510078,4.82
10.0,1.905061603,30.7
8.0,5.34256077,27.550001
23.0,1.739247799,76.08
34.0,38.56280136,32.3
1.0,6.42942953,3.15
1.0,11.48092175,62.170002
39.0,2.078872204,3.92
11.0,19.59555435,10.219999
6.0,6.19163275,43.309998
4.0,5.939269065,1.3
3.0,22.87758637,10.98
3.0,2.864192009,1.45
7.0,48.72347641,21.2
8.0,3.442718983,89.59
2.0,7.616796495,10.110001
1.0,2.508226633,2.96
5.0,6.681570055,75.770004
44.0,2.179568291,1.4200001
3.0,2.951803446,10.48
4.0,1.397823572,11.66
9.0,6.152549745,20.35
13.0,44.06642151,1.47
30.0,16.16477585,22.18
2.0,3.826816082,3.3700001
8.0,3.112096072,13.259999
1.0,6.575606345,1.8900001
17.0,1.482020021,48.0
10.0,2.736569643,4.2
21.0,2.932685614,4.33
43.0,9.989481925,1.64
6.0,13.08501339,21.89
28.0,2.157101155,2.53
12.0,1.35453558,132.59
18.0,21.74938965,87.01001
18.0,1.661110401,4.1499996
58.0,2.03024149,2.05
8.0,2.228796006,25.630001
3.0,2.194865465,7.07
29.0,7.931626795,32.85
5.0,7.26604271,17.970001
47.0,20.16017533,56.81
9.0,2.508003474,39.64
22.0,18.76267052,1.51
15.0,23.55038834,20.79
51.0,20.85602761,2.28
64.0,16.18298722,15.879999
2.0,37.16973496,2.93
6.8,10.7100668,1.7
2.0,2.656838179,6.0299997
1.7,8.5988245,4.49
8.8,3.148923874,5.21
4.0,1.364438057,5.59
2.0,2.821480751,2.04
10.0,8.46378422,6.04
20.0,2.713042021,17.470001
3.0,5.70679426,9.54
16.0,1.062875986,1.95
16.0,2.508112192,1.48
10.0,13.24829483,3.1599998
9.0,13.35315609,2.73
86.0,10.60771466,5.7699995
2.0,9.02454853,5.65
5.0,25.73985863,2.47
20.5,8.04908943,1.76
45.0,8.649107935,3.13
6.0,3.438475371,2.8000002
30.0,3.145784617,2.54
11.5,5.690588475,1.6
1.2,3.900574684,3.15
7.0,1.642292857,7.9700003
19.2,95.4910965,3.49
11.0,22.3479023,1.03
5.0,8.625390055,3.28
14.0,17.87278557,1.72
3.0,51.85173415,4.2599998
9.0,9.86716366,1.42
10.0,1.725934148,1.38
7.0,7.497133255,1.32
5.0,36.0772171,2.27
7.0,1.681801677,3.58
22.0,33.22405243,2.79
9.0,1.467683554,4.44
30.0,13.11451245,12.830001
3.0,14.44763184,1.38
3.0,19.91684342,9.0
10.0,41.07674408,37.51
27.0,21.05844116,29.219997
46.0,1.294272781,17.66
9.0,8.95629406,3.35
82.0,2.58863163,2.27
83.0,11.92989922,4.4
15.0,43.7828598,10.33
41.0,7.786485195,1.0600001
13.0,7.31237173,7.79
6.0,1.55503273,1.54
17.0,6.330646515,8.16
29.0,1.532290578,26.54
94.0,30.26382637,34.27
6.0,9.99059868,8.91
43.0,20.92362976,37.43
2.0,1.524400234,30.09
29.0,2.260905266,15.21
61.0,26.32531929,18.919998
11.0,2.334921837,32.82
9.0,9.19584751,59.58
15.0,2.663776636,14.78
28.0,1.73086071,1.3199999
21.0,1.000801564,2.01
7.0,7.184841155,11.57
1.0,16.885458,2.44
1.0,9.996009825,11.049999
11.0,29.07500458,4.76
7.0,28.82209015,1.02
3.0,4.637232781,3.1100001
2.0,2.153310299,30.399998
1.0,2.010419369,45.55
8.0,26.56690979,2.47
16.0,1.144513488,4.73
21.0,1.671649695,6.7600007
3.0,1.65417099,8.87
5.0,4.671144009,5.95
27.0,2.909118414,3.32
4.0,8.24102974,13.8
4.0,2.693380595,14.49
21.0,3.064752341,7.7699995
2.0,8.33625126,1.2
23.0,24.75660515,21.239998
15.0,14.11971665,104.16
107.0,4.368866444,2.97
30.0,3.136216641,1.24
7.0,1.182296515,1.54
19.0,2.363009453,6.37
24.0,67.74961855,7.33
30.0,5.13684225,1.66
24.0,4.606848717,1.3800001
18.0,6.117928505,1.06
15.0,7.6142869,1.75
11.0,7.933288095,3.62
2.0,4.611485005,12.22
73.0,2.199810028,5.0099998
32.0,29.52713013,2.47
10.0,1.146588326,12.360001
2.0,2.026584387,1.8199999
11.0,1.142000914,4.53
57.0,11.43570423,12.92
7.0,43.80160141,1.77
10.0,1.085262776,13.07
7.0,2.720019579,7.9700003
49.0,3.989929915,5.35
2.0,2.600961924,1.08
4.0,6.558179855,1.35
3.0,9.41394329,3.7799997
2.0,6.647725105,5.58
1.0,38.19209671,4.21
5.0,4.519927502,5.95
18.0,3.880130053,1.11
9.0,1.045809627,1.53
37.0,2.701902867,1.0
4.0,6.56444454,1.44
5.0,3.529962302,4.21
25.0,19.17519951,2.39
7.0,1.562627673,1.54
1.0,39.37012863,2.31
12.0,16.47767449,1.9499999
1.0,58.903965,5.2200003
1.0,16.95523072,1.9
9.0,3.100278616,2.21
12.0,45.80677033,1.0699999
4.0,26.81613541,1.35
1.0,3.593140841,2.04
5.0,1.917018533,14.929999
28.0,2.88641119,5.74
2.0,34.33824539,3.42
2.0,2.267287493,11.120001
19.0,7.366959095,2.5
10.0,70.9339676,2.44
9.0,19.76496125,1.34
4.0,2.355486632,5.45
1.0,4.309099198,8.219999
1.0,2.074670315,13.22
2.0,1.886642456,2.85
14.0,40.44182587,2.05
5.0,32.99110413,23.02
5.0,1.268943787,6.58
4.0,2.145960093,1.3
5.0,1.39419365,2.2
20.0,1.174509287,1.18
11.0,2.198520899,14.9800005
6.0,2.230074644,19.82
6.0,6.072119235,1.45
1.0,4.664021969,3.4100003
4.0,2.227411747,3.12
7.0,2.113803625,16.439999
14.0,6.688260555,6.2200003
39.0,1.226664901,2.26
21.0,3.213046551,21.76
40.0,1.002687574,6.41
30.0,1.483391285,43.269997
7.0,13.00875283,7.74
6.0,2.928070784,2.54
6.0,31.15128517,21.2
15.0,9.223342895,13.26
17.0,59.55508805,1.42
16.0,1.27139616,5.62
42.0,2.204371214,5.0699997
2.0,2.447686196,2.46
4.0,14.17787552,35.41
4.0,43.20114517,3.27
5.0,36.44638825,21.529999
10.0,14.93710041,41.4
8.0,8.20574093,1.4200001
12.0,1.637166262,5.71
33.0,1.203313589,3.8300002
41.0,21.69332695,32.79
25.0,4.260479927,21.29
9.0,2.558784724,38.98
25.0,3.04798007,5.02
4.0,3.111752034,31.34
4.0,6.786047935,24.27
7.0,8.4459219,4.18
26.0,11.70038319,31.630001
51.0,3.495490313,1.24
5.0,4.241265774,1.4
11.0,4.8981843,7.13
13.0,9.211686135,2.54
50.0,12.39083863,8.24
19.0,9.209892275,9.120001
83.0,2.324657202,10.95
23.0,9.65412903,9.49
21.0,31.06323052,2.95
38.0,1.128272534,1.1
1.0,2.512983084,1.8299999
5.0,16.3822918,1.3
3.0,11.90946579,1.63
6.0,7.08117676,1.01
2.0,19.39507294,2.15
15.0,19.04957772,1.14
5.0,53.11849215,4.01
25.0,42.92922592,1.77
6.0,14.9218731,1.3599999
1.0,21.0775013,1.72
6.0,32.00092316,1.38
5.0,1.04565537,1.4200001
11.0,12.34065342,1.53
8.0,39.12719345,2.82
20.0,21.81253624,1.4
2.0,33.09275818,2.6599998
6.0,1.996003509,2.35
4.0,10.73557759,9.23
20.0,3.835647583,1.13
3.0,11.55557251,1.18
18.0,58.3459854,2.71
2.0,63.196373,1.76
2.0,3.220089197,2.6799998
20.0,23.93250275,2.54
38.0,2.286283016,7.25
2.0,1.07400322,11.82
2.0,59.8628502,2.29
30.0,2.739398718,3.05
3.0,23.52008248,10.07
2.0,7.707740785,2.71
8.0,10.88557053,1.12
12.0,2.47727871,17.189999
10.0,6.07909584,2.24
9.0,3.649833203,1.7700001
4.0,32.12921524,2.2399998
19.0,1.531433821,1.25
22.0,1.535874009,1.23
11.0,1.569700599,9.17
42.0,2.108448267,6.5999994
11.0,77.33182525,2.2
8.0,3.344490767,1.5899999
4.0,9.55613613,3.1
10.0,4.887585163,9.41
18.0,35.29027939,1.22
2.0,2.152896881,2.17
25.0,2.639908314,6.58
7.0,1.753674388,22.89
2.0,37.65769196,22.029999
10.0,2.503957987,4.27
19.0,2.736332894,2.92
2.0,2.734235764,4.6400003
5.0,34.71192932,30.09
2.0,79.5751724,22.71
28.0,15.41206646,1.74
1.0,30.84560204,20.79
1.0,1.311088205,75.11
3.0,24.92964554,2.2
22.0,29.93969918,27.46
5.0,27.75062371,26.349998
3.0,31.69940377,30.82
1.0,3.944314957,2.4499998
2.0,1.557312489,50.29
13.0,1.235749007,4.5899997
3.0,12.3859272,42.89
6.5,38.85156632,2.64
17.0,6.500573635,12.950001
13.0,38.20243073,60.57
6.0,22.09395218,46.91
5.0,29.17655945,15.75
10.0,1.43235457,6.68
6.0,4.367777825,10.860001
40.0,5.10657072,17.16
20.0,12.44417382,5.5600004
15.0,1.133333683,20.51
2.0,2.290113449,4.52
2.0,59.1026268,37.29
1.0,8.303461075,8.29
2.0,1.454311133,12.51
1.0,6.68616104,14.710001
4.0,1.05869627,1.99
3.0,7.288159845,9.14
19.0,4.696534157,2.97
11.0,1.543948889,61.05
16.0,1.902146697,11.7
4.0,10.61460114,8.91
4.0,10.18768692,1.16
4.0,11.54320431,5.18
15.0,4.913286686,3.13
7.0,4.915909291,1.14
5.0,1.031675935,9.58
7.0,3.898350954,29.689999
35.0,34.91336441,6.7200003
17.0,18.01113892,5.75
2.0,2.833272219,13.74
28.0,5.176920415,6.09
5.0,16.68647957,7.79
9.0,9.293769835,17.48
15.0,4.145808697,1.03
5.0,19.18017769,36.120003
29.0,2.869644404,5.0299997
25.0,7.71194124,1.3900001
21.0,1.118057967,4.15
4.0,1.011766196,1.24
3.0,4.288121224,1.59
15.0,18.01800728,11.950001
17.0,2.095095396,4.27
21.0,5.09799528,1.21
4.0,3.605466366,2.26
5.0,4.272053242,1.4399999
20.0,1.356512428,1.71
19.0,4.395007611,3.11
2.0,16.10503197,2.2400002
59.0,8.85128689,2.54
2.0,3.780042649,2.44
18.0,25.41714287,2.6
21.0,18.50357628,2.6100001
23.0,12.17268467,9.51
12.0,1.71827972,1.46
20.0,1.340227962,4.1
10.0,4.668937683,2.88
4.0,1.653563857,13.76
3.0,11.45629502,2.8600001
40.0,23.80907822,3.53
4.0,8.023687365,1.54
25.0,13.02610493,10.79
2.0,10.09106159,3.98
40.0,1.432140589,1.05
36.0,49.78308106,1.5999999
31.0,25.32273484,28.27
4.0,10.05254841,1.79
25.0,12.45585251,4.94
25.0,7.96915245,3.36
16.0,4.125425816,5.0299997
2.0,17.35515785,7.01
20.0,2.154047728,43.85
15.0,1.133311153,1.3599999
20.0,6.99955845,3.4099998
25.0,7.06923151,13.52
9.0,2.061743498,11.83
6.0,15.1108923,5.86
6.0,3.659174204,8.83
21.0,25.09469795,63.71
12.0,12.78966046,1.03
7.0,3.70449996,4.68
2.0,81.32299805,1.62
10.0,1.47226286,2.44
11.0,1.767955542,4.1099997
9.0,14.35262299,4.1800003
2.0,26.53904343,7.3300004
7.0,29.06570626,1.6500001
10.0,1.977015496,24.59
3.0,4.072252751,29.779999
4.0,56.03784945,74.07
29.0,50.3431473,14.5
2.0,2.982461214,1.08
1.0,1.07741952,3.1200001
2.0,23.38036537,10.590001
1.0,19.09048653,55.350002
1.0,41.51933289,5.07
1.0,5.85829115,1.5
3.0,81.27360535,6.6
16.0,7.64243841,4.65
2.0,32.28141022,13.530001
40.0,2.746798277,7.29
3.0,1.134368301,1.86
1.0,1.18452096,1.29
4.0,11.01940632,14.890001
44.0,2.367835284,45.96
6.0,9.290693285,8.3
13.0,6.92009163,1.75
10.0,12.8741827,5.77
5.0,7.534250735,2.24
21.0,14.394454,1.32
20.0,6.47271347,1.48
12.0,1.485815168,1.3
29.0,1.470686913,2.6499999
46.0,2.631582499,13.61
22.0,3.658107281,1.3499999
8.0,3.507339239,2.4399998
11.0,9.38621521,1.08
21.0,1.363355041,5.6800003
2.0,2.211771965,2.9899998

in VTK, move point but keep the mesh (python)

Main question : I would like to know if it is possible to move a point in one direction but keep the mesh in vtk-Python (see image below)
I am new to vtk and would like to know if something is possible and if it is, which function to use. (I will give the context under if someone have a more clever idea).
I am using the vtk library with python and came across a pb with the delaunay_2d meshing.
I have a mesh that is mostly flat but with little variation
if you lunch this code, you will see that the meshing is really weird :
import pyvista as pv
import vtk as vtk
a=[[146.2346, -0.06153386, 611.2706],[146.1978, -0.05672521, 611.269],[146.1624, -0.05195256, 611.2675],[146.1345, -0.04595259, 611.2665],[146.0745, -0.02889959, 611.2647],[145.967, -0.01271295, 611.2602],[145.8994, -0.009446936, 611.2567],[145.7876, -0.01544256, 611.2445],[145.6697, -0.02221904, 611.2313],[145.6411, -0.02354358, 611.2281],[145.6213, -0.02429816, 611.226],[145.6148, -0.02446534, 611.2249],[145.6086, -0.02457465, 611.2237],[145.6037, -0.02456888, 611.2228],[145.5997, -0.02445992, 611.2221],[145.5722, -0.02384555, 611.2174],[145.4821, -0.02229311, 611.202],[145.3932, -0.02014619, 611.1866],[145.3392, -0.01758623, 611.1768],[145.2826, -0.01470557, 611.1657],[145.242, -0.01272894, 611.157],[145.2183, -0.01186882, 611.1517],[145.201, -0.01120841, 611.1478],[145.1839, -0.01051717, 611.1439],[145.17, -0.00969123, 611.1407],[145.1583, -0.008427223, 611.1383],[145.1294, -0.007862877, 611.1321],[145.1014, -0.008404535, 611.1261],[145.0899, -0.008730335, 611.1237],[145.0849, -0.008798788, 611.1226],[145.0315, -0.009818145, 611.1109],[144.9335, -0.01140382, 611.0887],[144.8838, -0.01200129, 611.077],[144.8506, -0.0121375, 611.0691],[144.7955, -0.01213034, 611.0557],[144.7571, -0.01195927, 611.0462],[144.7039, -0.0117043, 611.0333],[144.639, -0.01079165, 611.0176],[144.5931, -0.01010639, 611.0062],[144.5228, -0.01040282, 610.9877],[144.4637, -0.01073657, 610.972],[144.4376, -0.01124127, 610.9651],[144.413, -0.01201134, 610.9583],[144.3769, -0.01325327, 610.9479],[144.3213, -0.01482141, 610.9319],[144.2883, -0.01556498, 610.9223],[144.2539, -0.01585945, 610.9122],[144.1733, -0.01677441, 610.8897],[144.1193, -0.01754921, 610.8751],[144.1092, -0.01772558, 610.8723],[144.1012, -0.01783123, 610.8702],[144.0963, -0.01781308, 610.8689],[144.0742, -0.0179998, 610.8631],[144.0339, -0.01839697, 610.853],[143.9804, -0.01873316, 610.8398],[143.9467, -0.01887846, 610.8315],[143.9274, -0.01891992, 610.8267],[143.8417, -0.01886452, 610.8066],[143.7705, -0.01871645, 610.79],[143.7586, -0.01850215, 610.7873],[140.9641, 0.002861298, 575.0103],[140.975, 0.0004340185, 574.9571],[140.9918, -0.004345077, 574.8732],[140.9989, -0.00678831, 574.8369],[141.0005, -0.007331287, 574.8288],[141.0033, -0.00870053, 574.8147],[141.0085, -0.01185749, 574.79],[141.0185, -0.01458415, 574.7529],[141.0268, -0.01585665, 574.7258],[141.0422, -0.02161443, 574.6707],[141.0595, -0.02673956, 574.6101],[141.0743, -0.02733954, 574.5637],[141.0923, -0.02482757, 574.5121],[141.1047, -0.01995062, 574.4816],[141.112, -0.01798161, 574.4629],[141.1168, -0.01754502, 574.4503],[141.1319, -0.01713058, 574.4153],[141.148, -0.01711672, 574.3782],[141.1785, -0.01743222, 574.3112],[141.2074, -0.01777238, 574.2482],[141.2119, -0.01781772, 574.2393],[141.2374, -0.02053488, 574.193],[141.2616, -0.02339841, 574.1488],[141.2682, -0.02405973, 574.1371],[141.2773, -0.02454154, 574.121],[141.2984, -0.0244909, 574.0833],[141.3239, -0.02285809, 574.0379],[141.362, -0.02366696, 573.9743],[141.4008, -0.02681, 573.9104],[141.4111, -0.02758676, 573.8934],[141.4149, -0.02748217, 573.8879],[141.4247, -0.02697612, 573.8746],[141.4432, -0.02813518, 573.8474],[141.4665, -0.03125831, 573.8114],[141.4852, -0.03241773, 573.7831],[141.5292, -0.03128803, 573.7191],[141.5682, -0.03055324, 573.6623],[141.5732, -0.03044086, 573.655],[141.592, -0.02969062, 573.6299],[141.6085, -0.02897164, 573.6082],[141.6247, -0.02817515, 573.5873],[141.6633, -0.02625679, 573.5373],[141.711, -0.0244699, 573.4756],[141.7424, -0.02377839, 573.435],[141.7517, -0.02353401, 573.4231],[141.7648, -0.02296879, 573.4082],[141.7862, -0.02246382, 573.3844],[141.8357, -0.02191633, 573.3298],[141.9018, -0.02097274, 573.2567],[141.9447, -0.02015587, 573.2089],[141.9606, -0.0198681, 573.1911],[141.961, -0.01985728, 573.1907],[141.9736, -0.0194613, 573.1782],[141.9873, -0.01920701, 573.1648],[141.9997, -0.02040373, 573.153],[142.0396, -0.02199398, 573.1149],[142.1073, -0.02463654, 573.0479],[142.176, -0.02768754, 572.9786],[142.2113, -0.02821711, 572.9433],[142.2351, -0.02649652, 572.9198],[142.3082, -0.02100548, 572.8537],[142.3686, -0.01652271, 572.8005],[142.3796, -0.01589324, 572.7906],[142.3981, -0.01486295, 572.7743],[142.4123, -0.01408919, 572.7619],[142.4144, -0.01399181, 572.76],[142.4179, -0.01407487, 572.757],[142.448, -0.01566364, 572.7316],[142.5282, -0.01877348, 572.6642],[142.5982, -0.02105116, 572.6056],[142.6172, -0.02173755, 572.5896],[142.6276, -0.021897, 572.5812],[142.6731, -0.02252371, 572.5445],[142.7521, -0.02395345, 572.4821],[142.8003, -0.02493422, 572.4448],[142.8347, -0.02538628, 572.4179],[142.8763, -0.02544799, 572.3859],[142.9153, -0.02413499, 572.3573],[142.9477, -0.02288336, 572.3338],[142.9768, -0.02149255, 572.3131],[143.0515, -0.01691165, 572.2601],[143.1274, -0.01455436, 572.2069],[143.1697, -0.01542038, 572.178],[143.2005, -0.01505758, 572.1568],[143.2495, -0.01680911, 572.1242],[143.2874, -0.01877392, 572.0992],[143.3077, -0.01987864, 572.0859],[143.3509, -0.02099498, 572.0578],[143.4083, -0.01987314, 572.021],[143.4909, -0.01770812, 571.9689],[143.5684, -0.01706533, 571.9212],[143.5987, -0.01741168, 571.9031],[143.6137, -0.01759005, 571.8942],[143.6689, -0.01668662, 571.8615],[143.7408, -0.01502007, 571.8187],[143.7993, -0.01439461, 571.7853],[143.8609, -0.0165276, 571.7517],[143.8997, -0.01897029, 571.7308],[143.9147, -0.01910335, 571.7229],[143.9507, -0.0185069, 571.704],[144.013, -0.01750005, 571.6713],[144.0648, -0.01632737, 571.6442],[144.0993, -0.01506928, 571.6263],[144.1447, -0.01443901, 571.6029],[144.1923, -0.01450271, 571.579],[144.2355, -0.01467142, 571.558],[144.283, -0.01480775, 571.5352],[144.3439, -0.01599414, 571.5067],[144.4027, -0.01789944, 571.4795],[144.4572, -0.01791742, 571.4552],[144.5246, -0.01659406, 571.4258],[144.5738, -0.01525325, 571.4047],[144.6097, -0.01443211, 571.3898],[144.6464, -0.01424885, 571.3747],[144.6945, -0.01390467, 571.3555],[144.7463, -0.01350234, 571.3347],[144.7808, -0.01354561, 571.3207],[144.8094, -0.01393717, 571.3094],[144.8693, -0.01412922, 571.2871],[144.9426, -0.01378092, 571.2596],[144.9972, -0.01244129, 571.2401],[145.0396, -0.01095316, 571.2258],[145.0826, -0.00853111, 571.211],[145.1198, -0.006981449, 571.1983],[145.1381, -0.009466066, 571.1928],[145.1525, -0.01155278, 571.1885],[145.1717, -0.01150764, 571.1826],[145.1954, -0.01155187, 571.1752],[145.222, -0.01203899, 571.1672],[145.2529, -0.01274025, 571.158],[145.271, -0.01319267, 571.1527],[145.2814, -0.01332585, 571.1496],[145.2997, -0.01334692, 571.1445],[145.3551, -0.01436899, 571.1286],[145.4116, -0.0157692, 571.1123],[145.4388, -0.01593566, 571.1048],[145.4774, -0.0152119, 571.0944],[145.5604, -0.01549523, 571.075],[145.6195, -0.01626525, 571.0623],[145.6802, -0.01707819, 571.0502],[145.7626, -0.01802136, 571.0355],[145.8255, -0.01808286, 571.027],[145.8883, -0.01794028, 571.0183],[145.9254, -0.0178556, 571.0136],[145.9446, -0.017869, 571.0114],[145.984, -0.01818962, 571.0074],[146.0778, -0.01925302, 570.9996],[146.1833, -0.02391875, 570.992],[146.2321, -0.0281701, 570.9886],[146.2426, -0.02938274, 570.9879],[146.2166, -0.05736815, 611.4644],[146.174, -0.05089068, 611.4629],[146.1599, -0.04873756, 611.4623],[146.1137, -0.03929245, 611.4614],[146.0483, -0.02763847, 611.4596],[146.012, -0.02361259, 611.4579],[145.9631, -0.022168, 611.4549],[145.9114, -0.02165178, 611.4517],[145.8622, -0.01918254, 611.4482],[145.8258, -0.01688459, 611.4455],[145.812, -0.01702635, 611.4443],[145.699, -0.02098855, 611.4307],[145.5503, -0.0264029, 611.4119],[145.4873, -0.02732343, 611.4034],[145.4437, -0.02593876, 611.3963],[145.3971, -0.02403616, 611.3883],[145.3718, -0.02247259, 611.3837],[145.3409, -0.02103397, 611.3775],[145.3073, -0.01946996, 611.3708],[145.2901, -0.01852485, 611.3673],[145.1439, -0.01363603, 611.336],[145.0007, -0.008871335, 611.3053],[144.9918, -0.008317093, 611.3033],[144.9818, -0.00827229, 611.3011],[144.9711, -0.008648629, 611.2987],[144.9585, -0.00894847, 611.296],[144.9434, -0.009202947, 611.2927],[144.9355, -0.009293081, 611.291],[144.9336, -0.009293889, 611.2906],[144.9196, -0.009484665, 611.287],[144.8996, -0.009810211, 611.2818],[144.8846, -0.01014345, 611.2779],[144.8513, -0.01053094, 611.2692],[144.807, -0.01110086, 611.2577],[144.726, -0.01263126, 611.2365],[144.6032, -0.01377125, 611.2053],[144.5243, -0.01371456, 611.1859],[144.4985, -0.01368977, 611.1796],[144.4893, -0.01365795, 611.1773],[144.4804, -0.01371251, 611.1751],[144.4578, -0.0137947, 611.1696],[144.4187, -0.01381266, 611.16],[144.3741, -0.01397462, 611.1485],[144.3052, -0.01446937, 611.1297],[144.2563, -0.01481979, 611.1164],[144.255, -0.01484228, 611.116],[144.2525, -0.01495003, 611.1153],[144.2264, -0.01614293, 611.1078],[144.1978, -0.01735986, 611.0995],[144.1808, -0.01762734, 611.0947],[144.1633, -0.01779159, 611.0898],[144.1078, -0.01793095, 611.0743],[144.0449, -0.01793684, 611.057],[143.901, -0.01699888, 611.0205],[143.7598, -0.01609495, 610.9845],[140.8673, 0.004013773, 575.0136],[140.8857, -0.002197082, 574.9198],[140.9067, -0.01009257, 574.8142],[140.9167, -0.01630242, 574.765],[140.9439, -0.02201862, 574.668],[140.9666, -0.02335378, 574.5981],[140.9771, -0.02513118, 574.5642],[140.9885, -0.02729319, 574.527],[140.9966, -0.02716472, 574.502],[141.0051, -0.02627761, 574.4758],[141.0116, -0.02506499, 574.457],[141.0199, -0.02063325, 574.4372],[141.0487, -0.02102182, 574.3722],[141.0777, -0.02478343, 574.3076],[141.0955, -0.02463576, 574.2666],[141.1121, -0.02457507, 574.229],[141.1173, -0.02461446, 574.2178],[141.1236, -0.02464042, 574.2063],[141.135, -0.02530249, 574.1858],[141.1744, -0.02652624, 574.1139],[141.2091, -0.02709656, 574.0502],[141.2377, -0.02136374, 574.0002],[141.2738, -0.01635836, 573.9381],[141.2848, -0.0172927, 573.9203],[141.2951, -0.01758817, 573.9031],[141.3037, -0.01760539, 573.889],[141.3268, -0.01604579, 573.858],[141.3539, -0.01518705, 573.8207],[141.4088, -0.02247747, 573.7359],[141.4684, -0.02852728, 573.6449],[141.4843, -0.02764272, 573.6221],[141.5006, -0.02728717, 573.5983],[141.5111, -0.02722914, 573.5829],[141.5118, -0.02722982, 573.5818],[141.5132, -0.02715779, 573.5799],[141.5294, -0.02634171, 573.5587],[141.5565, -0.02501735, 573.5232],[141.6001, -0.02373889, 573.4655],[141.6579, -0.0224396, 573.3887],[141.6878, -0.0217516, 573.3498],[141.7011, -0.02140111, 573.3354],[141.7217, -0.02115995, 573.3127],[141.7776, -0.020856, 573.25],[141.8334, -0.02046155, 573.1874],[141.8645, -0.01999886, 573.1532],[141.8853, -0.01960157, 573.1304],[141.9001, -0.01918023, 573.114],[141.9348, -0.01900096, 573.08],[141.9562, -0.01924281, 573.0596],[141.993, -0.02112808, 573.022],[142.0713, -0.02525797, 572.941],[142.1216, -0.02746505, 572.8884],[142.1362, -0.02698184, 572.8736],[142.1481, -0.02621646, 572.8619],[142.168, -0.02474578, 572.8435],[142.2107, -0.02196891, 572.8044],[142.2444, -0.01999198, 572.7731],[142.2713, -0.01863434, 572.7483],[142.2985, -0.01733583, 572.7234],[142.3336, -0.01569685, 572.6921],[142.405, -0.01668335, 572.6296],[142.4628, -0.01980776, 572.5797],[142.5035, -0.02117437, 572.5449],[142.5384, -0.02189425, 572.5152],[142.5685, -0.02228352, 572.4902],[142.6137, -0.02278752, 572.4529],[142.6642, -0.02303429, 572.4118],[142.7085, -0.02325433, 572.3763],[142.766, -0.02257066, 572.3312],[142.8821, -0.01881034, 572.2437],[142.9597, -0.01593948, 572.1861],[142.9696, -0.01544765, 572.1788],[143.0172, -0.01338197, 572.1437],[143.076, -0.0114591, 572.101],[143.1149, -0.01234147, 572.0739],[143.1691, -0.01581758, 572.037],[143.2065, -0.01815548, 572.0118],[143.2522, -0.01978064, 571.9809],[143.3011, -0.02127273, 571.948],[143.3377, -0.02081609, 571.9245],[143.4183, -0.01950245, 571.8726],[143.4902, -0.01807297, 571.8264],[143.5343, -0.0175391, 571.7987],[143.5608, -0.01759356, 571.7825],[143.5911, -0.01717058, 571.764],[143.6458, -0.01607553, 571.7306],[143.693, -0.01547654, 571.7024],[143.7485, -0.01548299, 571.6709],[143.8175, -0.01574977, 571.6315],[143.8708, -0.01652237, 571.6017],[143.9491, -0.0160313, 571.5596],[144.0184, -0.01483544, 571.5227],[144.0363, -0.01447774, 571.5131],[144.0637, -0.01432391, 571.4987],[144.1224, -0.01434779, 571.4677],[144.1715, -0.01442718, 571.4422],[144.1953, -0.0145433, 571.4302],[144.2665, -0.01480657, 571.3962],[144.3489, -0.0163923, 571.3569],[144.3814, -0.01844081, 571.3411],[144.4083, -0.01861602, 571.3284],[144.4675, -0.01694035, 571.301],[144.5175, -0.01574981, 571.2781],[144.5462, -0.01568998, 571.2656],[144.5934, -0.01550807, 571.2451],[144.6454, -0.01547175, 571.2229],[144.7203, -0.01478874, 571.1919],[144.7835, -0.01376356, 571.1663],[144.8243, -0.01432241, 571.1497],[144.8731, -0.01529546, 571.1301],[144.8973, -0.01541066, 571.1205],[144.9038, -0.01508989, 571.1182],[144.916, -0.01455041, 571.1138],[144.9556, -0.01379068, 571.1005],[145.0602, -0.01391453, 571.0649],[145.1478, -0.01465114, 571.0349],[145.1655, -0.01478407, 571.0288],[145.1696, -0.0147913, 571.0275],[145.211, -0.01551238, 571.0156],[145.2521, -0.01625661, 571.0038],[145.2546, -0.01630192, 571.0031],[145.2582, -0.01633627, 571.002],[145.2917, -0.01701197, 570.9917],[145.3685, -0.01865086, 570.9682],[145.4243, -0.01943179, 570.9514],[145.45, -0.01889651, 570.9444],[145.4817, -0.01872314, 570.9368],[145.5508, -0.01847148, 570.9219],[145.6074, -0.01799234, 570.9097],[145.6385, -0.01740676, 570.9026],[145.6757, -0.01686226, 570.8941],[145.7179, -0.01731708, 570.8865],[145.7814, -0.01844415, 570.8759],[145.8272, -0.01896315, 570.8686],[145.8773, -0.01869122, 570.8623],[145.9458, -0.01847936, 570.8543],[145.985, -0.01839645, 570.8498],[146.0081, -0.01854843, 570.8472],[146.0541, -0.02106533, 570.8432],[146.1355, -0.02782925, 570.8374],[146.2059, -0.03366203, 570.8322],[146.2263, -0.03505306, 570.8305],[146.2396, -0.03491875, 570.8296]]
cloud = pv.PolyData(tab_point_ds_np)
surf_inter = cloud.delaunay_2d(alpha=0.35)
image = pv.Plotter()
image.add_mesh(surf_inter, show_edges=True)
image.add_points(cloud)
image.add_axes(interactive=True)
image.view_zx()
image.show()
but if i just add that after the generation of 'a' to make the point cloud flat, the delaunay_2D work perfectly:
for i in range(len(a)):
a[i][1] = 0 # Every y at 0
here is the image with and without making it flat :
So my idea was:
generate a flat mesh
move each point on the mesh at the correct altitude
Thanks in advance for your help
Just overwrite the points after having created the triangulation with the flat point array:
cloud.points = np.array([[v[0],0,v[2]] for v in a])
surf_inter = cloud.delaunay_2d(alpha=0.35)
surf_inter.points = np.array(a)

Scatter plot looks good but line plot looks weird on non-monotonically increasing data set

I have a monotonically increasing data set as shown below.
R,M
7.0868,1.8102943986273166
7.087,1.810312919954896
7.0872,1.8102755711577103
7.0875,1.8102573284176724
7.0876,1.810237664390435
7.0887,1.810218897273047
7.0891,1.8102001649403308
7.0893,1.810178092508343
7.0894,1.8101553469354064
7.0902,1.8101359159985828
7.0907,1.810114549302785
7.0913,1.81009305646246
7.0916,1.8100731291478405
7.0919,1.8100505894431602
7.0923,1.8100245482326576
7.0933,1.810004843857531
7.0941,1.809981589365771
7.0948,1.8099565489521152
7.0949,1.8099337348073137
7.0957,1.8099052572558645
7.096,1.8098801233168886
7.0963,1.8098547472451978
7.0968,1.8098277762241366
7.0976,1.8098018568760064
7.0988,1.8097719856008248
7.099,1.8097424026714641
7.0994,1.8097145467653863
7.1002,1.8096846260698558
7.1005,1.8096553317621344
7.1016,1.8096207945226712
7.1023000000000005,1.8095909693292185
7.1031,1.8095572406207299
7.1038,1.8095238119406782
7.1043,1.8094894673202357
7.1053,1.8094538233723965
7.1064,1.8094182142472666
7.1067,1.8093818127358254
7.1079,1.8093437811755255
7.1088000000000005,1.8093041362243816
7.1098,1.809264041823682
7.1107000000000005,1.8092243783159143
7.1112,1.8091814057573945
7.1126000000000005,1.8091391534332957
7.1136,1.809094359509292
7.1148,1.809048533354942
7.1158,1.8090036536620597
7.1169,1.8089557015211883
7.1181,1.8089046493876206
7.1193,1.8088552101687183
7.1204,1.8088020551150032
7.1219,1.808747338797958
7.1225000000000005,1.8086919257417675
7.1247,1.8086350956553856
7.1258,1.8085748348942912
7.1275,1.808514553392964
7.1291,1.8084534203833889
7.1306,1.8083867543300092
7.1325,1.8083196215972281
7.1338,1.80825088250088
7.136,1.808178483206244
7.1374,1.8081044657602499
7.1392,1.8080287144430973
7.1412,1.8079480881686774
7.1431000000000004,1.8078648303094877
7.1456,1.8077807725153732
7.1476,1.8076892427316402
7.1503000000000005,1.807599230113512
7.1525,1.8075034794947091
7.1552,1.8074049113668145
7.1578,1.8073014641377354
7.1612,1.8071891350684717
7.1637,1.8070785128831843
7.1675,1.80696372890561
7.1701,1.8068419878230761
7.1737,1.8067122501065405
7.1779,1.8065802344915192
7.1814,1.8064383616085946
7.1856,1.806293933093177
7.1896,1.806138911817485
7.1947,1.8059806108944794
7.1993,1.80580908721362
7.2053,1.8056328160830435
7.2107,1.8054479682161961
7.2173,1.8052525284387695
7.2237,1.8050465193576883
7.2309,1.8048296381956124
7.2392,1.8045988960975694
7.2474,1.8043595071215677
7.2564,1.8041082364687364
7.2666,1.8038382553758734
7.2781,1.8035594899544896
7.2901,1.8032661790541915
7.3036,1.8029587616930072
7.3192,1.8026419692687126
7.3365,1.802313214895432
7.3559,1.8019832998820766
7.3782000000000005,1.8016547858228427
7.4039,1.8013374225262055
7.434,1.8010610354808818
7.469,1.8008525385497174
7.4728,1.8008375055547212
7.4766,1.8008241798024116
7.4805,1.8008134283846535
7.485,1.8008014895962607
7.4889,1.8007906472467445
7.4931,1.8007836940234814
7.4974,1.8007772872833665
7.502,1.8007773636348627
7.5066,1.800777214492662
7.5111,1.800772599047411
7.5161,1.8007769259270974
7.5204,1.8007812794388944
7.5251,1.8007885071607819
7.5309,1.8007961396426069
7.5354,1.800809332665
7.5404,1.800828880377808
7.5456,1.800846702941447
7.5511,1.8008692674381197
7.5565,1.8008933437321841
7.5623000000000005,1.8009237058574081
7.5682,1.800958157045992
7.5744,1.8009948449267943
7.58,1.8010363488385235
7.5863000000000005,1.8010832972433193
7.5923,1.8011350711403118
7.5989,1.8011921478121384
7.6052,1.801254330745158
7.6122000000000005,1.8013200393645774
7.619,1.801396979723438
7.6262,1.801481231944994
7.6332,1.8015680286606623
7.6412,1.8016656871159082
7.6485,1.8017686065785499
7.6562,1.8018805264670845
7.664,1.8020043241836483
7.6723,1.8021374134198185
7.6806,1.802276358227313
7.689,1.802430876035706
7.698,1.8025962404854161
7.7073,1.802773424707928
7.7165,1.8029615206656595
7.7261,1.8031700727690376
7.7358,1.8033901306600841
7.746,1.8036245439350242
7.7569,1.8038801831608258
7.7674,1.8041511397011663
7.7785,1.8044409511998807
7.7895,1.804751063391503
7.8016000000000005,1.8050889378483397
7.8137,1.8054500843221957
7.8260000000000005,1.8058344798814248
7.839,1.8062497893213036
7.8523000000000005,1.8066916535420319
7.8660000000000005,1.807171119554773
7.8801000000000005,1.8076802794778468
7.8950000000000005,1.8082299359839067
7.91,1.808815338202358
7.9256,1.8094485033102967
7.9419,1.8101332152002367
7.9588,1.8108583555324504
7.9762,1.8116377906606793
7.9942,1.812480154325305
8.013300000000001,1.8133886252401064
8.0323,1.8143645477074526
8.0526,1.8154146330511043
8.073500000000001,1.8165442307174358
8.0957,1.8177698166402039
8.1182,1.819085725400004
8.1417,1.8205097465554974
8.1664,1.8220480025653125
8.192,1.8237072998986206
8.2188,1.8255111058560254
8.2468,1.827455350126501
8.2759,1.8295663029422389
8.3064,1.831861429607547
8.3383,1.8343455967834263
8.3716,1.837047237198313
8.4065,1.8399908757968044
8.4431,1.8431886841980547
8.4816,1.846678932529894
8.5218,1.8504805320192779
8.5642,1.8546328838729316
8.6085,1.859161369210759
8.655,1.8641143534208833
8.7039,1.8695256342139759
8.754900000000001,1.875446560741857
8.8087,1.881922204419208
8.8655,1.8890064461692662
8.9244,1.8967439742289458
8.9863,1.905188505881128
9.0511,1.9143851329920027
9.1186,1.924363320273434
9.188600000000001,1.9351143409915226
9.2613,1.9466051165466298
9.3348,1.9586922001685116
9.4098,1.970987602510523
9.4882,1.9833342806468837
9.5729,1.9958205973858019
9.6658,2.008306966070422
9.6757,2.0095470086686014
9.6853,2.0107829319774146
9.6956,2.0120161755240176
9.706,2.013246638357084
9.7155,2.0144724860531107
9.726,2.01569779646471
9.7361,2.01691593463459
9.7469,2.0181299858892676
9.7574,2.019339103824116
9.768,2.0205367574186544
9.7784,2.0217329512312534
9.789200000000001,2.022924537891196
9.8004,2.024103911848606
9.8115,2.0252755733660237
9.822700000000001,2.026442290408354
9.8339,2.027595562850575
9.8451,2.0287425260513627
9.8566,2.02987789695615
9.8683,2.031004255291417
9.8802,2.0321140981371753
9.8917,2.033211262029186
9.9039,2.03429873554374
9.9159,2.035370601551793
9.9284,2.036428080910105
9.9404,2.03746680777716
9.953100000000001,2.038486511766415
9.9657,2.039488307130752
9.9784,2.040471399292025
9.9911,2.0414350165353037
10.0042,2.0423773356028083
10.0178,2.043291283530465
10.030800000000001,2.0441838862321724
10.044500000000001,2.0450464474687147
10.0585,2.0458827447198584
10.0716,2.0466886270813385
10.0859,2.047468383690954
10.0998,2.0482043647433352
10.113900000000001,2.0489096859138938
10.1285,2.0495761215721746
10.1431,2.0501996224170225
10.158,2.0507863441183343
10.173,2.05132507354447
10.1883,2.0518124042758448
10.2033,2.052257120191798
10.2188,2.052637398387419
10.2344,2.0529609887501064
10.2505,2.053231208698309
10.266300000000001,2.053430956645957
10.2827,2.0535609020452807
10.2992,2.053618768726303
10.315900000000001,2.0535986346512063
10.3324,2.053499145209982
10.3495,2.0533064233065197
10.3668,2.0530215567767636
10.3844,2.0526369031524108
10.402000000000001,2.0521636845730233
10.42,2.0515392027607855
10.4381,2.0508116828399494
10.4563,2.0499535127064785
10.4748,2.0489576534963168
10.4937,2.0478138062588847
10.5128,2.046511793430433
10.532,2.0450378909729627
10.5515,2.043383966625784
10.5714,2.0415367556333575
10.591000000000001,2.039475707572078
10.6113,2.0371915999694594
10.6318,2.034681992486926
10.6523,2.031875344830552
10.6732,2.028806016957831
10.6943,2.0254302835993974
10.7156,2.021729410221098
10.737,2.0176679331240632
10.7585,2.0132226995271503
10.7804,2.0083569404787207
10.8025,2.003033377167351
10.8245,1.9972070467548615
10.8468,1.99084498211035
10.8693,1.9838848370723352
10.8916,1.976265341594595
10.913400000000001,1.9679245337116287
10.9359,1.9587753705415543
10.958,1.9487087547075432
10.9801,1.937613087921291
11.0016,1.925359737260557
11.0228,1.911811244861433
11.043700000000001,1.896814109152176
11.0641,1.880201767746232
11.0839,1.861791757645824
11.103,1.8413880752742964
11.1143,0.6798071334659402
11.1148,0.6620484741207461
11.115400000000001,0.7308628786759206
11.1163,0.643905710436412
11.1173,0.7471776126414391
11.1188,0.6253614804987849
11.119,0.7631699685933497
11.1209,1.8187639653487393
11.121,0.7788332436619917
11.1226,0.6064184938116979
11.1233,0.7941958537153351
11.1252,0.8092591741702967
11.1277,0.5870678163436467
11.1302,0.8385380585848173
11.1326,0.8527702605010601
11.135200000000001,0.5673102326921188
11.1377,0.8804746147417499
11.138300000000001,1.7936929573835567
11.1404,0.8939630164904495
11.142800000000001,0.9072161422501497
11.1443,0.5471696019139972
11.1457,0.920255663318353
11.148,0.933064576156273
11.1506,0.9456674682901905
11.152800000000001,0.958071445468564
11.1539,1.7659104790175046
11.1555,0.9702722709283456
11.1563,0.526626294457235
11.1578,0.982282581805736
11.16,0.994125843269314
11.1625,1.005758474384689
11.1651,1.0172259729870816
11.1667,1.0285290632922044
11.1681,1.7351407435690962
11.1694,1.0396641713997514
11.1708,1.0506369116951209
11.1715,0.5057129912122545
11.1728,1.06145775881892
11.1752,1.0721969265059947
11.177100000000001,1.0826438965199432
11.178700000000001,1.0930140692041797
11.1804,1.7010859834099117
11.180900000000001,1.1032438870571097
11.1824,1.113341990904366
11.184000000000001,1.123299806468843
11.1857,1.1331296145407677
11.1873,1.1428308979922694
11.1889,1.152401698215316
11.1903,1.161856869794937
11.1904,0.48445364974714356
11.1919,1.663399436215842
11.192,1.1711910394172824
11.1934,1.1804087961074725
11.1942,1.1895091584397912
11.195500000000001,1.1985002253694752
11.1974,1.2073817550934374
11.1981,1.2161518746407876
11.199300000000001,1.2248195347259854
11.2006,1.233382363999008
11.2012,1.6217221083677575
11.201600000000001,1.2418573170671454
11.2026,1.2502123181321048
11.2036,1.2584707455312942
11.2044,1.2666389953934527
11.205300000000001,1.2747462832375793
11.2059,1.282698337211604
11.2071,1.2905889671447655
11.2075,1.2983932387539374
11.208400000000001,1.5756312874271927
11.2089,1.3061289118283488
11.2093,1.3137413392392563
11.209900000000001,1.3212844363707013
11.2105,1.3287440211738633
11.2111,1.3361240786859585
11.2118,1.3434226680704695
11.2121,1.3506419841724973
11.2127,1.35780576619357
11.2131,1.3718370881026203
11.2135,1.5246558611202008
11.213700000000001,1.364846987030096
11.214,1.5138285906034126
11.2142,1.385586125420797
11.2144,1.5083287553910607
11.214500000000001,1.5027740924000998
11.2146,1.3990472473875148
11.2147,1.491494982843448
11.2148,1.4122266556473997
11.2149,1.4187122779735373
11.215,1.392352319217516
11.2151,1.4799814651383028
11.215200000000001,1.4682238422417109
11.215300000000001,1.4056725030722297
11.2154,1.4562337169860362
11.2155,1.4251295454595927
11.2156,1.4314822279446662
R,M
7.0868,1.8102943986273166
7.087,1.810312919954896
7.0872,1.8102755711577103
7.0875,1.8102573284176724
7.0876,1.810237664390435
7.0887,1.810218897273047
7.0891,1.8102001649403308
7.0893,1.810178092508343
7.0894,1.8101553469354064
7.0902,1.8101359159985828
7.0907,1.810114549302785
7.0913,1.81009305646246
7.0916,1.8100731291478405
7.0919,1.8100505894431602
7.0923,1.8100245482326576
7.0933,1.810004843857531
7.0941,1.809981589365771
7.0948,1.8099565489521152
7.0949,1.8099337348073137
7.0957,1.8099052572558645
7.096,1.8098801233168886
7.0963,1.8098547472451978
7.0968,1.8098277762241366
7.0976,1.8098018568760064
7.0988,1.8097719856008248
7.099,1.8097424026714641
7.0994,1.8097145467653863
7.1002,1.8096846260698558
7.1005,1.8096553317621344
7.1016,1.8096207945226712
7.1023000000000005,1.8095909693292185
7.1031,1.8095572406207299
7.1038,1.8095238119406782
7.1043,1.8094894673202357
7.1053,1.8094538233723965
7.1064,1.8094182142472666
7.1067,1.8093818127358254
7.1079,1.8093437811755255
7.1088000000000005,1.8093041362243816
7.1098,1.809264041823682
7.1107000000000005,1.8092243783159143
7.1112,1.8091814057573945
7.1126000000000005,1.8091391534332957
7.1136,1.809094359509292
7.1148,1.809048533354942
7.1158,1.8090036536620597
7.1169,1.8089557015211883
7.1181,1.8089046493876206
7.1193,1.8088552101687183
7.1204,1.8088020551150032
7.1219,1.808747338797958
7.1225000000000005,1.8086919257417675
7.1247,1.8086350956553856
7.1258,1.8085748348942912
7.1275,1.808514553392964
7.1291,1.8084534203833889
7.1306,1.8083867543300092
7.1325,1.8083196215972281
7.1338,1.80825088250088
7.136,1.808178483206244
7.1374,1.8081044657602499
7.1392,1.8080287144430973
7.1412,1.8079480881686774
7.1431000000000004,1.8078648303094877
7.1456,1.8077807725153732
7.1476,1.8076892427316402
7.1503000000000005,1.807599230113512
7.1525,1.8075034794947091
7.1552,1.8074049113668145
7.1578,1.8073014641377354
7.1612,1.8071891350684717
7.1637,1.8070785128831843
7.1675,1.80696372890561
7.1701,1.8068419878230761
7.1737,1.8067122501065405
7.1779,1.8065802344915192
7.1814,1.8064383616085946
7.1856,1.806293933093177
7.1896,1.806138911817485
7.1947,1.8059806108944794
7.1993,1.80580908721362
7.2053,1.8056328160830435
7.2107,1.8054479682161961
7.2173,1.8052525284387695
7.2237,1.8050465193576883
7.2309,1.8048296381956124
7.2392,1.8045988960975694
7.2474,1.8043595071215677
7.2564,1.8041082364687364
7.2666,1.8038382553758734
7.2781,1.8035594899544896
7.2901,1.8032661790541915
7.3036,1.8029587616930072
7.3192,1.8026419692687126
7.3365,1.802313214895432
7.3559,1.8019832998820766
7.3782000000000005,1.8016547858228427
7.4039,1.8013374225262055
7.434,1.8010610354808818
7.469,1.8008525385497174
7.4728,1.8008375055547212
7.4766,1.8008241798024116
7.4805,1.8008134283846535
7.485,1.8008014895962607
7.4889,1.8007906472467445
7.4931,1.8007836940234814
7.4974,1.8007772872833665
7.502,1.8007773636348627
7.5066,1.800777214492662
7.5111,1.800772599047411
7.5161,1.8007769259270974
7.5204,1.8007812794388944
7.5251,1.8007885071607819
7.5309,1.8007961396426069
7.5354,1.800809332665
7.5404,1.800828880377808
7.5456,1.800846702941447
7.5511,1.8008692674381197
7.5565,1.8008933437321841
7.5623000000000005,1.8009237058574081
7.5682,1.800958157045992
7.5744,1.8009948449267943
7.58,1.8010363488385235
7.5863000000000005,1.8010832972433193
7.5923,1.8011350711403118
7.5989,1.8011921478121384
7.6052,1.801254330745158
7.6122000000000005,1.8013200393645774
7.619,1.801396979723438
7.6262,1.801481231944994
7.6332,1.8015680286606623
7.6412,1.8016656871159082
7.6485,1.8017686065785499
7.6562,1.8018805264670845
7.664,1.8020043241836483
7.6723,1.8021374134198185
7.6806,1.802276358227313
7.689,1.802430876035706
7.698,1.8025962404854161
7.7073,1.802773424707928
7.7165,1.8029615206656595
7.7261,1.8031700727690376
7.7358,1.8033901306600841
7.746,1.8036245439350242
7.7569,1.8038801831608258
7.7674,1.8041511397011663
7.7785,1.8044409511998807
7.7895,1.804751063391503
7.8016000000000005,1.8050889378483397
7.8137,1.8054500843221957
7.8260000000000005,1.8058344798814248
7.839,1.8062497893213036
7.8523000000000005,1.8066916535420319
7.8660000000000005,1.807171119554773
7.8801000000000005,1.8076802794778468
7.8950000000000005,1.8082299359839067
7.91,1.808815338202358
7.9256,1.8094485033102967
7.9419,1.8101332152002367
7.9588,1.8108583555324504
7.9762,1.8116377906606793
7.9942,1.812480154325305
8.013300000000001,1.8133886252401064
8.0323,1.8143645477074526
8.0526,1.8154146330511043
8.073500000000001,1.8165442307174358
8.0957,1.8177698166402039
8.1182,1.819085725400004
8.1417,1.8205097465554974
8.1664,1.8220480025653125
8.192,1.8237072998986206
8.2188,1.8255111058560254
8.2468,1.827455350126501
8.2759,1.8295663029422389
8.3064,1.831861429607547
8.3383,1.8343455967834263
8.3716,1.837047237198313
8.4065,1.8399908757968044
8.4431,1.8431886841980547
8.4816,1.846678932529894
8.5218,1.8504805320192779
8.5642,1.8546328838729316
8.6085,1.859161369210759
8.655,1.8641143534208833
8.7039,1.8695256342139759
8.754900000000001,1.875446560741857
8.8087,1.881922204419208
8.8655,1.8890064461692662
8.9244,1.8967439742289458
8.9863,1.905188505881128
9.0511,1.9143851329920027
9.1186,1.924363320273434
9.188600000000001,1.9351143409915226
9.2613,1.9466051165466298
9.3348,1.9586922001685116
9.4098,1.970987602510523
9.4882,1.9833342806468837
9.5729,1.9958205973858019
9.6658,2.008306966070422
9.6757,2.0095470086686014
9.6853,2.0107829319774146
9.6956,2.0120161755240176
9.706,2.013246638357084
9.7155,2.0144724860531107
9.726,2.01569779646471
9.7361,2.01691593463459
9.7469,2.0181299858892676
9.7574,2.019339103824116
9.768,2.0205367574186544
9.7784,2.0217329512312534
9.789200000000001,2.022924537891196
9.8004,2.024103911848606
9.8115,2.0252755733660237
9.822700000000001,2.026442290408354
9.8339,2.027595562850575
9.8451,2.0287425260513627
9.8566,2.02987789695615
9.8683,2.031004255291417
9.8802,2.0321140981371753
9.8917,2.033211262029186
9.9039,2.03429873554374
9.9159,2.035370601551793
9.9284,2.036428080910105
9.9404,2.03746680777716
9.953100000000001,2.038486511766415
9.9657,2.039488307130752
9.9784,2.040471399292025
9.9911,2.0414350165353037
10.0042,2.0423773356028083
10.0178,2.043291283530465
10.030800000000001,2.0441838862321724
10.044500000000001,2.0450464474687147
10.0585,2.0458827447198584
10.0716,2.0466886270813385
10.0859,2.047468383690954
10.0998,2.0482043647433352
10.113900000000001,2.0489096859138938
10.1285,2.0495761215721746
10.1431,2.0501996224170225
10.158,2.0507863441183343
10.173,2.05132507354447
10.1883,2.0518124042758448
10.2033,2.052257120191798
10.2188,2.052637398387419
10.2344,2.0529609887501064
10.2505,2.053231208698309
10.266300000000001,2.053430956645957
10.2827,2.0535609020452807
10.2992,2.053618768726303
10.315900000000001,2.0535986346512063
10.3324,2.053499145209982
10.3495,2.0533064233065197
10.3668,2.0530215567767636
10.3844,2.0526369031524108
10.402000000000001,2.0521636845730233
10.42,2.0515392027607855
10.4381,2.0508116828399494
10.4563,2.0499535127064785
10.4748,2.0489576534963168
10.4937,2.0478138062588847
10.5128,2.046511793430433
10.532,2.0450378909729627
10.5515,2.043383966625784
10.5714,2.0415367556333575
10.591000000000001,2.039475707572078
10.6113,2.0371915999694594
10.6318,2.034681992486926
10.6523,2.031875344830552
10.6732,2.028806016957831
10.6943,2.0254302835993974
10.7156,2.021729410221098
10.737,2.0176679331240632
10.7585,2.0132226995271503
10.7804,2.0083569404787207
10.8025,2.003033377167351
10.8245,1.9972070467548615
10.8468,1.99084498211035
10.8693,1.9838848370723352
10.8916,1.976265341594595
10.913400000000001,1.9679245337116287
10.9359,1.9587753705415543
10.958,1.9487087547075432
10.9801,1.937613087921291
11.0016,1.925359737260557
11.0228,1.911811244861433
11.043700000000001,1.896814109152176
11.0641,1.880201767746232
11.0839,1.861791757645824
11.103,1.8413880752742964
11.1143,0.6798071334659402
11.1148,0.6620484741207461
11.115400000000001,0.7308628786759206
11.1163,0.643905710436412
11.1173,0.7471776126414391
11.1188,0.6253614804987849
11.119,0.7631699685933497
11.1209,1.8187639653487393
11.121,0.7788332436619917
11.1226,0.6064184938116979
11.1233,0.7941958537153351
11.1252,0.8092591741702967
11.1277,0.5870678163436467
11.1302,0.8385380585848173
11.1326,0.8527702605010601
11.135200000000001,0.5673102326921188
11.1377,0.8804746147417499
11.138300000000001,1.7936929573835567
11.1404,0.8939630164904495
11.142800000000001,0.9072161422501497
11.1443,0.5471696019139972
11.1457,0.920255663318353
11.148,0.933064576156273
11.1506,0.9456674682901905
11.152800000000001,0.958071445468564
11.1539,1.7659104790175046
11.1555,0.9702722709283456
11.1563,0.526626294457235
11.1578,0.982282581805736
11.16,0.994125843269314
11.1625,1.005758474384689
11.1651,1.0172259729870816
11.1667,1.0285290632922044
11.1681,1.7351407435690962
11.1694,1.0396641713997514
11.1708,1.0506369116951209
11.1715,0.5057129912122545
11.1728,1.06145775881892
11.1752,1.0721969265059947
11.177100000000001,1.0826438965199432
11.178700000000001,1.0930140692041797
11.1804,1.7010859834099117
11.180900000000001,1.1032438870571097
11.1824,1.113341990904366
11.184000000000001,1.123299806468843
11.1857,1.1331296145407677
11.1873,1.1428308979922694
11.1889,1.152401698215316
11.1903,1.161856869794937
11.1904,0.48445364974714356
11.1919,1.663399436215842
11.192,1.1711910394172824
11.1934,1.1804087961074725
11.1942,1.1895091584397912
11.195500000000001,1.1985002253694752
11.1974,1.2073817550934374
11.1981,1.2161518746407876
11.199300000000001,1.2248195347259854
11.2006,1.233382363999008
11.2012,1.6217221083677575
11.201600000000001,1.2418573170671454
11.2026,1.2502123181321048
11.2036,1.2584707455312942
11.2044,1.2666389953934527
11.205300000000001,1.2747462832375793
11.2059,1.282698337211604
11.2071,1.2905889671447655
11.2075,1.2983932387539374
11.208400000000001,1.5756312874271927
11.2089,1.3061289118283488
11.2093,1.3137413392392563
11.209900000000001,1.3212844363707013
11.2105,1.3287440211738633
11.2111,1.3361240786859585
11.2118,1.3434226680704695
11.2121,1.3506419841724973
11.2127,1.35780576619357
11.2131,1.3718370881026203
11.2135,1.5246558611202008
11.213700000000001,1.364846987030096
11.214,1.5138285906034126
11.2142,1.385586125420797
11.2144,1.5083287553910607
11.214500000000001,1.5027740924000998
11.2146,1.3990472473875148
11.2147,1.491494982843448
11.2148,1.4122266556473997
11.2149,1.4187122779735373
11.215,1.392352319217516
11.2151,1.4799814651383028
11.215200000000001,1.4682238422417109
11.215300000000001,1.4056725030722297
11.2154,1.4562337169860362
11.2155,1.4251295454595927
11.2156,1.4314822279446662
The data is imported using Pandas with the code below.
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv('data.txt')
df = df.sort_values(by=['R'])
plt.plot(df['R'], df['M'])
plt.gcf().set_size_inches(2.55*8,1*8)
plt.xlabel(r'$r$ $(km)$')
plt.ylabel(r'$M/M_\odot$')
plt.show()
exit()
I've shorted data short by X ('R') and it look weird where Y is not monotonically increasing as picture below
Also, if I short the data by Y ('M'), the plot doesn't look so well where X is not monotonically increasing.
Scatter plot looks as shown below.
I have no idea for an equation to fit this plot. Is there any method or package for connecting the point properly?
Edit1:
I've tried doing spline fit. The result is as below.
import numpy as np
tck = interpolate.splrep(df['R'], df['M'],)
xnew= np.linspace(min(df['R'].to_numpy()),max(df['R'].to_numpy()),1000)
ynew = interpolate.splev(xnew, tck)
plt.plot(xnew, ynew)
I guess in this particular case a solution to get the data in the desired order is to sort them by the polar angle of the points in a cartesian plane.
X = <your data>
order = np.argsort(np.arctan2(X[:,1], X[:,0]))
plt.plot(X[order,0], X[order,1])
plt.show()

How to integrate curve from data

Here are my x-values:
[2600.2 2601.2 2602.2 2603.1 2604.1 2605.1 2606. 2607. 2607.9 2608.9
2609.9 2610.8 2611.8 2612.8 2613.7 2614.7 2615.7 2616.6 2617.6 2618.6
2619.5 2620.5 2621.4 2622.4 2623.4 2624.3 2625.3 2626.3 2627.2 2628.2
2629.2 2630.1 2631.1 2632.1 2633. 2634. 2635. 2635.9 2636.9 2637.8
2638.8 2639.8 2640.7 2641.7 2642.7 2643.6 2644.6 2645.6 2646.5 2647.5
2648.5 2649.4 2650.4 2651.3 2652.3 2653.3 2654.2 2655.2 2656.2 2657.1
2658.1 2659.1 2660. 2661. 2662. 2662.9 2663.9 2664.9 2665.8 2666.8
2667.7 2668.7 2669.7 2670.6 2671.6 2672.6 2673.5 2674.5 2675.5 2676.4
2677.4 2678.4 2679.3 2680.3 2681.2 2682.2 2683.2 2684.1 2685.1 2686.1
2687. 2688. 2689. 2689.9 2690.9 2691.9 2692.8 2693.8 2694.7 2695.7
2696.7 2697.6 2698.6 2699.6 2700.5 2701.5 2702.5 2703.4 2704.4 2705.4
2706.3 2707.3 2708.3 2709.2 2710.2 2711.1 2712.1 2713.1 2714. 2715.
2716. 2716.9 2717.9 2718.9 2719.8 2720.8 2721.8 2722.7 2723.7 2724.6
2725.6 2726.6 2727.5 2728.5 2729.5 2730.4 2731.4 2732.4 2733.3 2734.3
2735.3 2736.2 2737.2 2738.2 2739.1 2740.1 2741. 2742. 2743. 2743.9
2744.9 2745.9 2746.8 2747.8 2748.8 2749.7 2750.7 2751.7 2752.6 2753.6
2754.5 2755.5 2756.5 2757.4 2758.4 2759.4 2760.3 2761.3 2762.3 2763.2
2764.2 2765.2 2766.1 2767.1 2768.1 2769. 2770. 2770.9 2771.9 2772.9
2773.8 2774.8 2775.8 2776.7 2777.7 2778.7 2779.6 2780.6 2781.6 2782.5
2783.5 2784.4 2785.4 2786.4 2787.3 2788.3 2789.3 2790.2 2791.2 2792.2
2793.1 2794.1 2795.1 2796. 2797. 2797.9 2798.9 2799.9 2800.8 2801.8
2802.8 2803.7 2804.7 2805.7 2806.6 2807.6 2808.6 2809.5 2810.5 2811.5
2812.4 2813.4 2814.3 2815.3 2816.3 2817.2 2818.2 2819.2 2820.1 2821.1
2822.1 2823. 2824. 2825. 2825.9 2826.9 2827.8 2828.8 2829.8 2830.7
2831.7 2832.7 2833.6 2834.6 2835.6 2836.5 2837.5 2838.5 2839.4 2840.4
2841.4 2842.3 2843.3 2844.2 2845.2 2846.2 2847.1 2848.1 2849.1 2850.
2851. 2852. 2852.9 2853.9 2854.9 2855.8 2856.8 2857.7 2858.7 2859.7
2860.6 2861.6 2862.6 2863.5 2864.5 2865.5 2866.4 2867.4 2868.4 2869.3
2870.3 2871.2 2872.2 2873.2 2874.1 2875.1 2876.1 2877. 2878. 2879.
2879.9 2880.9 2881.9 2882.8 2883.8 2884.8 2885.7 2886.7 2887.6 2888.6
2889.6 2890.5 2891.5 2892.5 2893.4 2894.4 2895.4 2896.3 2897.3 2898.3
2899.2 2900.2 2901.1 2902.1 2903.1 2904. 2905. 2906. 2906.9 2907.9
2908.9 2909.8 2910.8 2911.8 2912.7 2913.7 2914.7 2915.6 2916.6 2917.5
2918.5 2919.5 2920.4 2921.4 2922.4 2923.3 2924.3 2925.3 2926.2 2927.2
2928.2 2929.1 2930.1 2931. 2932. 2933. 2933.9 2934.9 2935.9 2936.8
2937.8 2938.8 2939.7 2940.7 2941.7 2942.6 2943.6 2944.5 2945.5 2946.5
2947.4 2948.4 2949.4 2950.3 2951.3 2952.3 2953.2 2954.2 2955.2 2956.1
2957.1 2958.1 2959. 2960. 2960.9 2961.9 2962.9 2963.8 2964.8 2965.8
2966.7 2967.7 2968.7 2969.6 2970.6 2971.6 2972.5 2973.5 2974.4 2975.4
2976.4 2977.3 2978.3 2979.3 2980.2 2981.2 2982.2 2983.1 2984.1 2985.1
2986. 2987. 2988. 2988.9 2989.9 2990.8 2991.8 2992.8 2993.7 2994.7
2995.7 2996.6 2997.6 2998.6 2999.5 3000.5 3001.5 3002.4 3003.4 3004.3
3005.3 3006.3 3007.2 3008.2 3009.2 3010.1 3011.1 3012.1 3013. 3014.
3015. 3015.9 3016.9 3017.9 3018.8 3019.8]
and y-values:
[-7.44466803e-04 -6.38664122e-04 -5.34609823e-04 -4.42448211e-04
-3.41690555e-04 -2.42654847e-04 -1.54987591e-04 -5.91990560e-05
2.55600336e-05 1.18132985e-04 2.09025991e-04 2.89400351e-04
3.77124735e-04 4.63193491e-04 5.39246590e-04 6.22192168e-04
7.03505639e-04 7.75298863e-04 -2.01875984e-04 9.30157920e-04
-5.76584966e-05 1.59295034e-05 8.08012121e-05 1.51379342e-04
2.20383942e-04 2.81148660e-04 3.47183293e-04 4.11664999e-04
-5.85919853e-04 -5.24369726e-04 -4.64352721e-04 -4.11642743e-04
-3.54520443e-04 -2.98912259e-04 -2.50154195e-04 -1.97405361e-04
-1.46152432e-04 -1.01298756e-04 -5.28713359e-05 -1.05509367e-05
3.50723226e-05 7.92280634e-05 1.17718164e-04 -8.94084909e-04
-8.54153425e-04 -8.19451625e-04 -7.82263155e-04 -7.46510819e-04
-7.15557404e-04 -6.82519783e-04 -6.50903801e-04 -6.23660938e-04
-5.94732888e-04 -5.69901563e-04 5.09541266e-04 -5.18787274e-04
-4.97608457e-04 -4.75397944e-04 -4.54574454e-04 6.16170144e-04
6.34369460e-04 6.51193332e-04 6.65161962e-04 6.79382903e-04
6.92239181e-04 7.02645966e-04 7.12919040e-04 7.21837433e-04
7.28708431e-04 7.35061830e-04 7.39629406e-04 7.43428919e-04
-3.07297461e-04 7.46958864e-04 7.46880284e-04 7.45469661e-04
7.43063292e-04 7.39128670e-04 -3.19316915e-04 -3.25181546e-04
7.20233508e-04 7.11143871e-04 7.01837339e-04 6.90247525e-04
6.78693826e-04 6.64610321e-04 6.49216731e-04 6.34243638e-04
6.16365002e-04 5.97180431e-04 5.78798777e-04 5.57136288e-04
5.34171219e-04 5.12389754e-04 4.86952378e-04 4.60214976e-04
4.35040369e-04 4.05834757e-04 3.78439674e-04 3.46767714e-04
3.13798203e-04 2.83016440e-04 2.47582168e-04 2.10850784e-04
1.76683478e-04 1.37487404e-04 9.69938540e-05 5.94400641e-05
1.64803804e-05 -2.77779379e-05 -6.87212380e-05 -1.15448651e-04
-1.63476655e-04 -2.07814574e-04 -2.58316150e-04 -3.04881898e-04
-3.57860800e-04 -4.12145285e-04 -4.62118682e-04 -5.18887480e-04
-5.76965937e-04 -6.30357620e-04 -6.90928891e-04 -7.52814695e-04
-8.09637384e-04 -8.74026019e-04 -9.39734858e-04 -1.00000336e-03
-1.39302040e-05 -7.64653255e-05 -1.47211271e-04 -2.19288563e-04
-2.85298568e-04 -3.59912644e-04 -4.35865855e-04 -5.05371076e-04
-5.83876630e-04 -6.63729907e-04 -7.36752757e-04 -8.19175452e-04
-9.02955255e-04 -9.79520230e-04 -1.06588804e-03 -1.15362314e-03
-1.23375682e-03 -2.68690973e-04 -3.51178179e-04 -4.44143508e-04
-5.38494735e-04 -6.24599214e-04 -7.21595167e-04 -8.19989322e-04
-9.09743181e-04 -1.01080619e-03 -1.11328051e-03 -1.20671793e-03
-1.31188675e-03 -1.41848077e-03 -4.59113905e-04 -5.68429590e-04
-6.68044666e-04 -7.80100637e-04 -8.93606563e-04 -9.97006096e-04
-1.11328198e-03 -1.23102384e-03 -2.80608069e-04 -4.01151072e-04
-5.23176860e-04 -6.34272793e-04 -7.59132433e-04 -8.85492469e-04
5.82568375e-05 -7.09712713e-05 -2.01718186e-04 -3.20694386e-04
-4.54345109e-04 4.83937944e-04 3.47359177e-04 2.09229380e-04
8.35806570e-05 -5.75154297e-05 -2.00183075e-04 7.31074418e-04
5.85400722e-04 4.38134142e-04 1.36636107e-03 1.21604716e-03
1.06411824e-03 9.25994929e-04 1.83424021e-03 1.69332288e-03
1.53518486e-03 2.43978952e-03 2.29455679e-03 2.13160111e-03
3.03249801e-03 2.88288661e-03 2.71504221e-03 3.61216191e-03
3.45810648e-03 4.35310574e-03 4.17857074e-03 5.08895105e-03
4.91110676e-03 5.81963759e-03 5.63845053e-03 6.52672784e-03
6.36053995e-03 7.24657091e-03 8.13195214e-03 7.96106363e-03
8.84414958e-03 9.72656200e-03 9.55089781e-03 1.04309645e-02
1.13103332e-02 1.22091471e-02 1.20067872e-02 1.28830348e-02
1.37792517e-02 1.46542196e-02 1.55495062e-02 1.64231655e-02
1.72960620e-02 1.81898177e-02 1.90613600e-02 2.10232224e-02
2.19165774e-02 2.27871255e-02 2.47527537e-02 2.56456629e-02
2.76146667e-02 2.95864701e-02 3.04801022e-02 3.24552956e-02
3.44570839e-02 3.64381330e-02 3.73090546e-02 3.93176951e-02
4.01883136e-02 3.99413472e-02 3.97172410e-02 3.83507327e-02
3.69832945e-02 3.45288224e-02 3.31609323e-02 3.06840301e-02
2.71317309e-02 2.46628156e-02 2.21965029e-02 2.08567884e-02
1.94892933e-02 1.81480845e-02 1.78733224e-02 1.75962456e-02
1.62501951e-02 1.59686819e-02 1.67795042e-02 1.65219970e-02
1.62336140e-02 1.59428341e-02 1.56790710e-02 1.53836971e-02
1.50858840e-02 1.48157546e-02 1.45132663e-02 1.53347956e-02
1.39316877e-02 1.36219595e-02 1.33410446e-02 1.30265037e-02
1.27094074e-02 1.24218231e-02 1.20998289e-02 1.06805433e-02
1.03861716e-02 1.00565924e-02 9.72436664e-03 8.32959359e-03
7.99229514e-03 7.68642420e-03 6.25169507e-03 5.90654091e-03
5.59355915e-03 5.24318304e-03 4.89003437e-03 3.47870860e-03
3.12024578e-03 2.75896150e-03 2.43137920e-03 2.06468706e-03
1.69512373e-03 1.36004754e-03 9.84981135e-04 6.06993019e-04
2.64291109e-04 -1.19296827e-04 -4.67067393e-04 -8.56319352e-04
-1.57470803e-04 -5.13089904e-04 -9.11112209e-04 -1.31219422e-03
-5.83499839e-04 -9.90445890e-04 -1.40050508e-03 -6.78741650e-04
-1.09476716e-03 -4.19269184e-04 -7.99266490e-04 -1.28638967e-04
-5.14130274e-04 1.51560600e-04 -2.83100227e-04 4.21200445e-04
1.07979970e-03 6.35578391e-04 1.33364405e-03 1.98499815e-03
1.53105139e-03 2.22274354e-03 1.76233437e-03 1.29849487e-03
1.98245206e-03 1.51203930e-03 1.03813746e-03 6.08625763e-04
1.28038297e-04 -3.07523898e-04 -7.94871439e-04 -1.28580703e-03
-1.73073413e-03 -2.22854468e-03 -2.73000414e-03 -2.07887167e-03
-2.58732249e-03 -1.99267690e-03 -2.45681242e-03 -1.86804972e-03
-1.71336659e-04 4.66408985e-04 2.16330903e-03 2.79823358e-03
3.37734816e-03 3.95383298e-03 5.70282896e-03 6.27564610e-03
5.72281539e-03 6.34484289e-03 5.78445904e-03 5.22006708e-03
4.70866859e-03 3.01363377e-03 2.43748942e-03 7.93751865e-04
-9.10645379e-04 -2.55893384e-03 -4.26871417e-03 -4.86473696e-03
-5.40475552e-03 -6.00879559e-03 -5.49914640e-03 -4.93107329e-03
-4.42706670e-03 -3.92612623e-03 -3.36556562e-03 -2.87038286e-03
-1.25156694e-03 -6.97404716e-04 -2.09949744e-04 1.40618052e-03
1.95380580e-03 2.43337333e-03 2.97583880e-03 3.44934833e-03
3.91956988e-03 4.45395838e-03 4.91800203e-03 4.23648918e-03
4.76133123e-03 4.07090402e-03 3.37574816e-03 2.74604376e-03
2.04183294e-03 1.33281906e-03 1.83408931e-03 1.11587836e-03
4.65318351e-04 -2.62183596e-04 -9.94613493e-04 -1.65803553e-03
-2.39990105e-03 -2.00195122e-03 -2.67843498e-03 -2.28875480e-03
-3.05028833e-03 -2.59258856e-03 -2.21508630e-03 -1.84142275e-03
-1.39322682e-03 -1.02679037e-03 -6.64262378e-04 9.30989361e-04
1.28749758e-03 1.72095891e-03 2.07002683e-03 3.57853978e-03
4.00338438e-03 4.34221377e-03 3.50941007e-03 3.92274433e-03
3.07950391e-03 3.39963667e-03 2.63098462e-03 1.77161722e-03
9.06633181e-04 1.23321618e-04 -7.52413122e-04 -3.75171969e-04
-1.26176158e-03 -2.15410634e-03 -1.79051506e-03 -1.52085428e-03
-2.43005406e-03 -2.07895302e-03 -1.82355060e-03 -2.74985271e-03
-2.41145220e-03 -2.17054397e-03 -1.93425688e-03 -4.24643055e-04
-1.95669324e-04 2.86093317e-05 3.45181395e-04 5.60606434e-04]
How would you integrate the curve from x = 2672.6 to 30005.3 in Python?
You can start out by finding the indices of your x array that are within your integral limits:
idx = np.where((np.array(x)>=2672.6) & (np.array(x)<=30005.3))[0]
And then either using np.trapz to integrate using the trapezoidal rule:
np.trapz(x=np.array(x)[idx],y=np.array(y)[idx])
or one of scipy's integration methods for integrating with fixed samples:
# same as numpy.trapz
sp.integrate.trapz(x=np.array(x)[idx],y=np.array(y)[idx])
# example using simpson's rule
sp.integrate.simps(x=np.array(x)[idx],y=np.array(y)[idx])
output:
import scipy as sp
import numpy as np
idx = np.where((np.array(x)>=2672.6) & (np.array(x)<=30005.3))[0]
>>> np.trapz(x=np.array(x)[idx],y=np.array(y)[idx])
1.4913432492153544
>>> sp.integrate.trapz(x=np.array(x)[idx],y=np.array(y)[idx])
1.4913432492153544
>>> sp.integrate.simps(x=np.array(x)[idx],y=np.array(y)[idx])
1.4892436835956682
Representing the integral:
Note, from your data, I suspect you meant the upper limit to be 3005.3 rather than 30005.3, but that's for you to decide :-)

pyplot: how to explicitly number an axis in a human-readable way

Pyplot has a strange feature where, for large numbers, the axis are scaled by non-base ten numbers, making it nearly impossible to read numeric values:
x = [49856280.352, 49860580.25, 49861011.77, 49861103.034, 49861191.295, 49862295.297, 49862311.928, 49862755.161, 49863005.142, 49863331.328, 49863795.672, 49863892.911, 49864078.203, 49864455.172, 49864628.486, 49865539.345, 49865562.414, 49865652.025, 49865860.79, 49866049.199, 49866559.841, 49866709.259, 49866976.163, 49867118.158, 49867184.515, 49867228.03, 49867703.98, 49868191.475, 49868264.993, 49868402.682, 49868547.472, 49868849.941, 49869167.486, 49869233.011, 49869388.16, 49869462.118, 49869947.616, 49869976.177, 49870146.971, 49870441.068, 49870858.267, 49870898.339, 49870966.598, 49871065.408, 49871113.361, 49871268.792, 49871332.292, 49872008.637, 49872014.321, 49872128.757, 49872276.278, 49872296.18, 49872322.098, 49872366.707, 49872370.336, 49872537.099, 49872909.555, 49872917.363, 49873131.438, 49873230.402, 49873252.129, 49873289.302, 49873382.584, 49873429.968, 49873440.124, 49873444.505, 49873507.617, 49873835.836, 49873905.902, 49873965.72, 49874080.127, 49874101.966, 49874166.944, 49874359.819, 49874388.385, 49874412.152, 49874421.629, 49874584.264, 49874755.328, 49874798.936, 49874833.007, 49875145.279, 49875310.799, 49875391.973, 49875484.389, 49875615.09, 49875616.889, 49875773.568, 49875776.696, 49875892.137, 49875953.749, 49875954.395, 49876161.776, 49876220.899, 49876321.362, 49876380.343, 49876496.107, 49876595.953, 49876644.428, 49876655.041, 49876714.369, 49876770.925, 49876788.46, 49876932.063, 49876952.641, 49877075.874, 49877105.142, 49877220.934, 49877288.062, 49877294.256, 49877308.79, 49877551.764, 49877586.774, 49877620.658, 49877666.194, 49877842.635, 49878091.505, 49878171.278, 49878181.791, 49878229.777, 49878244.476, 49878483.22, 49878541.483, 49878602.181, 49878612.309, 49878615.488, 49878677.558, 49878683.807, 49878703.616, 49878785.269, 49878793.774, 49878922.532, 49878933.228, 49878981.748, 49879041.296, 49879060.17, 49879263.424, 49879355.213, 49879449.193, 49879455.009, 49879471.561, 49879508.752, 49879538.815, 49879597.852, 49879683.744, 49879727.257, 49879751.962, 49879895.858, 49879960.524, 49880178.136, 49880196.753, 49880217.788, 49880336.479, 49880370.356, 49880396.479, 49880422.808, 49880539.652, 49880559.579, 49880624.786, 49880704.456, 49880739.891, 49880836.13, 49880886.385, 49880938.998, 49881169.02, 49881288.366, 49881305.161, 49881426.038, 49881427.956, 49881463.834, 49881617.346, 49881730.679, 49881881.14, 49881894.675, 49881979.949, 49882096.47, 49882112.031, 49882131.716, 49882159.639, 49882190.252, 49882483.949, 49882538.07, 49882583.816, 49882597.938, 49882602.861, 49882611.359, 49882648.24, 49882684.267, 49882706.434, 49882835.084, 49883043.946, 49883084.906, 49883109.752, 49883228.104, 49883288.07, 49883382.503, 49883401.475, 49883491.927, 49883574.922, 49883654.813, 49883702.522, 49883801.5, 49883814.683, 49883826.244, 49883846.713, 49883855.077, 49883978.159, 49884046.234, 49884064.489, 49884112.738, 49884138.818, 49884220.732, 49884251.195, 49884255.97, 49884361.999, 49884397.955, 49884416.274, 49884498.095, 49884516.764, 49884548.794, 49884580.933, 49884597.752, 49884624.897, 49884634.323, 49884670.05, 49884676.813, 49884733.419, 49884751.203, 49884834.288, 49884888.879, 49884902.225, 49885004.171, 49885153.972, 49885157.866, 49885173.615, 49885174.386, 49885219.196, 49885273.781, 49885347.517, 49885364.666, 49885380.826, 49885427.356, 49885509.155, 49885541.137, 49885578.287, 49885595.473, 49885612.014, 49885710.601, 49885740.394, 49885741.348, 49885841.454, 49885952.568, 49885988.633, 49886053.94, 49886058.886, 49886076.628, 49886095.714, 49886147.686, 49886164.4, 49886179.103, 49886201.971, 49886279.139, 49886312.282, 49886312.8, 49886324.598, 49886408.542, 49886481.161, 49886548.747, 49886641.616, 49886642.093, 49886668.221, 49886675.982, 49886725.046, 49886741.706, 49886821.745, 49886833.46, 49886840.54, 49886850.264, 49886873.972, 49887005.587, 49887042.942, 49887073.685, 49887076.296, 49887091.248, 49887105.67, 49887148.602, 49887159.267, 49887271.173, 49887285.866, 49887303.534, 49887369.19, 49887382.49, 49887454.943, 49887479.589, 49887498.203, 49887616.744, 49887721.935, 49887747.864, 49887786.036, 49887803.228, 49887858.683, 49887943.768, 49888058.328, 49888058.963, 49888148.314, 49888200.419, 49888346.257, 49888362.013, 49888366.362, 49888406.004, 49888450.807, 49888497.044, 49888614.062, 49888622.199, 49888628.315, 49888717.575, 49888731.575, 49888736.902, 49888765.916, 49888803.98, 49888875.799, 49888892.348, 49888934.101, 49888967.728, 49888974.393, 49888981.908, 49889075.143, 49889221.983, 49889255.367, 49889277.661, 49889298.851, 49889319.147, 49889320.207, 49889407.915, 49889413.481, 49889429.941, 49889469.243, 49889487.959, 49889532.295, 49889539.477, 49889552.03, 49889572.229, 49889585.375, 49889602.118, 49889668.329, 49889683.014, 49889697.206, 49889772.868, 49889806.44, 49889881.148, 49889916.157, 49889961.726, 49889989.911, 49889997.299, 49890021.069, 49890092.985, 49890123.557, 49890137.558, 49890249.033, 49890337.341, 49890363.69, 49890412.835, 49890438.527, 49890455.844, 49890457.272, 49890540.923, 49890552.792, 49890571.653, 49890656.799, 49890657.446, 49890771.402, 49890893.014, 49890940.859, 49891117.607, 49891188.608, 49891197.473, 49891204.319, 49891260.746, 49891286.509, 49891329.619, 49891369.244, 49891373.448, 49891400.609, 49891594.308, 49891664.373, 49891769.784, 49891812.789, 49891878.95, 49891889.874, 49891924.49, 49891962.647, 49891972.677, 49892086.585, 49892096.15, 49892131.411, 49892145.241, 49892147.07, 49892186.586, 49892221.814, 49892257.429, 49892295.906, 49892366.592, 49892414.483, 49892486.488, 49892505.361, 49892571.789, 49892614.344, 49892775.098, 49892807.812, 49892832.242, 49892837.597, 49892858.141, 49892894.853, 49892896.347, 49893017.939, 49893029.177, 49893118.449, 49893168.059, 49893232.781, 49893235.78, 49893287.331, 49893326.778, 49893406.653, 49893471.93, 49893495.472, 49893510.31, 49893593.136, 49893668.36, 49893690.138, 49893717.478, 49893841.341, 49893849.407, 49893918.451, 49893929.304, 49893965.073, 49893995.907, 49894105.083, 49894113.528, 49894207.766, 49894220.283, 49894229.309, 49894287.256, 49894296.334, 49894321.153, 49894394.072, 49894410.075, 49894426.245, 49894429.549, 49894486.508, 49894569.593, 49894596.175, 49894646.893, 49894684.32, 49894706.127, 49894730.259, 49894814.007, 49894846.182, 49894921.957, 49895075.836, 49895134.196, 49895411.552, 49895467.919, 49895581.219, 49895643.126, 49895681.785, 49895715.833, 49895717.103, 49895732.304, 49895747.613, 49895775.574, 49895797.26, 49895801.342, 49895905.897, 49895914.703, 49895933.794, 49895949.521, 49895999.669, 49896017.596, 49896189.338, 49896213.562, 49896231.62, 49896310.695, 49896462.188, 49896483.7, 49896508.985, 49896602.682, 49896631.951, 49896719.268, 49896806.399, 49896806.913, 49896872.332, 49897018.727, 49897124.196, 49897134.793, 49897213.913, 49897270.838, 49897284.028, 49897315.792, 49897330.168]
plt.hist(x)
plt.show()
In my example, the axis should be scaled by 1e7 or 1e8, or displayed as rgular numbers--not 4.986e7. Why would anyone want this setting? How can I make the x axis numbers human-readable?
How to prevent numbers being changed to exponential form in Python matplotlib figure
ax = plt.gca()
ax.get_xaxis().get_major_formatter().set_useOffset(False)
ax.get_xaxis().get_major_formatter().set_scientific(False)
plt.draw()

Categories