| color.scale | R Documentation |
For any continuous variable like fiber length, produces a vector that can be used in plotting functions for the col argument. Uses colorRampPalette.
color.scale(fl, cols, min.fl=NULL, max.fl=NULL)
fl |
A numeric vector containing a measurement for each fiber in a fiber list (length, curvature or angle). |
cols |
A character vector for determining the color gradient, in order from small to large values. Alternatively "viridis", "rainbow", "inferno" and "turbo" will supply these preset color gradients. |
min.fl |
A imposed lowest value of fl for the color scale. Can be used to make color legends equivalent across different plots. |
max.fl |
A imposed highest value of fl for the color scale. Can be used to make color legends equivalent across different plots. |
A vector with color values for each fiber
muscle.plot.stl
data(ant.final)
fl<-fiber.lengths(ant.final, res = 0.000673107, df=1)
cols<-color.scale(fl, c("blue", "green"))
muscle.plot.stl(ant.final, res = 0.000673107, cols = cols, mirror.axis = TRUE, df=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.