MathGroup Archive 2012

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

Search the Archive

Re: How to specify x-axis in List when using ListPlot

If you are not familiar with some of the commands, it is easiest to delete the semicolons at the end of the lines to understand what each line does.  At least this is what I do "step" through code.

This should work for any size list as long as x value is first value on each line.

(* begin code *)

(*Pull out each first element into own list*)

(*Generate separate lists for the y values*)

(*Combine (Riffle[]) xValues with each individual list of yValues *)

(*form (Partition[]) new list made up of two elements each*)

(* Previous two lines can be combined *)
(* tobeplotted=Map[Partition[Riffle[xValues,#],2]&,yValues]; *)

(*Plot all lists together on one plot*)

  • Prev by Date: Re: reduction/simplification of hypergeometric-function-related
  • Next by Date: Re: Extracting Parameter Values from NonlinearModelFit
  • Previous by thread: Re: How to specify x-axis in List when using ListPlot
  • Next by thread: Luke's list of mathematica questions