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

The Archive Base Latest Questions

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

I am drawing box-percentile plots in R, using the box-percentile panel function from Hmisc

  • 0

I am drawing box-percentile plots in R, using the box-percentile panel function from Hmisc (panel.bpplot) with bwplot from lattice.

I have a numeric vector (Length), and would like to show its distribution across the levels of a factor variable (Month).

Here’s an example with fake data:

For example,

set.seed(13)
Length<-sample(1:10, 1000, replace=TRUE)
Month<-sample(c("Apr","May","Jul","Aug","Sep","Nov"), 1000, replace=TRUE)

df<-cbind(Month, Length)
df<-as.data.frame(df)   
df$Month<-factor(df$Month, levels=c("Apr","May","Jul","Aug","Sep","Nov"))
df$Length<-as.numeric(df$Length)

#plot horizontal box-percentile plot; 
bwplot(Month~Length, data=df, panel=panel.bpplot)

This works fine. But I want the plots to be vertical, with Month on the x-axis and Length on the y-axis. The documentation for panel.bpplot says that horizontal plots make category levels more visible, but, for my purposes, I specifically need a vertical plot. Is there a way to modify panel.bpplot to do this?

  • 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-26T20:13:57+00:00Added an answer on May 26, 2026 at 8:13 pm

    I took some tips from this previous question and then merged it with your code. It seems the “trick” is setting up a rotated grid:

    require(grid)
    grid.newpage()
    pushViewport(viewport(angle = 90, name = "VP"))
    print(
        bwplot(Month~Length, data=df, panel=panel.bpplot, draw.in = "VP"
        ),
        newpage=FALSE
    )
    

    which results in:

    enter image description here

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

Sidebar

Related Questions

Is there a function for drawing a caption box underneath a figure/graph using matplotlib?
I have a WPF ItemsControl with a Canvas ItemPanel. Drawing from an internal source,
I was using the drawing code from this tutorial to let someone draw in
I have noticed issues with drawing one box over another. As requested, here is
I have a picture box which I draw some stuff on it using a
I' try to drawing canvas using example2 taken from http://dev.opera.com/articles/view/html5-canvas-painting/ . It works on
I have created a modal JDialog box with a custom drawing on it and
I'm drawing a selection box when I click and drag on my canvas object
I am having trouble drawing a line within a group box in a simple
I'm working on drawing an SVG grid using Javascript. I've managed to get the

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.