Plots


Jump to API response

This endpoint handles manipulation of Plotly plot files.

Reference

Authorization


Any user with or without a Plotly account may view public plots. For private plots, see authentication.

Actions


list

Listing all public plots can be done via a GET request to this endpoint. By default, plots will be listed in order of date created. The order_by query parameter is accepted at this endpoint. Currently, only ordering by views is supported. It is possible to filter the plots by quality with min_quality or max_quality as query parameter.

Example:

// GET https://api.plotly.com/v2/plots/ ---> 200

// GET https://api.plotly.com/v2/plots/?order_by=-views ---> 200

// GET https://api.plotly.com/v2/plots/?min_quality=5 ---> 200

// GET https://api.plotly.com/v2/plots/?max_quality=5 ---> 200

feed

Listing all handpicked feed plots can be done via a GET request to this endpoint. By default, plots will be listed in a random order.

Example:

// GET https://api.plotly.com/v2/plots/feed ---> 200

create

You can create new plot resources here. The only required field is 'figure'. Currently, the figure is restricted to only contain references to grid data. That is, this will fail if raw data arrays are passed in. To create and manipulate underlying grids for plots, see the grids endpoint.

Example:

// This fails because a figure field is required.
// POST https://api.plotly.com/v2/plots ---> 400 Bad Request
{}

// This fails because the figure has raw data
//POST https://api.plotly.com/v2/plots ---> 400 Bad Request
{
    "figure": {"data": [{"y": ['this', 'is', 'raw', 'data']}]}
}

// This succeeds because the figure has src keys, not raw data.
//POST https://api.plotly.com/v2/plots ---> 200 OK
{
    "figure": {"data": [{"ysrc": "sven:88:u8nd62"}]}
}

When creating a grid, you can optionally specify a source_fid to specify where a plot has come from:

  • source_fid: the fid of a plot that was copied (and presumably edited) to produce this one

detail

There is a lot of meta information stored about plot files including filename, title, share_url, and content_url to name a few.

This information can only be reached with a GET to this endpoint.

Example:

// GET https://api.plotly.com/v2/plots/iheartgraphs:90

content

The contents of a plot can be downloaded via the content resource. The plot content contains referenced grid/column data by default. If you wish to return the raw grid/column data, the inline_data=true query must be included in the request url. The Content-Type header will be appropriately set for the response body.

Alternatively, you can set ?map_data=unreadable to append a mapping of sources to data that belongs to grids which are unreadable for the requestor. This is useful when you have read access to another users plot, but that plot contains grid references which you don't have access to.

Examples:

// Returns referenced grid/column data
// GET https://api.plotly.com/v2/plots/iheartgraphs:90/content ---> 200 OK

// Returns full grid/column data
// GET https://api.plotly.com/v2/plots/iheartgraphs:90/content?inline_data=true ---> 200 OK

// Returns full grid/column data when requestor doesn't have permission
// to read the referenced grid.
// GET https://api.plotly.com/v2/plots/iheartgraphs:90/content?map_data=unreadable ---> 200 OK

GET /v2/plots/eazcon01:22?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "creation_time": "2016-12-20T07:57:53.895034Z",
    "comments": {
        "results": [],
        "count": 0
    },
    "parented": true,
    "embed_url": "https://chart-studio.plotly.com/~eazcon01/22.embed",
    "fid": "eazcon01:22",
    "filename": "progAccTable",
    "filetype": "plot",
    "img_url": "https://storage.googleapis.com/plotly-prod-images/eazcon01%2F22%2F9_C6A85L9VYOF2CV5D0CBMRXC6Z38Y01.png",
    "image_urls": {
        "default": "https://storage.googleapis.com/plotly-prod-images/eazcon01/22/2_YEAK7318UQLMI9WF80VJE2323098AZ.png",
        "block-thumb": "https://storage.googleapis.com/plotly-prod-images/eazcon01/22/8_8TGW07XZ27HGK5J2QAA5ODUZ7BJQKF.png",
        "list-thumb": "https://storage.googleapis.com/plotly-prod-images/eazcon01%2F22%2F9_C6A85L9VYOF2CV5D0CBMRXC6Z38Y01.png"
    },
    "api_urls": {
        "files": "https://api.plotly.com/v2/files/eazcon01:22",
        "plots": "https://api.plotly.com/v2/plots/eazcon01:22",
        "parent": "https://api.plotly.com/v2/folders/home?user=eazcon01"
    },
    "owner": "eazcon01",
    "parent": -1,
    "preview": "",
    "referencers": [],
    "references": [],
    "title": "Accuracy of Progressively-Trained Model Over Each NBA Season",
    "views": 1,
    "web_url": "https://chart-studio.plotly.com/~eazcon01/22/accuracy-of-progressively-trained-model-over-each-nba-season/",
    "world_readable": true,
    "date_modified": "2016-12-20T07:57:54.177Z",
    "stars": {
        "results": [],
        "count": 0
    },
    "collaborators": {
        "results": [],
        "count": 0
    },
    "subfolder_count": null,
    "refresh_interval": null,
    "organize_view_url": "https://chart-studio.plotly.com/~eazcon01/22/",
    "current_user_permission": "read",
    "is_theme": null,
    "is_template": null,
    "autosize": true,
    "caption": "",
    "figure": {
        "data": [
            {
                "type": "heatmap",
                "zsrc": "eazcon01:23:",
                "opacity": 0.75,
                "hoverinfo": "none",
                "showscale": false,
                "colorscale": [
                    [
                        0,
                        "#00083e"
                    ],
                    [
                        0.5,
                        "#ededee"
                    ],
                    [
                        1,
                        "#ffffff"
                    ]
                ]
            }
        ],
        "layout": {
            "title": "Accuracy of Progressively-Trained Model Over Each NBA Season",
            "width": 900,
            "xaxis": {
                "dtick": 1,
                "tick0": -0.5,
                "ticks": "",
                "zeroline": false,
                "gridwidth": 2,
                "showticklabels": false
            },
            "yaxis": {
                "dtick": 1,
                "tick0": 0.5,
                "ticks": "",
                "zeroline": false,
                "autorange": "reversed",
                "gridwidth": 2,
                "showticklabels": false
            },
            "height": 500,
            "margin": {
                "b": 0,
                "l": 0,
                "r": 0,
                "t": 0
            },
            "annotations": [
                {
                    "x": -0.45,
                    "y": 0,
                    "font": {
                        "color": "#ffffff"
                    },
                    "text": "<b>Train Years</b>",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 0,
                    "font": {
                        "color": "#ffffff"
                    },
                    "text": "<b>Test NBA Season</b>",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 0,
                    "font": {
                        "color": "#ffffff"
                    },
                    "text": "<b>rbf SVM Predict Acc.</b>",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 0,
                    "font": {
                        "color": "#ffffff"
                    },
                    "text": "<b>poly SVM Predict Acc.</b>",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 1,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2002",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 1,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2002-2003",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 1,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.7586206896551724",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 1,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.6551724137931034",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 2,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2003",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 2,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2003-2004",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 2,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.7241379310344828",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 2,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.7586206896551724",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 3,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2004",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 3,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2004-2005",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 3,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5666666666666667",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 3,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.6",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 4,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2005",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 4,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2005-2006",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 4,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5333333333333333",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 4,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 5,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2006",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 5,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2006-2007",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 5,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.6",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 5,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 6,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2007",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 6,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2007-2008",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 6,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.6666666666666666",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 6,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.6333333333333333",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 7,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2008",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 7,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2008-2009",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 7,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5666666666666667",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 7,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.6",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 8,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2009",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 8,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2009-2010",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 8,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.6666666666666666",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 8,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.6",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 9,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2010",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 9,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2010-2011",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 9,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.6666666666666666",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 9,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5333333333333333",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 10,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2011",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 10,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2011-2012",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 10,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.8",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 10,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.7",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 11,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2012",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 11,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2012-2013",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 11,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.6",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 11,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5333333333333333",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 12,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2013",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 12,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2013-2014",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 12,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5666666666666667",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 12,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5333333333333333",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 13,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2014",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 13,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2014-2015",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 13,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.7333333333333333",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 13,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.7",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": -0.45,
                    "y": 14,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2001-2015",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 0.55,
                    "y": 14,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "2015-2016",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 1.55,
                    "y": 14,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5333333333333333",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                },
                {
                    "x": 2.55,
                    "y": 14,
                    "font": {
                        "color": "#000000"
                    },
                    "text": "0.5",
                    "xref": "x1",
                    "yref": "y1",
                    "align": "left",
                    "xanchor": "left",
                    "showarrow": false
                }
            ]
        }
    },
    "height": 500,
    "width": 900,
    "user": {
        "profile_url": "https://chart-studio.plotly.com/~eazcon01",
        "avatar_url": "https://storage.googleapis.com/plotly-prod-profiles/98.jpg",
        "background_url": "https://storage.googleapis.com/plotly-prod-profiles/bg-5.jpg",
        "bio": "",
        "nickname": "",
        "website": "",
        "stream_tokens": null,
        "feature_set_id": null,
        "csrf_token": null,
        "date_joined": "2016-12-19 20:17:35",
        "mapbox_access_tokens": null,
        "has_password": null,
        "username": "eazcon01",
        "email": null,
        "is_active": null,
        "readonly": null,
        "is_dash_creator": null,
        "dash_created_count": null,
        "is_chart_creator": null,
        "charts_created_count": null
    }
}