

In other words, imaginary parts smaller thanĪ list of points (x, f(x)) in the interval xrange, which approximate Tolerance specifies how large it has to be in magnitude before Number arises (due, for example, to numerical issues), this Imaginary_tolerance – (default: 1e-8) if an imaginary Initial_points – (default: None) a list of x-values that should be evaluated.Įxcluded – (default: False) add a list of discovered x-values, for The algorithm will consider it significant. Is the initial subinterval size for the given xrange and plot_points, then The actual difference is greater than adaptive_tolerance*delta, where delta

#Arc aspect ratio calculator code#
Should be before the adaptive refinement code considers it significant. Setting this to 0Īdaptive_tolerance – (default: \(0.01\)) how large the relative difference However that in any actual plot a number is passed to this, with defaultĪdaptive_recursion – (default: \(5\)) how many levels of recursion to goīefore giving up when doing adaptive refinement. Plot_points – (default: \(5\)) the minimal number of plot points. Relative adaptive tolerance of adaptive_tolerance see below. TheĪdaptive refinement algorithm is also automatically invoked with a generate_plot_points ( f, xrange, plot_points, adaptive_tolerance, adaptive_recursion = 5, randomize = 0.01, initial_points = 5, excluded = True, imaginary_tolerance = None ) #Ĭalculate plot points for a function f in the interval xrange. If excluded, also x-values for which the calculation failed are given P2 to get a better linear approximation between them. Information on how the adaptive refinement algorithm works.Įxcluded – (default: False) also return locations where it has beenĭiscovered that the function is not definedĪ list of points to insert between p1 and See the documentation for plot() for more Setting this to 0 disables adaptive refinement.Īdaptive_tolerance – (default: \(0.01\)) how largeĪ relative difference should be before the adaptive refinementĬode considers it significant see documentation for generate_plot_pointsįor more information. Levels of recursion to go before giving up when doing adaptive The docstring for plot for a description of the algorithm.Īdaptive_recursion – (default: \(5\)) how many The adaptive refinement algorithm for plotting a function f. adaptive_refinement ( f, p1, p2, adaptive_tolerance, adaptive_recursion = 0.01, level = 5, excluded = 0 ) # NamedTemporaryFile ( suffix = ".png" ) as f. set_major_formatter ( formatter ) sage: import tempfile sage: with tempfile. get_major_formatter (), skip_values = ) sage: ax. plot ( t, s ) sage: formatter = SelectiveFormatter ( ax. Sage: from import SelectiveFormatter sage: import matplotlib.pyplot as plt sage: import numpy sage: fig = plt. This example is almost straight from a matplotlib example. Passes the rest on to a specified formatter. This matplotlib formatter selectively omits some tick values and SelectiveFormatter ( formatter, skip_values ) # ( trac ticket #12962)Įric Gourgoulhon (): add multi_graphics() and insets To linestyle and legend_label options as well. Jeroen Demeyer (): move parts of this file to graphics.py ( trac ticket #12857)Īaron Lauve (): reworked handling of ‘color’ when passedĪ list of functions now more in-line with other CAS’s. Jason Grout (2010-10): rewrote aspect ratio portions of the code To matplotlib fixed a number of smaller issues. Jason Grout (): shifted axes and grid functionality over Miserable 12 percent to a ‘wopping’ 35 percent, and fixed and William Stein (): raised the documentation coverage from a Ranges using the (varname, min, max) notation. Robert Miller (): tuning, NetworkX primitiveĪlex Clemesha (): added plot_vector_field, matrix_plot,Īrrow, bar_chart, Axes class usage (see axes.py)īobby Moretti and William Stein (2008-01): Change plot to specify William Stein (): fine tuning, bug fixes, better serverĪlex Clemesha (): added contour_plot, frame axes, misc

Type ? after each primitive in Sage for help and examples.Īlex Clemesha and William Stein (): initial version The following miscellaneous Graphics functions are included: List_plot_semilogx() and list_plot_semilogy() Plot() - plot of a function or other Sage object (e.g., elliptic The following plotting functions are supported: Line() - a line determined by a sequence of points (this need not The following graphics primitives are supported:Īrrow() - an arrow from a min point to a max point.ĭisk() - a filled disk (i.e. Rendering is done using the matplotlib Python library. Sage provides extensive 2D plotting functionality. Toggle table of contents sidebar 2D plotting #
