From the course: Interactive Dashboards with Plotly and Dash

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Plotting multiple series

Plotting multiple series

- [Instructor] So we've seen this briefly, but I just want to reiterate that we can plot multiple series. And a lot of the charts are going to be dependent on using that color argument. So if we take a look at our education dataframe, we have a categorical variable state. We have year and we have total expenditure. And so if I just filter my data down to two states, if I don't, we'll have 50, we can go ahead and plot year, total expenditure, specify color equals state, and give it a little title. And we'll end up splitting our data based on that color variable. And so specifying color equals state will end up giving us a line for each of our states in our dataframe. The same is true for charts like bar charts. And so here again, we're filtering our dataframe down to California and Massachusetts. Our X is year, our Y is total expenditure. And again, this might be best represented as a line chart. But just using the same piece of data, specified color equals state, and we end up with a…

Contents