Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4072683
allow for plotting using specific table
melonora Feb 18, 2024
ba4faa8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 18, 2024
72bf27d
Change into get with default return
melonora Feb 19, 2024
7d9e83f
fix issues with pp
melonora Feb 19, 2024
cd76a00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
7676c72
ensure instance key coercable to int dtype
melonora Feb 19, 2024
c0ebde3
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 19, 2024
45c13e0
add table keys import
melonora Feb 19, 2024
72eef3d
allow feature branches tests
melonora Feb 19, 2024
3532104
Merge branch 'main' into multi_table
melonora Feb 19, 2024
39b8003
remove table key getters
melonora Feb 20, 2024
3aafa1f
extract into function
melonora Feb 20, 2024
53fa1a7
add docstring
melonora Feb 20, 2024
3843f1a
don't create unnecessary anndata
melonora Feb 20, 2024
58fabd3
allow for label color without specified table
melonora Feb 20, 2024
8f9dc4d
refactor show param validations
melonora Feb 20, 2024
d664956
refactor show param validations
melonora Feb 21, 2024
19ecc0b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 21, 2024
de53fe2
big refactor
melonora Feb 21, 2024
bb3e5d8
remove unused render_params.layer
melonora Feb 21, 2024
f74f730
remove redundant code
melonora Feb 21, 2024
94d37d8
refactor to mapping
melonora Feb 22, 2024
882c2a9
allow later creation of mapping
melonora Feb 22, 2024
a21529d
reimplement color label
melonora Feb 22, 2024
cdaddf0
fix unused arguments
melonora Feb 23, 2024
406fb1b
change points shapes logic
melonora Feb 23, 2024
7e76133
unfixed full implementation
melonora Feb 24, 2024
cc9b404
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2024
21c05f1
fix tests
melonora Feb 24, 2024
a13361a
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 24, 2024
258593c
fix tests
melonora Feb 25, 2024
fa279ae
remove duplicate checks
melonora Feb 25, 2024
3082e40
implement nested list groups palette
melonora Feb 26, 2024
47483e6
fix tests
melonora Feb 26, 2024
33e1857
fix or mistake
melonora Feb 26, 2024
59d6590
add dummy test
melonora Feb 26, 2024
40e7130
Change to warning
melonora Feb 28, 2024
caf23df
partial fix mypy
melonora Feb 28, 2024
ecc7797
add function type hints
melonora Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ on:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [main]
branches: "*"

jobs:
test:
Expand Down
687 changes: 215 additions & 472 deletions src/spatialdata_plot/pl/basic.py

Large diffs are not rendered by default.

164 changes: 71 additions & 93 deletions src/spatialdata_plot/pl/render.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/spatialdata_plot/pl/render_params.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,12 +75,12 @@ class ShapesRenderParams:
col_for_color: str | None = None
groups: str | Sequence[str] | None = None
contour_px: int | None = None
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.3
scale: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -96,6 +96,7 @@ class PointsRenderParams:
alpha: float = 1.0
size: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -121,9 +122,9 @@ class LabelsRenderParams:
groups: str | Sequence[str] | None = None
contour_px: int | None = None
outline: bool = False
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.4
transfunc: Callable[[float], float] | None = None
scale: str | list[str] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
allow for plotting using specific table by melonora · Pull Request #217 · scverse/spatialdata-plot · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4072683
allow for plotting using specific table
melonora Feb 18, 2024
ba4faa8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 18, 2024
72bf27d
Change into get with default return
melonora Feb 19, 2024
7d9e83f
fix issues with pp
melonora Feb 19, 2024
cd76a00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
7676c72
ensure instance key coercable to int dtype
melonora Feb 19, 2024
c0ebde3
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 19, 2024
45c13e0
add table keys import
melonora Feb 19, 2024
72eef3d
allow feature branches tests
melonora Feb 19, 2024
3532104
Merge branch 'main' into multi_table
melonora Feb 19, 2024
39b8003
remove table key getters
melonora Feb 20, 2024
3aafa1f
extract into function
melonora Feb 20, 2024
53fa1a7
add docstring
melonora Feb 20, 2024
3843f1a
don't create unnecessary anndata
melonora Feb 20, 2024
58fabd3
allow for label color without specified table
melonora Feb 20, 2024
8f9dc4d
refactor show param validations
melonora Feb 20, 2024
d664956
refactor show param validations
melonora Feb 21, 2024
19ecc0b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 21, 2024
de53fe2
big refactor
melonora Feb 21, 2024
bb3e5d8
remove unused render_params.layer
melonora Feb 21, 2024
f74f730
remove redundant code
melonora Feb 21, 2024
94d37d8
refactor to mapping
melonora Feb 22, 2024
882c2a9
allow later creation of mapping
melonora Feb 22, 2024
a21529d
reimplement color label
melonora Feb 22, 2024
cdaddf0
fix unused arguments
melonora Feb 23, 2024
406fb1b
change points shapes logic
melonora Feb 23, 2024
7e76133
unfixed full implementation
melonora Feb 24, 2024
cc9b404
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2024
21c05f1
fix tests
melonora Feb 24, 2024
a13361a
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 24, 2024
258593c
fix tests
melonora Feb 25, 2024
fa279ae
remove duplicate checks
melonora Feb 25, 2024
3082e40
implement nested list groups palette
melonora Feb 26, 2024
47483e6
fix tests
melonora Feb 26, 2024
33e1857
fix or mistake
melonora Feb 26, 2024
59d6590
add dummy test
melonora Feb 26, 2024
40e7130
Change to warning
melonora Feb 28, 2024
caf23df
partial fix mypy
melonora Feb 28, 2024
ecc7797
add function type hints
melonora Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ on:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [main]
branches: "*"

jobs:
test:
Expand Down
687 changes: 215 additions & 472 deletions src/spatialdata_plot/pl/basic.py

Large diffs are not rendered by default.

164 changes: 71 additions & 93 deletions src/spatialdata_plot/pl/render.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/spatialdata_plot/pl/render_params.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,12 +75,12 @@ class ShapesRenderParams:
col_for_color: str | None = None
groups: str | Sequence[str] | None = None
contour_px: int | None = None
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.3
scale: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -96,6 +96,7 @@ class PointsRenderParams:
alpha: float = 1.0
size: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -121,9 +122,9 @@ class LabelsRenderParams:
groups: str | Sequence[str] | None = None
contour_px: int | None = None
outline: bool = False
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.4
transfunc: Callable[[float], float] | None = None
scale: str | list[str] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' allow for plotting using specific table by melonora · Pull Request #217 · scverse/spatialdata-plot · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4072683
allow for plotting using specific table
melonora Feb 18, 2024
ba4faa8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 18, 2024
72bf27d
Change into get with default return
melonora Feb 19, 2024
7d9e83f
fix issues with pp
melonora Feb 19, 2024
cd76a00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
7676c72
ensure instance key coercable to int dtype
melonora Feb 19, 2024
c0ebde3
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 19, 2024
45c13e0
add table keys import
melonora Feb 19, 2024
72eef3d
allow feature branches tests
melonora Feb 19, 2024
3532104
Merge branch 'main' into multi_table
melonora Feb 19, 2024
39b8003
remove table key getters
melonora Feb 20, 2024
3aafa1f
extract into function
melonora Feb 20, 2024
53fa1a7
add docstring
melonora Feb 20, 2024
3843f1a
don't create unnecessary anndata
melonora Feb 20, 2024
58fabd3
allow for label color without specified table
melonora Feb 20, 2024
8f9dc4d
refactor show param validations
melonora Feb 20, 2024
d664956
refactor show param validations
melonora Feb 21, 2024
19ecc0b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 21, 2024
de53fe2
big refactor
melonora Feb 21, 2024
bb3e5d8
remove unused render_params.layer
melonora Feb 21, 2024
f74f730
remove redundant code
melonora Feb 21, 2024
94d37d8
refactor to mapping
melonora Feb 22, 2024
882c2a9
allow later creation of mapping
melonora Feb 22, 2024
a21529d
reimplement color label
melonora Feb 22, 2024
cdaddf0
fix unused arguments
melonora Feb 23, 2024
406fb1b
change points shapes logic
melonora Feb 23, 2024
7e76133
unfixed full implementation
melonora Feb 24, 2024
cc9b404
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2024
21c05f1
fix tests
melonora Feb 24, 2024
a13361a
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 24, 2024
258593c
fix tests
melonora Feb 25, 2024
fa279ae
remove duplicate checks
melonora Feb 25, 2024
3082e40
implement nested list groups palette
melonora Feb 26, 2024
47483e6
fix tests
melonora Feb 26, 2024
33e1857
fix or mistake
melonora Feb 26, 2024
59d6590
add dummy test
melonora Feb 26, 2024
40e7130
Change to warning
melonora Feb 28, 2024
caf23df
partial fix mypy
melonora Feb 28, 2024
ecc7797
add function type hints
melonora Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ on:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [main]
branches: "*"

jobs:
test:
Expand Down
687 changes: 215 additions & 472 deletions src/spatialdata_plot/pl/basic.py

Large diffs are not rendered by default.

164 changes: 71 additions & 93 deletions src/spatialdata_plot/pl/render.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/spatialdata_plot/pl/render_params.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,12 +75,12 @@ class ShapesRenderParams:
col_for_color: str | None = None
groups: str | Sequence[str] | None = None
contour_px: int | None = None
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.3
scale: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -96,6 +96,7 @@ class PointsRenderParams:
alpha: float = 1.0
size: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -121,9 +122,9 @@ class LabelsRenderParams:
groups: str | Sequence[str] | None = None
contour_px: int | None = None
outline: bool = False
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.4
transfunc: Callable[[float], float] | None = None
scale: str | list[str] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' allow for plotting using specific table by melonora · Pull Request #217 · scverse/spatialdata-plot · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4072683
allow for plotting using specific table
melonora Feb 18, 2024
ba4faa8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 18, 2024
72bf27d
Change into get with default return
melonora Feb 19, 2024
7d9e83f
fix issues with pp
melonora Feb 19, 2024
cd76a00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
7676c72
ensure instance key coercable to int dtype
melonora Feb 19, 2024
c0ebde3
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 19, 2024
45c13e0
add table keys import
melonora Feb 19, 2024
72eef3d
allow feature branches tests
melonora Feb 19, 2024
3532104
Merge branch 'main' into multi_table
melonora Feb 19, 2024
39b8003
remove table key getters
melonora Feb 20, 2024
3aafa1f
extract into function
melonora Feb 20, 2024
53fa1a7
add docstring
melonora Feb 20, 2024
3843f1a
don't create unnecessary anndata
melonora Feb 20, 2024
58fabd3
allow for label color without specified table
melonora Feb 20, 2024
8f9dc4d
refactor show param validations
melonora Feb 20, 2024
d664956
refactor show param validations
melonora Feb 21, 2024
19ecc0b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 21, 2024
de53fe2
big refactor
melonora Feb 21, 2024
bb3e5d8
remove unused render_params.layer
melonora Feb 21, 2024
f74f730
remove redundant code
melonora Feb 21, 2024
94d37d8
refactor to mapping
melonora Feb 22, 2024
882c2a9
allow later creation of mapping
melonora Feb 22, 2024
a21529d
reimplement color label
melonora Feb 22, 2024
cdaddf0
fix unused arguments
melonora Feb 23, 2024
406fb1b
change points shapes logic
melonora Feb 23, 2024
7e76133
unfixed full implementation
melonora Feb 24, 2024
cc9b404
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2024
21c05f1
fix tests
melonora Feb 24, 2024
a13361a
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 24, 2024
258593c
fix tests
melonora Feb 25, 2024
fa279ae
remove duplicate checks
melonora Feb 25, 2024
3082e40
implement nested list groups palette
melonora Feb 26, 2024
47483e6
fix tests
melonora Feb 26, 2024
33e1857
fix or mistake
melonora Feb 26, 2024
59d6590
add dummy test
melonora Feb 26, 2024
40e7130
Change to warning
melonora Feb 28, 2024
caf23df
partial fix mypy
melonora Feb 28, 2024
ecc7797
add function type hints
melonora Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ on:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [main]
branches: "*"

jobs:
test:
Expand Down
687 changes: 215 additions & 472 deletions src/spatialdata_plot/pl/basic.py

Large diffs are not rendered by default.

164 changes: 71 additions & 93 deletions src/spatialdata_plot/pl/render.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/spatialdata_plot/pl/render_params.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,12 +75,12 @@ class ShapesRenderParams:
col_for_color: str | None = None
groups: str | Sequence[str] | None = None
contour_px: int | None = None
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.3
scale: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -96,6 +96,7 @@ class PointsRenderParams:
alpha: float = 1.0
size: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -121,9 +122,9 @@ class LabelsRenderParams:
groups: str | Sequence[str] | None = None
contour_px: int | None = None
outline: bool = False
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.4
transfunc: Callable[[float], float] | None = None
scale: str | list[str] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' allow for plotting using specific table by melonora · Pull Request #217 · scverse/spatialdata-plot · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4072683
allow for plotting using specific table
melonora Feb 18, 2024
ba4faa8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 18, 2024
72bf27d
Change into get with default return
melonora Feb 19, 2024
7d9e83f
fix issues with pp
melonora Feb 19, 2024
cd76a00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
7676c72
ensure instance key coercable to int dtype
melonora Feb 19, 2024
c0ebde3
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 19, 2024
45c13e0
add table keys import
melonora Feb 19, 2024
72eef3d
allow feature branches tests
melonora Feb 19, 2024
3532104
Merge branch 'main' into multi_table
melonora Feb 19, 2024
39b8003
remove table key getters
melonora Feb 20, 2024
3aafa1f
extract into function
melonora Feb 20, 2024
53fa1a7
add docstring
melonora Feb 20, 2024
3843f1a
don't create unnecessary anndata
melonora Feb 20, 2024
58fabd3
allow for label color without specified table
melonora Feb 20, 2024
8f9dc4d
refactor show param validations
melonora Feb 20, 2024
d664956
refactor show param validations
melonora Feb 21, 2024
19ecc0b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 21, 2024
de53fe2
big refactor
melonora Feb 21, 2024
bb3e5d8
remove unused render_params.layer
melonora Feb 21, 2024
f74f730
remove redundant code
melonora Feb 21, 2024
94d37d8
refactor to mapping
melonora Feb 22, 2024
882c2a9
allow later creation of mapping
melonora Feb 22, 2024
a21529d
reimplement color label
melonora Feb 22, 2024
cdaddf0
fix unused arguments
melonora Feb 23, 2024
406fb1b
change points shapes logic
melonora Feb 23, 2024
7e76133
unfixed full implementation
melonora Feb 24, 2024
cc9b404
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2024
21c05f1
fix tests
melonora Feb 24, 2024
a13361a
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 24, 2024
258593c
fix tests
melonora Feb 25, 2024
fa279ae
remove duplicate checks
melonora Feb 25, 2024
3082e40
implement nested list groups palette
melonora Feb 26, 2024
47483e6
fix tests
melonora Feb 26, 2024
33e1857
fix or mistake
melonora Feb 26, 2024
59d6590
add dummy test
melonora Feb 26, 2024
40e7130
Change to warning
melonora Feb 28, 2024
caf23df
partial fix mypy
melonora Feb 28, 2024
ecc7797
add function type hints
melonora Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ on:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [main]
branches: "*"

jobs:
test:
Expand Down
687 changes: 215 additions & 472 deletions src/spatialdata_plot/pl/basic.py

Large diffs are not rendered by default.

164 changes: 71 additions & 93 deletions src/spatialdata_plot/pl/render.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/spatialdata_plot/pl/render_params.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,12 +75,12 @@ class ShapesRenderParams:
col_for_color: str | None = None
groups: str | Sequence[str] | None = None
contour_px: int | None = None
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.3
scale: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -96,6 +96,7 @@ class PointsRenderParams:
alpha: float = 1.0
size: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -121,9 +122,9 @@ class LabelsRenderParams:
groups: str | Sequence[str] | None = None
contour_px: int | None = None
outline: bool = False
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.4
transfunc: Callable[[float], float] | None = None
scale: str | list[str] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' allow for plotting using specific table by melonora · Pull Request #217 · scverse/spatialdata-plot · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4072683
allow for plotting using specific table
melonora Feb 18, 2024
ba4faa8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 18, 2024
72bf27d
Change into get with default return
melonora Feb 19, 2024
7d9e83f
fix issues with pp
melonora Feb 19, 2024
cd76a00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
7676c72
ensure instance key coercable to int dtype
melonora Feb 19, 2024
c0ebde3
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 19, 2024
45c13e0
add table keys import
melonora Feb 19, 2024
72eef3d
allow feature branches tests
melonora Feb 19, 2024
3532104
Merge branch 'main' into multi_table
melonora Feb 19, 2024
39b8003
remove table key getters
melonora Feb 20, 2024
3aafa1f
extract into function
melonora Feb 20, 2024
53fa1a7
add docstring
melonora Feb 20, 2024
3843f1a
don't create unnecessary anndata
melonora Feb 20, 2024
58fabd3
allow for label color without specified table
melonora Feb 20, 2024
8f9dc4d
refactor show param validations
melonora Feb 20, 2024
d664956
refactor show param validations
melonora Feb 21, 2024
19ecc0b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 21, 2024
de53fe2
big refactor
melonora Feb 21, 2024
bb3e5d8
remove unused render_params.layer
melonora Feb 21, 2024
f74f730
remove redundant code
melonora Feb 21, 2024
94d37d8
refactor to mapping
melonora Feb 22, 2024
882c2a9
allow later creation of mapping
melonora Feb 22, 2024
a21529d
reimplement color label
melonora Feb 22, 2024
cdaddf0
fix unused arguments
melonora Feb 23, 2024
406fb1b
change points shapes logic
melonora Feb 23, 2024
7e76133
unfixed full implementation
melonora Feb 24, 2024
cc9b404
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2024
21c05f1
fix tests
melonora Feb 24, 2024
a13361a
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 24, 2024
258593c
fix tests
melonora Feb 25, 2024
fa279ae
remove duplicate checks
melonora Feb 25, 2024
3082e40
implement nested list groups palette
melonora Feb 26, 2024
47483e6
fix tests
melonora Feb 26, 2024
33e1857
fix or mistake
melonora Feb 26, 2024
59d6590
add dummy test
melonora Feb 26, 2024
40e7130
Change to warning
melonora Feb 28, 2024
caf23df
partial fix mypy
melonora Feb 28, 2024
ecc7797
add function type hints
melonora Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ on:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [main]
branches: "*"

jobs:
test:
Expand Down
687 changes: 215 additions & 472 deletions src/spatialdata_plot/pl/basic.py

Large diffs are not rendered by default.

164 changes: 71 additions & 93 deletions src/spatialdata_plot/pl/render.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/spatialdata_plot/pl/render_params.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,12 +75,12 @@ class ShapesRenderParams:
col_for_color: str | None = None
groups: str | Sequence[str] | None = None
contour_px: int | None = None
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.3
scale: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -96,6 +96,7 @@ class PointsRenderParams:
alpha: float = 1.0
size: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -121,9 +122,9 @@ class LabelsRenderParams:
groups: str | Sequence[str] | None = None
contour_px: int | None = None
outline: bool = False
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.4
transfunc: Callable[[float], float] | None = None
scale: str | list[str] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' allow for plotting using specific table by melonora · Pull Request #217 · scverse/spatialdata-plot · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4072683
allow for plotting using specific table
melonora Feb 18, 2024
ba4faa8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 18, 2024
72bf27d
Change into get with default return
melonora Feb 19, 2024
7d9e83f
fix issues with pp
melonora Feb 19, 2024
cd76a00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
7676c72
ensure instance key coercable to int dtype
melonora Feb 19, 2024
c0ebde3
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 19, 2024
45c13e0
add table keys import
melonora Feb 19, 2024
72eef3d
allow feature branches tests
melonora Feb 19, 2024
3532104
Merge branch 'main' into multi_table
melonora Feb 19, 2024
39b8003
remove table key getters
melonora Feb 20, 2024
3aafa1f
extract into function
melonora Feb 20, 2024
53fa1a7
add docstring
melonora Feb 20, 2024
3843f1a
don't create unnecessary anndata
melonora Feb 20, 2024
58fabd3
allow for label color without specified table
melonora Feb 20, 2024
8f9dc4d
refactor show param validations
melonora Feb 20, 2024
d664956
refactor show param validations
melonora Feb 21, 2024
19ecc0b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 21, 2024
de53fe2
big refactor
melonora Feb 21, 2024
bb3e5d8
remove unused render_params.layer
melonora Feb 21, 2024
f74f730
remove redundant code
melonora Feb 21, 2024
94d37d8
refactor to mapping
melonora Feb 22, 2024
882c2a9
allow later creation of mapping
melonora Feb 22, 2024
a21529d
reimplement color label
melonora Feb 22, 2024
cdaddf0
fix unused arguments
melonora Feb 23, 2024
406fb1b
change points shapes logic
melonora Feb 23, 2024
7e76133
unfixed full implementation
melonora Feb 24, 2024
cc9b404
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2024
21c05f1
fix tests
melonora Feb 24, 2024
a13361a
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 24, 2024
258593c
fix tests
melonora Feb 25, 2024
fa279ae
remove duplicate checks
melonora Feb 25, 2024
3082e40
implement nested list groups palette
melonora Feb 26, 2024
47483e6
fix tests
melonora Feb 26, 2024
33e1857
fix or mistake
melonora Feb 26, 2024
59d6590
add dummy test
melonora Feb 26, 2024
40e7130
Change to warning
melonora Feb 28, 2024
caf23df
partial fix mypy
melonora Feb 28, 2024
ecc7797
add function type hints
melonora Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ on:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [main]
branches: "*"

jobs:
test:
Expand Down
687 changes: 215 additions & 472 deletions src/spatialdata_plot/pl/basic.py

Large diffs are not rendered by default.

164 changes: 71 additions & 93 deletions src/spatialdata_plot/pl/render.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/spatialdata_plot/pl/render_params.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,12 +75,12 @@ class ShapesRenderParams:
col_for_color: str | None = None
groups: str | Sequence[str] | None = None
contour_px: int | None = None
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.3
scale: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -96,6 +96,7 @@ class PointsRenderParams:
alpha: float = 1.0
size: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -121,9 +122,9 @@ class LabelsRenderParams:
groups: str | Sequence[str] | None = None
contour_px: int | None = None
outline: bool = False
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.4
transfunc: Callable[[float], float] | None = None
scale: str | list[str] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); allow for plotting using specific table by melonora · Pull Request #217 · scverse/spatialdata-plot · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4072683
allow for plotting using specific table
melonora Feb 18, 2024
ba4faa8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 18, 2024
72bf27d
Change into get with default return
melonora Feb 19, 2024
7d9e83f
fix issues with pp
melonora Feb 19, 2024
cd76a00
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2024
7676c72
ensure instance key coercable to int dtype
melonora Feb 19, 2024
c0ebde3
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 19, 2024
45c13e0
add table keys import
melonora Feb 19, 2024
72eef3d
allow feature branches tests
melonora Feb 19, 2024
3532104
Merge branch 'main' into multi_table
melonora Feb 19, 2024
39b8003
remove table key getters
melonora Feb 20, 2024
3aafa1f
extract into function
melonora Feb 20, 2024
53fa1a7
add docstring
melonora Feb 20, 2024
3843f1a
don't create unnecessary anndata
melonora Feb 20, 2024
58fabd3
allow for label color without specified table
melonora Feb 20, 2024
8f9dc4d
refactor show param validations
melonora Feb 20, 2024
d664956
refactor show param validations
melonora Feb 21, 2024
19ecc0b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 21, 2024
de53fe2
big refactor
melonora Feb 21, 2024
bb3e5d8
remove unused render_params.layer
melonora Feb 21, 2024
f74f730
remove redundant code
melonora Feb 21, 2024
94d37d8
refactor to mapping
melonora Feb 22, 2024
882c2a9
allow later creation of mapping
melonora Feb 22, 2024
a21529d
reimplement color label
melonora Feb 22, 2024
cdaddf0
fix unused arguments
melonora Feb 23, 2024
406fb1b
change points shapes logic
melonora Feb 23, 2024
7e76133
unfixed full implementation
melonora Feb 24, 2024
cc9b404
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 24, 2024
21c05f1
fix tests
melonora Feb 24, 2024
a13361a
Merge branch 'multi_table' of https://github.com/melonora/spatialdata…
melonora Feb 24, 2024
258593c
fix tests
melonora Feb 25, 2024
fa279ae
remove duplicate checks
melonora Feb 25, 2024
3082e40
implement nested list groups palette
melonora Feb 26, 2024
47483e6
fix tests
melonora Feb 26, 2024
33e1857
fix or mistake
melonora Feb 26, 2024
59d6590
add dummy test
melonora Feb 26, 2024
40e7130
Change to warning
melonora Feb 28, 2024
caf23df
partial fix mypy
melonora Feb 28, 2024
ecc7797
add function type hints
melonora Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@ on:
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [main]
branches: "*"

jobs:
test:
Expand Down
687 changes: 215 additions & 472 deletions src/spatialdata_plot/pl/basic.py

Large diffs are not rendered by default.

164 changes: 71 additions & 93 deletions src/spatialdata_plot/pl/render.py

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/spatialdata_plot/pl/render_params.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -75,12 +75,12 @@ class ShapesRenderParams:
col_for_color: str | None = None
groups: str | Sequence[str] | None = None
contour_px: int | None = None
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.3
scale: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -96,6 +96,7 @@ class PointsRenderParams:
alpha: float = 1.0
size: float = 1.0
transfunc: Callable[[float], float] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None


@dataclass
Expand All@@ -121,9 +122,9 @@ class LabelsRenderParams:
groups: str | Sequence[str] | None = None
contour_px: int | None = None
outline: bool = False
layer: str | None = None
palette: ListedColormap | str | None = None
outline_alpha: float = 1.0
fill_alpha: float = 0.4
transfunc: Callable[[float], float] | None = None
scale: str | list[str] | None = None
element_table_mapping: dict[str, set[str] | str] | str | list[str] | None = None
Loading