Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
UW-Glance
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eva Schiffer
UW-Glance
Commits
a76a8e2e
Commit
a76a8e2e
authored
3 years ago
by
Eva Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
less eye searing colormaps for the gui
parent
cb94bb06
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pyglance/glance/gui_constants.py
+0
-10
0 additions, 10 deletions
pyglance/glance/gui_constants.py
pyglance/glance/gui_figuremanager.py
+13
-8
13 additions, 8 deletions
pyglance/glance/gui_figuremanager.py
pyglance/glance/gui_model.py
+2
-1
2 additions, 1 deletion
pyglance/glance/gui_model.py
with
15 additions
and
19 deletions
pyglance/glance/gui_constants.py
+
0
−
10
View file @
a76a8e2e
...
@@ -81,16 +81,6 @@ GREEN_VAR_NAME = "green"
...
@@ -81,16 +81,6 @@ GREEN_VAR_NAME = "green"
BLUE_VAR_NAME
=
"
blue
"
BLUE_VAR_NAME
=
"
blue
"
ALPHA_VAR_NAME
=
"
alpha
"
ALPHA_VAR_NAME
=
"
alpha
"
# colormaps that are available in the GUI
# TODO, this needs to be upkept when the list of colormaps in the figure manager changes
CM_RAINBOW
=
"
Rainbow
"
CM_RAINBOW_REV
=
"
Rainbow, Reverse
"
CM_RAINBOW_DESAT
=
"
Rainbow, Desaturated
"
CM_GRAY
=
"
Grayscale
"
CM_GRAY_REV
=
"
Grayscale, Reverse
"
CM_SPECTRAL
=
"
Rainbow2
"
COLORMAP_NAMES
=
[
CM_RAINBOW
,
CM_RAINBOW_REV
,
CM_RAINBOW_DESAT
,
CM_GRAY
,
CM_GRAY_REV
,
CM_SPECTRAL
]
NO_DATA_MESSAGE
=
"
Requested data was not available or did not exist.
"
NO_DATA_MESSAGE
=
"
Requested data was not available or did not exist.
"
UNKNOWN_DATA_FORM
=
"
An ununsupported plot format was requested. Aborting attempt to plot data.
"
UNKNOWN_DATA_FORM
=
"
An ununsupported plot format was requested. Aborting attempt to plot data.
"
...
...
This diff is collapsed.
Click to expand it.
pyglance/glance/gui_figuremanager.py
+
13
−
8
View file @
a76a8e2e
...
@@ -33,16 +33,21 @@ temp_dict = {'blue': [(0.0, 0.58333333333333326, 0.58333333333333326), (0.11, 0.
...
@@ -33,16 +33,21 @@ temp_dict = {'blue': [(0.0, 0.58333333333333326, 0.58333333333333326), (0.11, 0.
DESAT_MAP
=
matplotlib
.
colors
.
LinearSegmentedColormap
(
'
colormap
'
,
temp_dict
,
1024
)
DESAT_MAP
=
matplotlib
.
colors
.
LinearSegmentedColormap
(
'
colormap
'
,
temp_dict
,
1024
)
# colormaps that are available in the GUI
# colormaps that are available in the GUI
# if this changes the list of colormap names in the constants module ne
ed
s
t
o be kept u
p
temp_spectral
=
cm
.
spectral
if
hasattr
(
cm
,
'
spectral
'
)
else
cm
.
Spectral
# newer matplotlib chang
ed t
he name of this color ma
p
temp_spectral
=
cm
.
spectral
if
hasattr
(
cm
,
'
spectral
'
)
else
cm
.
Spectral
# newer matplotlib changed the name of this color map
temp_
r
spectral
=
cm
.
spectral
_r
if
hasattr
(
cm
,
'
spectral
_r
'
)
else
cm
.
Spectral
_r
AVAILABLE_COLORMAPS
=
{
AVAILABLE_COLORMAPS
=
{
CM_RAINBOW
:
cm
.
jet
,
"
Viridis
"
:
cm
.
viridis
,
CM_RAINBOW_REV
:
cm
.
jet_r
,
"
Cividis
"
:
cm
.
cividis
,
CM_RAINBOW_DESAT
:
DESAT_MAP
,
"
Plasma
"
:
cm
.
plasma
,
CM_GRAY
:
cm
.
bone
,
"
Ocean
"
:
cm
.
ocean
,
CM_GRAY_REV
:
cm
.
bone_r
,
"
Spectral Rainbow
"
:
temp_spectral
,
CM_SPECTRAL
:
temp_spectral
,
"
Spectral Rainbow, Reverse
"
:
temp_rspectral
,
"
Grayscale
"
:
cm
.
bone
,
"
Grayscale, Reverse
"
:
cm
.
bone_r
,
}
}
# note: we expect other modules to reference the COLORMAP_NAMES
COLORMAP_NAMES
=
list
(
AVAILABLE_COLORMAPS
.
keys
())
# whether or not the plot can be drawn on a map
# whether or not the plot can be drawn on a map
CAN_BE_MAPPED
=
{
CAN_BE_MAPPED
=
{
...
...
This diff is collapsed.
Click to expand it.
pyglance/glance/gui_model.py
+
2
−
1
View file @
a76a8e2e
...
@@ -13,7 +13,8 @@ from os import path
...
@@ -13,7 +13,8 @@ from os import path
import
glance.data
as
dataobjects
import
glance.data
as
dataobjects
import
glance.io
as
io
import
glance.io
as
io
from
glance.gui_constants
import
*
from
glance.gui_constants
import
*
from
glance.gui_figuremanager
import
COLORMAP_NAMES
LOG
=
logging
.
getLogger
(
__name__
)
LOG
=
logging
.
getLogger
(
__name__
)
...
...
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