-
Notifications
You must be signed in to change notification settings - Fork 0
Update scatter plot to align with the Plotly API #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…th the Plotly API and the line plot from vuecore
… other scripts, and also addx_title and y_title fields on he Pydantic model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just some ideas and questions.
| into the arguments for `plotly.express.scatter`. | ||
| Plotly Express implementation. It translates the validated `ScattereConfig` | ||
| into the arguments for `plotly.express.scatter` and also forwards any | ||
| additional, unvalidated keyword arguments from plotly. The resulting figure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you will add all plotly arguments per default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I added the most important ones, but also enabled passing extra arguments from plotly express. Do you think that would be better to just add all of them?
src/vuecore/plots/basic/scatter.py
Outdated
| * **Jupyter Notebook:** `docs/api_examples/scatter_plot.ipynb` - | ||
| https://vuecore.readthedocs.io/en/latest/api_examples/scatter_plot.html | ||
| * **Python Script:** `docs/api_examples/scatter_plot.py` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to have the link to GitHub?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will add the link for the Python Script on GitHub.
| a scatter plot, from data mapping to styling and layout. It ensures that | ||
| user-provided configurations are type-safe and adhere to the expected structure. | ||
| This model serves as a curated API for the most relevant parameters | ||
| for scatter plots, closely aligned with the `plotly.express.scatter` API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is a one-to-one mapping we could check is in a script with the default function parameters of the plotly function. the inspect module can do that, but there are probably other ways as well to list the parameter.
import inspect
import plotly.express as px
signature = inspect.signature(px.scatter)
This returns a signature object which has the name as keys (signature.parameters)
No description provided.