All righty.
Now we've seen a few different ways of changing the style of our spots and figures what we might do
is change the style again but from within an existing style.
Let's see what that means because that's kind of confusing when you hear it for the first time.
What we might do is come back up here and take this code.
Now this is one of the only times we're allowed to copy and paste because I think we've kind of seen
enough for now of writing out this type of map pop lib style plotting so we'll come right down because
what we're focused on now is just checking out how to change the style from within a style.
So if we go here now what we want to do is we want to at the top of this cell.
We've probably already set it above.
But I'm going to reset this style so plant dot style I use and I want to see on white great that's a
star.
We're going to stick with for the time being set this style.
Wonderful.
Now we've created out over 50 data frame up before that's the heart disease patients that are over 50
and this is going to plot out a scatter graph with this data.
It's already got some customization a legend and a horizontal line.
So let's see what this looks like with the White grid style.
Just for a quick refresh we'll go back up.
This is what it looks like.
This is the original one we've just copied the code from this cell.
And so we're going to come down take a quick snapshot of that in your mind and we're gonna see what
the Seabourn version looks like.
Let's it shift into OK.
So a little bit different.
We've got the white grid that makes sense because we're using seaborne white grid but these colors I
think the lines are different color it's red now and these dots are black and white by default.
What happens if you say I like the seaborne white grid style but I don't really like these colors that
it's putting out.
Well as you might have guessed the beautiful thing is now pop live.
It's got a whole bunch of different colors and we can change up the colors.
So if we go in here as a little parameter called see map which stands for color map and there's a whole
bunch of different styles I've kind of explored them myself.
I personally like winter or summer.
I think in know this is seasons.
All it's going to mean is that this changes the color scheme and let's see what happens beautiful.
So now our black and white dots are of a wintery color scheme.
You can tell the difference a lot more than just pure black and white.
Now if we have a look for go to I believe it's matte plot live colors tutorial.
Now this should show the map properly documentation where you can see a whole bunch of different colors.
If we go here.
Control f so colors.
That's what we're after.
Choosing color maps in that plot lib.
So again there's a lot of information here we go down.
So it's got some different patterns here.
We keep going down.
You'll start to see if you type in this is a string plasma.
Let's see what happens here.
That's going to change the color map.
So let's go back to our notebook.
We might type in plasma
OK.
So it's changed back.
I personally prefer winter.
You can also do summer.
Let's see what that looks like.
OK.
That's all right.
But still I think winter's my favorite I've had a practice with these same apps.
There we go.
That looks great.
But this is the map slightly documentation.
So tutorials slash colors slash color maps and you can keep scrolling down there's a whole bunch here
if you just wanted green and blue or if you just want a blue and purple you can use these little color
codes P. You be you for blue and purple or yellow green blue.
Well keep going there's actually quite a few right.
So it's all about experimenting and trying to figure out which colors you personally prefer or which
colors best demonstrate what you're trying to show in your map plot led plot.
But this line over here that's not really offering much.
So let's let's check out how we can kind of constrain our plot to certain widths and certain heights
on the different axis values using x limb and Y limb.
Let's grab our double sided plot from before our subplot.
We'll grab that code again.
This is one of the only times you're allowed to copy and paste code because there's quite a lot of it.
So to save time writing it out will bring down the graph because what we're focused on is customizing
the y and x axis limitations we'll put that down there.
So now we've just copied and pasted the code from take a snapshot of this one as well from up here down
to here.
Now if we run this
it's going to output that subplot that we saw before but with the default Seabourn colors.
So what do we have to do.
We have to change the C map.
So let's see it in action.
See map again.
This is just in our scatter plot like we've done up here.
We've added a C map parameter so we'll do that here.
C math equals Winter.
Let's see what happens.
Beautiful.
That changes axis zero.
So the first plot.
Now we have to do the same for Axis 1.
We'll add in C math equals winter b beautiful.
We'll go down have a look.
Beautiful.
So now I got two really good looking plants right here.
So if we go back to our anatomy of a map plot Lee plot starting to get really close to what we've got
here.
But as you can see with ours we've got this line here.
This line here and this one up here whereas on here it's kind of clean the edges nice and cut off at
50 they're at 200 up there.
So let's see how we would do that what we're going to do is come back up to our code and now in this
set parameter we could do it in there but I'll show you another way of doing it.
So we'll customize access 0 first just to show you what's going on.
Axis zero dot set y Lim to be.
What do we want yeah.
So we want to cut it off at about 50.
Let's try that.
So set X Lim.
So we're going to do that 50 member we can always change this.
So this is going to be change the x axis limits.
There we go.
So let's see what this does.
We're going to shift into beautiful.
So now we've cut off that line that was here before.
So let's do this just to see what happens
so that's what we've done.
We've removed this line because we've changed the X limit of access zero to be 50.
Remember both of these are using the same x axis as age.
So let's do it let's keep that in there we'll change that limitation there.
We're gonna add the same thing to Axis 1.
We'll put it under here.
Change x 1 x axis limits.
We're gonna x one dot sets X Lim and we're gonna change that to be.
I think it's the same 50 and 80.
Nice and simple 50 80.
And we're also going to change the Y limit on here to remove this top line to be a flat 200.
Maybe we go from 50 to 200 or 60 60 to 200 I think that'll be a good range.
So we'll do that as well.
X 1 set y Lim 60 200.
And let's see what happens.
Now take a quick look at what we've got here.
You've got this graph we've got this line here.
We've got this one.
We've got this line here.
We've got this top line here.
So let's see because we've changed the X limb and the Y limb of access 1 and the X limb of Axis 0.
Hopefully if we've done it all right due to fall that's what we're talking about.
So now we've fully replicated the plot that we have here.
We've got the exact same thing going on here we've we've cleaned out the x axis is we've changed the
color we've changed the style and can't really see it all in one here.
So let's zoom out a little bit.
There we go.
So that plot is looking pretty darn good.
I don't know if you agree or not maybe you create your own style maybe some different colors or something
like that but to me that looks like something we can share.
So that's what we're going to look at the next video is saving and sharing this plot.
So have a practice around maybe change the limitations with some different data or change his style.
Change the C map and see if you can create your own version of this heart disease analysis.