O'Reilly logo

Python: Penetration Testing for Developers by Dave Mound, Benjamin May, Andrew Mabbitt, Terry Ip, Cameron Buchanan, Mohit, Christopher Duffy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required