{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaPlots/Makie.jl/issues/183","repository_url":"https://api.github.com/repos/JuliaPlots/Makie.jl","labels_url":"https://api.github.com/repos/JuliaPlots/Makie.jl/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/JuliaPlots/Makie.jl/issues/183/comments","events_url":"https://api.github.com/repos/JuliaPlots/Makie.jl/issues/183/events","html_url":"https://github.com/JuliaPlots/Makie.jl/issues/183","id":373081552,"node_id":"MDU6SXNzdWUzNzMwODE1NTI=","number":183,"title":"High level Layouting","user":{"login":"SimonDanisch","id":1010467,"node_id":"MDQ6VXNlcjEwMTA0Njc=","avatar_url":"https://avatars2.githubusercontent.com/u/1010467?v=4","gravatar_id":"","url":"https://api.github.com/users/SimonDanisch","html_url":"https://github.com/SimonDanisch","followers_url":"https://api.github.com/users/SimonDanisch/followers","following_url":"https://api.github.com/users/SimonDanisch/following{/other_user}","gists_url":"https://api.github.com/users/SimonDanisch/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonDanisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonDanisch/subscriptions","organizations_url":"https://api.github.com/users/SimonDanisch/orgs","repos_url":"https://api.github.com/users/SimonDanisch/repos","events_url":"https://api.github.com/users/SimonDanisch/events{/privacy}","received_events_url":"https://api.github.com/users/SimonDanisch/received_events","type":"User","site_admin":false},"labels":[{"id":1100269201,"node_id":"MDU6TGFiZWwxMTAwMjY5MjAx","url":"https://api.github.com/repos/JuliaPlots/Makie.jl/labels/vizcon","name":"vizcon","color":"8eb8db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-23T16:11:04Z","updated_at":"2018-10-25T13:56:00Z","closed_at":null,"author_association":"MEMBER","body":"### Possible Inspirations:\r\n#### matplotlib\r\n\r\n@datseris likes:\r\nhttps://matplotlib.org/api/_as_gen/matplotlib.pyplot.subplot2grid.html\r\nwhich allows:\r\n```Julia\r\nax1 = subplot2grid((2,3), (0,0), colspan = 2, rowspan = 2);\r\nax2 = subplot2grid((2,3), (2, 0))\r\nax3 = subplot2grid((2,3), (1, 2))\r\n```\r\n![figure_1-1](https://user-images.githubusercontent.com/1010467/47373464-35eab400-d6ec-11e8-99d4-45935b444c47.png)\r\n\r\nI'm not a 100% what properties of this are important and considered as nice by @datseris.\r\n\r\n#### Plots.jl\r\nhttp://docs.juliaplots.org/latest/layouts/#advanced-layouts\r\n\r\n```Julia\r\nl = @layout [  a{0.3w} [grid(3,3)\r\n                         b{0.2h} ]]\r\nplot(\r\n    rand(10,11),\r\n    layout = l, legend = false, seriestype = [:bar :scatter :path],\r\n    title = [\"($i)\" for j = 1:1, i=1:11], titleloc = :right, titlefont = font(8)\r\n)\r\n```\r\n![image](https://user-images.githubusercontent.com/1010467/47373683-9bd73b80-d6ec-11e8-9be8-8d29d8bf28ce.png)\r\n\r\nPros:\r\n* pretty concise syntax\r\n* easy to have one command for multiple subplots for each series\r\n* plots can be first created and then put together in a layout, which makes it possible to compose plots from different sources\r\n\r\nCons:\r\n* i've never fully understood in all cases, how data maps to a series/subplot\r\n* it seems really unnecessary to have this as a macro and I literally always need to look up the syntax\r\n\r\n#### vbox/hbox\r\n\r\nI learned to like this one (after an initial disliking by me). It's trivial to remember what it does, and you can compose plots after they got created in a pretty flexible way, especially when we add the ability to define widths for each subscene. I also started estimating sizes of a scene and using that  to layout out the plot.\r\nSo on Makie master this works:\r\n```Julia\r\ns1 = slider(LinRange(0.01, 1, 100), raw = true, camera = campixel!)\r\ns2 = slider(LinRange(-2pi, 2pi, 100), raw = true, camera = campixel!)\r\ndata = lift(s2[end][:value]) do v\r\n    map(LinRange(0, 2pi, 100)) do x\r\n        4f0 .* Point2f0(sin(x) + (sin(x * v) .* 0.1), cos(x) + (cos(x * v) .* 0.1))\r\n    end\r\nend\r\np = scatter(data, markersize = s1[end][:value])\r\nhbox(p, vbox(s1, s2))\r\n```\r\n![slider](https://user-images.githubusercontent.com/1010467/47374515-70ede700-d6ee-11e8-986e-530ad18c2a3f.gif)\r\n\r\n### What we can do in Makie\r\n\r\nWe have roughly 3 ways to layout a graphic in Makie:\r\n\r\n* translate/scale/rotate a plot/scene directly to position it\r\n* create a subscene with a static or dynamic size\r\n* resize and position an existing scene\r\n\r\nI'd say we use these tools to create more high level layouting functions & recipes, and extend the current vbox + hbox based capabilities\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaPlots/Makie.jl/issues/comments/433060941","html_url":"https://github.com/JuliaPlots/Makie.jl/issues/183#issuecomment-433060941","issue_url":"https://api.github.com/repos/JuliaPlots/Makie.jl/issues/183","id":433060941,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzA2MDk0MQ==","user":{"login":"SimonDanisch","id":1010467,"node_id":"MDQ6VXNlcjEwMTA0Njc=","avatar_url":"https://avatars2.githubusercontent.com/u/1010467?v=4","gravatar_id":"","url":"https://api.github.com/users/SimonDanisch","html_url":"https://github.com/SimonDanisch","followers_url":"https://api.github.com/users/SimonDanisch/followers","following_url":"https://api.github.com/users/SimonDanisch/following{/other_user}","gists_url":"https://api.github.com/users/SimonDanisch/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonDanisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonDanisch/subscriptions","organizations_url":"https://api.github.com/users/SimonDanisch/orgs","repos_url":"https://api.github.com/users/SimonDanisch/repos","events_url":"https://api.github.com/users/SimonDanisch/events{/privacy}","received_events_url":"https://api.github.com/users/SimonDanisch/received_events","type":"User","site_admin":false},"created_at":"2018-10-25T13:56:00Z","updated_at":"2018-10-25T13:56:00Z","author_association":"MEMBER","body":"yeah, and the font sizes are messed up^^ needs some fixing here and there!"}}
{"actor":{"display_login":"SimonDanisch"}}