FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib/examples/api/unicode_minus.py at master · unutbu/matplotlib · GitHub
unutbu
matplotlib
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib
/
examples
/
api
/
unicode_minus.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (15 loc) · 555 Bytes
Breadcrumbs
matplotlib
/
examples
/
api
/
unicode_minus.py
Copy path
File metadata and controls
17 lines (15 loc) · 555 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
"""
You can use the proper typesetting unicode minus (see
http://en.wikipedia.org/wiki/Plus_sign#Plus_sign) or the ASCII hypen
for minus, which some people prefer. The matplotlibrc param
axes.unicode_minus controls the default behavior.
The default is to use the unicode minus
"""
import
numpy
as
np
import
matplotlib
import
matplotlib
.
pyplot
as
plt
matplotlib
.
rcParams
[
'axes.unicode_minus'
]
=
False
fig
,
ax
=
plt
.
subplots
()
ax
.
plot
(
10
*
np
.
random
.
randn
(
100
),
10
*
np
.
random
.
randn
(
100
),
'o'
)
ax
.
set_title
(
'Using hypen instead of unicode minus'
)
plt
.
show
()
Back
|
FazBrowse Home
|
New Git URL