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 8672597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:14:40+00:00 2026-06-12T19:14:40+00:00

This is kinda a build-on on my previous post creating an stacked area/bar plot

  • 0

This is kinda a build-on on my previous post creating an stacked area/bar plot with missing values (all the script I run can be found there). In this post, however, Im asking if its possible to leave a gap in an continuous x axis? I have a time-serie (month-by-month) over a year, but for one sample one month is missing and I would like to show this month as a complete gap in the plot. Almost like plotting a graph for Jan-Aug (Sep is missing) and one for Oct-Dec and merging these with a gap for Sep.

The only things I have come up trying are treating the missing month as zero or NA, creating a hugh drop in the area chart for Sep or excluding it but with an x axis ranging from 1-11, respectively (see plots in dropbox folder).

The data set Im working on can be found in my dropbox folder and it’s named r_class.txt and you can also see the two different plots (Rplots1 and 2).

Any ideas would really be appreciated!

  • 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-06-12T19:14:42+00:00Added an answer on June 12, 2026 at 7:14 pm

    Plot the series as two separate data frames:

    #Load libraries
    require(ggplot2)
    require(reshape)
    
    #Code copied from your linked post:
    wa=read.table('wa_class.txt', sep="", header=F, na.string="0")
    names(wa)=c("Class","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
    wam=melt(wa)
    wam$variablen=as.numeric(wam$variable)
    
    #For readability, split the melted data frame into two separate data frames
    wam1 <- wam[wam$variablen %in% 1:6,]
    wam2 <- wam[wam$variablen %in% 8:12, ]
    
    ggplot() +
      geom_area(data=wam1, aes(x=variablen, y=value, fill=Class)) +
      geom_area(data=wam2, aes(x=variablen, y=value, fill=Class))
      #and add lineranges, etc., accordingly
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After reading this post I kinda felt in the same position as the guy
I'm trying to build in my Layout this kind of line: Total......................1000 I need
I have this kinda template text : Hello {#Name#}, Thanks for coming blah on
I'm sure there used to be a plugin for this kinda stuff, but now
This is kinda....a two part question. The first one is much more important than
this is kinda overkill for me.. I am using a JTextPane for a chat,
i know this is kinda retarded but I just can't figure it out. I'm
This question is kinda aimed towards PHP but it probably applies to other languages
i'd like to write a wrapper for a C++ framework. this framework is kinda
I have a webpage with a form, which looks kinda like this: @using (Html.BeginForm(MyAction,

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.