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/phorkaew:16/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "creation_time": "2024-04-04T03:42:05.686301Z",
    "comments": {
        "results": [],
        "count": 0
    },
    "parented": true,
    "embed_url": "https://chart-studio.plotly.com/~phorkaew/16.embed",
    "fid": "phorkaew:16",
    "filename": "Plot 16",
    "filetype": "plot",
    "img_url": "https://storage.googleapis.com/plotly-prod-images/phorkaew/16/9_EII0EYZGCMJJQY6KW1W5Q2YI4YRNHK.png",
    "image_urls": {
        "default": "https://storage.googleapis.com/plotly-prod-images/phorkaew/16/2_QFJVNUCPYX44QV0F190VHSEV66MGI1.png",
        "block-thumb": "https://storage.googleapis.com/plotly-prod-images/phorkaew/16/8_2TVWIIAPGVAUVPOIN8W4EIYW2F5WZ9.png",
        "list-thumb": "https://storage.googleapis.com/plotly-prod-images/phorkaew/16/9_EII0EYZGCMJJQY6KW1W5Q2YI4YRNHK.png"
    },
    "api_urls": {
        "files": "https://api.plotly.com/v2/files/phorkaew:16",
        "plots": "https://api.plotly.com/v2/plots/phorkaew:16",
        "parent": "https://api.plotly.com/v2/folders/home?user=phorkaew"
    },
    "owner": "phorkaew",
    "parent": -1,
    "preview": "",
    "referencers": [],
    "references": [],
    "title": "",
    "views": 2,
    "web_url": "https://chart-studio.plotly.com/~phorkaew/16/",
    "world_readable": true,
    "date_modified": "2024-04-04T05:10:55.506Z",
    "stars": {
        "results": [],
        "count": 0
    },
    "collaborators": {
        "results": [],
        "count": 0
    },
    "subfolder_count": null,
    "refresh_interval": null,
    "organize_view_url": "https://chart-studio.plotly.com/~phorkaew/16/",
    "current_user_permission": "read",
    "is_theme": null,
    "is_template": false,
    "autosize": false,
    "caption": "",
    "figure": {
        "data": [
            {
                "meta": {
                    "columnNames": {
                        "z": "A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - AA - AB - AC - AD - AE - AF - AG - AH - AI - AJ - AK - AL - AM - AN - AO - AP - AQ - AR - AS - AT - AU - AV - AW - AX - AY - AZ - BA - BB - BC - BD - BE - BF - BG - BH - BI - BJ - BK - BL - BM - BN - BO - BP - BQ - BR - BS - BT - BU - BV - BW - BX - BY - BZ - CA - CB - CC - CD - CE - CF - CG - CH - CI - CJ - CK - CL - CM - CN - CO - CP - CQ - CR - CS - CT - CU - CV - CW - CX - CY - CZ - DA - DB - DC - DD - DE - DF - DG - DH - DI - DJ - DK - DL - DM - DN - DO - DP - DQ - DR - DS - DT - DU - DV - DW - DX - DY - DZ - EA - EB - EC - ED - EE - EF - EG - EH - EI - EJ - EK - EL - EM - EN - EO - EP - EQ - ER - ES - ET - EU - EV - EW - EX - EY - EZ - FA - FB - FC - FD - FE - FF - FG - FH - FI - FJ - FK - FL - FM - FN - FO - FP - FQ - FR - FS"
                    }
                },
                "mode": "markers",
                "type": "heatmap",
                "zmin": -0.5,
                "zsrc": "phorkaew:15:b8fd40,a4df2f,ee907a,a6805f,9ba96b,dd1ed0,798d65,9cc059,3bd12e,01fb0c,95ce08,cfc642,9987c5,8dfb55,5859e0,59c7c7,9eb748,e9cafb,60b0b6,422b6a,97de3d,af23b5,c47af6,972e39,c6a68e,df5f3c,085b47,8122fc,4126fb,bcaa75,e3085e,405d6a,27a739,1487b2,0d2243,58e7bc,96f319,c0699b,f31bb9,82fbd3,7c72bb,365a04,13be22,9c1adf,22cdf5,92f8c4,c6d11b,40a951,72b69d,64ed70,357f8e,989ae6,b5efeb,dce099,0e947d,7b0c84,1eaa53,a89476,279ca3,c9592a,e3aa26,2548a9,36b12f,23050f,f97841,701bc7,960999,e06740,d9fd08,d18bc8,4f85fd,8afea2,1466c1,8bdc14,75d84a,aa5666,1caa8f,00cebb,6a963e,9f31ad,12f898,25f74a,c8555c,285ced,300faa,ed0de4,9091a7,067ae7,8f766d,f4b28e,02d0e3,9ebaad,6d96a2,79e36e,0f7172,658fb1,c77608,b457c0,e90ce8,808245,c8e421,b0d23c,97d117,230987,312769,df9ea4,62d074,1c99ef,3d4815,72a0ab,269475,b8750a,e628db,c46202,10eb00,5797ca,c2541b,356032,269392,0b8e60,804dae,2495ea,857708,94ec86,ebbb18,5cdbd8,480115,65a21c,08c5d8,4001d2,9fe16a,ccfb74,13442c,8bcb27,b86d99,0d46b0,8a25bd,e3604a,f1068a,242ef1,bd4a1d,f0d4e8,6f584f,246a9b,6d9251,a3050a,2621da,124b51,13aad6,f2b151,a2105e,a640c4,8ea612,b3b784,0db44c,6fbf91,31b7eb,41f9ce,f7d7d7,9696a3,8f4f40,3c6d14,616b28,1ee743,e133eb,102865,6c2ce7,1156b1,297c3d,c5d069,6386d2,2952a8,6ea80f,cffede,790ddc",
                "zauto": false,
                "zsmooth": false,
                "colorbar": {
                    "x": 1,
                    "y": 0.5,
                    "tick0": 0,
                    "ticks": "outside",
                    "title": {
                        "text": "Correlation"
                    },
                    "lenmode": "fraction",
                    "tickmode": "auto",
                    "thickness": 40,
                    "showticklabels": true
                },
                "colorscale": [
                    [
                        0,
                        "#ffffff"
                    ],
                    [
                        0.125,
                        "#f0f0f0"
                    ],
                    [
                        0.25,
                        "#d9d9d9"
                    ],
                    [
                        0.375,
                        "#bdbdbd"
                    ],
                    [
                        0.5,
                        "#969696"
                    ],
                    [
                        0.625,
                        "#737373"
                    ],
                    [
                        0.75,
                        "#525252"
                    ],
                    [
                        0.875,
                        "#252525"
                    ],
                    [
                        1,
                        "#000000"
                    ]
                ],
                "showlegend": false,
                "reversescale": true,
                "autocolorscale": false
            }
        ],
        "frames": [],
        "layout": {
            "title": {
                "text": "Airsac Data Pearson's Correlation"
            },
            "width": 1000,
            "xaxis": {
                "dtick": 10,
                "range": [
                    -0.5,
                    175
                ],
                "ticks": "outside",
                "title": {
                    "text": "<b>Egg Airsac m_asamples Pearson's correlation</b>"
                },
                "tickmode": "linear",
                "autorange": false,
                "fixedrange": true,
                "showspikes": false,
                "rangeslider": {
                    "range": [
                        -0.5,
                        175
                    ],
                    "yaxis": {},
                    "visible": false,
                    "autorange": true
                }
            },
            "yaxis": {
                "dtick": 10,
                "range": [
                    0,
                    175
                ],
                "ticks": "outside",
                "tickmode": "linear",
                "autorange": false,
                "fixedrange": true,
                "showspikes": false
            },
            "height": 1000,
            "legend": {
                "orientation": "v"
            },
            "modebar": {
                "orientation": "h"
            },
            "autosize": false,
            "dragmode": "pan",
            "template": {
                "data": {
                    "bar": [
                        {
                            "type": "bar",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "table": [
                        {
                            "type": "table",
                            "cells": {
                                "fill": {
                                    "color": "#EBF0F8"
                                },
                                "line": {
                                    "color": "white"
                                }
                            },
                            "header": {
                                "fill": {
                                    "color": "#C8D4E3"
                                },
                                "line": {
                                    "color": "white"
                                }
                            }
                        }
                    ],
                    "carpet": [
                        {
                            "type": "carpet",
                            "aaxis": {
                                "gridcolor": "#C8D4E3",
                                "linecolor": "#C8D4E3",
                                "endlinecolor": "#2a3f5f",
                                "minorgridcolor": "#C8D4E3",
                                "startlinecolor": "#2a3f5f"
                            },
                            "baxis": {
                                "gridcolor": "#C8D4E3",
                                "linecolor": "#C8D4E3",
                                "endlinecolor": "#2a3f5f",
                                "minorgridcolor": "#C8D4E3",
                                "startlinecolor": "#2a3f5f"
                            }
                        }
                    ],
                    "mesh3d": [
                        {
                            "type": "mesh3d",
                            "colorbar": {
                                "ticks": "",
                                "outlinewidth": 0
                            }
                        }
                    ],
                    "contour": [
                        {
                            "type": "contour",
                            "colorbar": {
                                "ticks": "",
                                "outlinewidth": 0
                            },
                            "autocolorscale": true
                        }
                    ],
                    "heatmap": [
                        {
                            "type": "heatmap",
                            "colorbar": {
                                "ticks": "",
                                "outlinewidth": 0
                            },
                            "autocolorscale": true
                        }
                    ],
                    "scatter": [
                        {
                            "type": "scatter",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "surface": [
                        {
                            "type": "surface",
                            "colorbar": {
                                "ticks": "",
                                "outlinewidth": 0
                            }
                        }
                    ],
                    "heatmapgl": [
                        {
                            "type": "heatmapgl",
                            "colorbar": {
                                "ticks": "",
                                "outlinewidth": 0
                            }
                        }
                    ],
                    "histogram": [
                        {
                            "type": "histogram",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "parcoords": [
                        {
                            "line": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            },
                            "type": "parcoords"
                        }
                    ],
                    "scatter3d": [
                        {
                            "type": "scatter3d",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "scattergl": [
                        {
                            "type": "scattergl",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "choropleth": [
                        {
                            "type": "choropleth",
                            "colorbar": {
                                "ticks": "",
                                "outlinewidth": 0
                            }
                        }
                    ],
                    "scattergeo": [
                        {
                            "type": "scattergeo",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "histogram2d": [
                        {
                            "type": "histogram2d",
                            "colorbar": {
                                "ticks": "",
                                "outlinewidth": 0
                            },
                            "autocolorscale": true
                        }
                    ],
                    "scatterpolar": [
                        {
                            "type": "scatterpolar",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "contourcarpet": [
                        {
                            "type": "contourcarpet",
                            "colorbar": {
                                "ticks": "",
                                "outlinewidth": 0
                            }
                        }
                    ],
                    "scattercarpet": [
                        {
                            "type": "scattercarpet",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "scattermapbox": [
                        {
                            "type": "scattermapbox",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "scatterpolargl": [
                        {
                            "type": "scatterpolargl",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "scatterternary": [
                        {
                            "type": "scatterternary",
                            "marker": {
                                "colorbar": {
                                    "ticks": "",
                                    "outlinewidth": 0
                                }
                            }
                        }
                    ],
                    "histogram2dcontour": [
                        {
                            "type": "histogram2dcontour",
                            "colorbar": {
                                "ticks": "",
                                "outlinewidth": 0
                            },
                            "autocolorscale": true
                        }
                    ]
                },
                "layout": {
                    "geo": {
                        "bgcolor": "white",
                        "showland": true,
                        "lakecolor": "white",
                        "landcolor": "white",
                        "showlakes": true,
                        "subunitcolor": "#C8D4E3"
                    },
                    "font": {
                        "color": "#2a3f5f"
                    },
                    "polar": {
                        "bgcolor": "white",
                        "radialaxis": {
                            "ticks": "",
                            "gridcolor": "#EBF0F8",
                            "linecolor": "#EBF0F8"
                        },
                        "angularaxis": {
                            "ticks": "",
                            "gridcolor": "#EBF0F8",
                            "linecolor": "#EBF0F8"
                        }
                    },
                    "scene": {
                        "xaxis": {
                            "ticks": "",
                            "gridcolor": "#DFE8F3",
                            "gridwidth": 2,
                            "linecolor": "#EBF0F8",
                            "zerolinecolor": "#EBF0F8",
                            "showbackground": true,
                            "backgroundcolor": "white"
                        },
                        "yaxis": {
                            "ticks": "",
                            "gridcolor": "#DFE8F3",
                            "gridwidth": 2,
                            "linecolor": "#EBF0F8",
                            "zerolinecolor": "#EBF0F8",
                            "showbackground": true,
                            "backgroundcolor": "white"
                        },
                        "zaxis": {
                            "ticks": "",
                            "gridcolor": "#DFE8F3",
                            "gridwidth": 2,
                            "linecolor": "#EBF0F8",
                            "zerolinecolor": "#EBF0F8",
                            "showbackground": true,
                            "backgroundcolor": "white"
                        }
                    },
                    "title": {
                        "x": 0.05
                    },
                    "xaxis": {
                        "ticks": "",
                        "gridcolor": "#EBF0F8",
                        "linecolor": "#EBF0F8",
                        "automargin": true,
                        "zerolinecolor": "#EBF0F8",
                        "zerolinewidth": 2
                    },
                    "yaxis": {
                        "ticks": "",
                        "gridcolor": "#EBF0F8",
                        "linecolor": "#EBF0F8",
                        "automargin": true,
                        "zerolinecolor": "#EBF0F8",
                        "zerolinewidth": 2
                    },
                    "ternary": {
                        "aaxis": {
                            "ticks": "",
                            "gridcolor": "#DFE8F3",
                            "linecolor": "#A2B1C6"
                        },
                        "baxis": {
                            "ticks": "",
                            "gridcolor": "#DFE8F3",
                            "linecolor": "#A2B1C6"
                        },
                        "caxis": {
                            "ticks": "",
                            "gridcolor": "#DFE8F3",
                            "linecolor": "#A2B1C6"
                        },
                        "bgcolor": "white"
                    },
                    "colorway": [
                        "#636efa",
                        "#EF553B",
                        "#00cc96",
                        "#ab63fa",
                        "#19d3f3",
                        "#e763fa",
                        "#fecb52",
                        "#ffa15a",
                        "#ff6692",
                        "#b6e880"
                    ],
                    "hovermode": "closest",
                    "colorscale": {
                        "diverging": [
                            [
                                0,
                                "#8e0152"
                            ],
                            [
                                0.1,
                                "#c51b7d"
                            ],
                            [
                                0.2,
                                "#de77ae"
                            ],
                            [
                                0.3,
                                "#f1b6da"
                            ],
                            [
                                0.4,
                                "#fde0ef"
                            ],
                            [
                                0.5,
                                "#f7f7f7"
                            ],
                            [
                                0.6,
                                "#e6f5d0"
                            ],
                            [
                                0.7,
                                "#b8e186"
                            ],
                            [
                                0.8,
                                "#7fbc41"
                            ],
                            [
                                0.9,
                                "#4d9221"
                            ],
                            [
                                1,
                                "#276419"
                            ]
                        ],
                        "sequential": [
                            [
                                0,
                                "#0508b8"
                            ],
                            [
                                0.0893854748603352,
                                "#1910d8"
                            ],
                            [
                                0.1787709497206704,
                                "#3c19f0"
                            ],
                            [
                                0.2681564245810056,
                                "#6b1cfb"
                            ],
                            [
                                0.3575418994413408,
                                "#981cfd"
                            ],
                            [
                                0.44692737430167595,
                                "#bf1cfd"
                            ],
                            [
                                0.5363128491620112,
                                "#dd2bfd"
                            ],
                            [
                                0.6256983240223464,
                                "#f246fe"
                            ],
                            [
                                0.7150837988826816,
                                "#fc67fd"
                            ],
                            [
                                0.8044692737430168,
                                "#fe88fc"
                            ],
                            [
                                0.8938547486033519,
                                "#fea5fd"
                            ],
                            [
                                0.9832402234636871,
                                "#febefe"
                            ],
                            [
                                1,
                                "#fec3fe"
                            ]
                        ],
                        "sequentialminus": [
                            [
                                0,
                                "#0508b8"
                            ],
                            [
                                0.0893854748603352,
                                "#1910d8"
                            ],
                            [
                                0.1787709497206704,
                                "#3c19f0"
                            ],
                            [
                                0.2681564245810056,
                                "#6b1cfb"
                            ],
                            [
                                0.3575418994413408,
                                "#981cfd"
                            ],
                            [
                                0.44692737430167595,
                                "#bf1cfd"
                            ],
                            [
                                0.5363128491620112,
                                "#dd2bfd"
                            ],
                            [
                                0.6256983240223464,
                                "#f246fe"
                            ],
                            [
                                0.7150837988826816,
                                "#fc67fd"
                            ],
                            [
                                0.8044692737430168,
                                "#fe88fc"
                            ],
                            [
                                0.8938547486033519,
                                "#fea5fd"
                            ],
                            [
                                0.9832402234636871,
                                "#febefe"
                            ],
                            [
                                1,
                                "#fec3fe"
                            ]
                        ]
                    },
                    "plot_bgcolor": "white",
                    "paper_bgcolor": "white",
                    "shapedefaults": {
                        "line": {
                            "width": 0
                        },
                        "opacity": 0.4,
                        "fillcolor": "#506784"
                    },
                    "annotationdefaults": {
                        "arrowhead": 0,
                        "arrowcolor": "#506784",
                        "arrowwidth": 1
                    }
                },
                "themeRef": "PLOTLY_WHITE"
            },
            "colorscale": {
                "sequential": [
                    [
                        0,
                        "#ffffff"
                    ],
                    [
                        0.125,
                        "#f0f0f0"
                    ],
                    [
                        0.25,
                        "#d9d9d9"
                    ],
                    [
                        0.375,
                        "#bdbdbd"
                    ],
                    [
                        0.5,
                        "#969696"
                    ],
                    [
                        0.625,
                        "#737373"
                    ],
                    [
                        0.75,
                        "#525252"
                    ],
                    [
                        0.875,
                        "#252525"
                    ],
                    [
                        1,
                        "#000000"
                    ]
                ],
                "sequentialminus": [
                    [
                        0,
                        "#ffffff"
                    ],
                    [
                        0.125,
                        "#f0f0f0"
                    ],
                    [
                        0.25,
                        "#d9d9d9"
                    ],
                    [
                        0.375,
                        "#bdbdbd"
                    ],
                    [
                        0.5,
                        "#969696"
                    ],
                    [
                        0.625,
                        "#737373"
                    ],
                    [
                        0.75,
                        "#525252"
                    ],
                    [
                        0.875,
                        "#252525"
                    ],
                    [
                        1,
                        "#000000"
                    ]
                ]
            },
            "showlegend": true
        }
    },
    "height": 1000,
    "width": 1000,
    "user": {
        "profile_url": "https://chart-studio.plotly.com/~phorkaew",
        "avatar_url": "https://storage.googleapis.com/plotly-prod-profiles/21.jpg",
        "background_url": "https://storage.googleapis.com/plotly-prod-profiles/bg-3.jpg",
        "bio": "",
        "nickname": "",
        "website": "",
        "stream_tokens": null,
        "feature_set_id": null,
        "csrf_token": null,
        "date_joined": "2022-11-16 05:51:34",
        "mapbox_access_tokens": null,
        "has_password": null,
        "username": "phorkaew",
        "email": null,
        "is_active": null,
        "readonly": null,
        "is_dash_creator": null,
        "dash_created_count": null,
        "is_chart_creator": null,
        "charts_created_count": null
    }
}