1
$\begingroup$

I am new to both Mathematica and the concept of phase plot. I have data here cells_pop_data Let's say I have many such inputs. Then how can I plot a phase plot between cells and pop in Mathematica?

This is the data that I have



Count_C  Cells  Count_P Pop
1   900 1   527
2   903 2   530
3   904 3   533
4   907 4   536
5   910 5   539
6   912 6   542
7   914 7   545
8   917 8   548
9   920 9   551
10  922 10  554
11  924 11  557
12  925 12  560
13  927 13  563
14  928 14  566
15  930 15  569
16  933 16  572
17  935 17  575
18  938 18  578
19  940 19  581
20  942 20  584
21  944 21  587
22  947 22  590
23  949 23  593
24  952 24  596
25  953 25  599
26  956 26  602
27  959 27  605
28  960 28  608
29  963 29  611
30  964 30  614
31  965 31  617
32  968 32  620
33  969 33  623
34  971 34  626
35  974 35  629
36  976 36  632
37  979 37  635
38  981 38  638
39  982 39  641
40  985 40  644
41  986 41  647
42  988 42  650
43  989 43  653
44  991 44  656
45  992 45  659
46  995 46  662
47  997 47  665
48  999 48  668


$\endgroup$
4
  • $\begingroup$ Cannot access your data $\endgroup$
    – yode
    Commented Aug 28, 2022 at 12:30
  • $\begingroup$ I have given permission now, please check. $\endgroup$
    – Dvarkesh
    Commented Aug 28, 2022 at 12:55
  • 2
    $\begingroup$ What is the meaning of the data and what is your desires? Maybe give a smll example. $\endgroup$
    – cvgmt
    Commented Aug 28, 2022 at 14:39
  • $\begingroup$ Count_C and Count_p show the count or sr.no of cells and pop, respectively. While I wanted to plot phase plot between Cells vs Pop. $\endgroup$
    – Dvarkesh
    Commented Aug 29, 2022 at 4:05

1 Answer 1

2
$\begingroup$

I processed the data written in your question

dat = ToExpression@
With[{catenated = StringTake[#, 
     StringPosition[#, "Pop"][[1, 2]] - StringLength@#] &@
   FirstCase[StringSplit[Import@
"https://mathematica.stackexchange.com/questions/272683/how-to-plot-phase-plot",
"\n"],s_ /; StringContainsQ[s, "Count_C"]]}, 
Partition[StringSplit@catenated, 4]]

I don't know what your data means, but I can use the Cells column as x coordinates and Pop column as y coordinates for datapoints; ListPlot[dat[[;; , {2, 4}]]]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.