代码之家  ›  专栏  ›  技术社区  ›  cogitoergosum

闪亮-在绘图中显示欧元符号

  •  0
  • cogitoergosum  · 技术社区  · 10 年前

    我开发了一个闪亮的应用程序,在y轴标签上显示欧元金额。它不会在打印输出中渲染。我如何解决这个问题?

    以下内容位于 server.R :

    plot(monthRange, euroPerMonth/1000, 
         type="l",
         main="Cost",
         xlab="Months",
         ylab="€ (000)")    
    

    我最近遇到的是 this ; 但是,我不知道如何将其应用于光泽。

    1 回复  |  直到 9 年前
        1
  •  0
  •   Community Mohan Dere    6 年前

    以下最小示例确实正确绘制了欧元符号。

    将代码放入新的 R 文件并调用它 app.R

    server <- function(input, output) {
    output$cost <- renderPlot({
        plot(2, main="Cost", xlab="Months", ylab="€") 
      })
    }
    
    ui <- fluidPage(
        mainPanel(plotOutput("cost"))
    )
    
    shinyApp(ui = ui, server = server)
    

    运行此程序时,我会得到以下带有欧元符号的GUI。 enter image description here

    希望这有帮助。

    推荐文章