How To Plot Points in the Cartesian Plane (the EASY Way)

Video Series: Functions and Their Graphs (Step-by-Step Tutorials for Precalculus)

(D4M) — Here is the video transcript for this video.

00:00
hi everyone welcome back i’m dave this video is uh how to plot points in
the cartesian plane the easy way in this episode you’ll learn how to plot points
in the cartesian plane the easy way by using a computer
um first i want to mention before we get
started that this is this videos part of the series functions in their graphs
step-by-step tutorials for pre-calculus so the link is for the full series is
below in the description so um in this episode we’re going to talk about
setting up axes for a plot and we’re going to talk about how to plot points
and we’re going to talk about graphing functions now we’ve already talked about
these things right here in previous videos but in this video we’re going to
do things on the computer in particular you can follow along by opening up your
own python notebook link is below in the description and it
only takes a moment to get started but you’ll see how powerful and how how

00:01
useful it is and so right now let’s go ahead and get started [Music]
alright so at first was we’re going to need some axes so typically when you’re
in a pre calculus course and you’re working in the cartesian coordinate system
we’re going to draw some axes a particular way so in in a in a
pre-calculus course you would see something like this
where you would have the x-axis and the y-axis and you usually have arrows over
here to indicate the positive direction and the positive direction up here
so we need to have something like this uh whenever we sketch our graphs
because computer graphics software often don’t have axes that look like that so
i’m going to show you how to make those axes uh using a computer
and so let’s go ahead and see how to do that
so we’re going to look at a python uh notebook right here and first thing we

00:02
want to do is set up our python notebook by importing some
packages here so to execute the cell i’m gonna hit shift enter
and again you can use the link just below in the description to follow along
in your own python notebook and so right here um we’re going to have
a figure this is what a default figure looks like and and in a python notebook
so uh first thing is i’m going to declare what a figure is i’m going to
declare a figure and then i’m going to declare some axes using this plt using
the matplotlib package and i’m going to declare um
some axes and then i’m going to show it right and so if we execute the cell we
get this cell right here and this is what it looks like by default so as you
can see we have a border around here and we have some tick marks right here so
um i want to change it and make this look like something that you would see
in a traditional pre-calculus course so um we’re gonna customize this what

00:03
we’re gonna do is we’re still gonna declare figure
we’re still gonna declare a set of axes and then what we’re going to do is we’re
going to customize the way the the the plot looks so we’re going to say the
left and the bottom this is the left and this is the bottom we want that to go
through zero zero still but i want to turn off the right one and
the left one sorry the top one and the right one
and what i’m also going to do is i’m going to put some background color on
here this one up here’s why the background is why
if you don’t want to do that if you don’t want to customize your background
color then you can just leave off those two lines right there but i’m going to
go ahead and do that and then i want to put some arrows on
here as you can see what it’s going to look like down here after we execute
this cell right here so these two lines right here
put arrows on here and by the way we here’s the way we write comments in

00:04
python right there so i’m going to execute this cell right
here and as you can see right here we get something that looks much more
traditional than this right up here so this is the way i’m going to
plot our functions and our points and precalculus in these in this series here
so in order to make this quicker though i’m going to go ahead and define a
function so def we’re defined and the name of this function is uh pc for
precalculus pc underscore axes and then the input for this function
is going to be whatever axes i’m working
on and then here’s the customization and this is the same customization that we
just saw up right here so i’m going to declare which ones to
show which ones not to show and where them to go through i’m going to use the
background color and i’m going to have some arrows so once we define this
function here by hitting shift enter now it becomes a lot quicker and easier
to plot some axes right here so again on every

00:05
time i want to make a plot i just want to declare figure
i want to declare some axes and then i want to customize the axes and then i
want to show show my figure so let’s execute that and as you can see now we
get these standard uh looking axes that you would see in a pre-calculus class
and so now let’s go and look at plotting some points here [Music]
okay so as you can see over here we have this example over here and it says plot
these points and so i have a whole bunch of points here here’s an x and a y
here’s an x and a y and in the last video i talked about how to do this
um by hand and when we did this by hand you know we
had to to sketch the axes out and make the tick marks and so on
i guess we can go ahead and do one right here

00:06
so we can graph this one right here is the easiest one zero zeros right there’s
the origin one tick mark one tick mark here’s the point one one
we have the x and we have the y and so on so we can go through this list
right here and plot all these points here
here’s how we would do this by computer so now we have uh we’re going to declare
figure we’re going to declare a set of axes we’re going to customize the axes
and at the end we’re going to show it so those three are those three lines are
the same what’s new well in this example here i’m going to
say these are the x’s right here so instead of drawing them horizontally now
we’re going to type them up horizontally into an array we’re going to separate
each one by comma and we’re going to do the y’s
and so you know you can think of this as a minus three nine a minus two four
minus one one so there’s the points right there and then we’re gonna use

00:07
something called a scatter plot so scatter plot will not connect the
points at all they’re just points all by themselves so
let’s go ahead and execute that cell and then we get the points right here
so this is can plot them basically as fast as you can type in the points right
here so this is a really nice fast way of plotting points here
and let’s go ahead and see another example so in this example here
you know we have some x’s we have some y’s and so let’s go ahead and plot these
points here so when i plot these points here i’m going to you know use the same
i’m going to declare figure set of axes i’m going to customize my axes we’re
going to type in all the points and then we’re going to type in scatter dot x y
scatter x y on the axis that we’re declaring
and then we can show it and then we get all the points here so let’s execute

00:08
that cell there there we go and there’s all the points
right there there’s the scatter plot again scatter plot just means we’re not
going to be connecting them in in with line segments
and that’s in contrast to what we’re going to do next which is graphing
functions so there’s the x’s and there’s the y’s and there’s the scatter plot
all right great so now let’s look at graphing functions so let’s see that
okay so when we’re graphing functions we’re going to do something very similar
we’re going to declare a figure we’re going to declare a set of axes and at
the end we’re going to show the plot so how and we’re going to customize the
plot right so how does it change so here you can see this has changed
dramatically here because i no longer am typing in a list of points um so my x’s

00:09
are made automatically and my y’s are made automatically according to the rule
so notice here for exponent 2 we’re using this notation here
and what about the x’s so the x’s are gonna start from minus five to five so
right here we have minus five all the way to five and i’m gonna work in steps
in point zero one so these are very small steps right here
and so let’s go ahead and execute this cell right here
and then we can see we have a nice smooth looking curve right there
now i want to experiment with this here and and show you how this changes so
let’s go from point zero one where it looks nice and smooth let’s go to a one
and now you can see it’s a little bit more choppier you can kind of see these
points right here where it gets really choppy
and we can make it even more obvious by say moving that to a two [Music]
see what it’s doing is it’s not only plotting all of these points but it’s
connecting them with a line segment so that’s how plot difference is

00:10
different than the scatter that we used before
so this is going to go from -5 to -3 because it’s in steps of two it’s going
to plot this point it’s going to plot that point and it’s going to connect it
with a line segment so now it doesn’t look as smooth
so to make it look smooth we can plot lots lots of points
there we go now it’s very nice and smooth
and so this is how we plot this function right here y equals x squared
and so that looks really nice and smooth and we have our axes
we could label our axes if we want [Music] so there we go
so let’s look at another example so you may have known what this previous
function looks like y equals x squared right so you may know what that looks
like what about this one do you know what this one looks like
so this one is you know perhaps more difficult to graph by hand

00:11
but by computer it’s actually pretty much the same degree difficulty
we declare figure we declare a set of axes we’re going to customize the axes
we’re going to show the plot so here we need to um we need to have a [Music]
starting place here so i’m going to say -3
let’s go with -3 and then all the way to 2 and i’m going to go in small little
steps 0.01 and then here’s how i type up the function right we have an exponent
for the four we have a minus three x squared so i
have a minus three i like to i like to use spaces
but not with exponents it’s just my way of writing it
um let’s execute this and so now we get this nice plot right here
however this may not be the best um plot for you for me it stops here at
60 right so let’s let’s say let’s experiment with this a

00:12
little bit that’s how i came up with these numbers here minus two to two
i think this looks the best right here so minus two to two
i’m going to use that as my window to sketch this graph right here we have a
nice clean shape right here looks very symmetric
okay so that does it for this video so i hope that you like this video and i
hope that you go ahead and subscribe and if you have any questions let me
know in the section below and i look forward to seeing you next time
if you like this video please press this
button and subscribe to my channel now i want to turn it over to you math can be
difficult because it requires time and energy to become skills i want you to
tell everyone what you do to succeed in your studies either way let us know what
you think in the comments you

About The Author
Dave White Background Blue Shirt Squiggles Smile

David A. Smith (Dave)

Mathematics Educator

David A. Smith is the CEO and founder of Dave4Math. His background is in mathematics (B.S. & M.S. in Mathematics), computer science, and undergraduate teaching (15+ years). With extensive experience in higher education and a passion for learning, his professional and academic careers revolve around advancing knowledge for himself and others. His work helps others learn about subjects that can help them in their personal and professional lives.

Let's do some math together, today!

Contact us today.

Account

Affiliates

About Us

Blog

© 2022 DAVE4MATH.com

Privacy Policy | Terms of Service