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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:37:38+00:00 2026-06-15T11:37:38+00:00

I have 2 variables x and y which are Cartesian coordinates at [0,1], and

  • 0

I have 2 variables x and y which are Cartesian coordinates at [0,1], and z is the value of a (continuous) variable at these coordinates. The z vector has some important outliers

x<-sample(seq(0,1,0.001), replace=F)
y<-sample(seq(0,1,0.001), replace=F)
z<-runif(1001,min=0,max=1)
z[100]<-8;z[400]<-16;z[800]<-4

These outliers I would like to emphasize when presenting these data in a filled.contour

I have used until now

library(akima)
a<-interp(x,y,z)
filled.contour(a$x,a$y,a$z)

But I am not happy with this linear interpolation. For example (the outliers do not show up correctly).

I am thinking what I need is a some kind nearest neighbor “spatial” smoothing of z (based on the x,y location). Can anyone help or pinpoint to data/examples/packages/code that could help me? I would prefer a base R solution but if ggplot2 or lattice can do my job it would be fine. Any other idea/proposal of better visualization would be also welcomed.

  • 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-15T11:37:40+00:00Added an answer on June 15, 2026 at 11:37 am

    Check out @Paul Heimstra’s answer here. They suggest thin plate spline interpolation from the fields package. If kriging is right for you, the package automap may be useful.

    If you’re concerned with the interpolation of geographic values, it’s worth mentioning DG Rossiter’s online/free course on Geostatistics and Open-source statistical computing.

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

Sidebar

Related Questions

I have a php file which has some variables like $name1, $name2... How can
I have a url which has some get variables in it like: domain.com/recover?email=my@email.com&token=abc123 inside
I have this ingredients array which contains multiple variables (like name, icon, value etc.).
I have some String variables which are getting the values from invoking the function
I have a large function which has a vector defined as follows: v <-
I have the following variables which store the value of a set of cookies:
I want to read the file which contains the value of some variables which
I have this class called Variables which has multiple members and one of it
I have two string variables which are both file paths. The code that worked
In a C++ code I have a matrix of double variables which I print

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.