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

[Work in Progress] Basic framework for restructured plot. #1468

Merged
merged 29 commits into from Aug 25, 2012

Conversation

catchmrbharath
Copy link
Contributor

This is a just a framework of functions that will replace plot which took care of all the possible plots.
The behaviour that is expected is provided in the docstrings. This pull request was made to get an opinion
on the names of the functions and the behaviour that has to be expected of these functions.

I will keep updating this branch with the code for the behaviour.

@travisbot
Copy link

This pull request fails (merged 85cd5a9 into 65b6582).

``expr`` : Expression representing the function of single variable
``range``: (x, 0 , 5), A 3 - tuple denoting the range of the free variable.

If the ranges is not specified, then a default range of (-10, 10) is used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add: "This may change in the future if a more advanced default range detection algorithm is detected."

@asmeurer
Copy link
Member

asmeurer commented Aug 7, 2012

Why create a new file for this?

@Krastanov
Copy link
Member

SymPy Bot Summary: 🔴 There were test failures.

@catchmrbharath: Please fix the test failures.

Test command: setup.py test
master hash: 98cc80f
branch hash: 85cd5a99c5f32d08e756b0c827c3c5c46086ea65

Interpreter 1: 🔴 There were test failures.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYhcYiDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYlPAhDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYvbYiDA

Build HTML Docs: ✳️ All tests have passed.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYiJQjDA

Automatic review by SymPy Bot.

@travisbot
Copy link

This pull request fails (merged d9efa1ea into 65b6582).

@Krastanov
Copy link
Member

SymPy Bot Summary: 🔴 There were test failures.

@catchmrbharath: Please fix the test failures.

Test command: setup.py test
master hash: 0d88b25
branch hash: d9efa1ea0a5efa812fe4e76e308cf3f6068b69c0

Interpreter 1: 🔴 There were test failures.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYn-0iDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYkJQjDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYqowjDA

Build HTML Docs: ✳️ All tests have passed.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYj5QjDA

Automatic review by SymPy Bot.

@asmeurer
Copy link
Member

asmeurer commented Aug 8, 2012

SymPy Bot Summary: 🔴 There were test failures (merged catchmrbharath/restructured_plot (d9efa1ea0a5efa812fe4e76e308cf3f6068b69c0) into master (0d88b25)).

@catchmrbharath: Please fix the test failures.

Interpreter 1: 🔴 There were test failures.
Interpreter: None (2.5.0-final-0)
Architecture: Darwin (32-bit)

Interpreter 2: 🔴 There were test failures.
Interpreter: None (2.6.6-final-0)
Architecture: Darwin (32-bit)

Interpreter 3: 🔴 There were test failures.
Interpreter: None (2.7.2-final-0)
Architecture: Darwin (32-bit)

Interpreter 4: 🔴 There were test failures.
Interpreter: /sw/bin//python2.6 (2.6.8-final-0)
Architecture: Darwin (64-bit)

Interpreter 5: 🔴 There were test failures.
Interpreter: /sw/bin//python2.7 (2.7.3-final-0)
Architecture: Darwin (64-bit)

Interpreter 6: 🔴 There were test failures.
Interpreter: None (3.2.2-final-0)
Architecture: Darwin (32-bit)

Interpreter 7: 🔴 There were test failures.
Interpreter: None (3.3.0-beta-1)
Architecture: Darwin (32-bit)

Interpreter 8: 🔴 There were test failures.
Interpreter: /sw/bin//python3.2 (3.2.3-final-0)
Architecture: Darwin (64-bit)

Interpreter 9: 🔴 There were test failures.
Interpreter: None (3.3.0-beta-1)
Architecture: Darwin (64-bit)

Build HTML Docs: 🔴 There were test failures.
Sphinx version: 1.1.3

@travisbot
Copy link

This pull request fails (merged c3964eb2 into 65b6582).

@Krastanov
Copy link
Member

SymPy Bot Summary: 🔴 There were test failures.

@catchmrbharath: Please fix the test failures.

Test command: setup.py test
master hash: b0a9866
branch hash: c3964eb2aca5d5a9a60dd2d5869e92135cb64ba2

Interpreter 1: 🔴 There were test failures.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY8KMjDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYoMYiDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYsfAhDA

Build HTML Docs: ✳️ All tests have passed.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYn8YiDA

Automatic review by SymPy Bot.

@travisbot
Copy link

This pull request fails (merged 749e5664 into 65b6582).

@catchmrbharath
Copy link
Contributor Author

@asmeurer @Krastanov Can you have a look at this? Is the API access better?

I will add the depth and the nb_of_points in an hour.

Multiple plots with same range.
plot_line(expr1, expr2, ..., range)

Multiple plots with different .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ranges

@asmeurer
Copy link
Member

By the way, we need a Sphinx file for the new plotting module.

Usage
=====
Single Plot
plot_line(expr, range, ...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ... should be replaced with **kwargs.

@asmeurer
Copy link
Member

Where the range is optional, the spec should read [, range].

@travisbot
Copy link

This pull request fails (merged dea33703 into 65b6582).

@catchmrbharath
Copy link
Contributor Author

Where the range is optional, the spec should read [, range]

I didn't get it. Can you show with an example? Thanks.

@Krastanov
Copy link
Member

SymPy Bot Summary: 🔴 There were test failures.

@catchmrbharath: Please fix the test failures.

Test command: setup.py test
master hash: b0a9866
branch hash: dea3370300d87c475356e6182911c876f77581b2

Interpreter 1: 🔴 There were test failures.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY248iDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYjIAiDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY3bYiDA

Build HTML Docs: ✳️ All tests have passed.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY-9UiDA

Automatic review by SymPy Bot.

@travisbot
Copy link

This pull request fails (merged d38f44ff into b0a9866).

1 similar comment
@travisbot
Copy link

This pull request fails (merged d38f44ff into b0a9866).

@Krastanov
Copy link
Member

SymPy Bot Summary: 🔴 There were test failures.

@catchmrbharath: Please fix the test failures.

Test command: setup.py test
master hash: b0a9866
branch hash: d38f44ff5b160ab13b66aa52d0b11372b15804db

Interpreter 1: 🔴 There were test failures.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYtPAhDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYkfUiDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYwowjDA

Build HTML Docs: ✳️ All tests have passed.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY_tUiDA

Automatic review by SymPy Bot.

@travisbot
Copy link

This pull request fails (merged a764547d into 9215c28).

@Krastanov
Copy link
Member

SymPy Bot Summary: 🔴 There were test failures.

@catchmrbharath: Please fix the test failures.

Test command: setup.py test
master hash: 9215c28
branch hash: a764547dbd89b69d056ace82ffa204dc8ea2540a

Interpreter 1: 🔴 There were test failures.

Interpreter: /usr/local/bin/python2.5 (2.5.6-final-0)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY2qsjDA

Interpreter 2: 🔴 There were test failures.

Interpreter: /usr/bin/python2.7 (2.7.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY9aMjDA

Interpreter 3: 🔴 There were test failures.

Interpreter: /usr/bin/python3.2 (3.2.3-candidate-2)
Architecture: Linux (64-bit)
Cache: yes

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY4LYiDA

Build HTML Docs: ✳️ All tests have passed.

Docs build command: make html-errors
Sphinx version: 1.1.3

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sYsLMjDA

Automatic review by SymPy Bot.

@catchmrbharath
Copy link
Contributor Author

The new API is complete. I have added the tests and also updated the notebooks with the new functions

@asmeurer @Krastanov One of things I was not sure of was whether to delete the present plot function. There are very good cases of plot, for example, while plotting the solutions of equations, where we don't know whether the plot is going to be 3D or 2D. Any suggestions / discussion on whether it should be removed or not?

@asmeurer
Copy link
Member

I vote for removing it.

By the way, this can't be merged cleanly.

@catchmrbharath
Copy link
Contributor Author

I will rebase it.

Aesthetics
----------

``line_color``: float. Specifies the color for the plot.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not a float, it is a function returning a float. Check the "coloring" example notebook. Another docstring already explains all this, just add in parentheses a reference to it (either Plot or Series).

@Krastanov
Copy link
Member

I think that there is a number of example notebooks that are still using the now nonexistent plot function.

The name that I suggested may indeed turn out to be too long, however I still find the present ones a bit confusing (maybe it is just be :)

Besides some minor corrections to the docstrings I think that they should be sufficient.

@travisbot
Copy link

This pull request passes (merged 6bfa913 into b52b7c3).

* plot_line -> plot
* plot3D -> plot3d
* plot3D_parametric -> plot3d_parametric_line
* plot3D_surface -> plot3d_parametric_surface
@catchmrbharath
Copy link
Contributor Author

I have changed the plot names.

  • plot_line -> plot
  • plot3D -> plot3d
  • plot3D_parametric -> plot3d_parametric_line
  • plot3D_surface -> plot3d_parametric_surface

@asmeurer I have also fixed the doctest failures and addressed @Krastanov comments.

@travisbot
Copy link

This pull request fails (merged 41466ca into b52b7c3).

@Krastanov
Copy link
Member

I do not find any obvious issues anymore. Thanks for all the work.

@asmeurer
Copy link
Member

By the way, @catchmrbharath as noted on the mailing list, please refrain from rebasing this branch, so it can be merged into 0.7.2.

@asmeurer
Copy link
Member

SymPy Bot Summary: 🔴 Failed after merging catchmrbharath/restructured_plot (41466ca) into master (a184841).
@catchmrbharath: Please fix the test failures.
🔴 Python 2.5.0-final-0: fail
🔴 Python 2.6.6-final-0: fail
🔴 Python 2.7.2-final-0: fail
🔴 Python 2.6.8-final-0: fail
🔴 Python 2.7.3-final-0: fail
🔴 PyPy 1.9.0-final-0; 2.7.2-final-42: fail
✳️ Python 3.2.2-final-0: pass
✳️ Python 3.3.0-beta-2: pass
✳️ Python 3.2.3-final-0: pass
✳️ Python 3.3.0-beta-2: pass
🔴Sphinx 1.1.3: fail

@catchmrbharath
Copy link
Contributor Author

Sorry about that. Forgot to run quality test for the last commit. I will squash the new commit once all tests pass.

@catchmrbharath
Copy link
Contributor Author

I am not sure why the sphinx make is failing. It runs without a problem on my machine.

@asmeurer
Copy link
Member

I think it is a failure from master.

@asmeurer
Copy link
Member

I'm running the tests against 0.7.2 to see how things will be there.

@travisbot
Copy link

This pull request passes (merged 274ec3f into b52b7c3).

@asmeurer
Copy link
Member

SymPy Bot Summary: 🔴 Failed after merging catchmrbharath/restructured_plot (274ec3f) into origin/0.7.2 (c1c3b17).
@catchmrbharath: Please fix the test failures.
✳️ Python 2.5.0-final-0: pass
✳️ Python 2.6.6-final-0: pass
✳️ Python 2.7.2-final-0: pass
✳️ Python 2.6.8-final-0: pass
✳️ Python 2.7.3-final-0: pass
🔴 PyPy 1.9.0-final-0; 2.7.2-final-42: fail
✳️ Python 3.2.2-final-0: pass
✳️ Python 3.3.0-beta-2: pass
✳️ Python 3.2.3-final-0: pass
✳️ Python 3.3.0-beta-2: pass
🔴Sphinx 1.1.3: fail

@asmeurer
Copy link
Member

OK, those Sphinx errors you do need to fix.

@catchmrbharath
Copy link
Contributor Author

SymPy Bot Summary: ✳️ All tests have passed.

Test results html report: http://reviews.sympy.org/report/agZzeW1weTNyDAsSBFRhc2sY6eYkDA

Interpreter: /usr/local/bin/python (2.7.3-final-0)
Architecture: Darwin (64-bit)
Cache: yes
Test command: setup.py test
master hash: a184841
branch hash: 274ec3f

Automatic review by SymPy Bot.

@asmeurer
Copy link
Member

SymPy Bot Summary: 🔴 Failed after merging catchmrbharath/restructured_plot (6478b79) into origin/0.7.2 (c1c3b17).
@catchmrbharath: Please fix the test failures.
🔴Sphinx 1.1.3: fail

@asmeurer
Copy link
Member

SymPy Bot Summary: 🔴 Failed after merging catchmrbharath/restructured_plot (6478b79) into HEAD (6478b79).
@catchmrbharath: Please fix the test failures.
🔴Sphinx 1.1.3: fail

@catchmrbharath
Copy link
Contributor Author

SymPy Bot Summary: 🔴 Failed after merging catchmrbharath/restructured_plot (6478b79) into master (a184841).
@catchmrbharath: Please fix the test failures.
🔴Sphinx 1.1.3: fail

@catchmrbharath
Copy link
Contributor Author

SymPy Bot Summary: 🔴 Failed after merging catchmrbharath/restructured_plot (6478b79) into master (a184841).
@catchmrbharath: Please fix the test failures.
🔴Sphinx 1.1.3: fail

asmeurer added a commit that referenced this pull request Aug 25, 2012
[Work in Progress] Basic framework for restructured plot.
@asmeurer asmeurer merged commit 5b149c2 into sympy:master Aug 25, 2012
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6478b79 on catchmrbharath:restructured_plot into * on sympy:master*.

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

Successfully merging this pull request may close these issues.

None yet

5 participants