Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Plotting x, free variable error

I was plotting sin(x)/x and also wanted a seperate plot of sin(x) and x so I could visualize those components as well. However I get an error when plotting x saying "free variable x -> x". If I add a coefficient to h(x) such as h(x) = 1.0001*x then it works fine.

This is the code I am using:

f(x) = sin(x)/x
g(x) = sin(x)
h(x) = x

fig1 = plot(f,-10,10,rgbcolor='green')
fig2 = plot(g,-10,10,rgbcolor='purple')
fig3 = plot(h,-10,10,rgbcolor='red')

figure = fig1 + fig2 + fig3