Evaluate "Plot" with specific spacing, say 0.1 by 0.1 to 0.9?

Hey,

I have a very “heavy” calculation, which I want to speed-up.
How do I tell Mathematica to evaluate “Plot” with specific spacing, say 0.1 by 0.1 to 0.9?
Instead of Plot[Func., {x,0.1,0.9}] which let’s it choose the spacing itself?
In Matlab, this is the difference between [0.1:0.9] and [0.1:0.1:0.9]…

Thanks!
Erez .

Hi,

this is one way:

ListPlot[{#, Sin[#]} & /@ Range[0.1, 0.9, 0.1]]

If you really want, you can do it with Plot, too, but it is really artificial:

Plot[Sin[t], {t, 0.0, 1}, Mesh -> {Range[0., 1, 0.1]}, MeshStyle -> Directive[Red, PointSize -> Large], PlotStyle -> None]

Cheers,

Marco

Hi Erez,

DiscretePlot does what you are looking for. An example with spacing 0.1:

DiscretePlot[Sin[t], {t, 0, 2, 0.1}]

Hi,

if you DecretePlot, you can use the option Filling->None to get rid of the vertical lines.

DiscretePlot[Sin[t], {t, 0.1, 0.9, 0.1}, Filling -> None]

Cheers,

Marco

You can also use PlotPoints to set the number of initial points and MaxRecursion to prevent refinement. Of course the plot quality will suffer. (Mesh->Full just shows the points.)

Plot[Sin[x], {x, 0, 2 Pi}, PlotPoints -> 10, MaxRecursion -> 0, 
 Mesh -> Full]

The Joined option can be used to let DiscretePlot “fake” a continuous plot:

DiscretePlot[Sin[t], {t, 0, 2, 0.1}, Joined -> True, Filling -> None]