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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:58:36+00:00 2026-05-29T17:58:36+00:00

Matlab is displaying a black border around a plot and I would like to

  • 0

Matlab is displaying a black border around a plot and I would like to remove it. I think i should be using something like:

set(Figure#,'PropertyName',PropertyValue);

But I’m not sure what PropertyName or PropertyValue should be used…

Edit:

I tried all of the suggestions including:

set(gca,'box','off');
set(gca,'xcolor','w','ycolor','w','xtick',[],'ytick',[]);
axis off;

The figure still has a black boarder and looks like this:

enter image description here

Edit 2:
This is a simplified package that reproduces the black box. Run the script called “runPlot”. Here it is:
http://dl.dropbox.com/u/8058705/plotTest.zip
I can’t figure out why the box is still visible. This might be due to the line in “plotTEC.m”

axis([-.65 .6 .25 1.32]) % hardwiring axis length since the coastline runs off of the plot

@Pursuit: If I use “plot browser” I get a recursive error….I am not familiar with the matlab plotting package but this seems strange. Does anyone else get this error? Again, thank you guys for your advise!

Does anyone have any other suggestions?

Thanks in advance!

  • 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-29T17:58:37+00:00Added an answer on May 29, 2026 at 5:58 pm

    You want to experiment with the properties of the axis. Some properties of interest.

    xcolor  %The color of the x-axis line and the x axis labels
    ycolor  %
    box     %'on', or 'off' indicating if one or both sides of a plot should have lines
    xtick   %Where to place the labels
    ytick
    

    For a completely bare plot, use:

    figure
    set(gca,'xcolor','w','ycolor','w','xtick',[],'ytick',[])
    

    To set the figure background to white as well

    set(gcf,'color','w')
    

    Depending on your exact problem, you can try the ‘box’ property, to see how it affects your plots

    set(gca,'box','on')
    set(gca,'box','off')
    

    If you want to turn off the actual plots lines but keep the plot labels then I am not aware of a simple solution. I think that I would need to remove the axes as described above, and then manually add labels using the text function.


    Edit: As I just learned from this question, Plot Overlay MATLAB you can also try

    axis off
    axis on
    

    Which I think is equivalent to

    set(gca,'visible','off')
    set(gca,'visible','on')
    

    Edit 2:

    If nothing else works, activate the “plot browser” in your figure. Use “view” –> “plot browser”. From the plot browser panel, uncheck each object until you figure out which object is drawing the lines that you need to remove.

    Then double click on the offending object to bring up the “property editor” panel, and mostly likely click “More properties” to view all possible properties of that object. From that view you can (hopefully) figure out what object is drawing the offending lines.

    After you have figured out the object and property to edit, you can probably figure out where in the code that object is created, and set the property programmatically.

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

Sidebar

Related Questions

In Matlab, I would like to update the data plotted in a set of
In matlab I would like to read from a structured, and rather big, file
In Matlab, I have a loop that performs operations on arrays. I would like
In Matlab or GNU Octave I'd like to do something like this: x=struct('a',1,'b',2,'c',[1 2;3
In MATLAB I'm using a couple of java routines I've written to interface with
Some MATLAB help needed ! I have an set of 1s and 0s, I
Using MATLAB, I have this code: value = input('>> Enter a value: '); and
I am using a script in MatLab that works perfectly fine by itself, but
In matlab, is it possible in any way to do the following: By using
In MATLAB, if I define 2 matrices like: A = [1:10]; B = [1:11];

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.