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
DataInspector callback attributes #2261
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warn when pasting fails Check all characters are allowed before pasting, otherwise abort.
* Loosen type restriction * Define relocatable path for use in `loadshader()` * Use relocatable path instead of `@__DIR__` * Update GLMakie/src/GLMakie.jl Co-authored-by: Fabian Greimel <fabgrei@gmail.com> Co-authored-by: Simon <sdanisch@protonmail.com> Co-authored-by: Fabian Greimel <fabgrei@gmail.com>
* initial attempt of tricontourf * use miniqhull instead * use modified implementation of getting contours * add docs page * colormap example * add colorbar to docs * add visual tests * add compat bounds * use static rng * add option to pass matrix of triangles instead * shift to separate file * add triangulation example * add same example to tests * add news * fix missing contours * type plot function correctly for method errors * add CairoMakie tricontourf override * map(Point2f * factor out shared code between contourf and tricontourf Co-authored-by: Simon <sdanisch@protonmail.com>
* fix changing input types * add test
* Add makie latex string note * Update latex.md * Update latex.md * Fix link * Fix link description * latex Works now...? * Update latex.md * Update latex.md
* Added recipe with docs for hexbin * News entry * remove axis dependent logic * run formatter * always plot poly * clean up logic a bit * switch to polygon scatter * try changing to simpler algorithm * scale hexagons correctly * fix alg * add binsize, not quite right yet * remove nearestneighbors * fix docs * give up and use dict * fix offset * add docs * add airport example * add tests and highclip lowclip * change meaning of bins and cellsize to more intuitive measures * remove unused comments * remove highclip/lowclip for now * add zero threshold docs * tighten limits in example * ensure ints for isodd compat pre julia 1.7 * Update src/stats/hexbin.jl Co-authored-by: Simon <sdanisch@protonmail.com> * remove old comment Co-authored-by: Tabea Wilke <twilke@oflks561.dwd.de> Co-authored-by: twilke <t@w.de> Co-authored-by: Simon <sdanisch@protonmail.com>
* better perf + fix clicks on items * fix menu behaviour * clean up and comment * clean up and reference test * fix tests * don't make background black
ffreyer
added a commit
that referenced
this pull request
Oct 8, 2022
Changes: - add `inspector_hover` attribute to allow replacing `show_data` on a per-plot basis - add `inspector_label` attribute to allows for per-plot labels - add `inspector_clear` attribute to allow for custom cleanup code (e.g. for an indicator visualization) - adjust backends to ignore those attributes for rendering - minor cleanup in `pick_sorted`
12 tasks
SimonDanisch
added a commit
that referenced
this pull request
Oct 12, 2022
* add Tooltip recipe * use Tooltip in DataInspector * cleanup & restore useful indicators * fix typo Co-authored-by: Anshul Singhvi <asinghvi17@simons-rock.edu> * fix tooltip alignment * allow disabling of indicators * cleanup * update news * add docs * add test * adjust tooltip args and fix indicator duplication * fix indicator visibility & improve show_poly * fix docs? * fix error * split news entry [skip ci] * remove reused observables * add align attribute * fix typo * start tooltip invisible * manually merge #2261 (DataInspector callback attributes) Changes: - add `inspector_hover` attribute to allow replacing `show_data` on a per-plot basis - add `inspector_label` attribute to allows for per-plot labels - add `inspector_clear` attribute to allow for custom cleanup code (e.g. for an indicator visualization) - adjust backends to ignore those attributes for rendering - minor cleanup in `pick_sorted` * update docs * update NEWS Co-authored-by: Anshul Singhvi <asinghvi17@simons-rock.edu> Co-authored-by: Simon <sdanisch@protonmail.com>
t-bltg
pushed a commit
to t-bltg/Makie.jl
that referenced
this pull request
Dec 31, 2022
* add Tooltip recipe * use Tooltip in DataInspector * cleanup & restore useful indicators * fix typo Co-authored-by: Anshul Singhvi <asinghvi17@simons-rock.edu> * fix tooltip alignment * allow disabling of indicators * cleanup * update news * add docs * add test * adjust tooltip args and fix indicator duplication * fix indicator visibility & improve show_poly * fix docs? * fix error * split news entry [skip ci] * remove reused observables * add align attribute * fix typo * start tooltip invisible * manually merge MakieOrg#2261 (DataInspector callback attributes) Changes: - add `inspector_hover` attribute to allow replacing `show_data` on a per-plot basis - add `inspector_label` attribute to allows for per-plot labels - add `inspector_clear` attribute to allow for custom cleanup code (e.g. for an indicator visualization) - adjust backends to ignore those attributes for rendering - minor cleanup in `pick_sorted` * update docs * update NEWS Co-authored-by: Anshul Singhvi <asinghvi17@simons-rock.edu> Co-authored-by: Simon <sdanisch@protonmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds a lookup for callback attributes in DataInspector. Specifically:
inspector_label = (plot, index, position) -> label
which should return a string to be displayed when hovering a plot. Depending on the plot typeindex
may also be a pair of indices (heatmap, image) andposition
can be a Point, bounding box (mesh) or pair of points (arrows).inspector_hover = (inspector, plot, index[, source_plot]) -> ...
which takes over the full tooltip setup, i.e. replacesshow_data
inspector_clear = (inspector, plot) -> ...
which triggers when no plot is hovered and can be used for extra cleanupNone of these need to be implemented. They change, replace or extend default behavior.
Closes #1759, #1902. For example:
This is branched off of #2095, so that should be merged first.
Type of change
Checklist