T O P I C R E V I E W |
Artim |
Posted - 06/26/2022 : 07:05:45 AM Origin Ver. and Service Release (Select Help-->About Origin): 2022 SR1 9.9.0.225 (Academic) Operating System: Win10
I have some plotting to do (line graphs) and two questions: 1. I want the Legend names to come from the corresponding lines in a different column. How can I achieve that? In column B I have the names that should be used as the Legend name for that plot, column C holds the x data and all following columns hold various y data. Also, I have different data sets under each other. I already know how to put several graphs into one plot, but I don't want the legend name to be the coming from the column of the y data. I want Origin to look into column B and take the name from the corresponding line. While in Excel (or better said LibreOffice Calc) this is fairly easy, with Origin this doesn't seem to be that straight forward. Like at all. But I don't want to have to use some Excel graph, since with Origin everything simply looks much cleaner.
2. Since I need a separate plot for every y column, I'd like to simply duplicate the first plot, switch everything like from column d to column e and have everything else to adapt automatically (which is basically just rescaling of y aches). What's the easiest way to do that? |
6 L A T E S T R E P L I E S (Newest First) |
Artim |
Posted - 06/29/2022 : 04:04:57 AM quote: Originally posted by Cecilia_syy
Hi, Your data arrangement is quite special, so the solution above fail to work. But you can try following: 1. Legend entry from column B -- you can open legend properties dialog, and replace the content with following:
\l(1) %(1,@WT,2,1) //use 2nd column, 1st row of source sheet as legend entry
\l(2) %(2,@WT,2,2)
\l(3) %(3,@WT,2,3)
\l(4) %(1,@WT,2,4)
\l(5) %(2,@WT,2,5)
\l(6) %(3,@WT,2,6)
\l(7) %(2,@WT,2,7)
\l(8) %(3,@WT,2,8)
2. Batch Plotting with column's long name as the name for the plot -- Open Batch Plotting dialog, use following settings: - Batch Plot with Column Offset
- Column Offset=1 if Y column need to be plot is D E F. If Y column is D F G, then offset need to be 2
- Number of offsets = number of Y column you want to plot
- Graph Long Name= %(1, @LL)
Thanks Cecilia
Thanks, this did the trick. |
Cecilia_syy |
Posted - 06/28/2022 : 03:08:25 AM Hi, Your data arrangement is quite special, so the solution above fail to work. But you can try following: 1. Legend entry from column B -- you can open legend properties dialog, and replace the content with following:
\l(1) %(1,@WT,2,1) //use 2nd column, 1st row of source sheet as legend entry
\l(2) %(2,@WT,2,2)
\l(3) %(3,@WT,2,3)
\l(4) %(1,@WT,2,4)
\l(5) %(2,@WT,2,5)
\l(6) %(3,@WT,2,6)
\l(7) %(2,@WT,2,7)
\l(8) %(3,@WT,2,8)
2. Batch Plotting with column's long name as the name for the plot -- Open Batch Plotting dialog, use following settings: - Batch Plot with Column Offset
- Column Offset=1 if Y column need to be plot is D E F. If Y column is D F G, then offset need to be 2
- Number of offsets = number of Y column you want to plot
- Graph Long Name= %(1, @LL)
Thanks Cecilia |
Artim |
Posted - 06/28/2022 : 02:19:42 AM quote: Originally posted by AmandaLu
Hi,
1. I’m not sure what the problem is. If you select whole column and paste transpose, you should fill Long Name of all Y columns.
I need every label in every single y column. Not spread across the y columns.
quote: 2. Did you select all Y columns you want to plot in the middle list of the Batch Plotting dialog?
Yes, still, each plot only contains one of the 8 curves.
Let me try to make my table more clear: in the B column, I have labels for the different datasets that all need to be put in one graph. Let's name those datasets 1, 2, 3, etc. The C column holds the x data (time steps for the actual measurements), starting from the D column I have the data points for the y-axis. Also, for each dataset I have 2 series of measurement, from which I only plot the first one.
Now what I need to do is to put all 8 datasets for the y values in column D in one plot. That's easy, I just select the "block of data" for the first dataset in columns C and D, hold shift (or ctrl? I don't really think about that anymore, I just do it) and select the next "block of data" for the second dataset. This gives me 8 graphs in one plot. Now I want Origin for each graph to take the label that's being used for the legend not from the D column's head but from the corresponding rows in the B column.
Also, I have to do this procedure for another couple of y-Columns, where I just replace the data from the D column with the data from the following columns. Doing this with duplicate (batch plotting) only gives me plots with just the first graph, not the other 7 for that single plot. The legend reserves entries for them though. Also, it would be quite helpful if it could use the column's long name as the name for the plot. |
AmandaLu |
Posted - 06/27/2022 : 10:19:23 PM Hi,
1. I’m not sure what the problem is. If you select whole column and paste transpose, you should fill Long Name of all Y columns.
2. Did you select all Y columns you want to plot in the middle list of the Batch Plotting dialog?
Thanks, Amanda OriginLab Technical Service
|
Artim |
Posted - 06/27/2022 : 10:08:18 AM quote: Originally posted by AmandaLu
Hi,
1. the easiest way I can think of is copy column B and paste transpose to Long Name of y columns.
This is not an option. This would simply make no sense. I need those Labels for every y column.
quote: 2. you can right click on the graph window title bar and choose Batch Plotting.
This seems to be not working properly. Only the first graph is being plotted. |
AmandaLu |
Posted - 06/27/2022 : 03:10:36 AM Hi,
1. the easiest way I can think of is copy column B and paste transpose to Long Name of y columns.

2. you can right click on the graph window title bar and choose Batch Plotting.

Thanks, Amanda OriginLab Technical Service
|
|
|