Mathematica Asked on August 12, 2021
The sample point data and codes are listed as following. The point-image tells us that the data can be divided into nine groups. However, why are they divided into two groups by FindClusters
? Which can be verified by the fact that the curves are made up of two colors (Two colors in Mathematica V11.3, the colors become very complex in Mahtematica V9). Why aren’t they divided into nine groups? I want to group and sort the data correctly, then to get the nine line-curves of them. How can I do it? Thank you!
Note: The Mathematica I used is Version 11.3
The codes I used:
I don’t know how to obtain the line curves, so have to use ListPointPlot3D
. But to obtain the grouped separate line curves is my objective.
data={{0.0437345989867765`,0.027448540404927828`,150.79644737231007`},{0.04938016838673953`,0.047424756126886125`,113.09733552923255`},{0.051145420890910294`,0.05640776878763274`,75.39822368615503`},{0.051913378583851665`,0.060949057004484324`,37.69911184307752`},{0.0521370840290226`,0.06236303245723473`,0.`},{0.07387951657435363`,0.03584091853506918`,452.3893421169302`},{0.07654465510290173`,0.05239273610718475`,414.6902302738527`},{0.08105897684618887`,0.06157833047013417`,376.99111843077515`},{0.08802205450905072`,0.06820467365922271`,339.29200658769764`},{0.09705754646890652`,0.07595131661019748`,301.59289474462014`},{0.10032955423298524`,0.04363467030286158`,753.9822368615503`},{0.10314578115014386`,0.060828862119676176`,716.2831250184728`},{0.1042046313855752`,0.08605760821182902`,263.89378290154264`},{0.10641004791962101`,0.07165630123732109`,678.5840131753953`},{0.10828395343169178`,0.0954940813695602`,226.1946710584651`},{0.11054650458528836`,0.07859357613128073`,640.8849013323178`},{0.11063700114233449`,0.10316772151880929`,188.49555921538757`},{0.112076922285799`,0.10913045784518863`,150.79644737231007`},{0.11298329423049283`,0.11357133707487609`,113.09733552923255`},{0.11354180551907977`,0.11664335529865477`,75.39822368615503`},{0.11384692393567411`,0.1184484958235665`,37.69911184307752`},{0.11394410033576455`,0.11904406760884173`,0.`},{0.11623873168645853`,0.0824805082917696`,603.1857894892403`},{0.12137154305002183`,0.03177972219291105`,1130.9733552923256`},{0.12487786712514205`,0.057055365180551425`,1093.274243449248`},{0.12496706526139975`,0.083795354526819`,565.4866776461628`},{0.12883938165919614`,0.0715430690052577`,1055.5751316061705`},{0.1335685528212502`,0.08130183054963443`,1017.8760197630929`},{0.13945230914903417`,0.08805368066885977`,980.1769079200154`},{0.14051755814658035`,0.0851640867219403`,527.7875658030853`},{0.14700532349883821`,0.09289566224228514`,942.4777960769379`},{0.1564387442328299`,0.09719257566376534`,904.7786842338604`},{0.15858493121395373`,0.09745867546014358`,490.0884539600077`},{0.16675243924485`,0.10186040783930457`,867.0795723907829`},{0.16790066303711032`,0.11295171204071847`,452.3893421169302`},{0.17300723392105788`,0.12614694970670487`,414.6902302738527`},{0.17621101765590919`,0.13718489194428604`,376.99111843077515`},{0.1774474637996235`,0.10601155962022256`,829.3804605477054`},{0.17838146781798134`,0.14646424623790574`,339.29200658769764`},{0.1799225809281175`,0.15428341702857554`,301.59289474462014`},{0.1810494649428829`,0.16085383838236203`,263.89378290154264`},{0.18188721284899426`,0.16632684844597892`,226.1946710584651`},{0.18251304989449663`,0.17081231851047196`,188.49555921538757`},{0.18297657559953864`,0.17439058773924723`,150.79644737231007`},{0.18331032827080163`,0.17712010926433094`,113.09733552923255`},{0.18353562258119296`,0.17904238874314235`,75.39822368615503`},{0.18366587854125027`,0.180185160097525`,37.69911184307752`},{0.18370850697895516`,0.18056435191811288`,0.`},{0.1900984890566589`,0.10917617408500022`,791.6813487046279`},{0.20718593829091334`,0.11363672229024746`,753.9822368615503`},{0.22612570143610758`,0.12587283248386555`,716.2831250184728`},{0.23840631119068065`,0.14284325465610756`,678.5840131753953`},{0.24560422669463586`,0.1585720468438524`,640.8849013323178`},{0.24725265873267674`,0.14513101734156722`,1130.9733552923256`},{0.2502703130143015`,0.17230610168494592`,603.1857894892403`},{0.2535391295789955`,0.18429638459968092`,565.4866776461628`},{0.25594825541749705`,0.1948261924481059`,527.7875658030853`},{0.25778595516966246`,0.20411647186367649`,490.0884539600077`},{0.2592221275728078`,0.21233310098471608`,452.3893421169302`},{0.2596005547451709`,0.1469580821198297`,1093.274243449248`},{0.26036404597739776`,0.21960161036587833`,414.6902302738527`},{0.26128299039842295`,0.22601849248592365`,376.99111843077515`},{0.2620281901144365`,0.23165901914009074`,339.29200658769764`},{0.2626346615169767`,0.23658259001871448`,301.59289474462014`},{0.26312786733527893`,0.24083643594939128`,263.89378290154264`},{0.26352661145028455`,0.24445822513061083`,226.1946710584651`},{0.2638449010621096`,0.2474779247254969`,188.49555921538757`},{0.2640931764664956`,0.24991914462910214`,150.79644737231007`},{0.26427913741050385`,0.2518001111022964`,113.09733552923255`},{0.26440830165923707`,0.25313436754061786`,75.39822368615503`},{0.26448437801992614`,0.2539312667308417`,37.69911184307752`},{0.2645095040151279`,0.25419629672435523`,0.`},{0.2764805809083421`,0.14896525901359706`,1055.5751316061705`},{0.29834790139029344`,0.15674009899494196`,1017.8760197630929`},{0.3169282184792892`,0.17310950090049038`,980.1769079200154`},{0.3288218708795855`,0.1911814837563566`,942.4777960769379`},{0.33665508274590805`,0.2079032012828503`,904.7786842338604`},{0.3421915308860309`,0.22295066954011425`,867.0795723907829`},{0.3463185154042127`,0.23648682984549355`,829.3804605477054`},{0.34951326786173315`,0.24871605605582042`,791.6813487046279`},{0.3520552506823944`,0.25981294486697926`,753.9822368615503`},{0.35411994151270926`,0.2699173386975112`,716.2831250184728`},{0.355823706852308`,0.2791403660181393`,678.5840131753953`},{0.3572470960116221`,0.28757095980235664`,640.8849013323178`},{0.35844780494441103`,0.29528106417144967`,603.1857894892403`},{0.35946831941741797`,0.302329524318339`,565.4866776461628`},{0.36034064148564077`,0.30876495384722696`,527.7875658030853`},{0.3610893307860184`,0.31462785658887427`,490.0884539600077`},{0.36173352787220503`,0.3199522124347432`,452.3893421169302`},{0.3622883388300219`,0.32476667650548807`,414.6902302738527`},{0.362765805781157`,0.32909549644896724`,376.99111843077515`},{0.363175601106083`,0.33295922150871465`,339.29200658769764`},{0.36352553260525683`,0.3363752555172978`,301.59289474462014`},{0.36382191628045063`,0.33935829113072236`,263.89378290154264`},{0.36406985442791717`,0.34192065228260415`,226.1946710584651`},{0.3642734446002833`,0.34407256454660046`,188.49555921538757`},{0.36443593704204336`,0.3458223678776083`,150.79644737231007`},{0.36455985286521736`,0.3471766824057532`,113.09733552923255`},{0.36464707155936577`,0.3481405351404705`,75.39822368615503`},{0.3646988938342773`,0.34871745330382947`,37.69911184307752`},{0.36471608389871285`,0.3489095283413733`,0.`},{0.47412284887567074`,0.33172680041939506`,1130.9733552923256`},{0.47734833022577405`,0.3438211571296524`,1093.274243449248`},{0.48007828777631756`,0.3550967810609886`,1055.5751316061705`},{0.48241520339166705`,0.3656278110433649`,1017.8760197630929`},{0.48443446099699605`,0.3754774862795998`,980.1769079200154`},{0.48619287393988203`,0.384699706951713`,942.4777960769379`},{0.4877341504674113`,0.3933405578158219`,904.7786842338604`},{0.4890925133884253`,0.40143962676087847`,867.0795723907829`},{0.4902951671917905`,0.4090310963485377`,829.3804605477054`},{0.49136402250725525`,0.41614463213539593`,791.6813487046279`},{0.49231692844513175`,0.42280610192581464`,753.9822368615503`},{0.49316857061460967`,0.42903815848578486`,716.2831250184728`},{0.49393113692516355`,0.43486071325371006`,678.5840131753953`},{0.49461481885561515`,0.4402913232709481`,640.8849013323178`},{0.49522819404484003`,0.44534550889891594`,603.1857894892403`},{0.4957785218834969`,0.4500370160952323`,565.4866776461628`},{0.4962719743833954`,0.45437803402647764`,527.7875658030853`},{0.4967138182420737`,0.4583793764650679`,490.0884539600077`},{0.4971085596416555`,0.4620506336133762`,452.3893421169302`},{0.49746006025762024`,0.46540029960174456`,414.6902302738527`},{0.4977716307760598`,0.46843587982284585`,376.99111843077515`},{0.49804610665023313`,0.47116398141901933`,339.29200658769764`},{0.49828590968197667`,0.4735903895754227`,301.59289474462014`},{0.4984930981673345`,0.47572013174744343`,263.89378290154264`},{0.49866940771186974`,0.4775575315327355`,226.1946710584651`},{0.4988162843410503`,0.4791062535624693`,188.49555921538757`},{0.498934911162064`,0.4803693405133677`,150.79644737231007`},{0.4990262295460541`,0.4813492431177032`,113.09733552923255`},{0.49909095557224964`,0.482047843861275`,75.39822368615503`},{0.49912959229126924`,0.4824664749003613`,37.69911184307752`},{0.4991424382126344`,0.48260593059087814`,0.`},{0.6890221358019264`,0.602044445041995`,1130.9733552923256`},{0.6901424586135346`,0.6087687711085732`,1093.274243449248`},{0.6911781145815982`,0.6151899055051402`,1055.5751316061705`},{0.692136520865002`,0.6213178160239101`,1017.8760197630929`},{0.6930241990398274`,0.6271616492896728`,980.1769079200154`},{0.6938469035529896`,0.6327298071274196`,942.4777960769379`},{0.6946097282092561`,0.6380300141303938`,904.7786842338604`},{0.6953171949635522`,0.6430693774607419`,867.0795723907829`},{0.6959733283591203`,0.6478544398119352`,829.3804605477054`},{0.6965817182439317`,0.6523912263575782`,791.6813487046279`},{0.6971455728543183`,0.656685286411686`,753.9822368615503`},{0.6976677639352774`,0.6607417304337899`,716.2831250184728`},{0.6981508652394128`,0.6645652629307821`,678.5840131753953`},{0.6985971854901323`,0.668160211734524`,640.8849013323178`},{0.6990087966918044`,0.6715305540710332`,603.1857894892403`},{0.6993875585084892`,0.6746799397817881`,565.4866776461628`},{0.6997351393036964`,0.6776117120094399`,527.7875658030853`},{0.7000530343297282`,0.6803289256188161`,490.0884539600077`},{0.700342581471317`,0.6828343635877485`,452.3893421169302`},{0.7006049748790173`,0.6851305515709283`,414.6902302738527`},{0.7008412767724382`,0.6872197708128671`,376.99111843077515`},{0.7010524276464273`,0.6891040695619546`,339.29200658769764`},{0.7012392550750067`,0.6907852731169997`,301.59289474462014`},{0.7014024812760586`,0.6922649926193655`,263.89378290154264`},{0.7015427295721395`,0.6935446326874227`,226.1946710584651`},{0.7016605298604665`,0.6946253979760311`,188.49555921538757`},{0.701756323185066`,0.6955082987305854`,150.79644737231007`},{0.7018304654874046`,0.6961941553938515`,113.09733552923255`},{0.7018832305966485`,0.6966836023130709`,75.39822368615503`},{0.701914812507843`,0.696977090585234`,37.69911184307752`},{0.7019253269840611`,0.6970748900692321`,0.`},{1.0405474664726269`,1.0538165273583022`,1130.9733552923256`},{1.0411747834325211`,1.057770462705052`,1093.274243449248`},{1.0417712303059607`,1.0615758459270794`,1055.5751316061705`},{1.042337990105685`,1.065234317348892`,1017.8760197630929`},{1.0428761663960429`,1.0687474338299476`,980.1769079200154`},{1.0433867886751198`,1.072116671968147`,942.4777960769379`},{1.0438708172716455`,1.0753434311059498`,904.7786842338604`},{1.044329147804037`,1.0784290361484092`,867.0795723907829`},{1.0447626152430431`,1.0813747402025853`,829.3804605477054`},{1.0451719976152904`,1.0841817270468967`,791.6813487046279`},{1.0455580193804133`,1.086851113439083`,753.9822368615503`},{1.0459213545112027`,1.08938395127052`,716.2831250184728`},{1.0462626293027175`,1.091781229574598`,678.5840131753953`},{1.0465824249334432`,1.094043876396209`,640.8849013323178`},{1.0468812797994982`,1.0961727605287999`,603.1857894892403`},{1.0471596916398445`,1.0981686931254018`,565.4866776461628`},{1.047418119469387`,1.1000324291892274`,527.7875658030853`},{1.0476569853343283`,1.101764668949142`,490.0884539600077`},{1.0478766759028073`,1.1033660591249634`,452.3893421169302`},{1.0480775439027161`,1.104837194087162`,414.6902302738527`},{1.0482599094167058`,1.106178616914803`,376.99111843077515`},{1.048424061043624`,1.1073908203558624`,339.29200658769764`},{1.0485702569345743`,1.108474247693046`,301.59289474462014`},{1.0486987257105909`,1.109429293518246`,263.89378290154264`},{1.0488096672680864`,1.110256304418358`,226.1946710584651`},{1.0489032534777334`,1.1109555795749961`,188.49555921538757`},{1.0489796287810274`,1.111527371279859`,150.79644737231007`},{1.0490389106888538`,1.1119718853680611`,113.09733552923255`},{1.0490811901849078`,1.1122892815704075`,75.39822368615503`},{1.0491065320369908`,1.1124796737863076`,37.69911184307752`},{1.0491149750178124`,1.1125431302778894`,0.`},{1.8843069000466044`,2.295648962549785`,1130.9733552923256`},{1.8849454993257413`,2.297406870281081`,1093.274243449248`},{1.88556057624188`,2.2991038490486133`,1055.5751316061705`},{1.8861523326736003`,2.3007400385234744`,1017.8760197630929`},{1.8867209619847338`,2.30231557328454`,980.1769079200154`},{1.8872666491883834`,2.303830582835307`,942.4777960769379`},{1.8877895711029193`,2.305285191621074`,904.7786842338604`},{1.8882898965003854`,2.3066795190461034`,867.0795723907829`},{1.8887677862472398`,2.3080136794904504`,829.3804605477054`},{1.8892233934378546`,2.3092877823269777`,791.6813487046279`},{1.8896568635209927`,2.3105019319377877`,753.9822368615503`},{1.8900683344193192`,2.311656227730523`,716.2831250184728`},{1.8904579366423016`,2.31275076415416`,678.5840131753953`},{1.8908257933924066`,2.3137856307144276`,640.8849013323178`},{1.8911720206651474`,2.3147609119886785`,603.1857894892403`},{1.8914967273427485`,2.3156766876402215`,565.4866776461628`},{1.891800015281824`,2.3165330324319964`,527.7875658030853`},{1.892081979395013`,2.3173300162396906`,490.0884539600077`},{1.8923427077269301`,2.3180677040641062`,452.3893421169302`},{1.8925822815242876`,2.3187461560428506`,414.6902302738527`},{1.8928007753004716`,2.319365427461208`,376.99111843077515`},{1.8929982568946222`,2.319925568762326`,339.29200658769764`},{1.8931747875251743`,2.320426625556547`,301.59289474462014`},{1.893330421838256`,2.320868638629892`,263.89378290154264`},{1.8934652079506473`,2.3212516439517734`,226.1946710584651`},{1.8935791874875891`,2.321575672681816`,188.49555921538757`},{1.893672395615476`,2.3218407511756847`,150.79644737231007`},{1.893744861069353`,2.3220469009902156`,113.09733552923255`},{1.8937966061754674`,2.3221941388875855`,75.39822368615503`},{1.8938276468686797`,2.3222824768383887`,37.69911184307752`},{1.8938379927049098`,2.3223119220240993`,0.`}};
gx = FindClusters[data];
ListPointPlot3D[gx]
The point-image I obtained:
You can specify the number of clusters desired.
gx = FindClusters[data, 9,
Method -> "SpanningTree"];
Use ListLinePlot3D
ListLinePlot3D[gx, PlotLegends -> Automatic]
Correct answer by Bob Hanlon on August 12, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP