Python Plotting a Helix in Sympy: Troubleshooting and Tips

Click For Summary
The discussion revolves around issues with plotting a helix using SymPy in Python. The user is experiencing difficulties accessing their account and is limited in the number of questions they can ask. They attempted to use the command for plotting a 3D parametric line but received an unexpected output instead of a plot. Another participant confirmed that the code works on their setup and suggested that the user's Python installation might not support plotting windows. The user mentioned using Anaconda 2019.03 with Python 3.7 and Jupyter Notebook for running their code. Ultimately, the user resolved their issue, indicating that they managed to fix the plotting problem.
JD_PM
Messages
1,125
Reaction score
156
I asked this question on SO, but I am having problems with it (I cannot even get into my account now). It seems that people using the IP I am using are asking a lot and that limits the number of questions I can ask. Please have a look at my question. Here's the link:
[Moderators note: bold large formatting removed. Please use plain text in PF posts.]
https://stackoverflow.com/questions/55576155/how-to-plot-a-helix-in-sympy
After seeing that comment I have tried:

>>>x = sp.symbols('x')
>>>sp.plotting.plot3d_parametric_line(sp.cos(x),sp.sin(x),x, (x,0,10))

But got not plot:

<sympy.plotting.plot.Plot at 0x29104c282e8>

Any help is appreciated.
 
Last edited by a moderator:
Technology news on Phys.org
DrClaude said:
Can you otherwise produce plots? Because the code you wrote works for me.

You can get more information on the plotting command at
https://docs.sympy.org/latest/modules/plotting.html#sympy.plotting.plot.plot3d_parametric_line

Thanks.

Following the same example SymPy provides us with I got the same kind of outcome:

Screenshot (323).png


A weird (for me of course, I have just started with SymPy) outcome between <>.

What am I missing?
 
It appears that your python installation is not capable of opening a window for plotting.

You'll have to give details of your setup.
 
  • Like
Likes JD_PM
JD_PM said:
I use Jupyter Notebook for running code.
I found this:
 
  • Like
Likes jim mcnamara and JD_PM
DrClaude said:
I found this:

Thanks, now fixed! :)

Screenshot (324).png
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
916
Replies
2
Views
2K
Replies
4
Views
4K