Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ duckdb-extensions
# Sky Object Database
# ignore this because it's large and created on release
sky.db
*.parquet

# Data Folder
data/build/*
Expand Down
34 changes: 17 additions & 17 deletions docs/reference-styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,29 +155,29 @@ After you create a plot instance and start plotting stuff (e.g. stars, DSOs, etc
### Via `style` kwarg {.mt-none}
All plotting functions have an optional `style` kwarg that lets you pass in a dictionary of any styles you want to override for that plotting call. For example, here's how you can plot bright stars with a different marker and color than the plot's style:

```python
p.stars(
where=[_.magnitude < 3],
style={
"marker": {
"symbol": "star",
"color": "red",
}
```python
p.stars(
where=[_.magnitude < 3],
style={
"marker": {
"symbol": "star",
"color": "red",
}
)
```
}
)
```


### Via `style__*` kwargs
When you only want to override one or two style properties, it can be tedious to create a dictionary, so Starplot also lets you specify overrides through keyword arguments that start with `style__` and separate each level by `__`. For example, we could re-write the previous example like this:

```python
p.stars(
where=[_.magnitude < 3],
style__marker__symbol="star",
style__marker__color="red",
)
```
```python
p.stars(
where=[_.magnitude < 3],
style__marker__symbol="star",
style__marker__color="red",
)
```

**When overriding styles like this, you only have to define style properties you want to override.** Other properties will be inherited from the plot's style.

Expand Down
4 changes: 1 addition & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,12 @@ markdown_extensions:
- tables
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- pymdownx.details
- pymdownx.tabbed:
alternate_style: true
alternate_style: true
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mkdocs-glightbox==0.4.0
griffe==1.5.4
ruff==0.0.282
ipython==7.12.0
pygments==2.19.1
pygments==2.19.2
rich==13.9.4
snakeviz==2.2.2
marimo==0.15.2
Expand Down