Skip to content
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

Deterministic colours for Plot all #216

Open
pgleeson opened this issue Oct 23, 2020 · 4 comments
Open

Deterministic colours for Plot all #216

pgleeson opened this issue Oct 23, 2020 · 4 comments

Comments

@pgleeson
Copy link
Collaborator

A minor cosmetic thing, but might be good for data presentation. Can the sequence of colors used when plotting multiple graphs be deterministic, i.e. the same sequence of colours are used for each Plot all call? Assuming of course that a timeseries hasn't already been plotted and assigned a color.
That would make plots like this easier to interpret, i.e. matched colors for injected current 1 & membrane potentail 1, etc.
Screenshot 2020-10-23 at 09 56 47

@filippomc
Copy link
Collaborator

I understand that the final goal is to have stimulus and acquisition colors matching, and I don't see a good way to implement it consistently by using the color assign sequence. What about using the sweep number to match the color instead (If present)?

@pgleeson
Copy link
Collaborator Author

pgleeson commented Nov 3, 2020

I guess one way is to have the traces ordered alphabetically (by label), and then have a fixed colour list for the traces, applied in order. Then they would automatically match if the only difference in the names of the traces in each is 01, 02, etc.

filippomc added a commit that referenced this issue Nov 3, 2020
@filippomc
Copy link
Collaborator

I don't know how to scale this on different searches.. and can't really rely on the name because every file can have its conventions. I feel more comfortable in using the sweep number if that fits your needs

@pgleeson
Copy link
Collaborator Author

pgleeson commented Nov 4, 2020

Sure, use the sweep number, that should align between current/voltage for most data of this type. The sweep number is not required though? Maybe then fall back to the label?

What I'm assuming is: 1) try to order traces based on sweep number 2) if no sweep number order based on name 3) only once the order is decided are colours handed out...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants