Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
YAPSUT
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michele Maris
YAPSUT
Commits
0fb11b2e
Commit
0fb11b2e
authored
2 years ago
by
Michele Maris
Browse files
Options
Downloads
Patches
Plain Diff
u
parent
c7648382
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/yapsut/graphics.py
+22
-12
22 additions, 12 deletions
src/yapsut/graphics.py
with
22 additions
and
12 deletions
src/yapsut/graphics.py
+
22
−
12
View file @
0fb11b2e
...
@@ -247,26 +247,36 @@ class StandardFig() :
...
@@ -247,26 +247,36 @@ class StandardFig() :
self
.
fig
.
canvas
.
header_visible
=
False
self
.
fig
.
canvas
.
header_visible
=
False
self
.
fig
.
canvas
.
resizable
=
True
self
.
fig
.
canvas
.
resizable
=
True
return
self
.
fig
return
self
.
fig
def
legend
(
self
,
ncol
=
1
,
loc
=
1
,
title
=
''
)
:
def
legend
(
self
,
ncol
=
1
,
loc
=
1
,
title
=
''
,
fontsize
=
None
)
:
from
matplotlib
import
pyplot
as
plt
from
matplotlib
import
pyplot
as
plt
return
plt
.
legend
(
ncol
=
ncol
,
loc
=
loc
,
fontsize
=
self
.
fontsize_legend
,
title
=
title
)
fs
=
self
.
fontsize_legend
if
fontsize
is
None
else
fontsize
def
title
(
self
,
txt
)
:
return
plt
.
legend
(
ncol
=
ncol
,
loc
=
loc
,
fontsize
=
fs
,
title
=
title
)
def
title
(
self
,
txt
,
fontsize
=
None
)
:
from
matplotlib
import
pyplot
as
plt
from
matplotlib
import
pyplot
as
plt
return
plt
.
title
(
txt
,
fontsize
=
self
.
fontsize_title
)
fs
=
self
.
fontsize_title
if
fontsize
is
None
else
fontsize
def
xlabel
(
self
,
txt
)
:
return
plt
.
title
(
txt
,
fontsize
=
fs
)
def
suptitle
(
self
,
txt
,
fontsize
=
None
)
:
from
matplotlib
import
pyplot
as
plt
from
matplotlib
import
pyplot
as
plt
return
plt
.
xlabel
(
txt
,
fontsize
=
self
.
fontsize_xylabels
)
fs
=
self
.
fontsize_title
if
fontsize
is
None
else
fontsize
def
ylabel
(
self
,
txt
)
:
return
plt
.
suptitle
(
txt
,
fontsize
=
fs
)
def
xlabel
(
self
,
txt
,
fontsize
=
None
)
:
from
matplotlib
import
pyplot
as
plt
from
matplotlib
import
pyplot
as
plt
return
plt
.
ylabel
(
txt
,
fontsize
=
self
.
fontsize_xylabels
)
fs
=
self
.
fontsize_xylabels
if
fontsize
is
None
else
fontsize
def
XTICKS
(
self
,
ax
=
None
)
:
return
plt
.
xlabel
(
txt
,
fontsize
=
fs
)
def
ylabel
(
self
,
txt
,
fontsize
=
None
)
:
from
matplotlib
import
pyplot
as
plt
from
matplotlib
import
pyplot
as
plt
fs
=
self
.
fontsize_xylabels
if
fontsize
is
None
else
fontsize
return
plt
.
ylabel
(
txt
,
fontsize
=
fs
)
def
XTICKS
(
self
,
ax
=
None
,
fontsize
=
None
)
:
from
matplotlib
import
pyplot
as
plt
fs
=
self
.
fontsize_ticks
if
fontsize
is
None
else
fontsize
aa
=
plt
.
gca
().
get_xticklabels
()
if
ax
is
None
else
ax
.
get_xticklabels
()
aa
=
plt
.
gca
().
get_xticklabels
()
if
ax
is
None
else
ax
.
get_xticklabels
()
for
k
in
aa
:
k
.
set_fontsize
(
self
.
fontsize_tick
s
)
for
k
in
aa
:
k
.
set_fontsize
(
f
s
)
def
YTICKS
(
self
,
ax
=
None
)
:
def
YTICKS
(
self
,
ax
=
None
,
fontsize
=
None
)
:
from
matplotlib
import
pyplot
as
plt
from
matplotlib
import
pyplot
as
plt
fs
=
self
.
fontsize_ticks
if
fontsize
is
None
else
fontsize
aa
=
plt
.
gca
().
get_yticklabels
()
if
ax
is
None
else
ax
.
get_yticklabels
()
aa
=
plt
.
gca
().
get_yticklabels
()
if
ax
is
None
else
ax
.
get_yticklabels
()
for
k
in
aa
:
k
.
set_fontsize
(
self
.
fontsize_tick
s
)
for
k
in
aa
:
k
.
set_fontsize
(
f
s
)
def
gridspec
(
self
,
nrows
,
ncols
,
**
kargs
)
:
def
gridspec
(
self
,
nrows
,
ncols
,
**
kargs
)
:
"""
generates a GridSpec array. See matplotlib.gridspec.GridSpec
"""
"""
generates a GridSpec array. See matplotlib.gridspec.GridSpec
"""
import
matplotlib.gridspec
as
gridspec
import
matplotlib.gridspec
as
gridspec
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment