From the course: Python Data Visualization: Create Impactful Visuals, Animations, and Dashboards by Pearson
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Advanced plotting - Python Tutorial
From the course: Python Data Visualization: Create Impactful Visuals, Animations, and Dashboards by Pearson
Advanced plotting
Now that you're familiar with Bokeh, how it structures its code and what their main features are, we're going to look at how we can combine the different pieces that it makes available to us to build some more sophisticated and more advanced visualizations. In general, sophisticated plots can be generated with just a few lines of code by adding pieces and combining different functionality into one coherent visualization. Here we have just a few lines of code where we're building the visualization on the top right-hand corner of the slide. You can see how essentially we're just having two different plots with horizontal bars that are stacked, so hbar underscore stack. One that handles the positive values, one to handle the negative values with different color schemes and a coherent legend across the board. Despite the occasional complexity of Bokeh and how Bokeh is structured, you can see how easy it is to build something relatively sophisticated and visually appealing at the same…