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

Roadmap #59

Open
8 of 19 tasks
wiheto opened this issue Mar 2, 2023 · 4 comments
Open
8 of 19 tasks

Roadmap #59

wiheto opened this issue Mar 2, 2023 · 4 comments

Comments

@wiheto
Copy link
Owner

wiheto commented Mar 2, 2023

This is a collection of the long term roadmap (will start to use projects if more people contribute to this)

Released in #60

  • Improve svg saving for all templates (ensure all template backgrounds are rasteriszed)
  • More legend freedom (increase sizes) (see ENH: improve figure legend  #57) -> currently on develop branch
  • Link published article in docs
  • Plot from bids
  • Include connectivity matrices (like spring plots) that can be specified in views
  • Experienced some a bug with pybids layout.get_entities() sometimes failing. Need to investigate/create minimal example of to report/find workaround. -> unsure why but was caused but getting unique entities from the main folder and not the derivative folder was causing the error

Bug fixes

Enhancements

  • Better arrows for directions. Consider no arrows but just lines or lines with sphere (see Fix: Fix coord arrows #7)
  • Improve gif plots (see ENH Gif duration as framerate instead of duration #29)
  • Improve continuous colorbar use/flexibility (specify cbar tick range instead of just being extremes).
  • If node_color organizes connectivity matrix, then add color lines to connectivity matrix diagonal

New features

  • Include surface plots - no reasons they can't be included Enhancement: add surface templates #49
  • Allow to shuffle parcel id numbers to improve colorbar distirbution (e.g. sequential)
  • More BIDSoperations

Improved Documentation

  • Add BIDS and CM feature in README/Main page as a major feature.
  • Tutorial: BIDS
  • Gallery example of BIDS
  • Gallery example of legend_span
  • Gallery example, rotated cm
@wiheto
Copy link
Owner Author

wiheto commented Mar 20, 2023

Plot from bids

@deve now has obtaining edges from BIDS derivatives with "average" and "average and subtract" operations and can be grouped by tasks, sessions or a column of data in participants.tsv.

Added onto to do list

@wiheto wiheto changed the title V0.3 Roadmap Roadmap Jun 13, 2023
@hasibagen
Copy link

Is there a way to directly increase the brain size or add related functionalities?

Currently, I'm using the following code:

figpick, ax = netplotbrain.plot(template='MNI152NLin2009cAsym',
                                fig=figpick,
                                view=['LAR'])

# Set figure size
figpick.set_size_inches(20, 8)

# Save as an SVG file
figpick.savefig('/home/jade/app/edu/brain_plot.svg', format='svg', dpi=500)

to increase the image size, but this method also significantly increases the whitespace between the brains.

Is there a more effective way to enlarge the brains without increasing the surrounding whitespace?

@wiheto
Copy link
Owner Author

wiheto commented Sep 5, 2024

The simple answer is: no.
The longer answer is: yes but you have to do it manually and it could distort the figure so do it with care. The ax object is a list of three axis objects. and you can manually scale the xlim, ylim, zlim. ax[0].get_xlim() . Here is a quickly generated code of how you could do that

# Get current limits
current_xlim = ax[0].get_xlim()
current_ylim = ax[0].get_ylim()
current_zlim = ax[0].get_zlim()

# look at xlim to see its range
print(current_xlim)

# Calculate ranges
xlim_range = current_xlim[1] - current_xlim[0]
ylim_range = current_ylim[1] - current_ylim[0]
zlim_range = current_zlim[1] - current_zlim[0]

# Calculate the aspect ratios
xy_aspect_ratio = ylim_range / xlim_range
xz_aspect_ratio = zlim_range / xlim_range

# Change xlim to [-1, 1]
new_xlim = (-1, 1)
new_xlim_range = new_xlim[1] - new_xlim[0]

# Adjust ylim and zlim proportionally based on the aspect ratios
new_ylim_range = new_xlim_range * xy_aspect_ratio
new_ylim = (current_ylim[0], current_ylim[0] + new_ylim_range)

new_zlim_range = new_xlim_range * xz_aspect_ratio
new_zlim = (current_zlim[0], current_zlim[0] + new_zlim_range)

# Set the new limits
ax[0].set_xlim(new_xlim)
ax[0].set_ylim(new_ylim)
ax[0].set_zlim(new_zlim)

@hasibagen
Copy link

The simple answer is: no. The longer answer is: yes but you have to do it manually and it could distort the figure so do it with care. The ax object is a list of three axis objects. and you can manually scale the xlim, ylim, zlim. ax[0].get_xlim() . Here is a quickly generated code of how you could do that

# Get current limits
current_xlim = ax[0].get_xlim()
current_ylim = ax[0].get_ylim()
current_zlim = ax[0].get_zlim()

# look at xlim to see its range
print(current_xlim)

# Calculate ranges
xlim_range = current_xlim[1] - current_xlim[0]
ylim_range = current_ylim[1] - current_ylim[0]
zlim_range = current_zlim[1] - current_zlim[0]

# Calculate the aspect ratios
xy_aspect_ratio = ylim_range / xlim_range
xz_aspect_ratio = zlim_range / xlim_range

# Change xlim to [-1, 1]
new_xlim = (-1, 1)
new_xlim_range = new_xlim[1] - new_xlim[0]

# Adjust ylim and zlim proportionally based on the aspect ratios
new_ylim_range = new_xlim_range * xy_aspect_ratio
new_ylim = (current_ylim[0], current_ylim[0] + new_ylim_range)

new_zlim_range = new_xlim_range * xz_aspect_ratio
new_zlim = (current_zlim[0], current_zlim[0] + new_zlim_range)

# Set the new limits
ax[0].set_xlim(new_xlim)
ax[0].set_ylim(new_ylim)
ax[0].set_zlim(new_zlim)

I will give this a try, thanks for your work.

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

No branches or pull requests

2 participants