Plotting a Helix in Sympy: Troubleshooting and Tips

  • Context: Python 
  • Thread starter Thread starter JD_PM
  • Start date Start date
  • Tags Tags
    Helix Plot Python
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting issues related to plotting a helix using SymPy in a Jupyter Notebook environment. Participants share their experiences and seek assistance with code execution and output visualization.

Discussion Character

  • Technical explanation, Troubleshooting, Debate/contested

Main Points Raised

  • One participant shares a code snippet for plotting a helix using SymPy but reports that it does not produce a visual plot.
  • Another participant indicates that the provided code works for them, suggesting that the issue may lie elsewhere.
  • There is a suggestion that the participant's Python installation may not be capable of opening a window for plotting, prompting a request for more details about their setup.
  • A participant mentions using Anaconda and Jupyter Notebook, providing context about their environment.
  • One participant expresses that they have resolved their issue, indicating progress in troubleshooting.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the cause of the plotting issue, as some can execute the code successfully while others cannot. The discussion remains unresolved regarding the specific problem faced by the original poster.

Contextual Notes

Limitations include potential dependencies on the specific Python installation and environment settings, which are not fully detailed in the discussion.

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   Reactions: JD_PM
JD_PM said:
I use Jupyter Notebook for running code.
I found this:
 
  • Like
Likes   Reactions: jim mcnamara and JD_PM
DrClaude said:
I found this:

Thanks, now fixed! :)

Screenshot (324).png
 

Similar threads

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