unfoldtoolbox / UnfoldMakie.jl

Plotting tools for Unfold.jl based on Makie.jl and AlgebraOfGraphics.jl
MIT License
15 stars 7 forks source link

User-unfriendly configuration for butterfly plot #127

Open vladdez opened 7 months ago

vladdez commented 7 months ago

image

the field mapping is really hard to understand

  1. what the difference between sensors, label and labels?
  2. what the difference between pos, position, positions?
  3. how to specify them, actually? I do not understand the syntaxis...
  4. we have no documentation or example on them, but they should be
  5. can i safely change argument names to the same underscore format? or are they used somewhere in this form?
  6. how should I specify x and y labels?
  7. is this hierarchy is really necessary? it is really cumbersome, I would rather get rid of it
behinger commented 7 months ago

1/2 If you have a tuple for e.g. color it just means that the config will check first for a :channel column in your dataframe, next for a :chanels , ext for :trial and then trials - if it cannot fid any of these columns it will show an error, because why are you using butterfly if you don't use that in the first place ;-)

  1. plot_butterfly(...,mapping=(;color=:mycolorcolumn)) - I don't think this hierarchy is unecessary I think it is just a missunderstanding of what we are trying to achieve here
  2. There is documentation, we write Multiple defaults will be cycled until match. - but we could be more specific I totally agree. Do you have a better way to write it? Feel free to edit https://github.com/unfoldtoolbox/UnfoldMakie.jl/blob/40111127c2dbdafb7a798dd05f833486dfbe4204/src/docstringtemplate.jl#L41C1-L41C54
  3. mh, I think you could just add more. I think these were just some I had used in the past, we can modify them easily imho
  4. x/y labels are a property of axis, they are not specifically defined here but are inherited from PlotConfig(:erp) - a user would look into that code anyway. The help should show it
  5. you would easily overwrite this using 3
vladdez commented 7 months ago

cool, I already implemented axis labels with this information Thanks!