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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:46:56+00:00 2026-06-08T11:46:56+00:00

When trying to plot my data I get these error messages: 1: In min(x)

  • 0

When trying to plot my data I get these error messages:

1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf

This reproducible code works:

# some dummy data
library(mvtnorm)
dat <- rmvnorm(10000, mean=c(x=4,y=4), sigma=matrix(c(1,0.5,0.5,1), ncol=2))
dat <- as.data.frame(dat)

# 2d density plot
library(MASS)
kdexy <- kde2d(dat$x,dat$y, n=50)
image(kdexy, col=grey(seq(1,0.2,length=10)))

But using my real data doesn’t:

kdexy <- kde2d(temp$V1, temp$V2, n=50)
image(kdexy, col=grey(seq(1,0.2,length=10)))

Yet the structure of the two data sets is the same (the dummy data [dat] and the real data [temp]):

> str(dat$x)
 num [1:80000] 0.669 0.609 -0.633 0.565 0.559 ...
> str(temp$V1)
 num [1:823180] 0 0 0 0 0.0146 ...
> summary(dat$x)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-4.2270 -0.1902  0.4841  0.4900  1.1600  5.3570 
> summary(temp$V1)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
-1.0000  0.0000  0.0000 -0.0289  0.0000  0.9844 
> range(dat$x)
[1] -4.227400  5.357184
> range(temp$V1)
[1] -1.000000  0.984375
> str(temp$V2)
 num [1:823180] 1 1 15.5 15.5 18.5 ...
> summary(temp$V2)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   1.00    1.00   18.45   23.55   35.96  116.10 
> range(temp$V2)
[1]   1.0000 116.0829

They are both stored in dataframes and the only difference I’m aware of is the length, and that temp$V1 is bounded at -1 and 1.

The output of kdexy <- kde2d() differs between the two datasets. In the example data, the Z sections is populated with very small numbers; in the real dataset, every point is filled with ‘NaN’.

  • 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-08T11:46:58+00:00Added an answer on June 8, 2026 at 11:46 am

    My data are heavily concentrated around 0 (total n=850,000, n==0 ~ 650,000). Using a subset of data, where x<0 (n=150,000), the plots work.

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

Sidebar

Related Questions

I am trying to plot some test data (show at the end of this
I am trying to plot this kind of behaviour of a data set. I
I'm currently trying to use the core-plot library to graph some data I get
I am trying plot data sets consisting of 3 coordinates: X-coordinate, x-coordinate and the
I'm trying to plot data in matplotlib. I would like to hide the upper
I am trying to plot some data using pylab scatter function. I'm using pylab.scatter(X,
I'm trying to plot some data into a histogram using pyplot.hist as such: hst
I am trying to plot some one-dimensional data onto a 2-D plot in MATLAB.
I'm trying to annotate a polar plot with data tips labelled with 'R:...,Theta:...' where
I have the following data set that I am trying to plot with ggplot2,

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.