scaled plot

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Geosucher
Newbie
Newbie
Posts: 10
Joined: Tue Feb 05, 2008 12:00 am

scaled plot

Post by Geosucher » Thu Apr 08, 2010 8:18 am

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

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: scaled plot

Post by Yeray » Thu Apr 08, 2010 11:10 am

Hi Roland,

You should be able to do something similar to the example at All features\Welcome !\Axes\Isometric Axis.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Geosucher
Newbie
Newbie
Posts: 10
Joined: Tue Feb 05, 2008 12:00 am

Re: scaled plot

Post by Geosucher » Fri Apr 09, 2010 1:29 pm

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

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: scaled plot

Post by Yeray » Fri Apr 09, 2010 3:20 pm

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
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply