neulab/docprompting-conala huggingface dataset:
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_image_magnification()[source]
 
Get the factor by which to magnify images passed to draw_image(). Allows a backend to have images at a different resolution to other artists.
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.
open_group(s, gid=None)[source]
 
Open a grouping element with label s and gid (if set) as id. Only used by the SVG renderer.
option_image_nocomposite()[source]
 
Return whether image composition by Matplotlib should be skipped. Raster backends should usually return False (letting the C-level rasterizer take care of image composition); vector backends should usually return not rcParams["image.composite_image"].
option_scale_image()[source]
 
Return whether arbitrary affine transformations in draw_image() are supported (True for most vector backends).
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
start_filter()[source]
 
Switch to a temporary renderer for image filtering effects. Currently only supported by the agg renderer.
start_rasterizing()[source]
 
Switch to the raster renderer. Used by MixedModeRenderer.
stop_filter(filter_func)[source]
 
Switch back to the original renderer. The contents of the temporary renderer is processed with the filter_func and is drawn on the original renderer as an image. Currently only supported by the agg renderer.
stop_rasterizing()[source]
 
Switch back to the vector renderer and draw the contents of the raster renderer as an image on the vector renderer. Used by MixedModeRenderer.
classmatplotlib.backend_bases.ResizeEvent(name, canvas)[source]
 
Bases: matplotlib.backend_bases.Event An event triggered by a canvas resize. A ResizeEvent has a number of special attributes in addition to those defined by the parent Event class.  Attributes 
 
widthint


Width of the canvas in pixels.  
heightint


Height of the canvas in pixels.
classmatplotlib.backend_bases.ShowBase[source]
 
Bases: matplotlib.backend_bases._Backend Simple base class to generate a show() function in backends. Subclass must override mainloop() method.
classmatplotlib.backend_bases.TimerBase(interval=None, callbacks=None)[source]
 
Bases: object A base class for providing timer events, useful for things animations. Backends need to implement a few specific methods in order to use their own timing mechanisms so that the timer events are integrated into their event loops. Subclasses must override the following methods:  
_timer_start: Backend-specific code for starting the timer. 
_timer_stop: Backend-specific code for stopping the timer.  Subclasses may additionally override the following methods:  
_timer_set_single_shot: Code for setting the timer to single shot operating mode, if supported by the timer object. If not, the Timer class itself will store the flag and the _on_timer method should be overridden to support such behavior. 
_timer_set_interval: Code for setting the interval on the timer, if there is a method for doing so on the timer object. 
_on_timer: The internal function that any timer object should call, which will handle the task of running all callbacks that have been set.   Parameters 
 
intervalint, default: 1000ms


The time between timer events in milliseconds. Will be stored as timer.interval.  
callbackslist[tuple[callable, tuple, dict]]


List of (func, args, kwargs) tuples that will be called upon timer events. This list is accessible as timer.callbacks and can be manipulated directly, or the functions add_callback and remove_callback can be used.       add_callback(func, *args, **kwargs)[source]
 
Register func to be called by timer when the event fires. Any additional arguments provided will be passed to func. This function returns func, which makes it possible to use it as a decorator. 
   propertyinterval
 
The time between timer events, in milliseconds. 
   remove_callback(func, *args, **kwargs)[source]
 
Remove func from list of callbacks. args and kwargs are optional and used to distinguish between copies of the same function registered to be called with different arguments. This behavior is deprecated. In the future, *args, **kwargs won't be considered anymore; to keep a specific callback removable by itself, pass it to add_callback as a functools.partial object. 
   propertysingle_shot
 
Whether this timer should stop after a single run. 
   start(interval=None)[source]
 
Start the timer object.  Parameters 
 
intervalint, optional


Timer interval in milliseconds; overrides a previously set interval if provided.     
   stop()[source]
 
Stop the timer.
add_callback(func, *args, **kwargs)[source]
 
Register func to be called by timer when the event fires. Any additional arguments provided will be passed to func. This function returns func, which makes it possible to use it as a decorator.
remove_callback(func, *args, **kwargs)[source]
 
Remove func from list of callbacks. args and kwargs are optional and used to distinguish between copies of the same function registered to be called with different arguments. This behavior is deprecated. In the future, *args, **kwargs won't be considered anymore; to keep a specific callback removable by itself, pass it to add_callback as a functools.partial object.
start(interval=None)[source]
 
Start the timer object.  Parameters 
 
intervalint, optional


Timer interval in milliseconds; overrides a previously set interval if provided.
classmatplotlib.backend_bases.ToolContainerBase(toolmanager)[source]
 
Bases: object Base class for all tool containers, e.g. toolbars.  Attributes 
 
toolmanagerToolManager


The tools with which this ToolContainer wants to communicate.       add_tool(tool, group, position=- 1)[source]
 
Add a tool to this container.  Parameters 
 
tooltool_like


The tool to add, see ToolManager.get_tool.  
groupstr


The name of the group to add this tool to.  
positionint, default: -1


The position within the group to place this tool.     
   add_toolitem(name, group, position, image, description, toggle)[source]
 
Add a toolitem to the container. This method must be implemented per backend. The callback associated with the button click event, must be exactly self.trigger_tool(name).  Parameters 
 
namestr


Name of the tool to add, this gets used as the tool's ID and as the default label of the buttons.  
groupstr


Name of the group that this tool belongs to.  
positionint


Position of the tool within its group, if -1 it goes at the end.  
imagestr


Filename of the image for the button or None.  
descriptionstr


Description of the tool, used for the tooltips.  
togglebool


 
True : The button is a toggle (change the pressed/unpressed state between consecutive clicks). 
False : The button is a normal button (returns to unpressed state after release).      
   remove_toolitem(name)[source]
 
Remove a toolitem from the ToolContainer. This method must get implemented per backend. Called when ToolManager emits a tool_removed_event.  Parameters 
 
namestr


Name of the tool to remove.     
   set_message(s)[source]
 
Display a message on the toolbar.  Parameters 
 
sstr


Message text.     
   toggle_toolitem(name, toggled)[source]
 
Toggle the toolitem without firing event.  Parameters 
 
namestr


Id of the tool to toggle.  
toggledbool


Whether to set this tool as toggled or not.     
   trigger_tool(name)[source]
 
Trigger the tool.  Parameters 
 
namestr


Name (id) of the tool triggered from within the container.
add_tool(tool, group, position=- 1)[source]
 
Add a tool to this container.  Parameters 
 
tooltool_like


The tool to add, see ToolManager.get_tool.  
groupstr


The name of the group to add this tool to.  
positionint, default: -1


The position within the group to place this tool.
add_toolitem(name, group, position, image, description, toggle)[source]
 
Add a toolitem to the container. This method must be implemented per backend. The callback associated with the button click event, must be exactly self.trigger_tool(name).  Parameters 
 
namestr


Name of the tool to add, this gets used as the tool's ID and as the default label of the buttons.  
groupstr


Name of the group that this tool belongs to.  
positionint


Position of the tool within its group, if -1 it goes at the end.  
imagestr


Filename of the image for the button or None.  
descriptionstr


Description of the tool, used for the tooltips.  
togglebool


 
True : The button is a toggle (change the pressed/unpressed state between consecutive clicks). 
False : The button is a normal button (returns to unpressed state after release).
remove_toolitem(name)[source]
 
Remove a toolitem from the ToolContainer. This method must get implemented per backend. Called when ToolManager emits a tool_removed_event.  Parameters 
 
namestr


Name of the tool to remove.
set_message(s)[source]
 
Display a message on the toolbar.  Parameters 
 
sstr


Message text.
toggle_toolitem(name, toggled)[source]
 
Toggle the toolitem without firing event.  Parameters 
 
namestr


Id of the tool to toggle.  
toggledbool


Whether to set this tool as toggled or not.
trigger_tool(name)[source]
 
Trigger the tool.  Parameters 
 
namestr


Name (id) of the tool triggered from within the container.
classmatplotlib.backend_managers.ToolEvent(name, sender, tool, data=None)[source]
 
Bases: object Event for tool manipulation (add/remove).
add_tool(name, tool, *args, **kwargs)[source]
 
Add tool to ToolManager. If successful, adds a new event tool_trigger_{name} where {name} is the name of the tool; the event is fired every time the tool is triggered.  Parameters 
 
namestr


Name of the tool, treated as the ID, has to be unique.  
toolclass_like, i.e. str or type


Reference to find the class of the Tool to added.      See also  matplotlib.backend_tools.ToolBase

The base class for tools.    Notes args and kwargs get passed directly to the tools constructor.
get_tool(name, warn=True)[source]
 
Return the tool object with the given name. For convenience, this passes tool objects through.  Parameters 
 
namestr or ToolBase


Name of the tool, or the tool itself.  
warnbool, default: True


Whether a warning should be emitted it no tool with the given name exists.    Returns 
 
ToolBase or None

The tool or None if no tool with the given name exists.
get_tool_keymap(name)[source]
 
Return the keymap associated with the specified tool.  Parameters 
 
namestr


Name of the Tool.    Returns 
 list of str

List of keys associated with the tool.
message_event(message, sender=None)[source]
 
Emit a ToolManagerMessageEvent.
remove_tool(name)[source]
 
Remove tool named name.  Parameters 
 
namestr


Name of the tool.
set_figure(figure, update_tools=True)[source]
 
Bind the given figure to the tools.  Parameters 
 
figureFigure


update_toolsbool, default: True


Force tools to update figure.
toolmanager_connect(s, func)[source]
 
Connect event with string s to func.  Parameters 
 
sstr


The name of the event. The following events are recognized:  'tool_message_event' 'tool_removed_event' 'tool_added_event'  For every tool added a new event is created  'tool_trigger_TOOLNAME', where TOOLNAME is the id of the tool.   
funccallable


Callback function for the toolmanager event with signature: def func(event: ToolEvent) -> Any
    Returns 
 cid

The callback id for the connection. This can be used in toolmanager_disconnect.
toolmanager_disconnect(cid)[source]
 
Disconnect callback id cid. Example usage: cid = toolmanager.toolmanager_connect('tool_trigger_zoom', onpress)
#...later
toolmanager.toolmanager_disconnect(cid)
trigger_tool(name, sender=None, canvasevent=None, data=None)[source]
 
Trigger a tool and emit the tool_trigger_{name} event.  Parameters 
 
namestr


Name of the tool.  
senderobject


Object that wishes to trigger the tool.  
canvaseventEvent


Original Canvas event or None.  
dataobject


Extra data to pass to the tool when triggering.
update_keymap(name, key)[source]
 
Set the keymap to associate with the specified tool.  Parameters 
 
namestr


Name of the Tool.  
keystr or list of str


Keys to associate with the tool.
classmatplotlib.backend_managers.ToolManagerMessageEvent(name, sender, message)[source]
 
Bases: object Event carrying messages from toolmanager. Messages usually get displayed to the user by the toolbar.
classmatplotlib.backend_managers.ToolTriggerEvent(name, sender, tool, canvasevent=None, data=None)[source]
 
Bases: matplotlib.backend_managers.ToolEvent Event to inform that a tool has been triggered.
backend_mixed   classmatplotlib.backends.backend_mixed.MixedModeRenderer(figure, width, height, dpi, vector_renderer, raster_renderer_class=None, bbox_inches_restore=None)[source]
 
Bases: object A helper class to implement a renderer that switches between vector and raster drawing. An example may be a PDF writer, where most things are drawn with PDF vector commands, but some very complex objects, such as quad meshes, are rasterised and then output as images.  Parameters 
 
figurematplotlib.figure.Figure


The figure instance.  
widthscalar


The width of the canvas in logical units  
heightscalar


The height of the canvas in logical units  
dpifloat


The dpi of the canvas  
vector_renderermatplotlib.backend_bases.RendererBase


An instance of a subclass of RendererBase that will be used for the vector drawing.  
raster_renderer_classmatplotlib.backend_bases.RendererBase


The renderer class to use for the raster drawing. If not provided, this will use the Agg backend (which is currently the only viable option anyway.)       start_rasterizing()[source]
 
Enter "raster" mode. All subsequent drawing commands (until stop_rasterizing is called) will be drawn with the raster backend. 
   stop_rasterizing()[source]
 
Exit "raster" mode. All of the drawing that was done since the last start_rasterizing call will be copied to the vector backend by calling draw_image.
backend_nbagg Interactive figures in the IPython notebook.   classmatplotlib.backends.backend_nbagg.CommSocket(manager)[source]
 
Bases: object Manages the Comm connection between IPython and the browser (client). Comms are 2 way, with the CommSocket being able to publish a message via the send_json method, and handle a message with on_message. On the JS side figure.send_message and figure.ws.onmessage do the sending and receiving respectively.   is_open()[source]

   on_close()[source]

   on_message(message)[source]

   send_binary(blob)[source]

   send_json(content)[source]

 
   matplotlib.backends.backend_nbagg.FigureCanvas[source]
 
alias of matplotlib.backends.backend_nbagg.FigureCanvasNbAgg 
   classmatplotlib.backends.backend_nbagg.FigureCanvasNbAgg(*args, **kwargs)[source]
 
Bases: matplotlib.backends.backend_webagg_core.FigureCanvasWebAggCore 
   matplotlib.backends.backend_nbagg.FigureManager[source]
 
alias of matplotlib.backends.backend_nbagg.FigureManagerNbAgg 
   classmatplotlib.backends.backend_nbagg.FigureManagerNbAgg(canvas, num)[source]
 
Bases: matplotlib.backends.backend_webagg_core.FigureManagerWebAgg   ToolbarCls[source]
 
alias of matplotlib.backends.backend_nbagg.NavigationIPy 
   clearup_closed()[source]
 
Clear up any closed Comms. 
   propertyconnected

   destroy()[source]

   display_js()[source]

   classmethodget_javascript(stream=None)[source]

   remove_comm(comm_id)[source]

   reshow()[source]
 
A special method to re-show the figure in the notebook. 
   show()[source]
 
For GUI backends, show the figure window and redraw. For non-GUI backends, raise an exception, unless running headless (i.e. on Linux with an unset DISPLAY); this exception is converted to a warning in Figure.show. 
 
   classmatplotlib.backends.backend_nbagg.NavigationIPy(canvas)[source]
 
Bases: matplotlib.backends.backend_webagg_core.NavigationToolbar2WebAgg   toolitems=[('Home', 'Reset original view', 'fa fa-home icon-home', 'home'), ('Back', 'Back to previous view', 'fa fa-arrow-left icon-arrow-left', 'back'), ('Forward', 'Forward to next view', 'fa fa-arrow-right icon-arrow-right', 'forward'), (None, None, None, None), ('Pan', 'Left button pans, Right button zooms\nx/y fixes axis, CTRL fixes aspect', 'fa fa-arrows icon-move', 'pan'), ('Zoom', 'Zoom to rectangle\nx/y fixes axis', 'fa fa-square-o icon-check-empty', 'zoom'), (None, None, None, None), ('Download', 'Download plot', 'fa fa-floppy-o icon-save', 'download')]

 
   matplotlib.backends.backend_nbagg.connection_info()[source]
 
Return a string showing the figure and connection status for the backend. This is intended as a diagnostic tool, and not for general use. 
   matplotlib.backends.backend_nbagg.new_figure_manager_given_figure(num, figure)[source]
 
Create a new figure manager instance for the given figure. 
   matplotlib.backends.backend_nbagg.show(block=None)[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.
matplotlib.backend_tools.add_tools_to_container(container, tools=[['navigation', ['home', 'back', 'forward']], ['zoompan', ['pan', 'zoom', 'subplots']], ['io', ['save', 'help']]])[source]
 
Add multiple tools to the container.  Parameters 
 
containerContainer


backend_bases.ToolContainerBase object that will get the tools added.  
toolslist, optional


List in the form [[group1, [tool1, tool2 ...]], [group2, [...]]] where the tools [tool1, tool2, ...] will display in group1. See add_tool for details.
matplotlib.backend_tools.add_tools_to_manager(toolmanager, tools={'back': <class 'matplotlib.backend_tools.ToolBack'>, 'copy': 'ToolCopyToClipboard', 'cursor': 'ToolSetCursor', 'forward': <class 'matplotlib.backend_tools.ToolForward'>, 'fullscreen': <class 'matplotlib.backend_tools.ToolFullScreen'>, 'grid': <class 'matplotlib.backend_tools.ToolGrid'>, 'grid_minor': <class 'matplotlib.backend_tools.ToolMinorGrid'>, 'help': 'ToolHelp', 'home': <class 'matplotlib.backend_tools.ToolHome'>, 'pan': <class 'matplotlib.backend_tools.ToolPan'>, 'position': <class 'matplotlib.backend_tools.ToolCursorPosition'>, 'quit': <class 'matplotlib.backend_tools.ToolQuit'>, 'quit_all': <class 'matplotlib.backend_tools.ToolQuitAll'>, 'rubberband': 'ToolRubberband', 'save': 'ToolSaveFigure', 'subplots': 'ToolConfigureSubplots', 'viewpos': <class 'matplotlib.backend_tools.ToolViewsPositions'>, 'xscale': <class 'matplotlib.backend_tools.ToolXScale'>, 'yscale': <class 'matplotlib.backend_tools.ToolYScale'>, 'zoom': <class 'matplotlib.backend_tools.ToolZoom'>})[source]
 
Add multiple tools to a ToolManager.  Parameters 
 
toolmanagerbackend_managers.ToolManager


Manager to which the tools are added.  
tools{str: class_like}, optional


The tools to add in a {name: tool} dict, see add_tool for more info.
classmatplotlib.backend_tools.AxisScaleBase(*args, **kwargs)[source]
 
Bases: matplotlib.backend_tools.ToolToggleBase Base Tool to toggle between linear and logarithmic.   disable(event)[source]
 
Disable the toggle tool. trigger call this method when toggled is True. This can happen in different circumstances.  Click on the toolbar tool button. Call to matplotlib.backend_managers.ToolManager.trigger_tool. Another ToolToggleBase derived tool is triggered (from the same ToolManager).  
   enable(event)[source]
 
Enable the toggle tool. trigger calls this method when toggled is False. 
   trigger(sender, event, data=None)[source]
 
Calls enable or disable based on toggled value.
disable(event)[source]
 
Disable the toggle tool. trigger call this method when toggled is True. This can happen in different circumstances.  Click on the toolbar tool button. Call to matplotlib.backend_managers.ToolManager.trigger_tool. Another ToolToggleBase derived tool is triggered (from the same ToolManager).
enable(event)[source]
 
Enable the toggle tool. trigger calls this method when toggled is False.
trigger(sender, event, data=None)[source]
 
Calls enable or disable based on toggled value.
classmatplotlib.backend_tools.ConfigureSubplotsBase(toolmanager, name)[source]
 
Bases: matplotlib.backend_tools.ToolBase Base tool for the configuration of subplots.   description='Configure subplots'
 
Description of the Tool. str: Tooltip used if the Tool is included in a Toolbar. 
   image='subplots'
 
Filename of the image. str: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
description='Configure subplots'
 
Description of the Tool. str: Tooltip used if the Tool is included in a Toolbar.
image='subplots'
 
Filename of the image. str: Filename of the image to use in a Toolbar. If None, the name is used as a label in the toolbar button.
matplotlib.backend_tools.cursors[source]
 
alias of matplotlib.backend_tools.Cursors
classmatplotlib.backend_tools.Cursors(value)[source]
 
Bases: enum.IntEnum Backend-independent cursor types.   HAND=2[source]

   MOVE=4[source]

   POINTER=1[source]

   RESIZE_HORIZONTAL=6[source]

   RESIZE_VERTICAL=7[source]

   SELECT_REGION=3[source]

   WAIT=5[source]
matplotlib.backend_tools.default_toolbar_tools=[['navigation', ['home', 'back', 'forward']], ['zoompan', ['pan', 'zoom', 'subplots']], ['io', ['save', 'help']]]
 
Default tools in the toolbar
matplotlib.backend_tools.default_tools={'back': <class 'matplotlib.backend_tools.ToolBack'>, 'copy': 'ToolCopyToClipboard', 'cursor': 'ToolSetCursor', 'forward': <class 'matplotlib.backend_tools.ToolForward'>, 'fullscreen': <class 'matplotlib.backend_tools.ToolFullScreen'>, 'grid': <class 'matplotlib.backend_tools.ToolGrid'>, 'grid_minor': <class 'matplotlib.backend_tools.ToolMinorGrid'>, 'help': 'ToolHelp', 'home': <class 'matplotlib.backend_tools.ToolHome'>, 'pan': <class 'matplotlib.backend_tools.ToolPan'>, 'position': <class 'matplotlib.backend_tools.ToolCursorPosition'>, 'quit': <class 'matplotlib.backend_tools.ToolQuit'>, 'quit_all': <class 'matplotlib.backend_tools.ToolQuitAll'>, 'rubberband': 'ToolRubberband', 'save': 'ToolSaveFigure', 'subplots': 'ToolConfigureSubplots', 'viewpos': <class 'matplotlib.backend_tools.ToolViewsPositions'>, 'xscale': <class 'matplotlib.backend_tools.ToolXScale'>, 'yscale': <class 'matplotlib.backend_tools.ToolYScale'>, 'zoom': <class 'matplotlib.backend_tools.ToolZoom'>}
 
Default tools
classmatplotlib.backend_tools.RubberbandBase(toolmanager, name)[source]
 
Bases: matplotlib.backend_tools.ToolBase Draw and remove a rubberband.   draw_rubberband(*data)[source]
 
Draw rubberband. This method must get implemented per backend. 
   remove_rubberband()[source]
 
Remove rubberband. This method should get implemented per backend. 
   trigger(sender, event, data)[source]
 
Call draw_rubberband or remove_rubberband based on data.
draw_rubberband(*data)[source]
 
Draw rubberband. This method must get implemented per backend.
remove_rubberband()[source]
 
Remove rubberband. This method should get implemented per backend.
trigger(sender, event, data)[source]
 
Call draw_rubberband or remove_rubberband based on data.