Re: ListPlot question
- To: mathgroup at smc.vnet.net
- Subject: [mg125897] Re: ListPlot question
- From: Yi Wang <tririverwangyi at gmail.com>
- Date: Fri, 6 Apr 2012 05:56:20 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jljq20$ct8$1@smc.vnet.net>
Hi, JK You can first make a list and then plot it. As you can find in help, ListPlot has 3 forms of usage. The second solves your problem: ListPlot[ { {x1, y1}, {x2, y2},... } ] To be explicit, you can try ListPlot[Table[{x, Sin[x]}, {x, 0, 0.5, 0.1}]] Best, Yi On Thursday, April 5, 2012 5:53:04 AM UTC-4, JK wrote: > I have a user defined function f[x]. I want to plot it discretely > using ListPlot. > Specifically, I want to do: > > ListPlot[f[x],{x,0,0.5,0.1}] > > So I want plot 5 point from the function with 5 sequence of arguments. > However, the figure has an axis value of 0 to 5 instead of 0 to 0.5. > Is there anyway to fix this? > > Thanks > JK