Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qim3d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
QIM
Tools
qim3d
Commits
d0c45ed7
Commit
d0c45ed7
authored
1 year ago
by
s233039
Committed by
fima
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
QIM themed colormap
parent
6a7b6799
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!74
QIM themed colormap
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/assets/screenshots/viz-colormaps-qim.png
+0
-0
0 additions, 0 deletions
docs/assets/screenshots/viz-colormaps-qim.png
docs/viz.md
+1
-0
1 addition, 0 deletions
docs/viz.md
qim3d/viz/colormaps.py
+24
-3
24 additions, 3 deletions
qim3d/viz/colormaps.py
with
25 additions
and
3 deletions
docs/assets/screenshots/viz-colormaps-qim.png
0 → 100644
+
0
−
0
View file @
d0c45ed7
769 B
This diff is collapsed.
Click to expand it.
docs/viz.md
+
1
−
0
View file @
d0c45ed7
...
@@ -17,3 +17,4 @@ The `qim3d` library aims to provide easy ways to explore and get insights from v
...
@@ -17,3 +17,4 @@ The `qim3d` library aims to provide easy ways to explore and get insights from v
options:
options:
members:
members:
-
objects
-
objects
-
qim
This diff is collapsed.
Click to expand it.
qim3d/viz/colormaps.py
+
24
−
3
View file @
d0c45ed7
...
@@ -6,6 +6,7 @@ import colorsys
...
@@ -6,6 +6,7 @@ import colorsys
from
typing
import
Union
,
Tuple
from
typing
import
Union
,
Tuple
import
numpy
as
np
import
numpy
as
np
from
matplotlib.colors
import
LinearSegmentedColormap
from
matplotlib.colors
import
LinearSegmentedColormap
from
matplotlib
import
colormaps
from
qim3d.io.logger
import
log
from
qim3d.io.logger
import
log
...
@@ -104,8 +105,28 @@ def objects(
...
@@ -104,8 +105,28 @@ def objects(
randRGBcolors
[
-
1
]
=
background_color
randRGBcolors
[
-
1
]
=
background_color
# Create colormap
# Create colormap
objects
_cmap
=
LinearSegmentedColormap
.
from_list
(
objects
=
LinearSegmentedColormap
.
from_list
(
"
objects
_cmap
"
,
randRGBcolors
,
N
=
nlabels
"
objects
"
,
randRGBcolors
,
N
=
nlabels
)
)
return
objects_cmap
return
objects
qim
=
LinearSegmentedColormap
.
from_list
(
'
qim
'
,
[(
0.6
,
0.0
,
0.0
),
#990000
(
1.0
,
0.6
,
0.0
),
#ff9900
])
"""
Defines colormap in QIM logo colors. Can be accessed as module attribute or easily by ```cmap =
'
qim
'
```
Example:
```python
import qim3d
display(qim3d.viz.colormaps.qim)
```

"""
colormaps
.
register
(
qim
)
\ No newline at end of file
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