DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Transposing series with axis

 
Post new topic   Reply to topic    DPlot Forum Index -> General discussion
View previous topic :: View next topic  
Author Message
joecar



Joined: 11 May 2006
Posts: 43
Location: So.Cal.

PostPosted: Thu May 26, 2011 4:54 pm    Post subject: Transposing series with axis Reply with quote

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.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2290
Location: Vicksburg, Mississippi

PostPosted: Thu May 26, 2011 5:35 pm    Post subject: Reply with quote

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.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
joecar



Joined: 11 May 2006
Posts: 43
Location: So.Cal.

PostPosted: Tue May 31, 2011 1:33 pm    Post subject: Reply with quote

Ok, thanks.
Back to top
View user's profile Send private message
joecar



Joined: 11 May 2006
Posts: 43
Location: So.Cal.

PostPosted: Mon Jun 06, 2011 6:51 pm    Post subject: Explanation of what I'm doing... Reply with quote

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.



Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2290
Location: Vicksburg, Mississippi

PostPosted: Tue Jun 07, 2011 12:28 pm    Post subject: Reply with quote

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.
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
joecar



Joined: 11 May 2006
Posts: 43
Location: So.Cal.

PostPosted: Wed Jun 08, 2011 5:09 pm    Post subject: Reply with quote

Hi David,

I emailed you the Excel spreadsheet containing the data array and its transposition.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2290
Location: Vicksburg, Mississippi

PostPosted: Wed Jun 08, 2011 7:40 pm    Post subject: Reply with quote

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.)
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
joecar



Joined: 11 May 2006
Posts: 43
Location: So.Cal.

PostPosted: Tue Jun 14, 2011 5:19 pm    Post subject: Reply with quote

David, thanks, I'll try my hand at the add-in.
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2290
Location: Vicksburg, Mississippi

PostPosted: Tue Jun 14, 2011 5:22 pm    Post subject: Reply with quote

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!
_________________
David Hyde
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> General discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group