R plot_ly绘制内容随窗口大小的变化而变化

时间:2017-04-27 12:56:14

标签: r scale plotly

我在plot_ly中有一个散点图。通常,数据由50行组成。当我绘制并放大时,如果它是完整的窗口大小,我会看到每一行,但是当它是一个较小的窗口大小时,尽管它们的点仍然存在,但是根据窗口大小,许多行会消失。这是小窗口尺寸版本

Here is the smaller window size

一旦我增加窗口大小,我就会看到完整的数据。

enter image description here

这是我的代码;

p_alt <- plot_ly(data=cell_melt, x = cell_melt$value, y = cell_melt$gene_id, orientation = "h", type = "scatter", color = cell_melt$variable, hoverinfo = "text") %>% layout(yaxis = list(categoryorder = "array", categoryarray = rev(top_50$gene_id), margin = top_50$gene_id )) %>% layout(showlegend = F) %>% layout(margin = list(l=50, t=1, b=100))

我的最终目标是无论窗口大小如何都能获得完整的数据图。我需要使用哪些参数来实现它?

1 个答案:

答案 0 :(得分:0)

在搜索解决方案时,我意识到有一个参数+----------+---------+-------+------------+--------+-------------------+ |activityId|contentId|daypart|deviceTypeId|errorMsg| genreId| +----------+---------+-------+------------+--------+-------------------+ | null| null| null| null| null| null| | 4| 0002| 1| 1| null| DR1| | 4| 0004| 1| 2| null|Children (0-12 yrs)| | | 0018| 1| 3| null| Entertainment| 可以使每个数据点的绘制与窗口大小无关。

相关问题