Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

saro64

Computer
Sep 18, 2006
4
DE
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?
 
Replies continue below

Recommended for you

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...
 
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.
 
Hi , thanks for the information. Cahnging the position worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top