neulab/docprompting-conala huggingface dataset:
classmatplotlib.backends.backend_template.GraphicsContextTemplate[source]
 
Bases: matplotlib.backend_bases.GraphicsContextBase The graphics context provides the color, line styles, etc... See the cairo and postscript backends for examples of mapping the graphics context attributes (cap styles, join styles, line widths, colors) to a particular backend. In cairo this is done by wrapping a cairo.Context object and forwarding the appropriate calls to it using a dictionary mapping styles to gdk constants. In Postscript, all the work is done by the renderer, mapping line styles to postscript calls. If it's more appropriate to do the mapping at the renderer level (as in the postscript backend), you don't need to override any of the GC methods. If it's more appropriate to wrap an instance (as in the cairo backend) and do the mapping here, you'll need to override several of the setter methods. The base GraphicsContext stores colors as a RGB tuple on the unit interval, e.g., (0.5, 0.0, 1.0). You may need to map this to colors appropriate for your backend.
matplotlib.backends.backend_template.new_figure_manager(num, *args, FigureClass=<class 'matplotlib.figure.Figure'>, **kwargs)[source]
 
Create a new figure manager instance.
matplotlib.backends.backend_template.new_figure_manager_given_figure(num, figure)[source]
 
Create a new figure manager instance for the given figure.
classmatplotlib.backends.backend_template.RendererTemplate(dpi)[source]
 
Bases: matplotlib.backend_bases.RendererBase The renderer handles drawing/rendering operations. This is a minimal do-nothing class that can be used to get started when writing a new backend. Refer to backend_bases.RendererBase for documentation of the methods.   draw_image(gc, x, y, im)[source]
 
Draw an RGBA image.  Parameters 
 
gcGraphicsContextBase


A graphics context with clipping information.  
xscalar


The distance in physical units (i.e., dots or pixels) from the left hand side of the canvas.  
yscalar


The distance in physical units (i.e., dots or pixels) from the bottom side of the canvas.  
im(N, M, 4) array-like of np.uint8


An array of RGBA pixels.  
transformmatplotlib.transforms.Affine2DBase


If and only if the concrete backend is written such that option_scale_image() returns True, an affine transformation (i.e., an Affine2DBase) may be passed to draw_image(). The translation vector of the transformation is given in physical units (i.e., dots or pixels). Note that the transformation does not override x and y, and has to be applied before translating the result by x and y (this can be accomplished by adding x and y to the translation vector defined by transform).     
   draw_path(gc, path, transform, rgbFace=None)[source]
 
Draw a Path instance using the given affine transform. 
   draw_text(gc, x, y, s, prop, angle, ismath=False, mtext=None)[source]
 
Draw the text instance.  Parameters 
 
gcGraphicsContextBase


The graphics context.  
xfloat


The x location of the text in display coords.  
yfloat


The y location of the text baseline in display coords.  
sstr


The text string.  
propmatplotlib.font_manager.FontProperties


The font properties.  
anglefloat


The rotation angle in degrees anti-clockwise.  
mtextmatplotlib.text.Text


The original text object to be rendered.     Notes Note for backend implementers: When you are trying to determine if you have gotten your bounding box right (which is what enables the text layout/alignment to work properly), it helps to change the line in text.py: if 0: bbox_artist(self, renderer)
 to if 1, and then the actual bounding box will be plotted along with your text. 
   flipy()[source]
 
Return whether y values increase from top to bottom. Note that this only affects drawing of texts and images. 
   get_canvas_width_height()[source]
 
Return the canvas width and height in display coords. 
   get_text_width_height_descent(s, prop, ismath)[source]
 
Get the width, height, and descent (offset from the bottom to the baseline), in display coords, of the string s with FontProperties prop. 
   new_gc()[source]
 
Return an instance of a GraphicsContextBase. 
   points_to_pixels(points)[source]
 
Convert points to display units. You need to override this function (unless your backend doesn't have a dpi, e.g., postscript or svg). Some imaging systems assume some value for pixels per inch: points to pixels = points * pixels_per_inch/72 * dpi/72
  Parameters 
 
pointsfloat or array-like


a float or a numpy array of float    Returns 
 Points converted to pixels
matplotlib.backends.backend_template.show(*, block=None)[source]
 
For image backends - is not required. For GUI backends - show() is usually the last line of a pyplot script and tells the backend that it is time to draw. In interactive mode, this should do nothing.
matplotlib.backends.backend_tkagg.FigureCanvas[source]
 
alias of matplotlib.backends.backend_tkagg.FigureCanvasTkAgg
classmatplotlib.backends.backend_tkagg.FigureCanvasTkAgg(figure=None, master=None, resize_callback=<deprecated parameter>)[source]
 
Bases: matplotlib.backends.backend_agg.FigureCanvasAgg, matplotlib.backends._backend_tk.FigureCanvasTk   blit(bbox=None)[source]
 
Blit the canvas in bbox (default entire canvas). 
   draw()[source]
 
Render the Figure. It is important that this method actually walk the artist tree even if not output is produced because this will trigger deferred work (like computing limits auto-limits and tick values) that users may want access to before saving to disk.
matplotlib.backends.backend_tkcairo.FigureCanvas[source]
 
alias of matplotlib.backends.backend_tkcairo.FigureCanvasTkCairo
classmatplotlib.backends.backend_tkcairo.FigureCanvasTkCairo(*args, **kwargs)[source]
 
Bases: matplotlib.backends.backend_cairo.FigureCanvasCairo, matplotlib.backends._backend_tk.FigureCanvasTk   draw()[source]
 
Render the Figure. It is important that this method actually walk the artist tree even if not output is produced because this will trigger deferred work (like computing limits auto-limits and tick values) that users may want access to before saving to disk.
matplotlib.backends.backend_webagg.FigureCanvas[source]
 
alias of matplotlib.backends.backend_webagg.FigureCanvasWebAgg
classmatplotlib.backends.backend_webagg.FigureCanvasWebAgg(*args, **kwargs)[source]
 
Bases: matplotlib.backends.backend_webagg_core.FigureCanvasWebAggCore
matplotlib.backends.backend_webagg.ipython_inline_display(figure)[source]
classmatplotlib.backends.backend_webagg.ServerThread(group=None, target=None, name=None, args=(), kwargs=None, *, daemon=None)[source]
 
Bases: threading.Thread This constructor should always be called with keyword arguments. Arguments are: group should be None; reserved for future extension when a ThreadGroup class is implemented. target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called. name is the thread name. By default, a unique name is constructed of the form "Thread-N" where N is a small decimal number. args is the argument tuple for the target invocation. Defaults to (). kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}. If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.   run()[source]
 
Method representing the thread's activity. You may override this method in a subclass. The standard run() method invokes the callable object passed to the object's constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
run()[source]
 
Method representing the thread's activity. You may override this method in a subclass. The standard run() method invokes the callable object passed to the object's constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.
matplotlib.backends.backend_webagg.show()[source]
 
Show all figures. show blocks by calling mainloop if block is True, or if it is None and we are neither in IPython's %pylab mode, nor in interactive mode.
classmatplotlib.backends.backend_webagg.WebAggApplication(url_prefix='')[source]
 
Bases: tornado.web.Application   classAllFiguresPage(application, request, *, url_prefix='', **kwargs)[source]
 
Bases: tornado.web.RequestHandler   get()[source]

 
   classDownload(application:tornado.web.Application, request:tornado.httputil.HTTPServerRequest, **kwargs:Any)[source]
 
Bases: tornado.web.RequestHandler   get(fignum, fmt)[source]

 
   classFavIcon(application:tornado.web.Application, request:tornado.httputil.HTTPServerRequest, **kwargs:Any)[source]
 
Bases: tornado.web.RequestHandler   get()[source]

 
   classMplJs(application:tornado.web.Application, request:tornado.httputil.HTTPServerRequest, **kwargs:Any)[source]
 
Bases: tornado.web.RequestHandler   get()[source]

 
   classSingleFigurePage(application, request, *, url_prefix='', **kwargs)[source]
 
Bases: tornado.web.RequestHandler   get(fignum)[source]

 
   classWebSocket(application:tornado.web.Application, request:tornado.httputil.HTTPServerRequest, **kwargs:Any)[source]
 
Bases: tornado.websocket.WebSocketHandler   on_close()[source]
 
Invoked when the WebSocket is closed. If the connection was closed cleanly and a status code or reason phrase was supplied, these values will be available as the attributes self.close_code and self.close_reason.  Changed in version 4.0: Added close_code and close_reason attributes.  
   on_message(message)[source]
 
Handle incoming messages on the WebSocket This method must be overridden.  Changed in version 4.5: on_message can be a coroutine.  
   open(fignum)[source]
 
Invoked when a new WebSocket is opened. The arguments to open are extracted from the tornado.web.URLSpec regular expression, just like the arguments to tornado.web.RequestHandler.get. open may be a coroutine. on_message will not be called until open has returned.  Changed in version 5.1: open may be a coroutine.  
   send_binary(blob)[source]

   send_json(content)[source]

   supports_binary=True

 
   classmethodinitialize(url_prefix='', port=None, address=None)[source]

   initialized=False

   classmethodstart()[source]

   started=False
classAllFiguresPage(application, request, *, url_prefix='', **kwargs)[source]
 
Bases: tornado.web.RequestHandler   get()[source]
classDownload(application:tornado.web.Application, request:tornado.httputil.HTTPServerRequest, **kwargs:Any)[source]
 
Bases: tornado.web.RequestHandler   get(fignum, fmt)[source]
classFavIcon(application:tornado.web.Application, request:tornado.httputil.HTTPServerRequest, **kwargs:Any)[source]
 
Bases: tornado.web.RequestHandler   get()[source]
classmethodinitialize(url_prefix='', port=None, address=None)[source]
classMplJs(application:tornado.web.Application, request:tornado.httputil.HTTPServerRequest, **kwargs:Any)[source]
 
Bases: tornado.web.RequestHandler   get()[source]
classSingleFigurePage(application, request, *, url_prefix='', **kwargs)[source]
 
Bases: tornado.web.RequestHandler   get(fignum)[source]
classWebSocket(application:tornado.web.Application, request:tornado.httputil.HTTPServerRequest, **kwargs:Any)[source]
 
Bases: tornado.websocket.WebSocketHandler   on_close()[source]
 
Invoked when the WebSocket is closed. If the connection was closed cleanly and a status code or reason phrase was supplied, these values will be available as the attributes self.close_code and self.close_reason.  Changed in version 4.0: Added close_code and close_reason attributes.  
   on_message(message)[source]
 
Handle incoming messages on the WebSocket This method must be overridden.  Changed in version 4.5: on_message can be a coroutine.  
   open(fignum)[source]
 
Invoked when a new WebSocket is opened. The arguments to open are extracted from the tornado.web.URLSpec regular expression, just like the arguments to tornado.web.RequestHandler.get. open may be a coroutine. on_message will not be called until open has returned.  Changed in version 5.1: open may be a coroutine.  
   send_binary(blob)[source]

   send_json(content)[source]

   supports_binary=True
on_close()[source]
 
Invoked when the WebSocket is closed. If the connection was closed cleanly and a status code or reason phrase was supplied, these values will be available as the attributes self.close_code and self.close_reason.  Changed in version 4.0: Added close_code and close_reason attributes.
on_message(message)[source]
 
Handle incoming messages on the WebSocket This method must be overridden.  Changed in version 4.5: on_message can be a coroutine.
open(fignum)[source]
 
Invoked when a new WebSocket is opened. The arguments to open are extracted from the tornado.web.URLSpec regular expression, just like the arguments to tornado.web.RequestHandler.get. open may be a coroutine. on_message will not be called until open has returned.  Changed in version 5.1: open may be a coroutine.
classmatplotlib.bezier.BezierSegment(control_points)[source]
 
Bases: object A d-dimensional Bezier segment.  Parameters 
 
control_points(N, d) array


Location of the N control points.       axis_aligned_extrema()[source]
 
Return the dimension and location of the curve's interior extrema. The extrema are the points along the curve where one of its partial derivatives is zero.  Returns 
 
dimsarray of int


Index \(i\) of the partial derivative which is zero at each interior extrema.  
dzerosarray of float


Of same size as dims. The \(t\) such that \(d/dx_i B(t) = 0\)     
   propertycontrol_points
 
The control points of the curve. 
   propertydegree
 
Degree of the polynomial. One less the number of control points. 
   propertydimension
 
The dimension of the curve. 
   point_at_t(t)[source]
 
Evaluate the curve at a single point, returning a tuple of d floats. 
   propertypolynomial_coefficients
 
The polynomial coefficients of the Bezier curve.  Warning Follows opposite convention from numpy.polyval.   Returns 
 (n+1, d) array

Coefficients after expanding in polynomial basis, where \(n\) is the degree of the bezier curve and \(d\) its dimension. These are the numbers (\(C_j\)) such that the curve can be written \(\sum_{j=0}^n C_j t^j\).     Notes The coefficients are calculated as  \[{n \choose j} \sum_{i=0}^j (-1)^{i+j} {j \choose i} P_i\] where \(P_i\) are the control points of the curve.
axis_aligned_extrema()[source]
 
Return the dimension and location of the curve's interior extrema. The extrema are the points along the curve where one of its partial derivatives is zero.  Returns 
 
dimsarray of int


Index \(i\) of the partial derivative which is zero at each interior extrema.  
dzerosarray of float


Of same size as dims. The \(t\) such that \(d/dx_i B(t) = 0\)
point_at_t(t)[source]
 
Evaluate the curve at a single point, returning a tuple of d floats.
matplotlib.bezier.check_if_parallel(dx1, dy1, dx2, dy2, tolerance=1e-05)[source]
 
Check if two lines are parallel.  Parameters 
 
dx1, dy1, dx2, dy2float


The gradients dy/dx of the two lines.  
tolerancefloat


The angular tolerance in radians up to which the lines are considered parallel.    Returns 
 is_parallel

 1 if two lines are parallel in same direction. -1 if two lines are parallel in opposite direction. False otherwise.
matplotlib.bezier.find_bezier_t_intersecting_with_closedpath(bezier_point_at_t, inside_closedpath, t0=0.0, t1=1.0, tolerance=0.01)[source]
 
Find the intersection of the Bezier curve with a closed path. The intersection point t is approximated by two parameters t0, t1 such that t0 <= t <= t1. Search starts from t0 and t1 and uses a simple bisecting algorithm therefore one of the end points must be inside the path while the other doesn't. The search stops when the distance of the points parametrized by t0 and t1 gets smaller than the given tolerance.  Parameters 
 
bezier_point_at_tcallable


A function returning x, y coordinates of the Bezier at parameter t. It must have the signature: bezier_point_at_t(t: float) -> tuple[float, float]
  
inside_closedpathcallable


A function returning True if a given point (x, y) is inside the closed path. It must have the signature: inside_closedpath(point: tuple[float, float]) -> bool
  
t0, t1float


Start parameters for the search.  
tolerancefloat


Maximal allowed distance between the final points.    Returns 
 
t0, t1float


The Bezier path parameters.
matplotlib.bezier.find_control_points(c1x, c1y, mmx, mmy, c2x, c2y)[source]
 
Find control points of the Bezier curve passing through (c1x, c1y), (mmx, mmy), and (c2x, c2y), at parametric values 0, 0.5, and 1.
matplotlib.bezier.get_cos_sin(x0, y0, x1, y1)[source]
matplotlib.bezier.get_intersection(cx1, cy1, cos_t1, sin_t1, cx2, cy2, cos_t2, sin_t2)[source]
 
Return the intersection between the line through (cx1, cy1) at angle t1 and the line through (cx2, cy2) at angle t2.
matplotlib.bezier.get_normal_points(cx, cy, cos_t, sin_t, length)[source]
 
For a line passing through (cx, cy) and having an angle t, return locations of the two points located along its perpendicular line at the distance of length.
matplotlib.bezier.get_parallels(bezier2, width)[source]
 
Given the quadratic Bezier control points bezier2, returns control points of quadratic Bezier lines roughly parallel to given one separated by width.
matplotlib.bezier.inside_circle(cx, cy, r)[source]
 
Return a function that checks whether a point is in a circle with center (cx, cy) and radius r. The returned function has the signature: f(xy: tuple[float, float]) -> bool
matplotlib.bezier.make_wedged_bezier2(bezier2, width, w1=1.0, wm=0.5, w2=0.0)[source]
 
Being similar to get_parallels, returns control points of two quadratic Bezier lines having a width roughly parallel to given one separated by width.
exceptionmatplotlib.bezier.NonIntersectingPathException[source]
 
Bases: ValueError
matplotlib.bezier.split_bezier_intersecting_with_closedpath(bezier, inside_closedpath, tolerance=0.01)[source]
 
Split a Bezier curve into two at the intersection with a closed path.  Parameters 
 
bezier(N, 2) array-like


Control points of the Bezier segment. See BezierSegment.  
inside_closedpathcallable


A function returning True if a given point (x, y) is inside the closed path. See also find_bezier_t_intersecting_with_closedpath.  
tolerancefloat


The tolerance for the intersection. See also find_bezier_t_intersecting_with_closedpath.    Returns 
 left, right

Lists of control points for the two Bezier segments.
matplotlib.bezier.split_de_casteljau(beta, t)[source]
 
Split a Bezier segment defined by its control points beta into two separate segments divided at t and return their control points.
matplotlib.bezier.split_path_inout(path, inside, tolerance=0.01, reorder_inout=False)[source]
 
Divide a path into two segments at the point where inside(x, y) becomes False.
classmatplotlib.blocking_input.BlockingContourLabeler(cs)[source]
 
Bases: matplotlib.blocking_input.BlockingMouseInput Callable for retrieving mouse clicks and key presses in a blocking way. Used to place contour labels.   add_click(event)[source]
 
Add the coordinates of an event to the list of clicks.  Parameters 
 
eventMouseEvent

   
   button1(event)[source]
 
Process an button-1 event (add a label to a contour).  Parameters 
 
eventMouseEvent

   
   button3(event)[source]
 
Process an button-3 event (remove a label if not in inline mode). Unfortunately, if one is doing inline labels, then there is currently no way to fix the broken contour - once humpty-dumpty is broken, he can't be put back together. In inline mode, this does nothing.  Parameters 
 
eventMouseEvent

   
   pop_click(event, index=- 1)[source]
 
Remove a click (by default, the last) from the list of clicks.  Parameters 
 
eventMouseEvent
add_click(event)[source]
 
Add the coordinates of an event to the list of clicks.  Parameters 
 
eventMouseEvent
button1(event)[source]
 
Process an button-1 event (add a label to a contour).  Parameters 
 
eventMouseEvent
button3(event)[source]
 
Process an button-3 event (remove a label if not in inline mode). Unfortunately, if one is doing inline labels, then there is currently no way to fix the broken contour - once humpty-dumpty is broken, he can't be put back together. In inline mode, this does nothing.  Parameters 
 
eventMouseEvent
pop_click(event, index=- 1)[source]
 
Remove a click (by default, the last) from the list of clicks.  Parameters 
 
eventMouseEvent
classmatplotlib.blocking_input.BlockingInput(fig, eventslist=())[source]
 
Bases: object Callable for retrieving events in a blocking way.   add_event(event)[source]
 
For base class, this just appends an event to events. 
   cleanup()[source]
 
Disconnect all callbacks. 
   on_event(event)[source]
 
Event handler; will be passed to the current figure to retrieve events. 
   pop(index=- 1)[source]
 
Remove an event from the event list -- by default, the last. Note that this does not check that there are events, much like the normal pop method. If no events exist, this will throw an exception. 
   pop_event(index=- 1)[source]
 
Remove an event from the event list -- by default, the last. Note that this does not check that there are events, much like the normal pop method. If no events exist, this will throw an exception. 
   post_event()[source]
 
For baseclass, do nothing but collect events.
add_event(event)[source]
 
For base class, this just appends an event to events.
on_event(event)[source]
 
Event handler; will be passed to the current figure to retrieve events.
pop(index=- 1)[source]
 
Remove an event from the event list -- by default, the last. Note that this does not check that there are events, much like the normal pop method. If no events exist, this will throw an exception.
pop_event(index=- 1)[source]
 
Remove an event from the event list -- by default, the last. Note that this does not check that there are events, much like the normal pop method. If no events exist, this will throw an exception.
classmatplotlib.blocking_input.BlockingKeyMouseInput(fig)[source]
 
Bases: matplotlib.blocking_input.BlockingInput Callable for retrieving mouse clicks and key presses in a blocking way.   post_event()[source]
 
Determine if it is a key event.
classmatplotlib.blocking_input.BlockingMouseInput(fig, mouse_add=MouseButton.LEFT, mouse_pop=MouseButton.RIGHT, mouse_stop=MouseButton.MIDDLE)[source]
 
Bases: matplotlib.blocking_input.BlockingInput Callable for retrieving mouse clicks in a blocking way. This class will also retrieve keypresses and map them to mouse clicks: delete and backspace are a right click, enter is like a middle click, and all others are like a left click.   add_click(event)[source]
 
Add the coordinates of an event to the list of clicks.  Parameters 
 
eventMouseEvent

   
   button_add=1[source]

   button_pop=3[source]

   button_stop=2[source]

   cleanup(event=None)[source]
 
 Parameters 
 
eventMouseEvent, optional


Not used     
   key_event()[source]
 
Process a key press event, mapping keys to appropriate mouse clicks. 
   mouse_event()[source]
 
Process a mouse click event. 
   mouse_event_add(event)[source]
 
Process an button-1 event (add a click if inside axes).  Parameters 
 
eventMouseEvent

   
   mouse_event_pop(event)[source]
 
Process an button-3 event (remove the last click).  Parameters 
 
eventMouseEvent

   
   mouse_event_stop(event)[source]
 
Process an button-2 event (end blocking input).  Parameters 
 
eventMouseEvent

   
   pop(event, index=- 1)[source]
 
Remove a click and the associated event from the list of clicks. Defaults to the last click. 
   pop_click(event, index=- 1)[source]
 
Remove a click (by default, the last) from the list of clicks.  Parameters 
 
eventMouseEvent

   
   post_event()[source]
 
Process an event.
cleanup(event=None)[source]
 
 Parameters 
 
eventMouseEvent, optional


Not used
key_event()[source]
 
Process a key press event, mapping keys to appropriate mouse clicks.
mouse_event_add(event)[source]
 
Process an button-1 event (add a click if inside axes).  Parameters 
 
eventMouseEvent
mouse_event_pop(event)[source]
 
Process an button-3 event (remove the last click).  Parameters 
 
eventMouseEvent
mouse_event_stop(event)[source]
 
Process an button-2 event (end blocking input).  Parameters 
 
eventMouseEvent