Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Interactive Data Visualization with Python
  • Table Of Contents Toc
Interactive Data Visualization with Python

Interactive Data Visualization with Python - Second Edition

By : Abha Belorkar , Sharath Chandra Guntuku , Shubhangi Hora , Anshu Kumar
4.3 (3)
close
close
Interactive Data Visualization with Python

Interactive Data Visualization with Python

4.3 (3)
By: Abha Belorkar , Sharath Chandra Guntuku , Shubhangi Hora , Anshu Kumar

Overview of this book

With so much data being continuously generated, developers, who can present data as impactful and interesting visualizations, are always in demand. Interactive Data Visualization with Python sharpens your data exploration skills, tells you everything there is to know about interactive data visualization in Python. You'll begin by learning how to draw various plots with Matplotlib and Seaborn, the non-interactive data visualization libraries. You'll study different types of visualizations, compare them, and find out how to select a particular type of visualization to suit your requirements. After you get a hang of the various non-interactive visualization libraries, you'll learn the principles of intuitive and persuasive data visualization, and use Bokeh and Plotly to transform your visuals into strong stories. You'll also gain insight into how interactive data and model visualization can optimize the performance of a regression model. By the end of the course, you'll have a new skill set that'll make you the go-to person for transforming data visualizations into engaging and interesting stories.
Table of Contents (9 chapters)
close
close

Tweaking Plot Parameters

Looking at the last figure in our previous section, we find that the legend is not appropriately placed. We can tweak the plot parameters to adjust the placements of the legends and the axis labels, as well as change the font-size and rotation of the tick labels.

Exercise 11: Tweaking the Plot Parameters of a Grouped Bar Plot

In this exercise, we'll tweak the plot parameters, for example, hue, of a grouped bar plot. We'll see how to place legends and axis labels in the right places and also explore the rotation feature:

  1. Import the necessary modules—in this case, only seaborn:
    #Import seaborn
    import seaborn as sns
  2. Load the dataset:
    diamonds_df = sns.load_dataset('diamonds')
  3. Use the hue parameter to plot nested groups:
    ax = sns.barplot(x="cut", y="price", hue='color', data=diamonds_df)

    The output is as follows:

    Figure 1.26: Nested bar plot with the hue parameter
  4. Place the legend appropriately...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Interactive Data Visualization with Python
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon