Page 1 of 1

Transposing series with axis

Posted: Thu May 26, 2011 4:54 pm
by joecar
When you open/paste a Z table (a table with X and Y axes, and a 2D matrix of data Z), you get a series of curves with common X and Y axes (the series would be the Z axis)...

question: is there an easy/quick way to transpose X and Z, or Y and Z, or X and Y...?

( i.e. I want a different axis to be the series )

Thanks.

Posted: Thu May 26, 2011 5:35 pm
by DPlotAdmin
You can swap X and Y easily enough: Edit>Swap X,Y.

But there's no easy way to swap X & Z or Y & Z, and from your description I'm not sure I understand why you'd want to. If you have a table of M X values by N Y values, then you have M*N Z values. If you could switch X and Z, for example, you'd have a table of M*N X values, N Y values, and only M Z values. But you can do it, though not directly. Save your data as a CSV file. Open that file using file type K and be sure to check "Pick Columns to Plot". Then set X,Y,Z to 3,2,1 to swap X and Z, or 1,3,2 to swap Y &Z.

Posted: Tue May 31, 2011 1:33 pm
by joecar
Ok, thanks.

Explanation of what I'm doing...

Posted: Mon Jun 06, 2011 6:51 pm
by joecar
Hi David,

This is what I'm doing:

I'm "transposing" the X axis and the series, see images below; the second image would be an end-view of the first.

I'm currently doing this using a spreadsheet to transpose my data array, and then I copy/paste into DPLot.

Image

Image

Posted: Tue Jun 07, 2011 12:28 pm
by DPlotAdmin
Sorry, I misunderstood and thought you were talking about 3D data.

If you are starting from Excel, you can do this with the "X,Y,Label" command. If the columns are not in that order, first select the X column, then while pressing Ctrl select the Y column, and finally press the Ctrl key while selecting the Label column.

If you are not starting from Excel there is no good way to do this in DPlot unless your columns are already in the correct order. If they are not, then the best you can do is open the file with file type D and "Pick Columns to Plot" checked, then ignore the Labels column. You'll then have to manually enter legend entries for each curve.

Edit: After clicking Submit it sunk in that most of the above advice only applies to single curves, when that isn't what you have. I think we'll both save time if you send me your file.

Posted: Wed Jun 08, 2011 5:09 pm
by joecar
Hi David,

I emailed you the Excel spreadsheet containing the data array and its transposition.

Posted: Wed Jun 08, 2011 7:40 pm
by DPlotAdmin
Yes, I got it, thank you. The short answer is there is no good way to handle this in DPlot. The two possibilities are to 1) add an Add-In function to handle this layout and 2) write a DPlot file import plugin to handle this file format. #1 is probably easier IF you can always open a file of this type in Excel (that is, it doesn't exceed the maximum number of rows or columns for whatever version of Excel you're using.)

Posted: Tue Jun 14, 2011 5:19 pm
by joecar
David, thanks, I'll try my hand at the add-in.

Posted: Tue Jun 14, 2011 5:22 pm
by DPlotAdmin
I didn't mean to imply that either answer was something you should do. I'll be happy to add an Add-In function, but if you're in a hurry and are comfortable with VBA, go for it!