Opened 13 years ago
Closed 13 years ago
#1778 closed defect (fixed)
[with patch, positive review] plot() does not follow the same interval range conventions as plot3d()
Reported by: | moretti | Owned by: | moretti |
---|---|---|---|
Priority: | major | Milestone: | sage-2.10 |
Component: | graphics | Keywords: | plotting, plot3d, plot |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
sage: plot3d(x^2 + y^2, (x,-2,2), (y,-2,2))
is valid, however, to do a 2d plot, you use the syntax
sage: plot(x^2, x, -2, 2).
I spoke with William about this, he wants to deprecate the plot(x^2, -2, 2)
syntax for 2d plotting and introduce a new preferred syntax:
sage: plot(x^2, (x, -2, 2))
Attachments (3)
Change History (11)
Changed 13 years ago by
comment:1 Changed 13 years ago by
Changed 13 years ago by
comment:2 Changed 13 years ago by
- Summary changed from plot() does not follow the same interval range conventions as plot3d() to [with patch] plot() does not follow the same interval range conventions as plot3d()
I implemented this in the attached. It makes both the old and new style of plot() syntax valid. However the documentation mentions that plot(x^{2, (x, a, b)) is the preferred syntax. Please test it out. }
comment:3 Changed 13 years ago by
- Milestone set to sage-2.10
- Priority changed from minor to major
That this doesn't work anymore is definitely a bug:
sage: plot(sin(2), (x,0,10*pi)) BOOM!
Likewise for
sage: plot(sin(2), 0,10*pi) BOOM
I'll try to fix this....
comment:4 Changed 13 years ago by
It turns out the plot(sin(2), (x,0,10*pi))
problem above was a really genuine bug coming from an indentation mistake on line 624 (I will attach a patch fixing this and other issues).
Changed 13 years ago by
apply the hg bundle that bobby posted, then apply this plain text patch which fixes one serious bug.
comment:5 Changed 13 years ago by
- Summary changed from [with patch] plot() does not follow the same interval range conventions as plot3d() to [with patch, positive review] plot() does not follow the same interval range conventions as plot3d()
Apply the plot.hg followed by trac-1778-referee.patch
comment:6 Changed 13 years ago by
- Description modified (diff)
comment:7 Changed 13 years ago by
comment:8 Changed 13 years ago by
- Resolution set to fixed
- Status changed from new to closed
Merged in Sage 2.10.alpha3
Ignore the previous patch, it does not have all the required changes.