Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
c034e8f1
Commit
c034e8f1
authored
Jul 25, 2017
by
Theo Steininger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved Plotting
parent
e3bc5346
Pipeline
#15467
passed with stages
in 12 minutes and 37 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
13 deletions
+19
-13
nifty/plotting/descriptors/axis.py
nifty/plotting/descriptors/axis.py
+9
-6
nifty/plotting/figures/figure_2D.py
nifty/plotting/figures/figure_2D.py
+2
-2
nifty/plotting/figures/figure_3D.py
nifty/plotting/figures/figure_3D.py
+3
-2
nifty/plotting/plots/heatmaps/heatmap.py
nifty/plotting/plots/heatmaps/heatmap.py
+4
-2
nifty/plotting/plots/scatter_plots/scatter_plot.py
nifty/plotting/plots/scatter_plots/scatter_plot.py
+1
-1
No files found.
nifty/plotting/descriptors/axis.py
View file @
c034e8f1
...
...
@@ -4,9 +4,9 @@ from nifty.plotting.plotly_wrapper import PlotlyWrapper
class
Axis
(
PlotlyWrapper
):
def
__init__
(
self
,
text
=
None
,
font
=
'
'
,
color
=
''
,
log
=
False
,
font_size
=
18
,
show_grid
=
True
,
visible
=
True
):
self
.
text
=
text
def
__init__
(
self
,
label
=
None
,
font
=
'Balto
'
,
color
=
''
,
log
=
False
,
font_size
=
22
,
show_grid
=
True
,
visible
=
True
):
self
.
label
=
str
(
label
)
self
.
font
=
font
self
.
color
=
color
self
.
log
=
log
...
...
@@ -16,9 +16,9 @@ class Axis(PlotlyWrapper):
def
to_plotly
(
self
):
ply_object
=
dict
()
if
self
.
text
:
if
self
.
label
:
ply_object
.
update
(
dict
(
title
=
self
.
text
,
title
=
self
.
label
,
titlefont
=
dict
(
family
=
self
.
font
,
color
=
self
.
color
,
...
...
@@ -30,5 +30,8 @@ class Axis(PlotlyWrapper):
if
not
self
.
show_grid
:
ply_object
[
'showgrid'
]
=
False
ply_object
[
'visible'
]
=
self
.
visible
ply_object
[
'tickfont'
]
=
{
'size'
:
self
.
font_size
}
ply_object
[
'tickfont'
]
=
{
'size'
:
self
.
font_size
,
'family'
:
self
.
font
}
# ply_object['domain'] = {'0': '0.04',
# '1': '1'}
return
ply_object
nifty/plotting/figures/figure_2D.py
View file @
c034e8f1
...
...
@@ -11,8 +11,8 @@ class Figure2D(FigureFromPlot):
width
=
width
if
width
is
not
None
else
plots
[
0
].
default_width
()
height
=
\
height
if
height
is
not
None
else
plots
[
0
].
default_height
()
(
xaxis
,
yaxis
)
=
\
xaxis
if
xaxis
is
not
None
else
plots
[
0
].
default_axes
()
xaxis
=
xaxis
if
xaxis
is
not
None
else
plots
[
0
].
default_axes
()[
0
]
yaxis
=
yaxis
if
yaxis
is
not
None
else
plots
[
0
].
default_axes
()[
1
]
if
isinstance
(
plots
[
0
],
Heatmap
)
and
width
is
None
and
\
height
is
None
:
...
...
nifty/plotting/figures/figure_3D.py
View file @
c034e8f1
...
...
@@ -9,8 +9,9 @@ class Figure3D(FigureFromPlot):
width
=
width
if
width
is
not
None
else
plots
[
0
].
default_width
()
height
=
\
height
if
height
is
not
None
else
plots
[
0
].
default_height
()
(
xaxis
,
yaxis
,
zaxis
)
=
\
xaxis
if
xaxis
is
not
None
else
plots
[
0
].
default_axes
()
xaxis
=
xaxis
if
xaxis
is
not
None
else
plots
[
0
].
default_axes
()[
0
]
yaxis
=
yaxis
if
yaxis
is
not
None
else
plots
[
0
].
default_axes
()[
1
]
zaxis
=
zaxis
if
zaxis
is
not
None
else
plots
[
0
].
default_axes
()[
2
]
super
(
Figure3D
,
self
).
__init__
(
plots
,
title
,
width
,
height
)
self
.
xaxis
=
xaxis
self
.
yaxis
=
yaxis
...
...
nifty/plotting/plots/heatmaps/heatmap.py
View file @
c034e8f1
...
...
@@ -22,7 +22,8 @@ class Heatmap(PlotlyWrapper):
self
.
data
=
data
self
.
zmin
=
zmin
self
.
zmax
=
zmax
self
.
_font_size
=
18
self
.
_font_size
=
22
self
.
_font_family
=
'Bento'
def
at
(
self
,
data
):
if
isinstance
(
data
,
list
):
...
...
@@ -50,7 +51,8 @@ class Heatmap(PlotlyWrapper):
plotly_object
[
'zmax'
]
=
self
.
zmax
plotly_object
[
'showscale'
]
=
True
plotly_object
[
'colorbar'
]
=
{
'tickfont'
:
{
'size'
:
self
.
_font_size
}}
plotly_object
[
'colorbar'
]
=
{
'tickfont'
:
{
'size'
:
self
.
_font_size
,
'family'
:
self
.
_font_family
}}
if
self
.
color_map
:
plotly_object
[
'colorscale'
]
=
self
.
color_map
.
to_plotly
()
if
self
.
webgl
:
...
...
nifty/plotting/plots/scatter_plots/scatter_plot.py
View file @
c034e8f1
...
...
@@ -42,7 +42,7 @@ class ScatterPlot(PlotlyWrapper):
return
ply_object
def
default_width
(
self
):
return
7
00
return
11
00
def
default_height
(
self
):
return
700
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment