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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:04:58+00:00 2026-05-31T13:04:58+00:00

I’m plotting a rather strange wireframe. The y-axis should run from -50 to 0,

  • 0

I’m plotting a rather strange wireframe. The y-axis should run from -50 to 0, but needs to be labeled with positive numbers. So the origin should be at (0,50,0), with y decreasing along the y-axis.

My first thought was to take the original command:

wireframe(z~x*(10*log10(y)), grid, colorkey=TRUE, drape=TRUE, scales=list(arrows=FALSE))

and just negate y in the formula:

wireframe(z~x*(-10*log10(y)), grid, colorkey=TRUE, drape=TRUE, scales=list(arrows=FALSE))

But wireframe is too clever, and flips the axises (and plotted data!) around so that the x-axis now ascends from 0 to 50.

How can I manually specific the tic labels on my y-axis?

EDIT: Here’s the R code to produce this issue:

tf_model <- function(n,l){
 tf =  n*l
 return(tf)
}

n <- c(0:100)/100 * 0.1
l <- -c(0:100)/2
l <- 10^(l/10)

grid <- expand.grid(x=n, y=l)

grid$z <- tf_model(grid$x, grid$y)

library('lattice')
trellis.par.set("axis.line",list(col=NA,lty=1,lwd=1))

wireframe(z~x*(10*log10(y)), grid, colorkey=TRUE, drape=TRUE, scales=list(arrows=FALSE))

 wireframe(z~x*(-10*log10(y)), grid, colorkey=TRUE, drape=TRUE, scales=list(arrows=FALSE))
  • 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-31T13:04:59+00:00Added an answer on May 31, 2026 at 1:04 pm

    It sounds like what you really want is to change the labels that are attached to the tick marks of the y axis. You can do that by setting the labels component of the y component of a list passed to the scales argument:

    wireframe(z~x*(10*log10(y)), grid, colorkey=TRUE, drape=TRUE, 
              scales = list(arrows = FALSE, y = list(labels = seq(0, 50, by = 10))))
    
    ## Or perhaps this -- I can't quite make out which you want.
    wireframe(z~x*(10*log10(y)), grid, colorkey=TRUE, drape=TRUE, 
              scales = list(arrows = FALSE, y = list(labels = seq(50, 0, by = -10))))
    

    In general, you can achieve fairly complete control over, say, the y-axis of a lattice plot by setting a combination of ylim and the at and labels components of the list passed to scales:

    • ylim: specifies the extent and orientation of the y-axis. For example, set ylim=c(0, 1000) to extend the y-axis, or ylim=c(0,-50) to reverse its orientation.

    • at: controls the location of tick marks on the axis. For example, scales = list(y=list(at=c(0,-50))) will only put tick marks at either end point of your default axes.

    • labels: set the labels to be placed at the tick marks (which are either set by the function’s default behavior, or by the at argument). For example, scales = list(y=list(at=c(0,-50), labels=c("Zero", "Below Zero")))

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from
I want to construct a data frame in an Rcpp function, but when I
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.