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

fill option is broken for polar_plot #6875

Closed
sagetrac-whuss mannequin opened this issue Sep 3, 2009 · 10 comments
Closed

fill option is broken for polar_plot #6875

sagetrac-whuss mannequin opened this issue Sep 3, 2009 · 10 comments

Comments

@sagetrac-whuss
Copy link
Mannequin

sagetrac-whuss mannequin commented Sep 3, 2009

The fill option for polar_plot does not work correctly anymore.

The following two doctests don't produce the supposed output:

  • Fill the area between two functions:
sage: polar_plot(cos(4*x) + 1.5, 0, 2*pi, fill=0.5 * cos(4*x) + 2.5, fillcolor='orange').show(aspect_ratio=1)
  • Fill the area between several spirals:
sage: polar_plot([(1.2+k*0.2)*log(x) for k in range(6)], 1, 3 * pi, fill = {0: [1], 2: [3], 4: [5]})

This regression has been introduced with the changeset 12287 (Ticket: #5930).

Sage really needs a test framework for plots. Otherwise more and more regressions will creep in, without anybody noticing.

Component: graphics

Keywords: polar_plot, fill

Author: Wilfried Huss

Reviewer: Jason Grout

Merged: Sage 4.1.2.alpha2

Issue created by migration from https://trac.sagemath.org/ticket/6875

@sagetrac-whuss sagetrac-whuss mannequin added this to the sage-4.1.2 milestone Sep 3, 2009
@sagetrac-whuss sagetrac-whuss mannequin added the s: needs review label Sep 3, 2009
@sagetrac-whuss
Copy link
Mannequin Author

sagetrac-whuss mannequin commented Sep 3, 2009

Attachment: trac_6875_fill_regression.patch.gz

@jasongrout
Copy link
Member

comment:1

It still doesn't seem like the first example above works for me---I get a single solid figure. Is it supposed to have a band around it's edge?

@sagetrac-whuss
Copy link
Mannequin Author

sagetrac-whuss mannequin commented Sep 15, 2009

Attachment: polar_1.png

The correct output of the first example

@sagetrac-whuss
Copy link
Mannequin Author

sagetrac-whuss mannequin commented Sep 15, 2009

Attachment: polar_2.png

The correct output of the second example

@sagetrac-whuss
Copy link
Mannequin Author

sagetrac-whuss mannequin commented Sep 15, 2009

comment:2

Replying to @jasongrout:

It still doesn't seem like the first example above works for me---I get a single solid figure. Is it supposed to have a band around it's edge?

I've attached two images with the correct output of the two examples.
Is this what you get with the patch?

@jasongrout
Copy link
Member

comment:3

I compiled a fresh version of 4.1.1.alpha1 overnight, and everything seems to work on that. So positive review!

(Note to everyone else: the functions above were already in the doctests, but just were not working).

I wish this would have been working last week when I taught finding areas in polar coordinates! I'm glad you found the fix.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 15, 2009

Changed author from whuss to Wilfried Huss

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 15, 2009

comment:4

Merged trac_6875_fill_regression.patch.

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 15, 2009

Merged: Sage 4.1.2.alpha2

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Sep 15, 2009

Reviewer: Jason Grout

@sagetrac-mvngu sagetrac-mvngu mannequin closed this as completed Sep 15, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants