MathGroup Archive 2013

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

Search the Archive

Re: what is wrong with this code?


You're just seeing some artifacts. Increasing the plotpoints gives a better looking plot:

f[x_] := If[EvenQ[IntegerPart[x]], 0.4, 0.8];
Plot[f[x], {x, 1, 101}, PlotRange -> {0, 1}, PlotPoints -> 69] 

BTW, next time try to be a bit more descriptive than just "what's wrong with this", OK? 



  • Prev by Date: Re: Packages with data sets
  • Next by Date: Re: what is wrong with this code?
  • Previous by thread: Re: what is wrong with this code?
  • Next by thread: Re: what is wrong with this code?