ggplot

I'm trying to make a basic ggplot to build off of.  I'm trying:

 

library(ggplot2)
df <- c(.param0, .param1)


png(file=#output_file#)
 print(ggplot(df, aes(.param0, .param1)) + geom_point())

 

But I receive the following error:

Error: `data` must be a data frame, or other object coercible by `fortify()`, not a character vector

 

and

 

Error Code: INVALID_R_COMMAND Incident Id: f84e2071-e76c-423f-93c7-2c00bb71e99c Error Message: org.rosuda.REngine.Rserve.RserveException: voidEval failed, request status: error code: 127

 

any advice is welcomed.

1reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Example you have column name: "Finance_Closing_Status" and add this to search bar then in R script you can

    Try this:

    library(ggplot2);
    colnames(df) <- c("Finance_Closing_Status")

    Closing_Status <-df$Finance_Closing_Status[1]

    png(file=#output_file#,width=1800, height=300, res=72);

    p = ggplot() + annotate("text", label = Closing_Status, x = 4.5, y = 170, color = "White", size=20 ,fontface="bold") + theme(axis.title.x=element_blank(),
            axis.text.x=element_blank(),
            axis.ticks.x=element_blank()) + theme(axis.title.y=element_blank(),
            axis.text.y=element_blank(),
            axis.ticks.y=element_blank()) + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank()) + theme(
      panel.background = element_rect(fill = "#26B12C"))

    print(p)

    Like 1
Like Follow
  • Status Answered
  • 9 mths agoLast active
  • 1Replies
  • 30Views
  • 3 Following