Re: Using a List for the Listplot x-labels
- To: mathgroup at smc.vnet.net
- Subject: [mg63647] Re: Using a List for the Listplot x-labels
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Mon, 9 Jan 2006 04:48:23 -0500 (EST)
- Organization: The Open University, Milton Keynes, UK
- References: <dpqkco$2m2$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Uwe Ziegenhagen wrote:
> Hello,
>
> I have a list 'a' and use a function on this list to receive list 'b'.
> When I create a ListPlot the x-labels go from 1 to n, I would like to
> use the original list. Can someone give me a hint?
>
> Uwe
>
Hi Uwe,
According to the Online Help: "ListPlot[{{a, a}, {a, a}, ? }] plots a
list of points with specified a and a coordinates. " So transpose your
two lists to get a list of pairs as in
In[1]:=
a = {0.3, 1.5, 2.7};
b = {3, 6, 4};
ListPlot[Transpose[{a, b}], PlotStyle -> PointSize[0.02]];
Best regards,
/J.M.