FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ExampleCodesForMatPlotLib/ScatterPlot.py at main · Sarish002/ExampleCodesForMatPlotLib · GitHub
Sarish002
/
ExampleCodesForMatPlotLib
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ExampleCodesForMatPlotLib
/
ScatterPlot.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (18 loc) · 692 Bytes
Breadcrumbs
ExampleCodesForMatPlotLib
/
ScatterPlot.py
Copy path
File metadata and controls
24 lines (18 loc) · 692 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from
matplotlib
import
pyplot
as
plot
from
matplotlib
import
style
,
rc
plot
.
figure
(
figsize
=
(
7
,
5
))
style
.
use
(
'ggplot'
)
style
.
use
(
'ggplot'
)
rc
(
'font'
,
**
{
'family'
:
'Comic Sans MS'
})
plot
.
rcParams
[
'axes.facecolor'
]
=
'#FFFFFF'
x
=
[
12
,
23
,
34
,
45
,
56
,
67
,
78
,
89
]
x2
=
[
9
,
20
,
31
,
42
,
53
,
64
,
75
,
86
]
y
=
[
'Rachel'
,
'Abhinav'
,
'Fred'
,
'Kiran'
,
'Navin'
,
'David'
,
'Ashwin'
,
'Zoe'
]
plot
.
scatter
(
y
,
x
,
label
=
'Marks in English'
,
color
=
'#9a07f5'
)
plot
.
scatter
(
y
,
x2
,
label
=
'Marks in Math'
,
color
=
'#e83cc9'
)
plot
.
title
(
'English or Math?'
,
loc
=
'center'
)
plot
.
xlabel
(
"Student"
)
plot
.
ylabel
(
"Marks"
)
plot
.
legend
()
plot
.
grid
(
True
,
color
=
'k'
,
linestyle
=
'-'
)
plot
.
show
()
Back
|
FazBrowse Home
|
New Git URL