×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How do I expand the axes to eliminate all of the gray space in a figur

How do I expand the axes to eliminate all of the gray space in a figur

How do I expand the axes to eliminate all of the gray space in a figur

(OP)
Hi,

Iam using MATLAB version 6.5.0.180913a Release 13.

I have the following question:

How do I expand the axes to eliminate all of the gray space in a figure?

However, this can be accomplished through manipulation of the 'OuterPosition', 'Position', and 'TightInset' properties of the axes.


But In my MATLAB version i can use only the 'Position' property. The other propeties(TightInset and OuterPosition) are not available.

For example, if i use the following command, i get the error message.


t1 = get(h1,'TightInset');



??? Error using ==> get
Invalid axes property: 'TightInset'.

It seems these properties are not available in my version of MATLAB. So How can i eliminate gray spaces in any other way or is there any other propeties to do the same?

RE: How do I expand the axes to eliminate all of the gray space in a figur

Is it acceptable to just change the color of the grey area?

if so ...

just type get(h1)

and it should be Color = [0.8 0.8 0.8]
I think 1 is white and 0 is black.

then.

set(h1,'Color',[1 1 1])

should do the trick...

RE: How do I expand the axes to eliminate all of the gray space in a figur

Change the Position property.

CODE

set(gca, 'Position', [x y width height])
The values range from 0 to 1.
Set x=0, y=0, width=1 and height=1 to completely fill the figure.
However, no axis labels or tick labels will be visible.

RE: How do I expand the axes to eliminate all of the gray space in a figur

(OP)
Hi , thanks for the information. Cahnging the position worked.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources