I need some help in understanding how to make ggvis
marks (in this case layer_arcs
) bigger
I've been trying to recreate a sunburst diagram in ggvis
(v0.4.1) in R (v3.2.0, Windows 7) and have managed to create a data.frame "df_example" where each row is an arc mark and appropriate parameters to use to with layer_arc. Below is a sample of the data.frame:
str(df_example)
'data.frame': 47 obs. of 6 variables:
$ innerRadius: num 50 50 50 50 50 50 50 100 100 100 ...
$ outerRadius: num 100 100 100 100 100 100 100 150 150 150 ...
$ stopAngle : num 0.0991 0.2861 0.5329 0.7838 1.0955 ...
$ initAngle : num 0 0.0991 0.2861 0.5329 0.7838 ...
$ x : num 0 0 0 0 0 0 0 0 0 0 ...
$ y : num 0 0 0 0 0 0 0 0 0 0 ...
Now when I plot this using ggvis
with the following code:
df_example %>%
ggvis(x=~x,y=~y) %>%
layer_arcs(innerRadius=~innerRadius,outerRadius=~outerRadius,
startAngle=~initAngle,endAngle=~stopAngle,
stroke:="white",fill.hover:="#AAFFAA") %>%
scale_numeric("x",domain=c(-10,10)) %>%
scale_numeric("y",domain=c(-10,10))
I get an image like this:
I'm unsure how to go about making the marks bigger overall (essentially making the whole visual take up as much as space as possible). I've tried increasing the inner/outer radii and changing the x/y scales but that doesn't change the apparent size of the arc marks. I feel this has something to do with the scales (radii are in pixels for example). Any pointers as to what parameters I'm missing and anything else would be helpful.