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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:16:32+00:00 2026-05-27T12:16:32+00:00

here is a simple problem that surely you already come across, but is giving

  • 0

here is a simple problem that surely you already come across, but is giving me a big headache…

I have a dataframe like this:

set.seed(3)
mydata <- data.frame(var = rnorm(100,20,1),
                     temp = sin(sort(rep(c(1:10),10))),
                     subj = as.factor(rep(c(1:10),5)))

and I need to make a scatter plot for each subj, not a problem, but…
what i want is to replace the strips from the lattice and add a label to each plot.
I manage to do this with the following code, but I’m still not happy…

xyplot(var ~ temp | subj, 
       data = mydata,
       strip=FALSE,
       panel = function(x, y,...) {
               panel.xyplot(x, y,...)
               panel.text(1,21,labels=which.packet())
               }) 

The last bit…where i got stacked…is how to print letters instead of numbers in each panel. I would like to call the panels a,b,c… and so on.

Any suggestions…
Many thanks
matteo

  • 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-27T12:16:33+00:00Added an answer on May 27, 2026 at 12:16 pm

    You almost got it. If you need letters, then index letters with panel.number():

    xyplot(var ~ temp | subj, 
       data = mydata,
       strip=FALSE,
       panel = function(x, y,...) {
               panel.xyplot(x, y,...)
               panel.text(1,21,labels=letters[panel.number()])
               }) 
    

    You can also define another character vector inside your panel function and use this indexing schema with it.

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

Sidebar

Related Questions

Here's a simple problem. I have an application that takes a phone number like
I have a simple yet hard problem here that is driving me nuts ...
very simple problem here... but I can't work it out. I have a simple
here is a simple problem. I have a table of 500 rows and what
I'm working on a simple subtraction problem, but unfortunately it keeps returning NaN Here
This problem is not readily reproducible in a simple example here but was wondering
I have a simple stupid question. Here's the problem, for years, my company has
I have a simple problem; Here is the code : #include<stdio.h> main(){ int input;
My problem is somewhat like the question here and here , but none of
Here's a simple problem I need to solve, but it makes me feel my

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.