Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot function shows negative values above origin #21777

Open
Psycho-Pirate opened this issue Jul 25, 2021 · 5 comments
Open

Plot function shows negative values above origin #21777

Psycho-Pirate opened this issue Jul 25, 2021 · 5 comments
Labels

Comments

@Psycho-Pirate
Copy link
Member

from sympy import symbols
from sympy.plotting import plot
x=symbols('x')
plot(x/7-22/7, (x, 0, 10), show=True)

plotttt
Here the plot returned shows negative values on the y-axis above origin.

@moorepants
Copy link
Member

What is the issue? It doesn't seem incorrect. What is the expected output?

@Psycho-Pirate
Copy link
Member Author

Well I expected the default origin to be set at (0,0). So that above the x axis all the y values are positive.
Something like this:
save

@moorepants
Copy link
Member

Doesn't that have lots of wasted whitespace? I'm guessing the design uses the limits of the data to minimize dead space.

@Psycho-Pirate
Copy link
Member Author

Psycho-Pirate commented Jul 25, 2021

I just expected the origin to be at (0,0) by default. Even though it is not a rule, usually when graphs are plotted origin is set to be at (0,0). However if minimizing dead space was also kept in mind while designing this function then i guess its fine.

@oscargus
Copy link
Contributor

I think this can be "solved" by printing the X axis at the top for a negative y axis and the bottom for a positive. It is indeed confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants