# Plotting points of a function

Akash2 shared this question 2 years ago

Is there a way to plot the points of a graph without the entire function? For example, if I wanted to plot the points of y=x^2 for all integer values of x is there a command I can use, or do I have to just do it manually?

1

You can use Sequence((p, p²), p, -100, 100). You might as well use a slider to define the min and max of the points shown, to show the points one by one, dragging the slider. With a slider s you could use something like Sequence((p, p²), p, -5, s).

chris

1

Also to use the y=x^2 object directly

`Sequence((p, f(p)), p, -100, 100)`

1

Is there a way that I could do this for the points of an ODE? For example, could I graph the integer points of S?

1
1

Using First(S,2500) I'm able to generate this, but is there a way to set the interval? I'm getting hundredths but am trying to just get integers. Would I use some sort of domain restriction?

1

I was able to figure it out: Using l1=First(S,2500), I did sequence(l1(100p),p,0,25) and got only the integer points. Thank you for the help everybody!

1

keepif(isinteger(x(P)),P,l1)

1

1

Thanks for the keep command. It seems to be more optimized than my sequence command. Here is the finished file.