Currently the network plot for cluster analysis is not completely set up in its function. It's is finally stitched together in the report.
Description
Description
Related Objects
Related Objects
- Mentioned Here
- T27326: autolayout networks in multi task report ugly
Event Timeline
Comment Actions
the function is network() and is already in the report
{r ,eval=T,fig.width=12, fig.height=6,include=FALSE} if (length(relensemble)>2) { netw=network(object, method = "symdiff", edge.col=grDevices::grey.colors, edge.lwd=1, rate=1.05, cols=cols ) plot.new() leg=legend("topright", names(netw$leg.col), lwd = 1, col = netw$leg.col, bg =NA,plot=F,cex=.8) w <- grconvertX(leg$rect$w, to='inches') addy=6+w } else addy=1
{r network, fig.width=addy, fig.height=6,out.width='100%'} if (length(relensemble)>2) { plot(netw, layoutType = "neato", fixedsize=TRUE, # fontsize, # width, # height, shape="ellipse", cex=.8 ) }
Comment Actions
the complication arises to handle the automatic sizing of the plot, which is why in the first chunk it reads out the width without plotting and in the second chunk the figure width is adapted
Comment Actions
Is it not possible to create a plot first on a canvas that contains everything and as a second step add the scaled plot to the report?
Comment Actions
this is more or less what I tried, ugliness is T27326. I think a ggplot solution mentioned there would be better