#20636: Add pictures to contour_plot.py
-------------------------------------+-------------------------------------
Reporter: jhonrubia6 | Owner:
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-7.3
Component: documentation | Resolution:
Keywords: | Merged in:
Authors: Javier Honrubia | Reviewers:
González | Work issues:
Report Upstream: N/A | Commit:
Branch: | e79e987eda01a2750ecf8ff5fa3c458862b3e51d
u/jhonrubia6/add_pictures_to_contour_plot_py| Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by tscrim):
Thank you for your work on adding the pictures and improving the
documentation.
While it is good to be PEP8 compliant, strictly enforcing it can make
things less readable, especially for someone who it looking at the doc on
the webpages. In particular, when you move one argument to a second line
when it only goes over 80 characters by a little bit makes it more
difficult on the user (in particular, the new user/student). For example:
{{{#!diff
+ sage: contour_plot(f, (0, pi),
+ ....: (0, pi)).show(axes=True) # These are
equivalent
}}}
{{{#!diff
- sage: contour_plot(x**2-y**2, (x,-2, 2), (y,-2,
2),region=x-y,plot_points=300)
+ sage: contour_plot(x**2-y**2, (x,-2, 2), (y,-2, 2), region=x - y,
+ ....: plot_points=300)
}}}
{{{#!diff
- sage: implicit_plot(mandel(7), (-0.3, 0.05), (-1.15,
-0.9),plot_points=50)
+ sage: implicit_plot(mandel(7), (-0.3, 0.05), (-1.15, -0.9),
+ ....: plot_points=50)
}}}
{{{#!diff
- sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2),
plot_points=400)
+ sage: region_plot([x^2+y^2<1, x<y], (x,-2,2), (y,-2,2),
+ ....: plot_points=400)
}}}
{{{#!diff
- sage: region_plot(lambda x,y: x^2+y^2<1 or x<y, (x,-2,2),
(y,-2,2), plot_points=400)
+ sage: region_plot(lambda x,y: x^2+y^2<1 or x<y, (x,-2,2),
(y,-2,2),
+ ....: plot_points=400)
}}}
{{{#!diff
- sage: region_plot([y>0, x>0, x^2+y^2<1], (x,-1.1, 1.1), (y,-1.1,
1.1), plot_points = 400)
+ sage: region_plot([y>0, x>0, x^2+y^2<1], (x,-1.1, 1.1), (y,-1.1,
1.1),
+ ....: plot_points = 400)
}}}
This same philosophy applies to the code itself. Also, you should revert
the change to the copyright header. All of these comments apply to the
other plotting tickets.
Your alignment is off on these changes:
{{{#!diff
- sage: region_plot(sin(x)*sin(y) >= 1/4, (x,-10,10), (y,-10,10),
incol='yellow', bordercol='black', borderstyle='dashed', plot_points=250)
+ sage: region_plot(sin(x)*sin(y) >= 1/4, (x,-10,10), (y,-10,10),
+ ....: incol='yellow', bordercol='black',
+ ....: borderstyle='dashed', plot_points=250)
}}}
{{{#!diff
- sage: P=contour_plot(y^2 + 1 - x^3 - x, (x,-pi,pi), (y,-pi,pi), \
- ... fill=False, cmap='hsv', labels=True,
label_inline_spacing=1)
+ sage: P = contour_plot(y^2 + 1 - x^3 - x, (x, -pi, pi), (y, -pi,
pi),
+ ....: fill=False, cmap='hsv', labels=True,
+ ....: label_inline_spacing=1)
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/20636#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.