FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/examples/errorbar_demo.py at transforms · tecki/matplotlib · GitHub
tecki
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
examples
/
errorbar_demo.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (35 loc) · 991 Bytes
Breadcrumbs
matplotlib
/
examples
/
errorbar_demo.py
Copy path
File metadata and controls
47 lines (35 loc) · 991 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python
from
pylab
import
*
t
=
arange
(
0.1
,
4
,
0.1
)
s
=
exp
(
-
t
)
e
=
0.1
*
abs
(
randn
(
len
(
s
)))
f
=
0.1
*
abs
(
randn
(
len
(
s
)))
g
=
2
*
e
h
=
2
*
f
figure
()
errorbar
(
t
,
s
,
e
,
fmt
=
'o'
)
# vertical symmetric
figure
()
errorbar
(
t
,
s
,
None
,
f
,
fmt
=
'o'
)
# horizontal symmetric
figure
()
errorbar
(
t
,
s
,
e
,
f
,
fmt
=
'o'
)
# both symmetric
figure
()
errorbar
(
t
,
s
, [
e
,
g
], [
f
,
h
],
fmt
=
'--o'
)
# both asymmetric
figure
()
errorbar
(
t
,
s
, [
e
,
g
],
f
,
fmt
=
'o'
,
ecolor
=
'g'
)
# both mixed
figure
()
errorbar
(
t
,
s
,
e
, [
f
,
h
],
fmt
=
'o'
)
# both mixed
figure
()
errorbar
(
t
,
s
, [
e
,
g
],
fmt
=
'o'
)
# vertical asymmetric
figure
()
errorbar
(
t
,
s
,
yerr
=
e
,
fmt
=
'o'
)
# named
figure
()
errorbar
(
t
,
s
,
xerr
=
f
,
fmt
=
'o'
)
# named
xlabel
(
'Distance (m)'
)
ylabel
(
'Height (m)'
)
title
(
'Mean and standard error as a function of distance'
)
figure
()
ax
=
subplot
(
111
)
ax
.
set_yscale
(
'log'
)
errorbar
(
t
,
s
+
2
,
e
,
f
,
fmt
=
'o'
)
# both symmetric
#savefig('errorbar_demo')
show
()
Back
|
FazBrowse Home
|
New Git URL