Skip to content
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

Hboxing plots #170

Closed
mschauer opened this issue Oct 20, 2018 · 7 comments
Closed

Hboxing plots #170

mschauer opened this issue Oct 20, 2018 · 7 comments

Comments

@mschauer
Copy link
Contributor

The following does not work (changing the -42 to 0 or running the code in the repl makes it work more or less).

Displays:
makie1

Should display (up to minor margin errors):
makie2

using Makie
using AbstractPlotting: hbox
using Random
function p()
    Random.seed!(123)
    t =  range(-122277.93103448274, stop=-14798.035304081845, length=29542)
    x = -42 .- randn(length(t))
    global sc1 = Scene(resolution = (2000, 300))
    scatter!(sc1, t, x, color=:black,  markersize=sqrt(length(t)/20))
    global sc2 = Scene(resolution = (2000, 300))

    lines!(sc2, t[1:end-1], diff(x), color=:blue)
    scene = hbox(sc2, sc1)
    display(scene)
end
p()

Looks almost like a version of #132

@SimonDanisch
Copy link
Member

(changing the -42 to 0 or running the code in the repl makes it work more or less

no, executing it multiple times seem to make it work -.-

I need to figure out what could be order dependent/racy here ... I thought that this should be much less the case with observables^^

@mschauer
Copy link
Contributor Author

If you are running this example, also check that if the plot is created, then there is still something wrong with zooming: if zooming the lower figure it zooms towards the mouse pointer, if zooming the upper figure it zooms to a point outside.

@SimonDanisch
Copy link
Member

yeah, I noticed too ;) Must be a wrong mapping of the mouse position in a subwindow

@mschauer
Copy link
Contributor Author

No, I think there is really a connection to the -42, try to vary it while calling the function.

@SimonDanisch
Copy link
Member

hm, but it definitely works without changing it - it probably just makes it less visible when it starts at 0;)

@mschauer
Copy link
Contributor Author

No, really, maybe machine dependent but on fresh repls running with +4 and -42 as constant I get
makie4
makie42

@SimonDanisch
Copy link
Member

fixed on master AbstractPlotting + Makie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants