---
output:
html_document:
code_folding: hide
---
```{r block2, message=FALSE, fig.width=fig.1.width, fig.height=fig.1.height, dev='svg'}
library(ggplot2)
library(ggrepel)
inputdata <- INPUTDATAFRAME
plot = ggplot(inputdata, aes(x = x.axis, y = y.axis, size = size.by, label = label.by, fill = fill.by)) +
geom_point(shape=21, alpha=0.5) +
geom_text_repel(size = 4, colour = "black") +
scale_size_area(max_size=15,name = "size.by.legend.name") +
scale_fill_gradientn(colors = c(scale.fill.gradientn.color), name="fill.by.legend.name") +
xlab("x.label") + ylab("y.label") +
theme(axis.title.x=element_text(axis.title.x.theme),axis.title.y=element_text(axis.title.y.theme)
)
yrange = ggplot_build(plot)$layout$panel_scales_y[[1]]$range$range
yper = (yrange[2]-yrange[1])/100
plot = plot + ylim(c(yrange[1]-5*yper,yrange[2]+5*yper))
print(plot)