Comments (5)
Yep the events could definitely use some documentation!
As to
use coordinates in data space as opposed to pixel space
data_space_point = Makie.project(ax.scene.camera, :pixel, :data, pixel_space_point)
from makie.jl.
that's close, thank you! but, there seems to be a translation problem that needs to be subtracted. if i plot three points as follows, and then put my cursor directly over [1,1] in data space, project
returns (1.18,1.19). similarly, [2,2] returns (2.18,2.20). where is the ~0.2 offset coming from?
julia> using GLMakie
julia> fig,ax,s = scatter([1,2,3])
julia> data_space_point = Makie.project(ax.scene.camera, :pixel, :data, ax.scene.events.mouseposition[])
3-element Point{3, Float32} with indices SOneTo(3):
1.1825435
1.1989319
0.0
julia> data_space_point = Makie.project(ax.scene.camera, :pixel, :data, ax.scene.events.mouseposition[])
3-element Point{3, Float32} with indices SOneTo(3):
2.1808665
2.2028778
0.0
julia> data_space_point = Makie.project(ax.scene.camera, :pixel, :data, ax.scene.events.mouseposition[])
3-element Point{3, Float32} with indices SOneTo(3):
3.184107
3.208738
from makie.jl.
you need to subtract the ax.scene.px_area[].origin
from mouseposition[]
I think
from makie.jl.
that works, thanks! though px_area
has been renamed to viewport
:
┌ Warning: `.px_area` got renamed to `.viewport`, and means the area the scene maps to in device independent units, not pixels. Note, `size(scene) == widths(scene.viewport[])`
└ @ Makie ~/.julia/packages/Makie/VRavR/src/deprecated.jl:9
from makie.jl.
Right, years old habits ;)
from makie.jl.
Related Issues (20)
- Unable to change line colour with `ecdfplot!`
- CairMakie 0.12.2 fails to compile HOT 1
- Bug in Streamplot animation when initialized as 0. HOT 5
- Reproducable output for CairoMakie HOT 1
- Plot ignores wider type of observable and fails during notify in a conversion step
- WGLMakie precompilation warns “waiting for IO to finish”
- Automatic dark mode HOT 4
- WGLMakie scatter overflows axis for large figures
- Sometimes units are not handled HOT 1
- xtick is missing for missing data HOT 4
- Plot methods that don't work with units
- FR: Add ability to change the "reset zoom" binding
- Utilizing weakdeps/extensions HOT 2
- Interact with GLMakie scene from the REPL? HOT 2
- Error when creating sysimage with MakieCore 0.8.2
- `xticks` is ignored with unit aware axes
- Stack overflow for BezierPath marker in data space
- BoundsError in `recordframe!` with WGLMakie
- eye position and lookat incorrectly set HOT 1
- Create line plot with a specific number of markers (like markerindices in matlab)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from makie.jl.