Ticket #3534 (closed defect: fixed)

Opened 5 months ago

Last modified 3 months ago

[with patch; positive review] plot -- fix circle example in the documentation

Reported by: was Assigned to: tba
Priority: minor Milestone: sage-3.1.2
Component: documentation Keywords: editor_mhansen
Cc:

Description

> The first example here:
> http://www.sagemath.org/doc/html/tut/node21.html
> .. shows creating a circle plot via:
> L = [[cos(pi*i/100),sin(pi*i/100)] for i in range(200)]
> p = polygon(L, rgbcolor=(1,1,0))
> p.save()          ## or   p.show()
>
> When I try this, I get an ellipse!  Or more precisely, the plot has
> unequal axis scaling.
>
> Here's a picture:
> http://backspaces.net/temp/Safari116.png

Use this instead:

L = [[cos(pi*i/100),sin(pi*i/100)] for i in range(200)]
p = polygon(L, rgbcolor=(1,1,0))
p.save(aspect_ratio=1)          ## or   p.show()

Attachments

doc-3534.patch (5.9 kB) - added by was on 06/29/2008 05:44:23 PM.
3534-new.patch (3.7 kB) - added by jhpalmieri on 07/15/2008 11:47:41 AM.

Change History

06/29/2008 05:43:26 PM changed by was

  • summary changed from plot -- fix circle example in the documentation to [with patch; needs review] plot -- fix circle example in the documentation.

The attached patch fixes the above issue. It also greatly improves all the examples to simply show the plots instead of having hacking notes outside the examples to show the plots, which was done before when the doctesting framework couldn't handle plotting.

06/29/2008 05:44:23 PM changed by was

  • attachment doc-3534.patch added.

06/29/2008 07:07:01 PM changed by jhpalmieri

It would be better to patch against the new version of the tutorial (the one in 3.0.4.alpha1): see http://trac.sagemath.org/sage_trac/ticket/3347.

07/02/2008 02:04:29 PM changed by mhansen

  • keywords set to editor_mhansen.

I'll be an editor for this since I did #3347.

07/15/2008 11:47:41 AM changed by jhpalmieri

  • attachment 3534-new.patch added.

07/15/2008 11:49:50 AM changed by jhpalmieri

Here's a new patch, based on William's but done against the new version of the tutorial. (This means that the details are different, but I've tried to preserve the ideas behind his changes.)

09/15/2008 07:17:27 PM changed by mhansen

  • summary changed from [with patch; needs review] plot -- fix circle example in the documentation to [with patch; positive review] plot -- fix circle example in the documentation.

Looks good to me. I'll make these changes in the ReST version too.

09/15/2008 08:53:17 PM changed by mabshoff

  • status changed from new to closed.
  • resolution set to fixed.
  • milestone changed from sage-3.1.3 to sage-3.1.2.

Merged in Sage 3.1.2.rc5