Transposing series with axis

Beta releases, announcements and anything else that doesn't fit below. Please read the <B>Welcome</B> topic.

Moderator: DPlotAdmin

Post Reply
joecar
Posts: 43
Joined: Thu May 11, 2006 10:33 pm
Location: So.Cal.

Transposing series with axis

Post 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.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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.
Visualize Your Data
support@dplot.com
joecar
Posts: 43
Joined: Thu May 11, 2006 10:33 pm
Location: So.Cal.

Post by joecar »

Ok, thanks.
joecar
Posts: 43
Joined: Thu May 11, 2006 10:33 pm
Location: So.Cal.

Explanation of what I'm doing...

Post 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
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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.
Visualize Your Data
support@dplot.com
joecar
Posts: 43
Joined: Thu May 11, 2006 10:33 pm
Location: So.Cal.

Post by joecar »

Hi David,

I emailed you the Excel spreadsheet containing the data array and its transposition.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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.)
Visualize Your Data
support@dplot.com
joecar
Posts: 43
Joined: Thu May 11, 2006 10:33 pm
Location: So.Cal.

Post by joecar »

David, thanks, I'll try my hand at the add-in.
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post 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!
Visualize Your Data
support@dplot.com
Post Reply