On 12/31/11 8:19 AM, Christophe BAL wrote:
Hello Jason.
Where is the function that is called for cartesian plots ?
In $SAGE_ROOT/devel/sage/sage/plot/plot.py, where $SAGE_ROOT is the
directory where sage is installed.
The example seems like it would fit well in the examples at the top of
the file, or in part right under the "def plot" line that looks like this:
@rename_keyword(color='rgbcolor')
@options(alpha=1, thickness=1, fill=False, fillcolor='automatic',
fillalpha=0.5, rgbcolor=(0,0,1), plot_points=200,
adaptive_tolerance=0.01, adaptive_recursion=5, detect_poles =
False, exclude = None, legend_label=None,
__original_opts=True, aspect_ratio='automatic')
def plot(funcs, *args, **kwds):
There are some examples of the exclude option at the bottom of the plot
documentation. Maybe right there would be good?
A example with excluded values::
sage: plot(floor(x), (x, 1, 10), exclude = [1..10])
We exclude all points where prime_pi makes a jump::
sage: jumps = [n for n in [1..100] if prime_pi(n) != prime_pi(n-1)]
sage: plot(lambda x: prime_pi(x), (x, 1, 100), exclude = jumps)
Excluded points can also be given by an equation::
sage: g(x) = x^2-2*x-2
sage: plot(1/g(x), (x, -3, 4), exclude = g(x) == 0, ymin = -5,
ymax = 5)
``exclude`` and ``detect_poles`` can be used together::
sage: f(x) = (floor(x)+0.5) / (1-(x-0.5)^2)
sage: plot(f, (x, -3.5, 3.5), detect_poles = 'show', exclude =
[-3..3], ymin = -5, ymax = 5)
Thanks,
Jason
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org