Hi,
First of all, I would suggest that you look into using graph templates and graph themes which may be easier to work with rather than building graph programmatically from scratch. You can customize a graph and save as template and create instance of it programmatically, or save your desired settings to a template file and applly template programmatically to other graphs.
As for your specific questions:
1) Please see the following page and the example named "Manipulate graph axes" under graphing category
http://www.originlab.com/index.aspx?s=9&lm=71&pid=268
2)The legend is a text object with name "Legend" and properties of this text object can be accessed with code such as:
GraphLayer gly = Project.ActiveLayer();
if( !gly ) return;
// Add/update legend
LT_execute("Legend;");
// Point to legend text object
GraphObject gobjLegend = gly.GraphObjects("Legend");
// Get dimension properties into tree and change
Tree tr;
tr = gobjLegend.Label.Dimension;
out_tree(tr);
tr.Dimension.Left.dVal = 5.5;
gobjLegend.Label.Dimension = tr;
// Can also directly address object properties
gobjLegend.Label.Font.Size.nVal = 28;
3) All formats supported in the GUI are allowed. As to what string constant to use for each format, please look at the export dialog and the Save as Type drop-down. For example to export as a TIFF file, you will use:
export_page_to_image( pg, "c:\\test.tiff", "tif", false);
Easwar
OriginLab
Edited by - easwar on 12/17/2005 3:52:05 PM