Matplotlib#

pydantic model zero_true.Matplotlib#

Matplotlib component for displaying matplotlib figures as images

Show JSON schema
{
   "title": "Matplotlib",
   "description": "Matplotlib component for displaying matplotlib figures as images",
   "type": "object",
   "properties": {
      "id": {
         "description": "Unique id for a component",
         "title": "Id",
         "type": "string"
      },
      "variable_name": {
         "default": "",
         "description": "Optional variable name associated with a component",
         "title": "Variable Name",
         "type": "string"
      },
      "component": {
         "default": "v-img",
         "description": "Vue component name",
         "title": "Component",
         "type": "string"
      },
      "src": {
         "description": "Source URL of the image of the graph",
         "title": "Src",
         "type": "string"
      },
      "alt": {
         "default": "",
         "description": "Alternative text for the graph image",
         "title": "Alt",
         "type": "string"
      },
      "width": {
         "default": 100,
         "description": "Width of the graph",
         "title": "Width",
         "type": "integer"
      },
      "height": {
         "default": 100,
         "description": "Height of the graph",
         "title": "Height",
         "type": "integer"
      }
   },
   "required": [
      "id",
      "src"
   ]
}

field alt: str = ''#

Alternative text for the graph image

field component: str = 'v-img'#

Vue component name

field height: int = 100#

Height of the graph

field src: str [Required]#

Source URL of the image of the graph

field width: int = 100#

Width of the graph

classmethod from_matplotlib(id: str, figure: Figure, alt=None, width=None, height=None)#

Create a Matplotlib component from a matplotlib figure