Generating graphs using plot.ly

Sometimes it’s really nice to have a visual representation of your data. In this recipe, we are going to look at using the plot.ly python API to generate a nice graph.

Getting ready

In this recipe, we will be using the plot.ly API to generate our graph. If you don’t already have one, you’ll need to sign up for an account at https://plot.ly.

Once you have an account, you will need to prepare your environment for using plot.ly.

The easiest way is to use pip to install it, so simply run the command:

$ pip install plotly

Then, you will need to run the following command (substituting the {username}, {apikey}, and {streamids} with your own, which are viewable under your account subscriptions on the plot.ly site):

python -c ...

Get Python: Penetration Testing for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.