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!

Excel chart axis length 2

Status
Not open for further replies.

kmpillai

Mechanical
Feb 2, 2001
87
IN
In excel chart is it possible to specify the axis length say x-axis exactly equal to 6 inches ? Please help me how to do this.
 
Replies continue below

Recommended for you

Hi,

I suppose you can't specify the axis length directly, but you can resize the whole chart (trial-and-error?).
You can size each axis separately, by dragging in its direction.

Ari Constancio, Chem. Eng.
ari.constancio@netc.pt
 
Hi Ari,
Thank you for your reply. I understood that no way is there to specify the axis length.
 
Kmpillai,

I'm trying to do the same thing, I think. I wan't to be able to print the graph out so that the axis measures 6inches *on paper*. I think there is a way, and if I figure it out I'll let you know how. But don't wait around for me if you need it soon!

 
Hi, kmpillai.

If you are trying to print your chart at fixed size WITHIN ANOTHER DOCUMENT, then this suggestion will probably be of no help to you. (Continue to watch this space, and hope that a REAL expert comes along :) )

On the other hand, if all you want to do is to print your chart, (and nothing else) on a single sheet, this may work for you (gleaned from the excel help section, under heading "I can't scale a chart to the size I want..."):

(a) Insert chart onto a new sheet (via 'insert' menu).

(b) Activate the new 'chart sheet' by clicking on its tab; set the page margins from the 'file - page set up' menu, and also set the chart to be printed to fill the page (from the 'chart' tab).

By suitable adjustment of the margins you can get pretty good numeric control over the final printed width of the chart. Some trial and adjustment may still be needed, since Excel puts a blank frame around the chart, and it is this frame which is fitted between the margins.

Good luck.
 
Hi Kmpillai

This may not be the perfact solution but can generate detail required by you, It will depands how complicated your chart data is.


Excel can be used to control AutoCad, You can send your data to AutoCad and generate chart through VBA ( this will required knowledge of Autocad Object model also). This will required more effort to generate chart but it will be at a scale what we want.


Nitin Patel
India


 
Hello kmpillai
Yes, it is possible to do it - you'll need to use VBA

Select the chart

If the x-axis is not visible right-click the chart and from the axes tab select the x-axis radio btn.

In the Immediate window in the VBA window enter the following command:

ActiveChart.PlotArea.Width=6*72

The x-axis will be sized to exactly 6 inches (72 points = 1 inch)
Of course the Chart Area width must be more than this to accommodate the plot area. There are finer points to this, but I suggest the above should meet your requirement
mala
 
Another way (easy and not sophisticated) is to add a line, double click the line and size it to the required length, then pull the chart to the length of the line, delete the line and voila!
TM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top