Engaging plots, made easy.

Easily turn your data into engaging visualizations. Powerful API for coders. Powerful app for everyone.

from plotapi import Chord

Chord(matrix, names).show()

API for coders

Uploading to cloud

PlotAPI supports uploading visualizations to the cloud, where they can be embedded and shared privately, publicly, or within your Team.

We've already activated our license with the license activation instructions.

Let's demonstrate the different output formats we can output to a notebook -- inline!

Save locally or upload to cloud

You can do more within a script/notebook than just uploading to the cloud. You can save locally and display within a notebook too!

We'll use the following data to create a Chord diagram in our examples.

from plotapi import Chord 

matrix = [
    [0, 5, 6, 4, 7, 4],
    [5, 0, 5, 4, 6, 5],
    [6, 5, 0, 4, 5, 5],
    [4, 4, 4, 0, 5, 5],
    [7, 6, 5, 5, 0, 4],
    [4, 5, 5, 5, 4, 0],

names = ["Action", "Adventure", "Comedy", "Drama", "Fantasy", "Thriller"]

Interactive HTML

Call .to_upload() to upload an interactive visualization to the cloud.

The name paramater is required. Calling .upload() to the same name will overwrite a visualization if it exists.

project = Chord(matrix, names).upload(name="My Visualization", public=True)

This will return a dict that you can use in your application, containing:

  • message: A friendly message indicating the outcome of the upload.
  • view_url: The URL at which the visualization can be viewed.
  • edit_url: The URL at which the project settings can be modified.
  • embed_url: The URL which can be used to embed in other platforms and websites, typically using an iFrame.
  • public: Indicating the project's visibility. By default, it is set to False, meaning only you can see it.

Let's print the view_url and share it with our colleagues.

Customizing the view page

Uploading to the cloud supports additional customizations.

  • description: Descriptive text that will appear alongside the visualization at the view_url.
  • maximized: When set to True, the visualization will be expanded by default.
  • full_width: When set to True, the visualization can take up the full width of the window.
  • public: Can be set to True or False.
  • custom_css: Allows the specification of custom CSS.
custom_project = Chord(matrix, names).upload(
    name="My customized visualization",
    description="A demonstration from the PlotAPI documentation.",
    custom_css="text { fill: white; stroke: black; paint-order: stroke; stroke-width: 3px; }",

Let's print the view_url and share it with our colleagues.

Saving locally