Description Usage Arguments Value Note Examples
View source: R/brainview_magick.R
This function serves as an easy (but slightly inflexible) way to export a high-quality, tight-layout, horizontal colorbar figure to disk.
1 2 3 4 5 6 7 8 9 10 11 12 13 | vis.export.from.coloredmeshes(
coloredmeshes,
colorbar_legend = NULL,
img_only = TRUE,
horizontal = TRUE,
silent = TRUE,
quality = 1L,
output_img = "fsbrain_arranged.png",
image.plot_extra_options = NULL,
large_legend = TRUE,
view_angles = get.view.angle.names(angle_set = "t4"),
style = "default"
)
|
coloredmeshes |
list of coloredmesh. A coloredmesh is a named list as returned by the 'coloredmesh.from*' functions (like |
colorbar_legend |
character string or NULL, the title for the colorbar. |
img_only |
logical, whether to return only the resulting image |
horizontal |
logical, whether to plot the colorbar horizontally |
silent |
logical, whether to suppress messages |
quality |
integer, an arbitrary quality. This is the resolution per tile before trimming, divided by 1000, in pixels. Example: 1L means 1000x1000 pixels per tile before trimming. Currently supported values: |
output_img |
string, path to the output file. Defaults to "fsbrain_arranged.png" |
image.plot_extra_options |
named list, custom options for fields::image.plot. Overwrites those derived from the quality setting. If in doubt, leave this alone. |
large_legend |
logical, whether to plot extra large legend text, affects the font size of the colorbar_legend and the tick labels. |
view_angles |
list of strings. See |
style |
the rendering style, see |
magick image instance or named list, depending on the value of 'img_only'. If the latter, the list contains the fields 'rev_vl', 'rev_cb', and 'rev_ex', which are the return values of the functions vislayout.from.coloredmeshes
, coloredmesh.plot.colorbar.separate
, and combine.colorbar.with.brainview.image, respectively.
This function also exports the resulting image to disk in PNG format, in the current working directory, named 'fsbrain_merged.png'. Note that your screen resolution has to be high enough to generate the final image.
1 2 3 4 5 6 | ## Not run:
rand_data = rnorm(327684, 5, 1.5);
cm = vis.data.on.fsaverage(morph_data_both=rand_data, rglactions=list('no_vis'=T));
vis.export.from.coloredmeshes(cm, colorbar_legend='Random data');
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.