-
Notifications
You must be signed in to change notification settings - Fork 32
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
#237 - Clean up plot_recipes #1400
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 💯
I have two general comments to do as follow-up:
- Add a way to easily change the defaults (idea: have a mutable wrapper type for the plotting defaults). This use cases arises often eg. if i want to define the aspectratio (unfortunately passing
aspectratio = :auto
is broken but that is another issue). - Now that it is easy to choose between plotting using directions or refinement, "relax" the condition in
plot_list
by letting the user decide which method to use. This allows to plot more sets, too (such as the lazy linear map of an intersection, which cannot be plotted ATM) -- this can also be fixed if we use support function instead of support vector in the iterative refinement algorithm, but still, offering both approaches for plotting seems natural.
Changes requested to handle the plots of bounded polyhedra (see comment below).
Sorry, I added the changes to the old commit, but they got a bit tangled with a rebase with |
a34e8fc
to
4976871
Compare
Wow, building time of the docs increased from <17 minutes to 28 minutes here. What is so different? I even reduced the total number of methods here... |
I finally understood now what is going on with the plotting. The part that got terribly slow was the zonotope algorithm in the manual. There we plotted 100 resp. 200 sets, which normally is not too much, but here these sets are lazy and every set is the previous set inside another nesting level. I was actually surprised that this even worked. 100 sets take 30 seconds in In this branch I had introduced helper functions that are called from the loop for individual handling of each set in the list. Julia tries to be smart and compiles a new version for every new set (recall that we build nested lazy sets in that zonotope code, so each set is different type-wise) and this costs a lot (0.05 seconds every time, but this sums up). In Conclusion: I finally added the hardcoded version as an option (deactivated by default because I like the individual plot recipes more and in our |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the summary.
See #237.
Most important changes:
Intersection
s.