nipy / PySurfer

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

Issues with new sphinx-gallery examples #199

Closed mwaskom closed 6 years ago

mwaskom commented 7 years ago

I just noticed to issues with the new example gallery:

mwaskom commented 7 years ago

Also previously the examples were loosely ordered alphabetically to go in a loosely ascending order of complexity/how common the task is, which is no longer the case.

larsoner commented 7 years ago

I won't have time to look at this anytime soon. Feel free to roll back to the old version if need be

larsoner commented 7 years ago

Actually I have a bit of time now...

Also previously the examples were loosely ordered alphabetically to go in a loosely ascending order of complexity/how common the task is, which is no longer the case.

Two options for this one:

  1. Change titles instead of filenames to go roughly in order
  2. Create subdirectories with themes ("basic", "meg", etc.), each with a README.rst like here

Examples that produce a multi-panel figure no longer show the multi-panel image that gets saved; now they show four separate images and only one becomes the thumbnail.

This one can't be easily fixed unfortunately. :( One way to fix it would be to 1) take a screenshot of the PySurfer window, 2) plot it using matplotlib, and 3) tell SG to use this instead of the first image, but it's a bit of a hack.

We have a few examples that don't produce an image

I actually don't mind this too much. It's nice to have them listed on the page, even if it's with a default thumbnail. Alternatively, we can make them produce some image.

larsoner commented 7 years ago

Also previously the examples were loosely ordered alphabetically to go in a loosely ascending order of complexity/how common the task is, which is no longer the case.

So it turns out SG by default orders examples by the number of code lines, so it should still in some sense be ordered by complexity. But there is a PR in the works to allow explicit ordering.

@mwaskom how was the ordering actually defined before? I think it might have been filename-alphabetical, in which case the SG PR mentioned above also adds this option, and we can use it until someone wants to explicitly reorder.

Can we live with the single-image problem, and the no-image-produced problem (I don't actually think it's a problem...?) and close this once the ordering problem is solved?

mwaskom commented 7 years ago

@mwaskom how was the ordering actually defined before? I think it might have been filename-alphabetical, in which case the SG PR mentioned above also adds this option, and we can use it until someone wants to explicitly reorder.

It was alphabetical by filename. But the SG default seems reasonable.

Can we live with the single-image problem, and the no-image-produced problem (I don't actually think it's a problem...?) and close this once the ordering problem is solved?

The single-image problem strikes me as a little weird in that what the example shows isn't actually what the user will see (i.e. it doesn't show of your nice work putting the split brains together). But if it's simply undoable, oh well. I think the small number of examples with no image generated make the gallery look a little blighted, but it should be easy to make those scripts generate an image (I'm actually not sure why they don't?)

larsoner commented 7 years ago

Alphabetical by filename is also doable, let me know if you'd prefer that (old way) to the SG default (number of lines).

I also noticed that the size of thumbnails decreased from ~250x250 to ~112x112, do you want me to bump that back up while I'm in there? I plan to figure out how to set it in SG using CSS.

mwaskom commented 7 years ago

I also noticed that the size of thumbnails decreased from ~250x250 to ~112x112, do you want me to bump that back up while I'm in there? I plan to figure out how to set it in SG using CSS.

Yeah, looking at the doc build from the last PR, the thumbnails are pretty small. I think 250 is a good size.