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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:57:59+00:00 2026-06-18T12:57:59+00:00

How do i tell ggplot to to plot points only if count is greater

  • 0

How do i tell ggplot to to plot points only if count is greater than X. I know this should be easy but i couldnt figure it out. something like

ggplot(items,aes(x=itemname,y=..count..))+geom_bar(y>X)
  • 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-18T12:58:00+00:00Added an answer on June 18, 2026 at 12:58 pm

    If I understand your question correctly (you haven’t provided example data), the easiest way is to generate your the data frame you want to plot outside of ggplot. So

    ##Example data
    items = data.frame(itemname = sample(LETTERS[1:5], 30, replace=TRUE))
    ##Use table to count elements
    items_sum = as.data.frame(table(items))
    

    Then plot

    X = 4
    ggplot(items_sum[items_sum$Freq > X,], aes(x=items,y=Freq)) + 
        geom_bar(stat="identity")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just came across this code that lets me plot multiple ordinates (I know
Tell me if anyone encountered this problem: I show on my page plot using
Please tell me if I got this wrong. Anchor point is like a movable
Tell me what I did wrong? I'm trying to fill the sheet. But the
Can tell somebody what this mean in C++? (is in front of a function)
I'm trying to plot some date points: library(ggplot2) library(plyr) set.seed(1234) df <- data.frame( c1
Please tell me if this is correct. In my error handler, I need to
Please tell me whats wrong with this c# code.. public bool CloseCOMPort() { try
Please tell me what is use of: <add assembly=*/> because of this i am
Please tell me, in my form, the user should enter percentage value between 1

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.