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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:14:54+00:00 2026-06-08T10:14:54+00:00

I have a surface plot I’m trying to do. x is an 11 element

  • 0

I have a surface plot I’m trying to do. x is an 11 element vector, y a 300 element vector and z a 300*11 element matrix.

When I try to plot it like this:

surf(x y z)

The surface plot doesn’t show up. The axes are there but there is no surface plot.
blank surface plot

However, if for some reason I do a surface plot of a subset of the matrix like this:

surf(x y(1:31) z(1:31,:))

Then it works and the plot shows up.
working surface plot

As soon as I increase the number in the brackets to 32 it stops working. If I change the range from 2:32 then it works, so it’s nothing to do with the data just the size of the matrices.

What’s going on here? How do I fix it?

P.S I’d attach the code but it’s a bit long and complex, and imports .txt files to load into the x and y vectors.

  • 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-08T10:14:55+00:00Added an answer on June 8, 2026 at 10:14 am

    Sometimes, it can help to change Matlab’s figure renderer, which is basically the backend that performs the drawing. Options are painters, zbuffer, and OpenGL.

    Since it is a figure property, you can apply it to a specific figure, e.g.:

    set(gcf(), 'Renderer', 'painters')
    

    or update the default figure properties (if always needed, you could put it in your user-specific startup.m):

    set(0, 'Renderer', 'painters')
    

    Similarly, to get the current Renderer state, use get instead of set:

    get(gcf(), 'Renderer')
    

    Different renderers have different performance properties (e.g. OpenGL renderer can use hardware acceleration, if supported), but also different quirks (in my experience, frame capturing using getframe() works with some renderers while using remote desktop login, but not all). While I don’t know the exact reason for your problem, it may be one of these weird quirks, so try changing the renderer.

    From the Renderer property documentation:

    Rendering method used for screen and printing.
    Selects the method used to render MATLAB graphics. The choices are:

    painters — The original rendering method used by MATLAB is faster when the figure contains only simple or small graphics objects.

    zbuffer — MATLAB draws graphics objects faster and more accurately because it colors objects on a per-pixel basis and MATLAB renders only those pixels that are visible in the scene (thus eliminating front-to-back sorting errors). Note that this method can consume a lot of system memory if MATLAB is displaying a complex scene.

    OpenGL — OpenGL is a renderer that is available on many computer systems. This renderer is generally faster than painters or zbuffer and in some cases enables MATLAB to access graphics hardware that is available on some systems.

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

Sidebar

Related Questions

Been trying to find this online for a while now. I have a SDL_Surface
I'm working on this surface project where we have a bing maps control and
I have a surface project and I would like to use controls designed in
I have a 3d surface in my figure surf(x,y,z) I also have a contourf
I have a problem which is twofold: How do I plot a toroidal surface
I have created a 3d map using rgl.surface(), mainly following Shane's answer in this
I have a pygame Surface and would like to invert the colors. Is there
I would like to have a plot in R similar to the 2D smoothScatter
I have the following problem when trying to plot some 3D data in Mathematica.
I have a surface (OffScreenPlain or RenderTarget with D3DFMT_A8R8G8B8) which I copy pixels (ARGB)

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.