The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Strange axis swap in image plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Frank_H

Germany
Posts

Posted - 06/29/2005 :  06:37:50 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5 SR5
Operating System: XP

I have a strange issue with image plots:

I am using image (intensity) plot as a fast and efficient plot for data (faster and smaller output files compared to contour plot).
The problem starts if I want to use negative increment of the (y-)axis (From-y > To-y). When doing that, the bottom x-axis is suddenly plotted at the top of the graph! But looking into the Format->x-axis options I find that Origin still thinks that it is the bottom axis.

Is this a bug or a feature, and if its a feature, how do I turn it off?

Please do not suggest to swap the MinRow and MaxRow setting in the matrix instead of swapping the axis - of cause I thought of that, but I would like to have consistency of different data sets without the need of tracking sign changes.

Regards,
Frank

greg

USA
1379 Posts

Posted - 06/29/2005 :  10:36:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Early on it was decided that image plots should use the coordinate system where Y increases from the top down - as opposed to normal Cartesian where Y increases from the bottom up.
The Image Plot does this with a LAYER property which reverses the direction of the Y axis. The 'Top' and 'Bottom' are still in the Cartesian sense, so that 'Top' X axis that you normally see is really the 'Bottom' X axis being displayed at the top of the image due to that layer property :

LAYER.Y.REVERSE = 1

If you just want the normal Cartesian system, change the property :

LAYER.Y.REVERSE = 0

If you always want your Image Plots this way, saving the Template will not help here because code in the Plot3D.OGS file handles this. You should change the code in the [ImagePlot] section if you prefer Cartesian.

Go to Top of Page

Frank_H

Germany
Posts

Posted - 06/29/2005 :  1:32:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Greg

Thanks, that helps!
Can I access this property also in OriginC in the Layer tree? I did not find this property when printing the tree with
gl.GetLayerContents(tr);
out_tree(tr);

Regards,
Frank
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 06/29/2005 :  2:31:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Looks like this property is not available via theme access, so LT is needed. You need to use proper graph layer's LT_execute,






void sy(int nSet)
{
GraphPage gp = Project.Pages();
if(!gp)
return;

foreach(GraphLayer gl in gp.Layers)
{
string strLT = "layer.Y.reverse=" + nSet;
gl.LT_execute(strLT);
}
}








CP


Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000