class_docstr: Main canvas for drawing a chart.
  
  The Figure object holds the list of Marks and Axes. It also holds an
  optional Interaction object that is responsible for figure-level mouse
  interactions, the "interaction layer".
  
  Besides, the Figure object has two reference scales, for positioning items
  in an absolute fashion in the figure canvas.
  
  Style Attributes
  ----------------
  
  Attributes
  ----------
  title: string (default: '')
      title of the figure
  axes: List of Axes (default: [])
      list containing the instances of the axes for the figure
  marks: List of Marks (default: [])
      list containing the marks which are to be appended to the figure
  interaction: Interaction or None (default: None)
      optional interaction layer for the figure
  scale_x: Scale
      Scale representing the x values of the figure
  scale_y: Scale
      Scale representing the y values of the figure
  padding_x: Float (default: 0.0)
      Padding to be applied in the horizontal direction of the figure
      around the data points, proportion of the horizontal length
  padding_y: Float (default: 0.025)
      Padding to be applied in the vertical direction of the figure
      around the data points, proportion of the vertical length
  legend_location: {'top-right', 'top', 'top-left', 'left',
      'bottom-left', 'bottom', 'bottom-right', 'right'}
      location of the legend relative to the center of the figure
  background_style: Dict (default: {})
      CSS style to be applied to the background of the figure
  legend_style: Dict (default: {})
      CSS style to be applied to the SVG legend e.g, {'fill': 'white'}
  legend_text: Dict (default: {})
      CSS style to be applied to the legend text e.g., {'font-size': 20}
  title_style: Dict (default: {})
      CSS style to be applied to the title of the figure
  animation_duration: nonnegative int (default: 0)
      Duration of transition on change of data attributes, in milliseconds.
  
  Layout Attributes
  -----------------
  
  Attributes
  ----------
  pixel_ratio:
      Pixel ratio of the WebGL canvas (2 on retina screens). Set to 1 for better performance,
      but less crisp edges. If set to None it will use the browser's window.devicePixelRatio.
  display_toolbar: boolean (default: True)
      Show or hide the integrated toolbar.
  fig_margin: dict (default: {top=60, bottom=60, left=60, right=60})
      Dictionary containing the top, bottom, left and right margins. The user
      is responsible for making sure that the width and height are greater
      than the sum of the margins.
  auto_layout: boolean (default: False)
      Whether to use the auto-layout solver or not
  min_aspect_ratio: float
      Minimum width / height ratio of the figure
  max_aspect_ratio: float
      Maximum width / height ratio of the figure
  
  !!! Note
  
      The aspect ratios stand for width / height ratios.
  
      - If the available space is within bounds in terms of min and max aspect
      ratio, we use the entire available space.
      - If the available space is too oblong horizontally, we use the client
      height and the width that corresponds max_aspect_ratio (maximize width
      under the constraints).
      - If the available space is too oblong vertically, we use the client width
      and the height that corresponds to min_aspect_ratio (maximize height
      under the constraint).
      This corresponds to maximizing the area under the constraints.
  
      Default min and max aspect ratio are both equal to 16 / 9.
class_docstr_tok: ["Main","canvas","for","drawing","a","chart",".","The","Figure","object","holds","the","list","of","Marks","and","Axes",".","It","also","holds","an","optional","Interaction","object","that","is","responsible","for","figure-level","mouse","interactions",",","the","``","interaction","layer","''",".","Besides",",","the","Figure","object","has","two","reference","scales",",","for","positioning","items","in","an","absolute","fashion","in","the","figure","canvas",".","Style","Attributes","--","--","--","--","--","--","--","--","Attributes","--","--","--","--","--","title",":","string","(","default",":","``",")","title","of","the","figure","axes",":","List","of","Axes","(","default",":","[","]",")","list","containing","the","instances","of","the","axes","for","the","figure","marks",":","List","of","Marks","(","default",":","[","]",")","list","containing","the","marks","which","are","to","be","appended","to","the","figure","interaction",":","Interaction","or","None","(","default",":","None",")","optional","interaction","layer","for","the","figure","scale_x",":","Scale","Scale","representing","the","x","values","of","the","figure","scale_y",":","Scale","Scale","representing","the","y","values","of","the","figure","padding_x",":","Float","(","default",":","0.0",")","Padding","to","be","applied","in","the","horizontal","direction","of","the","figure","around","the","data","points",",","proportion","of","the","horizontal","length","padding_y",":","Float","(","default",":","0.025",")","Padding","to","be","applied","in","the","vertical","direction","of","the","figure","around","the","data","points",",","proportion","of","the","vertical","length","legend_location",":","{","'top-right","'",",","'top","'",",","'top-left","'",",","'left","'",",","'bottom-left","'",",","'bottom","'",",","'bottom-right","'",",","'right","'","}","location","of","the","legend","relative","to","the","center","of","the","figure","background_style",":","Dict","(","default",":","{","}",")","CSS","style","to","be","applied","to","the","background","of","the","figure","legend_style",":","Dict","(","default",":","{","}",")","CSS","style","to","be","applied","to","the","SVG","legend","e.g",",","{","'fill","'",":","'white","'","}","legend_text",":","Dict","(","default",":","{","}",")","CSS","style","to","be","applied","to","the","legend","text","e.g.",",","{","'font-size","'",":","20","}","title_style",":","Dict","(","default",":","{","}",")","CSS","style","to","be","applied","to","the","title","of","the","figure","animation_duration",":","nonnegative","int","(","default",":","0",")","Duration","of","transition","on","change","of","data","attributes",",","in","milliseconds",".","Layout","Attributes","--","--","--","--","--","--","--","--","-","Attributes","--","--","--","--","--","pixel_ratio",":","Pixel","ratio","of","the","WebGL","canvas","(","2","on","retina","screens",")",".","Set","to","1","for","better","performance",",","but","less","crisp","edges",".","If","set","to","None","it","will","use","the","browser","'s","window.devicePixelRatio",".","display_toolbar",":","boolean","(","default",":","True",")","Show","or","hide","the","integrated","toolbar",".","fig_margin",":","dict","(","default",":","{","top=60",",","bottom=60",",","left=60",",","right=60","}",")","Dictionary","containing","the","top",",","bottom",",","left","and","right","margins",".","The","user","is","responsible","for","making","sure","that","the","width","and","height","are","greater","than","the","sum","of","the","margins",".","auto_layout",":","boolean","(","default",":","False",")","Whether","to","use","the","auto-layout","solver","or","not","min_aspect_ratio",":","float","Minimum","width","\/","height","ratio","of","the","figure","max_aspect_ratio",":","float","Maximum","width","\/","height","ratio","of","the","figure","!","!","!","Note","The","aspect","ratios","stand","for","width","\/","height","ratios",".","-","If","the","available","space","is","within","bounds","in","terms","of","min","and","max","aspect","ratio",",","we","use","the","entire","available","space",".","-","If","the","available","space","is","too","oblong","horizontally",",","we","use","the","client","height","and","the","width","that","corresponds","max_aspect_ratio","(","maximize","width","under","the","constraints",")",".","-","If","the","available","space","is","too","oblong","vertically",",","we","use","the","client","width","and","the","height","that","corresponds","to","min_aspect_ratio","(","maximize","height","under","the","constraint",")",".","This","corresponds","to","maximizing","the","area","under","the","constraints",".","Default","min","and","max","aspect","ratio","are","both","equal","to","16","\/","9","."]
code: def __init__(self, **kwargs):
      super(Figure, self).__init__(**kwargs)
  
      self._upload_png_callback = None
      self.on_msg(self._handle_custom_msgs)
  
file_path: bqplot/bqplot/figure.py
imports: from traitlets import Bool, Unicode, Instance, List, Dict, Enum, Float, Int, TraitError, default, validate
  from ipywidgets import DOMWidget, register, widget_serialization
  from bqscales import Scale, LinearScale
  from .interacts import Interaction
  from .marks import Mark
  from .axes import Axis
  from ._version import __frontend_version__
label_desc: Use image node_id 1 to create a new Figure object from inherited base classes: DOMWidget with example: obj = Figure()