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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:06:46+00:00 2026-05-25T14:06:46+00:00

I woud like to understand how levelplot works. I have almost no experience with

  • 0

I woud like to understand how levelplot works. I have almost no experience with plots and R.

What confuses me, is how should I interpret for example x~y*z ?
Lets assume I have a function, and I would like to show how often certain value occurs by using 3d plot. I would have hence x = x, y = f(x) and z = count. How to obtain such simple plot by using levelplot (or something else if it is not appriopriate).

In addition, should I group “count” myself – 3 columns in my data from, or just have 2 columns – x and f(x) and have duplications?

Hope my question is clear, I tried to read levelplot documentation, however I could not find any tutorial that teaches basics.

  • 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-25T14:06:47+00:00Added an answer on May 25, 2026 at 2:06 pm

    The following example is from the ?levelplot documentation.

    The formula z~x*y means that z is a function of x, y and the interaction between x and y. Had the function been z~x+y it would have meant that z is a function of x and y, ignoring any interaction.

    You can read more about the formula interface in the help for ?formula.

    x <- seq(pi/4, 5 * pi, length.out = 100)
    y <- seq(pi/4, 5 * pi, length.out = 100)
    r <- as.vector(sqrt(outer(x^2, y^2, "+")))
    grid <- expand.grid(x=x, y=y)
    grid$z <- cos(r^2) * exp(-r/(pi^3))
    levelplot(z~x*y, grid, cuts = 50, scales=list(log="e"), xlab="",
              ylab="", main="Weird Function", sub="with log scales",
              colorkey = FALSE, region = TRUE)
    

    enter image description here

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

Sidebar

Related Questions

I woud like to understand what are all the benefits we have if we
I have a WebSite and I woud like Deny Directory Browser from a web.config
I woud like to create a cross-platform drawing program. The one requirement for writing
I woud like to generate graphs using GraphViz and display them on an ASP.NET
Say I have a MySQL query, for example: SELECT id, name, surname FROM employees
I woud like to save my MS SQL Server 2005 stored procedures to .sql
I woud like to create a filled rounded rectangle at run-time and assign it
I woud like to I'd like to allow a user to connect to a
I have a problem, and I have not found the solution yet. I woud
I am quite new in Perl and I woud like to know which of

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.