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

  • Home
  • SEARCH
  • 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 8106229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:24:14+00:00 2026-06-06T00:24:14+00:00

Is there a way in Mathematica to check whether a plot is empty or

  • 0

Is there a way in Mathematica to check whether a plot is empty or not?

By empty, I mean it is only showing the axes and not any data points.
I have a function that, depending on its inputs, gives some data points (to be plotted later) or none, but i won’t know whether it will produce any valid data points unless i plot it.
And if it doesn’t, when i plot it, it will return an empty plot.
I would like to differentiate between the empty plot and a plot with data points.

  • 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-06T00:24:16+00:00Added an answer on June 6, 2026 at 12:24 am

    I’ll generate an empty Plot to explore the form.

    empty = Plot[{}, {x, 0, 1}];
    FullForm[%]
    

    shows that Plot[] returns a Graphics object with two parts – 1.) the content, and 2.) the options. In this case the first is an empty List, so setting a condition like

    empty[[1]] == {}
    

    should return True for this particular type of emptiness. It’ll work for other Plots

    Plot3D[{}, {x, -3, 3}, {y, -2, 2}][[1]] == {}
    
    True
    

    but you might have to pick apart the FullForm of your example to be sure.

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

Sidebar

Related Questions

Is there any way to force Mathematica to treat subscripted variables independently of their
I wonder if there exists way to work with large files in Mathematica ?
Is there any way to change the BackColor of the border of a panel
A simple is there a better way question. I want to find if any
Is there any way to get at the actual messages generated during the evaluation
Is there any way to detect underflow automatically during execution? Specifically I believe there
Is there a way in mathematica to have variable coefficients for NDSolve? I need
If I do a Plot with Frame->True is there a way I can find
Is there a way in Mathematica to determine if all the integers in a
I have the following problem when trying to plot some 3D data in Mathematica.

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.