Page 1 of 1

scaled plot

Posted: Thu Apr 08, 2010 8:18 am
by 10548232
Hi,

I have to create a plot of a chart with a defined length of vertical and horizontal axes. For example I have a chart with a vertical axis form 0 to 25 and a horizontal axis from 0 to 350. I have to print the chart with a horizontal axis length of 10 cm and a vertical axis length of 20 cm.

My Code
...
Chart1.Axes.Left.Automatic:=false;
Chart1.Axes.Bottom.Automatic:=false;
Chart1.Axes.Left.Maximum:= 25;
Chart1.Axes.Left.Minimum:=0;
Chart1.Axes.Bottom.Maximum:=350;
Chart1.Axes.Bottom.Minimum:=0;
Chart1.PrintProportional:=false;
Chart1.Axes.Left.PositionUnits:=muPixels;
Chart1.Axes.Left.StartPosition:=0;
Chart1.Axes.Left.IAxisSize:=4724;
Chart1.Axes.Bottom.PositionUnits:=muPixels;
Chart1.Axes.Bottom.StartPosition:=0;
Chart1.Axes.Bottom.IAxisSize:=2362;
Chart1.Print;

creates a plot of 17.6 cm x 9.3 cm.

Where is my mistake? Thanks

Roland

Re: scaled plot

Posted: Thu Apr 08, 2010 11:10 am
by yeray
Hi Roland,

You should be able to do something similar to the example at All features\Welcome !\Axes\Isometric Axis.

Re: scaled plot

Posted: Fri Apr 09, 2010 1:29 pm
by 10548232
Hi Yeray,

my problem is not to change the axes minimum or maximum to create isometric axes. I have a fixed minimum and maximum and will print a axis with a defined length (with printer resolution a defined number of pixels per axes). The scale of horizontal and vertical axes may be different.

Best regards

Roland

Re: scaled plot

Posted: Fri Apr 09, 2010 3:20 pm
by yeray
Hi Roland,

Yes but that example uses functions that may help you on finding a way to achieve what you want. Here is another example of how you could convert Pixels to MM, if it helps:
http://delphi.about.com/od/adptips2005/qt/pixel2mm.htm