2017-04-26 91 views
1

我的目标是将页面划分为四个象限,每个象限都有一组独立的情节。缩放使得模块变得模糊 - 光滑的流水线

我准备好了一个象限。它占据整个窗口时看起来很好。我希望在一个页面上有4个这样的窗格。正如您从屏幕截图(两个上象限)中可以看到的那样,将已经准备好的窗格插入左上象限会导致一些非常模糊的事情。我怎样才能让图表不变得模糊?

enter image description here

我用fluidrow,也许是这不是一个好主意?

ui = fluidPage(

    fluidRow(
    column(6, 

      fluidRow(
      column(8, plotOutput("barChart1", height = 250)) 
      , column(4, plotOutput("compteur1", height = 250)) 
      ) 

      ,fluidRow(
      column(3, 
        dateRangeInput(
         "dateRange2", 
         label = "Choose the window:", 
         start = "2016-09-01" 
        ) 
      ) 
      , column(3, 
         selectInput("security", "Index:", selected = worldindices[1] 
            , list(`World Indices` = worldindices, 
             `Regional Indices` = regionIndices, 
             `Country Indices` = countryIndices) 
        ) 
      ) 
      , column(3, 
         selectInput("metric", "Metric:", selected = plainMetrics[1] 
            , list(plainMetrics 
             , `Valuation Multiples` = valMul 
             , `Fundamentals` = corpFund) 
        ) 
      )  
      ) 
      , plotOutput("chartAggr", height = 250)  


    ) 
    , column(6, style = "background-color:yellow;", div(style = "height:500px;") 
    ) 
) 

) 

亲切的问候

编辑 - 低于以下的答案:

试图给出一个较高的值,在服务器端的res参数renderPlot似乎并没有工作。我给它例如值128,并得到以下结果:该服务器通过在res参数

enter image description here

回答

1

在你renderPlot()函数...它设置为比默认72高像素/英寸。

renderPlot(表达式,宽度= “自动”,高度= “自动”,RES = 72,...,ENV = parent.frame(),引用= FALSE,execOnResize = FALSE,outputArgs =列表())

请注意,您可能需要调整绘图的大小并将滚动条添加到容器以适应较大的高分辨率图像。

## Something like this on the server 
output$barChart1 <- renderPlot(PLOT(), width = 1000, height = 1000, res = 128) 

## Something like this on UI 
div(style = 'overflow-x: scroll', 
        plotOutput("barChart1", inline = TRUE)) 
       ) 
+0

感谢这个答案,我试过了,但结果却是让图形更大的...但它并没有使其不太模糊恐怕:((见上文)。 – hartmut

+0

如果你看一下图片# 2左上方,现在是高分辨率,但是挤入一个小容器,这看起来很混乱,但不太模糊。现在你可以在renderPlot()中使用width和height参数,确保添加一个滚动条用户可以在通过小窗口显示的大图中围绕高分辨率图像移动。 –