Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6712207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:13:56+00:00 2026-05-26T08:13:56+00:00

After succeeding (with your help) in plotting meteo variables in single (one variable) graphs

  • 0

After succeeding (with your help) in plotting meteo variables in single (one variable) graphs I’m trying to produce a panel with time series of the different variables in my data in a single panel, like the one in ggplot2 webpage example. I have tried to reproduce that example (the last graph at bottom of the page) with my data but without success

My data span for several years but I attach just a month. You can see the output of dput(datos) at http://ubuntuone.com/42j1RqUmNmxUuCppW4gElX

and this is the code I’m trying

datos=read.csv("paterna.dat",sep=";",header=T,na.strings="-99.9")
dm=melt(datos,id="FECHA.H_SOLAR")

datos$PRECIP[is.na(datos$PRECIP)]=0
dm=melt(datos,id="FECHA.H_SOLAR")
qplot(date, value, data = dm, geom = "line", group = variable) +  facet_grid(variable ~ ., scale = "free_y") 
Error: geom_line requires the following missing aesthetics: x
Además: Mensajes de aviso perdidos
1: In min(x) : ningún argumento finito para min; retornando Inf
2: In max(x) : ningun argumento finito para max; retornando -Inf

I try qplot as it appears in the cited example but maybe it’s better to use ggplot and set the aesthetics. Then I could also customize axes.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:13:57+00:00Added an answer on May 26, 2026 at 8:13 am

    the issue is twofold. First of all there’s no date object within the melted data.frame, which gives you the error message. Second, your FECHA.H_SOLAR is a factor which would make hard plotting the dates correctely. So here is my solution:

    datos <- source("http://ubuntuone.com/42j1RqUmNmxUuCppW4gElX")[[1]]
    library(reshape2)
    library(ggplot2)
    
    datos$PRECIP[is.na(datos$PRECIP)] <- 0
    dm <- melt(datos,id="FECHA.H_SOLAR")
    # change FECHA.H_SOLAR to POSIXct so you get your dates right
    dm$Fecha <- as.POSIXct(dm$FECHA.H_SOLAR, "%y/%m/%d %H:%M:%S", tz = "")
    qplot(Fecha, value, data = dm, geom = "line", group = variable) +
      facet_grid(variable ~ ., scale = "free_y")
    

    enter image description here

    Hope it Helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After nearly 10 hours of searching and trying different things I couldn't figure out,
After reading lots of sample code into this matter, I'm trying to figure out
I’m trying to use the delegate function and not succeeding, here is my html…
I'm trying to start an Android application using adb shell. I'm not succeeding The
After going back to one of 'PHP Login System' test projects, I now need
After many hours of hair pulling, I look to stackoverflow to help me solve
After reading the Head First Design Patterns book and using a number of other
After the suggestion to use a library for my ajax needs I am going
After reading this question , I was reminded of when I was taught Java
After upgrading to the latest version of TortoiseSVN (1.5.2.13595), it's context menu is no

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.