Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
pymor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
pyMOR
pymor
Commits
d11519f3
Commit
d11519f3
authored
Jun 25, 2020
by
Hendrik Kleikamp
Committed by
René Fritze
Jul 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[gui] remove colorbar from 1D plots
parent
61eb5439
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
src/pymor/discretizers/builtin/gui/jupyter/patch.py
src/pymor/discretizers/builtin/gui/jupyter/patch.py
+3
-2
src/pymor/discretizers/builtin/gui/matplotlib.py
src/pymor/discretizers/builtin/gui/matplotlib.py
+0
-8
No files found.
src/pymor/discretizers/builtin/gui/jupyter/patch.py
View file @
d11519f3
...
...
@@ -93,13 +93,14 @@ def visualize_patch(grid, U, bounding_box=([0, 0], [1, 1]), codim=2, title=None,
codim
=
codim
,
colorbar
=
separate_colorbars
))
else
:
plots
.
append
(
Matplotlib1DAxes
(
figure
,
grid
,
bounding_box
=
bounding_box
,
vmin
=
vmin
,
vmax
=
vmax
,
codim
=
codim
,
colorbar
=
separate_colorbars
))
codim
=
codim
,
colorbar
=
separate_colorbars
))
if
legend
:
ax
.
set_title
(
legend
[
i
])
plt
.
tight_layout
()
if
not
separate_colorbars
:
figure
.
colorbar
(
plots
[
0
].
p
,
ax
=
axes
)
if
hasattr
(
plots
[
0
],
'p'
):
figure
.
colorbar
(
plots
[
0
].
p
,
ax
=
axes
)
def
set
(
self
,
U
,
ind
):
if
rescale_colorbars
:
...
...
src/pymor/discretizers/builtin/gui/matplotlib.py
View file @
d11519f3
...
...
@@ -81,13 +81,6 @@ class Matplotlib1DAxes:
self
.
axes
=
figure
.
gca
()
self
.
lines
,
=
self
.
axes
.
plot
(
xs
,
np
.
zeros_like
(
xs
))
# TODO
import
matplotlib.pyplot
as
plt
self
.
p
=
plt
.
cm
.
ScalarMappable
(
cmap
=
plt
.
get_cmap
(
"viridis"
),
norm
=
plt
.
Normalize
(
vmin
=
vmin
or
0
,
vmax
=
vmax
or
1
))
if
colorbar
:
figure
.
colorbar
(
self
.
p
,
ax
=
a
)
def
set
(
self
,
U
,
vmin
=
None
,
vmax
=
None
):
self
.
vmin
=
self
.
vmin
if
vmin
is
None
else
vmin
...
...
@@ -103,7 +96,6 @@ class Matplotlib1DAxes:
self
.
axes
.
relim
()
self
.
axes
.
autoscale_view
(
True
,
True
,
True
)
self
.
p
.
set_clim
(
self
.
vmin
,
self
.
vmax
)
if
config
.
HAVE_QT
and
config
.
HAVE_MATPLOTLIB
:
...
...
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