-
Notifications
You must be signed in to change notification settings - Fork 81
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
Remove unused code #407
Remove unused code #407
Conversation
can |
I don't think that the output of
where
which is are both getters (and not setters) on |
When applying this PR, all tests still pass on Julia 1. Julia 1.0 fails on the compatibility requirements. So, I'd say this refactor is good to go. Is there anything I can do? @bjarthur Are the problems with Cairo also the reason why Gadfly and Compose development seems to be slowed down? I think Gadfly is the best Julia plotting library, so its a bit weird that development slowed down |
@Mattriks @tlnagy thoughts on this PR? i'm not familiar enough with this section of code to know if there are unforseen ramifcations. @rikhuijzer did the Gadfly tests also pass? the actual tests of Compose are quite limited, and we really rely mostly on Gadfly's tests to ensure Compose works. in particular, the regression tests. re. dev slowing down. @Mattriks has been carrying the torch mostly lately. i doubt cairo is an issue. i actually mostly use the SVG backend which is pure julia and no cairo, in part because of the interactivity. i too prefer gadfly over the others (though i love UnicodePlots!). most people like Plots though, though i wonder whether that is simply because the name implies that it's officially endorsed. would be great to have more contributions from you! |
The Gadfly development has only slowed down because I've been busy with other work over the past 4 months (see Gadfly commits). Hoping to get back to it in the new year! |
My assessment is that in feasible = feasible && issatisfied(ctx, w_solution[j], h_solution[i]) That way, feasible || @warn "Graphic may not be drawn correctly at the given size." In Gadfly, I was able to trigger this warning when I made a plot too small: p = plot(x=1:5, y=rand(5), Geom.line)
draw(PNG(4cm, 4cm), p) # works
draw(PNG(3cm, 3cm), p) # warning |
@bjarthur For me, tests for Gadfly.jl and Cairo.jl fail locally because Cairo fails to precompile. This is probably because I'm running NixOS. I still have to find a workaround for this, and am planning to set-up a (Docker) dev container, which I'm not particularly fond of.
Thank you. I must say that PRs like this are helping me in understanding Gadfly/Compose better. Thank you also for pointing me towards the documentation. @Mattriks thanks for looking into it in detail! Now the code makes much more sense. I've made the PR such that it includes the fix as offered by Mattriks. If merging, please do squash because the commits are a mess again 😄 |
I ran the Gadfly tests with this PR and found 8 testscripts which generate the warning, mainly due to the size of the test plots being slightly undersized. Here's one that looks ok to me, but still generates the warning: p5 = evalfile(dirname(pathof(Gadfly))*"/../test/testscripts/scale_alpha_discrete.jl")
draw(PNG(), p5) However the warning does seem to hint at some uncertainty! I also noticed in Jupyter that when I don't include the |
I won't be able to work on this PR today. If you want, you should be able to edit my changes directly (I've set the checkmark in GitHub to allow edits by maintainers.) Alternatively, close this PR and create your own one :) Please don't let me being unavailable today hinder your work 😄 |
@rikhuijzer I read this just by coincidence, could you please file an issue to Cairo.jl on precompilation. |
Correct me if I'm wrong, but I cannot think of any way how these lines of code are actually doing anything :)