Automatic Series Numbering in Calc

Hi all,

I have a large data set representing the positions of particles through time. Each row is a single “snapshot” of a particle, and there are anywhere from 10 to 40 rows corresponding to each particle.

The beginning cell of each row has the particle number. So, for example, if I have 10 snapshots of particle 1 through time, I would have 10 rows, each beginning with “1”, with a different position in each. Each row also has the particle velocity.

I would like to graph the velocity versus the position of each particle, with each particle in its own series (so each has its own line on the plot). How can I make Calc number the series based on the particle numbers?

I don’t have enough Karma to upload a file. I will include a CSV snippet here:

Particle Number,X Centroid (µm),Y Centroid (µm),Velocity (µm/s),Deformation Parameter (W-H)/(W+H)
1,222.015991795,3758.0415342354,,-0.0833333333
1,222.984248255,3820.6932611265,38496.7336008294,-0.0847457627
1,223.7581421031,3892.8035540998,44305.8677241967,-0.0598290598
1,223.1496876992,3969.7013478402,47246.1529830517,-0.0598290598
1,225.4753719419,4051.9608901154,50559.034301425,-0.0588235294
1,222.5691311986,4137.2260915408,52415.8856346383,-0.0806451613
1,224.9039207106,4235.3305501849,60290.7489673911,-0.0743801653
1,224.2745440024,4335.1406446645,61322.8143663743,-0.0967741935
1,225.4821970478,4448.1026409769,69405.8621392055,-0.0819672131
1,225.4323949873,4572.2084882805,76248.4915651584,-0.0983606557
1,225.8785523883,4708.06991619,83471.360844772,-0.1056910569
1,226.197124848,4853.781466154,89522.8692990339,-0.1129032258
2,225.2324523214,2517.2939593425,,0.2440944882
2,224.0740738475,2618.6003442887,62244.958938006,0.2195121951
2,225.4794566456,2693.0737715051,45763.3314753951,0.1451612903
2,227.3462673167,2755.3171520603,38258.451794469,0.1016949153
2,223.1954193451,2814.6344437663,36532.6368423524,0.05
2,223.733288853,2861.6242126721,28871.5922790748,0.0256410256
2,221.2763285692,2907.7682285013,28390.2439397684,0.0344827586
2,220.9793206578,2952.1407133947,27262.2977272559,0.0178571429
2,222.9025981039,2992.5451624324,24851.9016692665,0
2,221.2061513443,3035.506995702,26415.5772270404,0.0178571429
2,219.9296240747,3077.8871452447,26049.4395260045,-0.0088495575
2,219.8068604319,3116.7611348532,23883.6257495288,0.009009009
2,218.1871438763,3154.134646344,22983.1924362137,-0.0088495575
2,221.0256653761,3197.5513884105,26731.4424258239,0
2,220.1840008748,3237.4367060177,24510.3044688437,0
2,220.3769149543,3273.729051241,22297.7040166857,-0.0442477876
2,221.709635978,3316.0684255131,26025.4625873777,-0.0442477876
2,222.7305227305,3358.5507585508,26107.9456010961,-0.0088495575
2,220.5420912071,3401.9306255128,26685.7327941283,-0.0357142857
2,220.3503486567,3448.0795929671,28353.3719069462,-0.0265486726
2,220.8501477202,3497.0652918835,30097.5323716209,-0.027027027
2,218.7085520419,3545.4323088732,29744.9737844942,-0.0178571429
2,219.6546739746,3600.0758923454,33577.1041897967,-0.045045045
2,221.2598666223,3652.6490150808,32315.0691836475,-0.0526315789
2,221.8703318948,3714.0041215021,37697.3816982103,-0.0357142857
2,220.5999112636,3771.8432450341,35543.9277925599,-0.0677966102
2,222.1726257918,3841.2494156003,42652.8963863294,-0.0619469027
2,223.2064373164,3915.4207529925,45574.0126897264,-0.0178571429
2,223.5676989278,3990.8179597338,46323.2711080097,-0.0689655172
2,224.9950166617,4076.9786140157,52942.8782482433,-0.0608695652
2,222.8617424696,4163.7664186684,53337.0313037948,-0.0689655172
2,224.436040168,4261.4182271866,60003.3777204703,-0.0833333333
2,224.9532719953,4367.4287259462,65131.7915738526,-0.1
2,224.9353664448,4483.5705213064,71355.5105461199,-0.0924369748
2,226.6451140087,4610.6432502068,78078.3525935686,-0.1
2,227.1724374729,4751.1048941664,86297.8120599627,-0.1
3,227.4152161243,2492.9769472487,,0.2268907563
3,227.4082462762,2601.5586157096,66710.6986665063,0.1652173913
3,225.0170931918,2679.9610457957,48191.493779243,0.1304347826
3,226.2435867622,2745.7790423077,40444.4586630592,0.0810810811
3,222.3446798919,2808.665072816,38710.2754624257,0.0666666667
3,221.2343610193,2853.1582832658,27344.3689875676,0.0275229358
3,221.5172326645,2906.7309025507,32914.5492473743,0.0285714286
3,221.8502941046,2951.2487364125,27351.7523722513,0.0392156863
3,221.3951657365,2992.3560767717,25257.1866221638,0.0095238095
3,221.2868121959,3033.3639424549,25194.6111462351,-0.0095238095
3,218.9276585081,3074.5275273319,25331.6947567049,0
3,218.196097581,3116.4743442495,25775.3176158321,-0.0097087379
3,219.5533219084,3156.8055798128,24792.8398105379,-0.0280373832
3,218.8037380439,3197.8266878413,25206.8663883243,0
3,218.8909171102,3236.264599901,23615.6488942457,-0.0285714286
3,219.4283488071,3278.1975215418,25764.9774127242,-0.0285714286
3,220.2309711815,3321.3009686394,26486.6028944763,-0.0097087379
3,220.16801193,3364.0977004821,26293.6000695034,-0.0377358491
3,219.3932665936,3410.7054583686,28638.9559237888,-0.0285714286
3,221.3310140139,3457.7930919394,28954.3131119314,-0.0384615385
3,218.0851539826,3509.5147274635,31839.3908845171,-0.0196078431
3,219.9232926346,3555.4572895791,28248.8980494842,-0.046728972
3,220.6884737005,3610.5758997325,33867.1834789718,-0.0476190476
3,219.782460153,3666.7381255387,34509.5894525883,-0.0485436893
3,222.189745571,3727.3518613447,37269.3882945441,-0.046728972
3,222.1394293983,3797.3276989514,42991.9550865558,-0.0291262136
3,222.2920471615,3865.1940052035,41695.9898352236,-0.0384615385
3,222.1153291917,3936.1533774942,43596.3458608714,-0.0476190476
3,223.1359999658,4015.4709553003,48735.3820590708,-0.046728972
3,223.7921896809,4101.9271270618,53118.7060594167,-0.046728972
3,224.9885957751,4196.584589843,58160.5525511242,-0.0377358491
3,223.372317647,4294.3532504445,60075.5810941993,-0.0458715596
3,224.2838160151,4404.666980033,67777.1604956,-0.0825688073
3,226.4758560453,4519.6549055201,70659.4275543915,-0.0714285714
3,226.452275992,4657.2767418888,84552.4765083099,-0.0555555556
3,225.8002978464,4796.3672397596,85455.7342893733,-0.1071428571

The above CSV table corresponds to three particles, numbered 1-3. I want to plot Velocity versus Y Centroid for each particle, but there could be many particles, so I don’t have time to select each particle group as a series by hand. Is there a way Calc can automatically put each particle in its own series?

Thanks.

Hi ottobonn,
please take a look to see if the attached file is in direction what you are looking for.

After import data from CSV or pasted as unformatted text in the same way as the CSV.

Create a Data Pilot with “Y Centroid” as row field, “particle number” as column field and “Velocity” (average) as Data field. I think in this way the data are how you need to do the chart.

AutomaticSeriesNumbering.jpg
Please change file extension to .ods, because maybe there is an error an Ask and do not allow upload ods files.

That is what I am looking for! Can you explain a bit further how to create the pivot table? Thanks.

Ah, I see how you did it. A Pivot Table sorts the data by Y position, which putting them in columns by their particle number. Thanks!

How large is large? If this is but a subset of your data, then maybe gnuplot or R (specifically RSQLite) might better serve your needs. Steep learning curve is a downside, though.