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_region function #2770
Comments
comment:1
Attachment: plot-region.png If you want to try out part1, you need to apply the patch at #4884. At the moment it support only one function. Multiple function support is coming in part2. |
comment:2
Attachment: trac_2770_part2.patch.gz Now it is complete, apply both patches and the patch at #4884 to test. The example in the screenshot should work, but is rather ugly at the default plot_points setting, try at plot_points=200 to see it looking good. |
comment:3
Since there is heavy discussion at #4884 I will wait until that settles to update this patch to work with whatever is decided upon. |
comment:4
#4884 is settled |
comment:5
This has some odd behavior which I hope the author could please comment on: This looks good:
This looks very odd (wrong but maybe the algorithm just needs more points?):
This looks plain wrong (and I think we have provided enough points:-):
|
comment:6
Means to add to the review above: If you first apply the first patch at #4884 (but not the second), then the two patches above apply cleanly to 3.2.2. |
comment:7
The first very wrong case is really because there is not enough data to interpolate properly. In the second case it's too much of a good thing. There is too much data and every insignificant contour line gets plotted and since they have a minimum width you get a red picture. For this example, plot_points=400 looks much more reasonable. |
comment:8
Okay, thanks for that explanation. This is a useful patch. My impression is that if it can't be easily fixed, then at least it should be documented how to adjust the parameters to get proper behaviour. I'm guessing that the people who will use this patch are students and teachers, so the more detailed examples the better:-) Does this seem reasonable? With that's I'd be prepared to give it a positive review. Other cool examples you could include:
And one similar to Jason's:
(I know you have
but it looks odd without the aspect ratio set.) Do these seem reasonable Arnaud? |
Attachment: trac_2770_part2.1.patch.gz |
comment:9
I agree with more examples. I just did not have a huge inspiration for them. The last patch adds your suggested examples. |
comment:10
The patches applied fine but the test timed out on my machine (amd64 ubuntu 8.10). So, positive review for the patch but I could not do the test using sage -t. (The examples seemed to work okay though.) |
This is a slightly rebased version of Arnaud Bergeron's patch |
comment:11
Attachment: trac_2770_part1.patch.gz Merged all three patches in Sage 3.3.alpha0 |
It would be great to have a plot_region function which would plot a region where a system of equations/inequalities were true.
Here is an initial version:
This uses an idea from cwitty (to use contour_plot) and the patch from #2768. A screenshot is attached below.
Component: graphics
Issue created by migration from https://trac.sagemath.org/ticket/2770
The text was updated successfully, but these errors were encountered: