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
 All Forums
 Origin Forum
 Origin Forum
 axis manipulation

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
studentAgain Posted - 05/04/2012 : 7:35:22 PM
Origin Ver. 7.5/8.5
Operating System: XP

Hello,

I would like to ask a quick question about axis manipulation: is there a quick way to subtract a common number from the X axis? (I have a lot of data plotted in one graph and it would be great if I do not need to go through every single x column of my data and do it manually)
Similar to the option available in the "Tick Labels" 'divide by factor' by I just need to subtract the number?

Thank you very much in advance,
Student

1   L A T E S T    R E P L I E S    (Newest First)
easwar Posted - 05/06/2012 : 5:10:16 PM
Hi Student,

There is no gui control for this, but you could run some script such as below.

This script will find the X dataset of each plot in the active layer, and subtract 10 from the x values. So if your graph has X, Y from different datasets plotted in a layer, it will operate on each of them. Note that this operates on the active layer, so if you have more than one layer you need to run it on each layer, or you can look up LabTalk User Guide to learn how to loop over all graphs, then all layers, and run this code for each layer that is found.


// Loop over all data plots in current layer
doc -e D{
	// Get current plot index
	int nplot = layer.plot;
	// Get the worksheet range of the corresponding X-values: 
	range -wx rWx = $(nplot);
	// Subtract offset from the X-values
	rWx -= 10;
	}
}


Easwar
OriginLab




The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000