3
$\begingroup$

How shall I plot this list of zm vs. zs?

Should I extract the individual list first?

phase = {{zm -> 12.735357153161043513, zs -> 9.7234898615983598324}, {zm -> 12.439795620502032594, zs -> 9.5677333839734501010}, {zm -> 12.322794261025035959, zs -> 9.5083406581264741392}, {zm -> 12.283443749378536461, zs -> 9.4885610867682085673}, {zm -> 12.270768716468870474, zs -> 9.4822083318853045563}, {zm -> 12.266737552360516880, zs -> 9.4801896991994617103}, {zm -> 12.265460495293092574, zs -> 9.4795503825168381655}, {zm -> 12.265056425467359123, zs -> 9.4793481160147239450}, {zm -> 12.264928624482637468, zs -> 9.4792841440516469762}, {zm -> 12.264888207974288607, zs -> 9.4792639133728615843}}
$\endgroup$
1
  • 4
    $\begingroup$ ListPlot[Values /@ phase] or ListPlot[Association /@ phase]? $\endgroup$
    – kglr
    Aug 3 at 17:57
6
$\begingroup$

This will work:

ListPlot[{zm, zs} /. phase]
$\endgroup$
1
$\begingroup$
phase//{#[[All,1,2]], #[[All,2,2]]}&//Transpose

(* {
    {12.73535715316104351, 9.723489861598359832}, 
    {12.43979562050203259, 9.567733383973450101}, 
    {12.32279426102503596, 9.508340658126474139}, 
    {12.28344374937853646, 9.488561086768208567}, 
    {12.27076871646887047, 9.482208331885304556}, 
    {12.26673755236051688, 9.480189699199461710}, 
    {12.26546049529309257, 9.479550382516838166}, 
    {12.26505642546735912, 9.479348116014723945}, 
    {12.26492862448263747, 9.479284144051646976}, 
    {12.26488820797428861, 9.479263913372861584}
   } *)

phase//{#[[All,1,2]], #[[All,2,2]]}&//Transpose//ListPlot
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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