Is there any way to modify key.arrow thickness and label (i.e. m/s) font size of a vectorplot in rasterVis package R? - rastervis

I am trying to modify key.arrow features of a vectorplot in rasterVis package of R. However, as far as I understand key.arrow has only two args, i.e. label and size. When I change aspX and aspY of a vectorplot, it automatically translates the reference (legend) vector. However, the same translation does not work with lwd.arrows and length features. So, I am curious whether there is any way to link features like lwd and length to key.arrow. Similarly, is there any way to change font size of a label args of key.arrow?
Thanks

Related

How do you change the font of `Plots.text()` in julia?

I am using the Plots.text function from the Plots.jl package to annotate points in my plot. It appears that changing the plot(..., fontfamily="Computer Modern") does note seem to have an effect on these annotations.
Plots.text creates a text object including styling information. It is therefore necessary to change the font directly
Plots.text("abcde", "Arial")
seems to work

How can I make the internal node representation smaller in the plotting function of the partykit/glmertree package in R?

I am working with the glmertree package in R, which is an extension of the partykit package. I am trying to plot a model using the glmertree plotting function, which simply extends the partykit plotting function. I would like to make the circles for the internal nodes smaller in my plot so that they do not all overlap. I have extensively researched the ip_args (inner panel args) option for a party kit plot, but all I have managed to do is change the font size or the font color or what is printed in the internal node- I cannot change the circle size. Can anyone help with this?
Default plot, made with the code
plot(glmr_reasonable)
Using the code:
ip_args=list(abbreviate=FALSE, pval=FALSE, gp=gpar(cex=0.5, col="red", pin=c(0.25, 0.25)))
plot(glmr_reasonable, ip_args=ip_args)
I was able to make the following changes:
New plot
However, I don't want red text and tiny font, I want smaller circles. Does anyone know how to help?
Thanks!
The node_inner() panel function currently determines how large the label for the longest splitting variable name is and chooses the size of the ellipse correspondingly. However, due to a bug (that I just fixed on R-Forge) the gpar settings within the ip_args had not been processed correctly.
If you have one (or a few) variable name(s) that is/are quite long like STABLE_RESIDENCE then all ellipses become larger. (It would just look awkward to make this only larger for some nodes.) To save space you can either abbreviate the text or decrease the font size:
By setting ip_args = list(abbreviate = 10), say, only those variable names that are longer than 10 would get abbreviated automatically, thus making all ellipses smaller.
By decreasing the fontsize throughout the entire plot you will also make the ellipses smaller, e.g., plot(..., gp = gpar(fontsize = 9)).
Decreasing the fontsize just locally in the inner nodes (but not the rest of the tree) will also make the ellipses smaller, e.g., ip_args = list(gp = gpar(fontsize = 9)).
The last point did not work correctly up to now but I have just committed a fix to R-Forge. (To install this you currently have to check out and install by hand because R-Forge's auto-builder currently seems to hang...)

Manipulate Labels in Gadfly Charting Julia

I have a line chart in Gadfly using the label = "string vector" option. My question is how can I manipulate the location and size of the labels printed on the chart? I want to adjust the location of the printed labels upward slightly and increase the font size. How can I do this?
From the Gadfly documentation, I think it should be an option within 'Theme', but I can't seem to figure this out.
http://gadflyjl.org/themes.html
Thank you
As mentioned by #jfish003 there is a named argument in Theme, major_label_font_size which can be set as needed. The font size of minor label can also be set. Note that the argument is of type Measure, a simple example,
julia>plot(x=rand(10), y=rand(10), Theme(major_label_font_size=15pt))

color.plot.phylo in PICANTE, how do you change size (cex) of tips or pass commands to plot.phylo?

I found the color.plot.phylo in the package PICANTE which colors the tips of your tree based on a trait. It's a great function, but I haven't been able to pass other commands to the phylo.plot function, as suggested.
I'm especially interested in changing the size (cex) of the tips and node.label.
Also, is there a way to move the legend?
This function wasn't written in a way that makes it easy to modify those graphical parameters, because certain parameters such as the location of the legend and the size of the text are both hard-coded in the function. If you are somewhat proficient at R you could modify the code of the function to change some of those values. For example, modify the following line in the function:
plot.phylo(phylo, cex = 0.8, tip.color = tip.color, main = main, ...)
to eliminate the cex value and then you should be able to specify different cex values as an argument to the function. You can find help on writing/modifying functions in R elsewhere on this site and in the R documentation.

Chernoff faces extended in R

The aplpack library contains the possibility to plot beautiful Chernoff faces with faces. symbols and TeachingDemos also offer the possibility to plot variations of these faces. But none of them allows to plot more than 15 dimensions (symbols allows two more dimensions for colours, but they are defined in an inconvenient way so that some faces turn out to be completely black, hiding other parts of the face). Is there a way in R (perhaps with another library) to plot more dimensions, e.g. by adding a body with limbs of different lengths or by using colours to visualise some of the dimensions? Maybe I've overseen something and the colours in aplpack can be mapped to variables as well?
The TeachingDemos package also has the ms.face function that works with the my.symbols function to create a scatterplot with the Chernoff Face as the symbol. This gives the original 15 values of the face, plus an x-coordinate and a y-coordinate; with my.symbols you can also specify a color (for the overall face, not individual features) and an overall size based on variables. That gives 19 dimensions, you could also vary the line width and style, but that will probably distort the plot more than help.
With that many dimensions I would probably go more for the star plots (symbols function) with the variables ordered based on a clustering procedure, or use some type of dimension reduction tool (principal components, grand tour, etc.)

Resources