-
Notifications
You must be signed in to change notification settings - Fork 25
Conversation
- Rename file - change names of ac,as,am attributes to colors, markers, sizes - nest poly plot and test for markers to use it
@fbanning can you explain to me something which I don't get from the recipe system... There is both a function The other thing I don't understand is where is |
The similar names While
That's just the way Makie recipes work: They have two parts. You need to define both a |
Even though the above comment was already pretty long (it's really hard to explain these things without going into too much detail), let me add another thought on the first topic: It's possible that the overlapping and maybe somewhat confusing naming can be fixed. All while making our code base smaller and providing a better user experience. Too good to be true? Maybe. In its current state, If this is indeed possible, then some massive simplification of our code would follow. We could remove ABMStepper, its specific stepping functions as well as the need for Then the usage would look as follows: #formerly abm_plot
abmplot(model)
#formerly abm_play
abmplot(model; enable_controls = true)
#formerly abm_data_exploration
abmplot(model; enable_data_exploration = true) Such a user experience would be highly desirable to me. It gives the user one single function to work with and allows custom usage via the keywords. I want to try out this approach right after I've finished this PR but so far I didn't find the time or muse to try it out. But let's do this step by step. Let's first finish this PR. Then I'll work on the next step to (hopefully) simplify our plotting a bit more. |
Thanks for the detailed reply, I understand what is going on now. Notice that the necessity of EDIT: But, given the recipe system, we can merge the structs EDIT 2: But, we should be careful: if this is indeed possible, we should only do it if it increases code clarity. The important point is not to minimize lines of source code, but to maximize how easy it is to understand the code. Sometimes the extra lines help with that. |
Wait, I'm a bit lost now. The refactoring into recipes shouldn't really care about what kind of space we have right? That's exactly why I wrote the function EDIT: I stand corrected. The plot recipe dispaches on the position type not the space. But, same argument: the position type from open street map space is also Point2f0, so it shouldn't care? |
I guess you're right. Will merge the two methods. We will definitely need a new method for |
I think so, yes.
Yes, that's the status quo. My hope is that we can eliminate the need for a separate ABMStepper struct completely. This should be possible if we define all the necessary ABMStepper variables as attributes inside the recipe via
Absolutely agree with this but in addition I want to emphasise the importance of a good user experience. Let's see how this turns out once I start working on it. But first let's finish this PR. |
- Merge plotting.jl and abmplot_recipe.jl - Remove need for abm_init_plot! function - Directly call abmplot! instead - Add remaining keywords to recipe Attributes
Yes,
That seems like a great approach. Lifting everything from a model observable, including the position and all other stuff. Do you think you can do this in this PR? I'd suggest to do this in the Regarding user experience: I think your suggestion is anyways simpler for a user. It also gives them the possibiolity of passing a new model instance instead of having to recreate a plot from scratch. Also, it simplifies a lot our "reset" button functionality. |
…mics.jl into recipe-refactor
OK, everything seems to work now. I'm locally building the docs to double check that everything looks good. |
All fine. Tag, merge, party. |
I haven't had the time to keep track of much here or in Agents for a while now... Looking forward to playing with the new plotting once it's out |
model.space
/src/agents/
to better reflect what they're doing and keep them more functionally separate from each otherOpenStreetMapSpace
into recipe system withosmplot
asstatic_preplot!
and agents asscatter!
plotABMStepper
struct and functionality and move all of it into Attributes ofABMPlot
recipeabm_plot
,abm_play
, andabm_data_exploration
intoABMPlot
recipeabm_plot
abm_play
abm_data_exploration
abm_video
convenience function to work withABMPlot
recipeAddinspectable::Bool
Attribute to recipe which controls if agent inspection on mouse hover should be enabled or notabm_data_exploration
OSMMakie
and subsequently onGraphMakie
which in turn waits for the release of Makie 0.16.4 that fixes one of their bugs. Need to be a bit patient.)