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

"Global" legend with multiple slice series in "row" layout? #15

Open
gdevenyi opened this issue Jun 12, 2020 · 0 comments
Open

"Global" legend with multiple slice series in "row" layout? #15

gdevenyi opened this issue Jun 12, 2020 · 0 comments

Comments

@gdevenyi
Copy link

From the wonderful MRIcrotome examples I can generate this vertical multi-slice series image:

sliceSeries(nrow = 5, ncol= 1, begin = 25 + 20, end = 298 - 10, dimension = 2) %>%  #slice sequence to display stats
  anatomy(anatVol, low=1, high=5.9) %>%
  overlay(mincArray(model, predictor),     # specify which column of the mincLM model
    low=round(thresholds["0.05",predictor],digits=2), high=round(thresholds["0.01",predictor],digits=2), symmetric = T, alpha=0.6) %>%       # t score range; symmetric = T means show positive and negative t values
  sliceSeries(nrow = 5, ncol= 1, begin = 24 + 15, end = 246 - 10, dimension = 1) %>%  #slice sequence to display stats
  anatomy(anatVol, low=1, high=5.9) %>%
  overlay(mincArray(model, predictor),     # specify which column of the mincLM model
    low=round(thresholds["0.05",predictor],digits=2), high=round(thresholds["0.01",predictor],digits=2), symmetric = T, alpha=0.6) %>%       # t score range; symmetric = T means show positive and negative t values
  sliceSeries(nrow = 5, ncol= 1, begin = 32 + 30, end = 252 - 20, dimension = 3) %>%  #slice sequence to display stats
  anatomy(anatVol, low=1, high=5.9) %>%
  overlay(mincArray(model, predictor),     # specify which column of the mincLM model
    low=round(thresholds["0.05",predictor],digits=2), high=round(thresholds["0.01",predictor],digits=2), symmetric = T, alpha=0.6) %>%   
  legend(predictor) %>%
  draw()

image

However if I switch to "row" layout, swapping row and column count and forcing row with layout="row"

sliceSeries(nrow = 1, ncol= 5, begin = 25 + 20, end = 298 - 10, dimension = 2) %>%  #slice sequence to display stats
  anatomy(anatVol, low=1, high=5.9) %>%
  overlay(mincArray(model, predictor),     # specify which column of the mincLM model
    low=round(thresholds["0.05",predictor],digits=2), high=round(thresholds["0.01",predictor],digits=2), symmetric = T, alpha=0.6) %>%       # t score range; symmetric = T means show positive and negative t values
  sliceSeries(nrow = 1, ncol= 5, begin = 24 + 15, end = 246 - 10, dimension = 1) %>%  #slice sequence to display stats
  anatomy(anatVol, low=1, high=5.9) %>%
  overlay(mincArray(model, predictor),     # specify which column of the mincLM model
    low=round(thresholds["0.05",predictor],digits=2), high=round(thresholds["0.01",predictor],digits=2), symmetric = T, alpha=0.6) %>%       # t score range; symmetric = T means show positive and negative t values
  sliceSeries(nrow = 1, ncol= 5, begin = 32 + 30, end = 252 - 20, dimension = 3) %>%  #slice sequence to display stats
  anatomy(anatVol, low=1, high=5.9) %>%
  overlay(mincArray(model, predictor),     # specify which column of the mincLM model
    low=round(thresholds["0.05",predictor],digits=2), high=round(thresholds["0.01",predictor],digits=2), symmetric = T, alpha=0.6) %>%   
  legend(predictor) %>%
  draw(layout = "row")

I get a colourbar on just the last sliceseries:
image

Is it possible to get a global colourbar from this?

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

1 participant