[BUG] line chart data mapping error
khm0651 opened this issue · 2 comments
Describe the bug
I have noticed that while the graph appears the same in both Google Spreadsheet and Python matplotlib, it looks strange when using Kandy.
I'm wondering whether I should inquire about this issue with the Kandy team or with the DataFrame team.
My suspicion is that there might be a problem in the data mapping process.
It seems that the issue is occurring due to internal data reordering.
`
%useLatestDescriptors
%use dataframe
%use kandy
val yAxis = listOf(
27187.986328125,
27188.4232421875,
27188.86015625,
27189.2970703125,
27189.733984375,
27190.1708984375,
27190.6078125,
27191.0447265625,
27191.481640625,
27191.9185546875,
27192.35546875,
27192.7923828125,
27193.229296875,
27193.6662109375,
27194.103125,
27194.5400390625,
27194.976953125,
27195.4138671875,
27195.85078125,
27196.2876953125,
27196.724609375,
27197.226684570312,
27197.728759765625,
27198.230834960938,
27198.73291015625,
27199.234985351562,
27199.737060546875,
27200.239135742188,
27200.7412109375,
27201.243286132812,
27201.745361328125,
27202.247436523438,
27202.74951171875,
27203.251586914062,
27203.753662109375,
27204.255737304688,
27204.7578125,
27205.259887695312,
27205.761962890625,
27206.264038085938,
27206.76611328125,
27207.268188476562,
27207.770263671875,
27208.272338867188,
27208.7744140625,
27209.276489257812,
27209.778564453125,
27210.280639648438,
27210.78271484375,
27211.284790039062,
27211.786865234375,
27212.288940429688,
27212.791015625,
27213.293090820312,
27213.795166015625,
27214.297241210938,
27214.79931640625,
27215.301391601562,
27215.803466796875,
27216.305541992188,
27216.8076171875,
27217.309692382812,
27217.811767578125,
27218.313842773438,
27218.81591796875,
27219.317993164062,
27219.820068359375,
27220.322143554688,
27220.82421875,
27221.326293945312,
27221.828369140625,
27222.330444335938,
27222.83251953125,
27223.334594726562,
27223.836669921875,
27224.338745117188,
27224.8408203125,
27225.342895507812,
27225.844970703125,
27226.347045898438,
27226.84912109375,
27227.351196289062,
27227.853271484375,
27228.355346679688,
27228.857421875,
27229.359497070312,
27229.861572265625,
27230.363647460938,
27230.86572265625,
27231.367797851562,
27231.869873046875,
27232.371948242188,
27232.8740234375,
27233.376098632812,
27233.878173828125,
27234.380249023438,
27234.88232421875,
27235.384399414062,
27235.886474609375,
27236.388549804688,
27236.890625,
27185.722045898438,
27134.553466796875,
27083.384887695312,
27032.21630859375,
26981.047729492188,
26929.879150390625,
26878.710571289062,
26827.5419921875,
26776.373413085938,
26725.204833984375,
26674.036254882812,
26622.86767578125,
26571.699096679688,
26520.530517578125,
26469.361938476562,
26418.193359375,
26367.024780273438,
26315.856201171875,
26264.687622070312,
26213.51904296875,
26162.350463867188,
26111.181884765625,
26060.013305664062,
26008.8447265625,
25957.676147460938,
25906.507568359375,
25855.338989257812,
25804.17041015625,
25753.001831054688,
25701.833251953125,
25650.664672851562,
25599.49609375,
25548.327514648438,
25497.158935546875,
25445.990356445312,
25394.82177734375,
25343.653198242188,
25292.484619140625,
25241.316040039062,
25190.1474609375,
25138.978881835938,
25087.810302734375,
25036.641723632812,
24985.47314453125,
24934.304565429688,
24883.135986328125,
24831.967407226562,
24780.798828125,
24729.630249023438,
24678.461669921875,
24627.293090820312,
24576.12451171875,
24524.955932617188,
24473.787353515625,
24422.618774414062,
24371.4501953125,
24320.281616210938,
24269.113037109375,
24217.944458007812,
24166.77587890625,
24115.607299804688,
24064.438720703125,
24013.270141601562,
23962.1015625,
23910.932983398438,
23859.764404296875,
23808.595825195312,
23757.42724609375,
23706.258666992188,
23655.090087890625,
23603.921508789062,
23552.7529296875,
23501.584350585938,
23450.415771484375,
23399.247192382812,
23348.07861328125,
23296.910034179688,
23245.741455078125,
23194.572875976562,
23143.404296875,
23143.3904296875,
23143.3765625,
23143.3626953125,
23143.348828125,
23143.3349609375,
23143.32109375,
23143.3072265625,
23143.293359375,
23143.2794921875,
23143.265625,
23143.2517578125,
23143.237890625,
23143.2240234375,
23143.21015625,
23143.1962890625,
23143.182421875,
23143.1685546875,
23143.1546875,
23143.1408203125,
23143.126953125,
23143.1130859375,
23143.09921875,
23143.0853515625,
23143.071484375,
23143.0576171875,
23143.04375,
23143.0298828125,
23143.016015625,
23143.0021484375,
23142.98828125,
23142.9744140625,
23142.960546875,
23142.9466796875,
23142.9328125,
23142.9189453125,
23142.905078125,
23142.8912109375,
23142.87734375,
23142.8634765625,
23142.849609375,
23142.8357421875,
23142.821875,
23142.8080078125,
23142.794140625,
23142.7802734375,
23142.76640625,
23142.7525390625,
23142.738671875,
23142.7248046875,
23142.7109375,
23142.6970703125,
23142.683203125,
23142.6693359375,
23142.65546875,
23142.6416015625,
23142.627734375,
23142.6138671875,
23142.6,
23142.5861328125,
23142.572265625,
23142.5583984375,
23142.54453125,
23142.5306640625,
23142.516796875,
23142.5029296875,
23142.4890625,
23142.4751953125,
23142.461328125,
23142.4474609375,
23142.43359375,
23142.4197265625,
23142.405859375,
23142.3919921875,
23142.378125,
23142.3642578125,
23142.350390625,
23142.3365234375,
23142.32265625,
23142.3087890625,
23142.294921875,
23143.18759765625,
23144.0802734375,
23144.97294921875,
23145.865625,
23146.75830078125,
23147.6509765625,
23148.54365234375,
23149.436328125,
23150.32900390625,
23151.2216796875,
23152.11435546875,
23153.00703125,
23153.89970703125,
23154.7923828125,
23155.68505859375,
23156.577734375,
23157.47041015625,
23158.3630859375,
23159.25576171875,
23160.1484375,
23161.04111328125,
23161.9337890625,
23162.82646484375,
23163.719140625,
23164.61181640625,
23165.5044921875,
23166.39716796875,
23167.28984375,
23168.18251953125,
23169.0751953125,
23169.96787109375,
23170.860546875,
23171.75322265625,
23172.6458984375,
23173.53857421875,
23174.43125,
23175.32392578125,
23176.2166015625,
23177.10927734375
)
val xAxis = listOf(
0.009626723593100905,
0.009628219355363399,
0.009629715117625892,
0.009631210879888386,
0.009632706642150879,
0.009634202404413372,
0.009635698166675866,
0.009637193928938359,
0.009638689691200852,
0.009640185453463346,
0.00964168121572584,
0.009643176977988333,
0.009644672740250826,
0.00964616850251332,
0.009647664264775813,
0.009649160027038306,
0.0096506557893008,
0.009652151551563293,
0.009653647313825786,
0.00965514307608828,
0.009656638838350773,
0.009659456519875676,
0.009662274201400579,
0.00966509188292548,
0.009667909564450383,
0.009670727245975286,
0.009673544927500189,
0.009676362609025092,
0.009679180290549993,
0.009681997972074896,
0.009684815653599799,
0.009687633335124702,
0.009690451016649605,
0.009693268698174506,
0.009696086379699409,
0.009698904061224312,
0.009701721742749215,
0.009704539424274117,
0.009707357105799019,
0.009710174787323922,
0.009712992468848825,
0.009715810150373727,
0.00971862783189863,
0.009721445513423532,
0.009724263194948434,
0.009727080876473337,
0.00972989855799824,
0.009732716239523143,
0.009735533921048044,
0.009738351602572947,
0.00974116928409785,
0.009743986965622753,
0.009746804647147656,
0.009749622328672557,
0.00975244001019746,
0.009755257691722363,
0.009758075373247266,
0.009760893054772169,
0.00976371073629707,
0.009766528417821973,
0.009769346099346876,
0.009772163780871779,
0.009774981462396682,
0.009777799143921583,
0.009780616825446486,
0.009783434506971389,
0.009786252188496292,
0.009789069870021195,
0.009791887551546096,
0.009794705233070999,
0.009797522914595902,
0.009800340596120805,
0.009803158277645708,
0.009805975959170609,
0.009808793640695512,
0.009811611322220415,
0.009814429003745318,
0.00981724668527022,
0.009820064366795122,
0.009822882048320025,
0.009825699729844928,
0.00982851741136983,
0.009831335092894734,
0.009834152774419635,
0.009836970455944538,
0.00983978813746944,
0.009842605818994344,
0.009845423500519247,
0.009848241182044148,
0.00985105886356905,
0.009853876545093954,
0.009856694226618857,
0.00985951190814376,
0.00986232958966866,
0.009865147271193564,
0.009867964952718467,
0.00987078263424337,
0.009873600315768272,
0.009876417997293174,
0.009879235678818077,
0.00988205336034298,
0.009877076745033265,
0.00987210012972355,
0.009867123514413833,
0.009862146899104118,
0.009857170283794403,
0.009852193668484688,
0.009847217053174973,
0.009842240437865257,
0.009837263822555542,
0.009832287207245827,
0.009827310591936112,
0.009822333976626397,
0.00981735736131668,
0.009812380746006965,
0.00980740413069725,
0.009802427515387535,
0.00979745090007782,
0.009792474284768104,
0.009787497669458389,
0.009782521054148674,
0.009777544438838959,
0.009772567823529244,
0.009767591208219528,
0.009762614592909813,
0.009757637977600098,
0.009752661362290383,
0.009747684746980668,
0.009742708131670951,
0.009737731516361236,
0.009732754901051521,
0.009727778285741806,
0.009722801670432091,
0.009717825055122375,
0.00971284843981266,
0.009707871824502945,
0.00970289520919323,
0.009697918593883515,
0.009692941978573798,
0.009687965363264084,
0.009682988747954369,
0.009678012132644654,
0.009673035517334939,
0.009668058902025222,
0.009663082286715507,
0.009658105671405792,
0.009653129056096077,
0.009648152440786362,
0.009643175825476646,
0.00963819921016693,
0.009633222594857216,
0.009628245979547501,
0.009623269364237786,
0.00961829274892807,
0.009613316133618354,
0.00960833951830864,
0.009603362902998925,
0.00959838628768921,
0.009593409672379493,
0.009588433057069778,
0.009583456441760063,
0.009578479826450348,
0.009573503211140633,
0.009568526595830917,
0.009563549980521202,
0.009558573365211487,
0.009553596749901772,
0.009548620134592057,
0.00954364351928234,
0.009538666903972625,
0.00953369028866291,
0.009528713673353196,
0.00952373705804348,
0.009518760442733764,
0.009513783827424049,
0.009508807212114334,
0.00950383059680462,
0.009498853981494904,
0.009493877366185188,
0.009488900750875473,
0.009483924135565758,
0.009483959095086902,
0.009483994054608046,
0.009484029014129192,
0.009484063973650337,
0.009484098933171481,
0.009484133892692625,
0.00948416885221377,
0.009484203811734915,
0.00948423877125606,
0.009484273730777204,
0.009484308690298348,
0.009484343649819493,
0.009484378609340639,
0.009484413568861783,
0.009484448528382927,
0.009484483487904071,
0.009484518447425216,
0.009484553406946362,
0.009484588366467506,
0.00948462332598865,
0.009484658285509795,
0.009484693245030939,
0.009484728204552085,
0.00948476316407323,
0.009484798123594373,
0.009484833083115518,
0.009484868042636662,
0.009484903002157808,
0.009484937961678952,
0.009484972921200097,
0.009485007880721241,
0.009485042840242385,
0.009485077799763531,
0.009485112759284675,
0.00948514771880582,
0.009485182678326964,
0.009485217637848108,
0.009485252597369254,
0.009485287556890399,
0.009485322516411543,
0.009485357475932687,
0.009485392435453831,
0.009485427394974977,
0.009485462354496122,
0.009485497314017266,
0.00948553227353841,
0.009485567233059555,
0.0094856021925807,
0.009485637152101845,
0.00948567211162299,
0.009485707071144133,
0.009485742030665278,
0.009485776990186424,
0.009485811949707568,
0.009485846909228712,
0.009485881868749857,
0.009485916828271001,
0.009485951787792147,
0.009485986747313291,
0.009486021706834435,
0.00948605666635558,
0.009486091625876724,
0.00948612658539787,
0.009486161544919014,
0.009486196504440159,
0.009486231463961303,
0.009486266423482447,
0.009486301383003593,
0.009486336342524737,
0.009486371302045882,
0.009486406261567026,
0.00948644122108817,
0.009486476180609316,
0.00948651114013046,
0.009486546099651605,
0.00948658105917275,
0.009486616018693893,
0.00948665097821504,
0.009486685937736184,
0.009486720897257328,
0.0094879578682594,
0.009489194839261472,
0.009490431810263544,
0.009491668781265616,
0.009492905752267689,
0.00949414272326976,
0.009495379694271833,
0.009496616665273905,
0.009497853636275977,
0.009499090607278049,
0.009500327578280121,
0.009501564549282193,
0.009502801520284265,
0.009504038491286337,
0.00950527546228841,
0.009506512433290482,
0.009507749404292554,
0.009508986375294626,
0.009510223346296698,
0.00951146031729877,
0.009512697288300842,
0.009513934259302914,
0.009515171230304986,
0.009516408201307058,
0.00951764517230913,
0.009518882143311203,
0.009520119114313275,
0.009521356085315347,
0.009522593056317419,
0.009523830027319491,
0.009525066998321563,
0.009526303969323635,
0.009527540940325707,
0.00952877791132778,
0.009530014882329851,
0.009531251853331923,
0.009532488824333996,
0.009533725795336068,
0.00953496276633814
)
plot{
line {
x(xAxis)
y(yAxis)
}
}
`
Expected behavior
google spread sheet and python matplotlib is worked like that with same data
Actual Behavior
Screenshots
Library Version, Tool version, and Environment
(please complete the following information):
- Library version: 0.7.0
- Kotlin-Notebook version: kotlin-jupyter-kernel 0.12.0.217
Additional information
Provide any other useful information that may help in resolving the bug.
Hi! line {}
sorts points by x
value. Instead, you can use path {}
to plot a curve with the original point order.
@AndreiKingsley
thank you for answer
work for me!