nipy / PySurfer

Cortical neuroimaging visualization in Python
https://pysurfer.github.io/
BSD 3-Clause "New" or "Revised" License
240 stars 97 forks source link

ENH: Time-label consistency over time #131

Closed christianbrodbeck closed 9 years ago

christianbrodbeck commented 9 years ago

Mayavi's default bahavior is to change the text size when the number of characters changes, which looks strange in a movie (see before). This PR tries to fix this tentatively by using a constant font size and right-aligning the label (see after). I don't know how much of this should be exposed in Brain.add_data(), maybe at least the font size?

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.07%) to 72.56% when pulling a2fe975f05b664f6f0f946df256f09d32dd7f326 on christianbrodbeck:timelabel into b8b8c1017e85ab3d69259d1495c3db0316aab582 on nipy:master.

larsoner commented 9 years ago

This will break backward compatibility a bit, since it will change how the labels get plotted. I think I'm okay with it in this case, though. @agramfort WDYT?

christianbrodbeck commented 9 years ago

Yes I was considering exposing the old default as an argument, but since the old default had this strange effect whenever the number of digits changed maybe something more useful can be exposed...

agramfort commented 9 years ago

it's more a bug fix so I am fine with it. You use more these features than me anyway :)

christianbrodbeck commented 9 years ago

Ok, I exposed the font size for the label. Do you want more options?

larsoner commented 9 years ago

Looks good, we can add more later if we need them

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.07%) to 72.56% when pulling 188c833caf0cd1b71eafa975469b4931e88bdd56 on christianbrodbeck:timelabel into b8b8c1017e85ab3d69259d1495c3db0316aab582 on nipy:master.

larsoner commented 9 years ago

Thanks again @christianbrodbeck