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
 Change Worksheet for multiple plots
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 05/27/2022 :  01:39:18 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2022b (64-bit) SR1 9.9.5.167
Windows 7 Pro SP1 x64

Greetings!

Change Worksheet function works with currently selected and active plot.
Is this possible to Change Worksheet for multiple selected plots at a time from GUI?

Thank you.

---
Andrey

AmandaLu

439 Posts

Posted - 05/27/2022 :  03:58:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Change Worksheet cannot work for multiple selected plots right now. I suggest Batch Potting instead.


Thanks,
Amanda
OriginLab Technical Service
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 05/27/2022 :  05:05:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AmandaLu

Hi,

Change Worksheet cannot work for multiple selected plots right now. I suggest Batch Potting instead.


Thanks,
Amanda
OriginLab Technical Service





Dear Amanda,

I tried Batch Potting, but it doesn't work (show any options) since my graph take data from few different sheets.

Can I Change Worksheet for multiple plots via Plot Setup dialog?

---
Andrey
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 05/27/2022 :  05:11:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Can you also share a snippet to access individual graph item settings via LT script, please?

Currently I loop through plots in the active Graph window using the following syntax:
	doc -e DY
	{
		type "Dataset name: %C";
		//type %(CR);
	}

---
Andrey

Edited by - AKazak on 05/27/2022 05:11:32 AM
Go to Top of Page

AmandaLu

439 Posts

Posted - 05/27/2022 :  05:50:25 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
I tried Batch Potting, but it doesn't work (show any options) since my graph take data from few different sheets.

Can I Change Worksheet for multiple plots via Plot Setup dialog?

Yes, if your plots from different sheets, you will need to use Plot Setup or Layer Contents to change multiple plots.

quote:
Can you also share a snippet to access individual graph item settings via LT script, please?

What do you mean “graph items”? If you want to loop graph objects, please try
DOC -e G
https://www.originlab.com/doc/en/labtalk/ref/document-cmd#-e_object_.7Bscript.7D.3B_Execute_the_given_script_for_all_objects

Thanks,
Amanda
OriginLab Technical Service
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 05/27/2022 :  06:13:01 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AmandaLu
Yes, if your plots from different sheets, you will need to use Plot Setup or Layer Contents to change multiple plots.


How do I use Plot Setup or Layer Contents to change worksheet for multiple plots at once (not manually one-by-one)?

quote:
Originally posted by AmandaLu
What do you mean “graph items”? If you want to loop graph objects, please try
DOC -e G
https://www.originlab.com/doc/en/labtalk/ref/document-cmd#-e_object_.7Bscript.7D.3B_Execute_the_given_script_for_all_objects


Sorry for misunderstanding.
By graph items I mean plot object (lines, scatters) and its groups.
For example how to get or set data range of an line scatter plot using LT?

---
Andrey
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 05/27/2022 :  11:15:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Any ideas?

---
Andrey
Go to Top of Page

AmandaLu

439 Posts

Posted - 05/31/2022 :  11:55:32 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
quote:
How do I use Plot Setup or Layer Contents to change worksheet for multiple plots at once (not manually one-by-one)?

I’m not sure how your plot data is arranged. If the group of plots is plotted like this: plot1 from sheet1, col(B), plot2 from sheet2, col(B), plot3 from sheet3, col(B), etc. and you want to replace them with col(C) of every sheet, you can select all sheets from upper panel of Plot Setup, and then select col(C) in the middle panel, click Replace button to replace them all at once.
You can see the similar operation in steps 3-5 of below tutorial:
https://www.originlab.com/doc/Tutorials/Create-Graph#Create_a_Plot_using_Plot_Setup

quote:
By graph items I mean plot object (lines, scatters) and its groups.
For example how to get or set data range of an line scatter plot using LT?

if I understand correctly, your graph contains multi plots, some are scatter and some are line. You want to get the range of all line plots and set properties for line plots?
If so, LabTalk cannot do this right now. But you can try
layer.plot1.pid
to return the plot type for each plot (200=line, 201=scatter).

If I’m wrong, please explain further what you want.

Thanks,
Amanda
OriginLab Technical Service
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 06/01/2022 :  02:33:56 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AmandaLu

Hi,
quote:
How do I use Plot Setup or Layer Contents to change worksheet for multiple plots at once (not manually one-by-one)?

I’m not sure how your plot data is arranged. If the group of plots is plotted like this: plot1 from sheet1, col(B), plot2 from sheet2, col(B), plot3 from sheet3, col(B), etc. and you want to replace them with col(C) of every sheet, you can select all sheets from upper panel of Plot Setup, and then select col(C) in the middle panel, click Replace button to replace them all at once.
You can see the similar operation in steps 3-5 of below tutorial:
https://www.originlab.com/doc/Tutorials/Create-Graph#Create_a_Plot_using_Plot_Setup

quote:
By graph items I mean plot object (lines, scatters) and its groups.
For example how to get or set data range of an line scatter plot using LT?

if I understand correctly, your graph contains multi plots, some are scatter and some are line. You want to get the range of all line plots and set properties for line plots?
If so, LabTalk cannot do this right now. But you can try
layer.plot1.pid
to return the plot type for each plot (200=line, 201=scatter).

If I’m wrong, please explain further what you want.

Thanks,
Amanda
OriginLab Technical Service




I have multiple plots, some are scatter and some are line that take data from the same sheet, but from different columns.

I want to keep the data selection scheme, but change the reference data source sheet sheet from Sheet1 to Sheet2 for all the plots.

---
Andrey
Go to Top of Page

AmandaLu

439 Posts

Posted - 06/01/2022 :  06:17:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please try Batch Plotting



Thanks,
Amanda
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 06/01/2022 :  06:37:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AmandaLu

Hi,

Please try Batch Plotting



Thanks,
Amanda



Dear Amanda,

I tried Batch Potting, but it doesn't work (show any options) the in case when my graph take data from few different sheets.

Can I Change Worksheet for line/scatter multiple plots with data sources from multiple sheets via Plot Setup dialog?

---
Andrey
Go to Top of Page

AmandaLu

439 Posts

Posted - 06/06/2022 :  05:34:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Could you please send me a sample project? You can send from ticket system:
https://www.originlab.com/restricted/support/NewTicket.aspx

Thanks,
Amanda
OriginLab Technical Service
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 06/07/2022 :  01:49:06 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AmandaLu

Hi,

Could you please send me a sample project? You can send from ticket system:
https://www.originlab.com/restricted/support/NewTicket.aspx

Thanks,
Amanda
OriginLab Technical Service




Please see the following project:
https://my.originlab.com/ftp/forum_and_kbase/Images/Change%20Worksheet%20Test%20Project.opju

---
Andrey
Go to Top of Page

AmandaLu

439 Posts

Posted - 06/07/2022 :  04:01:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If you have several workbooks with similar structure, and want to plot graph from each of book, you can use following settings.



Thanks,
Amanda
OriginLab Technical Service
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 06/07/2022 :  06:53:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by AmandaLu

Hi,

If you have several workbooks with similar structure, and want to plot graph from each of book, you can use following settings.



Thanks,
Amanda
OriginLab Technical Service




Dear Amanda,

Got it.
However this is not what I asked about. I need to change the data source for multiple line or scatter plots to the other sheet with the same structure.

---
Andrey
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