MathGroup Archive 1996

[Date Index] [Thread Index] [Author Index]

Search the Archive

Q:Nicer than: Function[x,MapAt[Im,x,2]]/@data


I want to ListPlot the imaginary part of data:

data={{x0,z0},{x1,z1},{x2,z2}}

The x? are real, the z? complex.

My simple but ugly solution was 
 
Transpose[{Transpose[data][[1]],Im[Transpose[data][[2]]]}]

after reading a little I came to the shorter

Function[x,MapAt[Im,x,2]]/@data 

Is there a nicer way to do it?


  • Prev by Date: Re: Need help with solving problem
  • Next by Date: Re: Need help with solving problem
  • Previous by thread: Re: XMathematica: can't open display, exiting...
  • Next by thread: Q:Nicer than: Function[x,MapAt[Im,x,2]]/@data