adamerose / adamerose/PandasGUI
Grapher redesign
- Linguagem predominante
- Python
- Estrelas
- 3.3k
- Forks
- 239
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
Tracking major changes to the Grapher here, will edit this OP as things change.
### How the Grapher works
- There are functions that generate Plotly figures in `pandasgui.jotly`
- The Grapher widget is defined in `pandasgui.grapher` and imports all those Jotly functions
- The Grapher has a list of 'schemas' including an icon, name, and the Jotly function for each type of graph you can make in the Grapher, and has the UI to switch between those and display figures.
- The actual drag-n-drop UI inside the Grapher is a `FuncUi` defined in `pandasgui.widgets.func_ui` and it takes a list of schemas then auto-generates the UI based on the type-hints of the function provided in the schema.
Here's how `FuncUi` maps the Jotly function type hints to PyQt widgets:
- `ColumnName` (which is just a `str`) -> A textbox that you can type in or drop columns onto
- `Literal` -> A combobox dropdown with options for the valid values defined in the type hint
- `bool` -> A checkbox
- `ColumnNameList` (which is `List(str)`) -> A list of multiple text boxes where you can drop column names and add/remove rows.
### Todo
- [X] Added a console to display errors generating plots
- [x] Added a button `Preview Kwargs` to show your args as defined by the UI in a text box as a dict
- [x] Automatically re-render the plot any time the arguments are changed
- [ ] Re-add the old logic like sorting and aggregating for line/bar plots and more args to jotly
- [x] Implement `ColumnNameList` for args that accept a list of column names
- [ ] Heuristics to differentiate categorical and continuous numeric columns. Should add a `color_mode` arg like [this](https://plotly.com/python/discrete-color/#discrete-colors-in-dash), but add a third `auto` option that uses a heuristic.
- [ ] Sync selections made between the Grapher and DataFrameExplorer. JMP does this and it's very cool: https://www.screencast.com/t/yKmLTaFaP9
- [ ] Add argument facet_tab: interactive tabs you can click between
- [ ] Add argument facet_wrap: splits into subplots like facet_row and facet_col but using a single variable and wraps them all into a square grid. This should be easy because plotly already provides facet_col_wrap, I will just make that number auto-calculated to give a grid.
- [ ] Add argument facet_page: like facet_col but each subplot is full size and you can scroll through them. These were partly inspired by JMP. ([page ](https://www.screencast.com/t/PuQHKwZG)/ [wrap](https://www.screencast.com/t/YaITlhzUe))
- [ ] Allow opening Grapher to a specific state. So maybe you could type `x = pandasgui.show_grapher(df, type='scatter', args={ 'x': 'age', 'y': 'fare', 'color':'survived''})` and it will pop open like [this](https://www.screencast.com/t/2qnzQdhnkgS)
- [ ] Make Grapher a dialog instead of a Tab so you can have multiple Graphers open at once for a single DataFrame
- [ ] Add checkbox to disable automatic re-rendering
- [x] Fix the GroupBox title styling
- [x] Automatic title generation
- [x] Default Grapher settings stored in preferences
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.