WHICH OF THE FOLLOWING FUCTION WILL CREATE A HORIZONTAL BAR CHAT
Answers
Explanation:
Often when visualizing data using a bar chart, you’ll have to make a decision about the orientation of your bars. While there are no concrete rules, there are quite a few factors that can go into making this decision. For example, when grouping your data by an ordinal variable, you may want to display those groupings along the x-axis. On the other hand, when grouping your data by a nominal variable, or a variable that has long labels, you may want to display those groupings horizontally to aid in readability.
This recipe will show you how to go about creating a horizontal bar chart using Python. Specifically, you’ll be using pandas plot() method, which is simply a wrapper for the matplotlib pyplot API.
In our example, you’ll be using the publicly available San Francisco bike share trip dataset to identify the top 15 bike stations with the highest average trip durations. You will then visualize these average trip durations using a horizontal bar chart. The steps in this recipe are divided into the following sections: