Re: Plotting points of the function at increments.

*To*: mathgroup at smc.vnet.net*Subject*: [mg85733] Re: Plotting points of the function at increments.*From*: Bill Rowe <readnewsciv at sbcglobal.net>*Date*: Wed, 20 Feb 2008 07:00:56 -0500 (EST)

On 2/19/08 at 7:03 AM, lrebanks at netvigator.com (Lea Rebanks) wrote: >I am trying to plot the points of this function at increments of 1 >:- >Plot[0.5x+5,{x,-5,5},PlotPoints*10] The correct syntax for using PlotPoints would be: Plot[0.5x+5,{x,-5,5},PlotPoints->10] However, if you do ?PlotPoints you will find this specifies the initial number of points for Mathematica to sample your expression and does not do what you seem to want. >I wish to have an 'X' at each point on the line at f[1], f[2], f[3] >. etc Hopefully I can adjust the size & colours of the 'X' markers >aswell. doing the following would work: data = Table[{x, 0.5 x +5},{x,-5,5}]; ListPlot[data, Joined->True, Epilog->{Red,Text["X",#]&/@data}] will plot the line y = 0.5 x + 5 with a red "X" at y[-1], y[-2] etc. You can change the size by specifying the font size. However, it would probably be simpler to adjust size if you were to use a graphic primitive in place of a text character. And if you wanted to restrict the "X" characters to appear only in quadrant 1 (positive values) ListPlot code would become ListPlot[data, Joined->True, Epilog->{Red,Text["X",#]&/@Cases[data, {_?Positive, _}]}] -- To reply via email subtract one hundred and four