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
 multiple spectrums on the same graph

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
tomce Posted - 02/01/2012 : 10:40:00 AM
Origin Ver. and Service Release (Select Help-->About Origin): 8.1 SR3
Operating System: Windows XP

Hi!

I wanna plot multiple spectrums on the same graph and I would like to be able to choose which spectrums are visible at any given time (ideally, I would like to have some sort of "clickable legend" which would allow me to select which spectrums are visible). For example, I have spectrums of some porous materials with different concentrations of adsorbed drug recorded at a few temperatures. I would like to be able to compare spectrums of different samples recorded at the same temperature or spectrums of the same sample recorded at different temperatures. So far I have been using multi-layer approach: I plotted each spectrum in separated layer and then show/hide them with "hide layer" command. Is there an easier and more sophisticated way to do it because before-mentioned solution is not really useful when you have 10+ spectrums.

Regards, T.
8   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 02/06/2012 : 11:14:29 AM
Hi tomce,

Currently there are no buttons to force even spaces between objects. I will
suggest our developers for the future release.

By the way, for that purpose, showing grid would help you to arrange the labels.
Try "View: Show: Object Grid" menu to show the object grid, then choose
"Format: Snap Objects to Grid" menu. (Object grid is helpful for labels
attached to the layer. Layer grid is helpful for labels attached to the page,
or to set the position of a layer. For the layout page, there is also a layout
grid, as well.)



To set the grid spacing, you can do it in Page tab from "Tools: Options" menu.

--Hideo Fujii
OriginLab
tomce Posted - 02/06/2012 : 05:01:34 AM
Hideo, thank you again, this has been very helpful. I have just one more question: how to do an equidistant vertical alignment of the buttons (other then manually arrange buttons)? It seems that "vertical" toolbar button doesn't do the trick.

Regards, T.
Hideo Fujii Posted - 02/03/2012 : 4:30:28 PM
Hi tomce,

> how to deal with buttons (group/ungroup, justification, position ...)

Once a label became a button, the click action is taken over by the button script. 
So, you need to switch the graph to Button Edit Mode ("Edit: Button Edit Mode" menu 
or CTRL+ALT+B). 
(If you only need to open the Programming Control dialog of a button, you can ALT+double-click.)

In Button Edit Mode, you can do the following by useing buttons in the Object Edit toolbar: 
  - Adjustment (Left/Right/Top/Bottom)
  - Move (to Front/Back between labels)
  - Move (to Front/Back between plot and label)
  - Group/Ungroup

You can use CTRL+click for multiple selection, and the first selected item leads the rest dominantly. 
Once you finish working, choose "Edit: Button Edit Mode" menu to toggle off the mode.



--Hideo Fujii
OriginLab
tomce Posted - 02/03/2012 : 03:42:29 AM
Hi Easwar and Hideo!

Thank you for your prompt and really helpful replies.
Hideo, your solution is great and works really nice. It's just what I needed and it makes my work much easier.
Easwar, I really hope you can incorporate such feature in some future version of Origin to make it even better. I think a lot of people would really appreciated.
Keep up the great work and thank you again.

Regards, T.

P.S. a few tips on how to deal with buttons (group/ungroup, justification, position ...) would be much appreciated
easwar Posted - 02/02/2012 : 5:06:34 PM
Hi T.,

Thanks for the response. We will consider improving this with the legend in a future version.

Right now another way you can control which plots to turn on/off, is as follows:
1> Double click inside the graph layer to open Plot Details dialog box. Expand the left side tree to show the data plots under Layer level
2> You will see check boxes in front of each data plot in each layer. Then you can check/uncheck and click Apply button to update your plot

Easwar
OriginLab
Hideo Fujii Posted - 02/02/2012 : 1:55:58 PM
Hi tomce,

One way to toggle on/off the plot appearance like in your sample, 
you can try to place text label buttons like in the following 
screenshot. To make such, you can: 

1) Make a dummy text label. Right-click it, and choose "Programming Control" flyout.
2) Enter the script, and change the first line to set the plot number.

  pn=1;           //this plot number
  layer.plot=pn;  //activate the plot
  get %C -s hsSW; //current ON/OFF status
  if(hsSW==1) {
    set %c -s 0; 
    this.text$=\l($(pn)) %($(pn)) OFF;
  }
  else {
    set %c -s 1; 
    this.text$=\l($(pn)) %($(pn)) ON;
  }

3) Set "Script, Run After" to "Button Up", and click OK.



Make this button as many as you need.

Once you make these buttons, change to "Button Edit Mode" (under Edit menu), 
you can group all buttons, and you can save the template. 
Anytime, you can open this template, and copy-and-paste the button group 
(in Button Edit Mode) to any other graphs, when you need.

--Hideo Fujii
OriginLab

tomce Posted - 02/02/2012 : 04:20:15 AM
Hi!

Thank you for your answer.

The way I envisioned my multi-spectrum plot is something similar to this:



At the right side of graph you can see the legend with all spectrums listed and a checkbox next to each (the names of spectrums should also be visible). You can simply choose which spectrums are displayed by checking/unchecking the checkbox. Such feature would help immensely when analysing large number of spectrums.

Regard, T.
easwar Posted - 02/01/2012 : 4:35:50 PM
Hi T.,

Currently you can click on a particular data curve in the layer (if it is a grouped plot, first click selects the group, and 2nd click selects a particular plot), then you can right click and in the context menu there are options for hiding that particular plot, or hide all other plots etc.

Your suggestion of doing this from legend sounds good, perhaps easier there to identify the plot. If a plot is hidden, how would you want it marked in the legend? Some way to tell which items are not displayed? Currently there is no marking.

Thanks,

Easwar
OriginLab


P.S. The above is for multiple plots in a single layer

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