Creating charts is easily with Plotly. Discover how to work with basic charts in Plotly.
- [Instructor] In this lesson, we'll review some of the most … essential charts Plotly has to offer. … To get started, we'll import Plotly dot express as PX … then import the Gapminder data set just for Oceana. … That is Australia and New Zealand. … In our output, … you can see this as a time series data set. … So let's start off with the line chart, … showing life expectancy over time. … To create our figure, we call PX dot line … and pass in our data frame. … We then set the X axis to the year, … the Y access to life expectancy, … and then we'll color by country … calling fig that show, we get our chart. … Note we can easily modify the variable that we want to show. … For instance, let's look at GDP per capita. … And there you have it. … With Plotly, it's fairly easy to modify the layout … of your chart using the update layout method. … Here, we're going to move our legend … from its default position to the upper left of our visual. … We're setting our legend to a dictionary … where we specify that will incur the y-axis to the top, …
This course was created by Madecraft. We are pleased to host this training in our library.