heatmaply
heatmaply copied to clipboard
grid_size seems to do nothing
I would like to make the smallest point smaller when using node_type = "scatter"
. As I understood the description in the documentation, grid_size
controls this, however different values for this parameter seem to have no effect.
Large value for grid_size
# Make data
mat1 = matrix(rexp(100), nrow = 10, ncol = 10)
mat2 = matrix(c(rexp(90, rate = 1), rep(0, 10)), nrow = 10, ncol = 10)
heatmaply(
x = mat1,
point_size_mat = mat2,
grid_size = 1e3,
node_type = "scatter",
plot_method = "ggplot"
)
Small value for grid_size
heatmaply(
x = mat1,
point_size_mat = mat2,
grid_size = 1e-3,
node_type = "scatter",
plot_method = "ggplot"
)
Any ideas what I might be doing wrong or is going on?
Only when using a fixed point size, and not when mapping point size to point_size_mat
Got it, thank you.
My use case is in emulating a plot made with ggplot
mapping point size like geom_point(mapping = aes(size = ...
, but the mapping function seems like it may be different than for heatmaply
.
For example, here are four plots using the same data with different point size mappings:
heatmaply(plot_method = "ggplot" ...
:
heatmaply(plot_method = "plotly" ...
:
ggplot
+ geom_point(aes(size = ...
:
ggplot
+ geom_point(aes(size = ...
+ ggplotly
I would like to use plot_method = ggplot
, but the difference in size mapping is greatest between ggplot
+ geom_point(aes(size = ...
and heatmaply(plot_method = "ggplot" ...
.
Do you know if there are any tweaks that can be made to approach it using heatmaply
?
Truthfully no, as far as I can tell the call to ggplot2 should basically be equivalent to ggplot(data) + geom_point([...], size=size_var)
.
If you post reproducible code for the example plots you showed in the last comment, I'll have a look