visualdatatools.com Forum Index visualdatatools.com
Discussion for DataTank and DataGraph
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Extra Axis: Offset & Control

 
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Feature Request
View previous topic :: View next topic  
Author Message
Peter Yarensky



Joined: 31 Jan 2011
Posts: 3
Location: New Hampshire

PostPosted: Tue Feb 01, 2011 7:39 pm    Post subject: Extra Axis: Offset & Control Reply with quote

I've been trying to accomplish a couple things and have concluded that they're either difficult or not possible, but I'm not sure which.

I have a graph that is a simple scatterplot of a relationship between the X and Y variables. I would like to be able to label both axes with both raw score units and z-score units.

There are two problems. First, specifying the scale of the second axis is confusing as it's implemented, especially as the "Data" and "Display" fields aren't clearly defined separately for the Convert option. I think I got it by entering "1" in the Data field and the value of the standard deviation of the distribution in the Display field, as 1/SD seems like the correct ratio.

Second, I can't find any way to set the zero point of the z-score axis to be equal to the mean of the original data. I think I read in the forum that offsets currently aren't possible. As a Statistics instructor I have to do this sort of thing regularly.

It occurs to me that both problems could be solved in what appears to be a fairly elegant fashion by adding a choice to the Units pop-up menu such as "Specify" which would allow one to specify the lower and upper values of the axes. (It would also be nice to have this option more directly for the original axes.)

I have no idea how easy that would be to impliment, but it strikes me as a major improvement in both flexibility of designing the graph and in the ease of use.

Thanks,
Peter Yarensky
Back to top
View user's profile Send private message Visit poster's website
David
Site Admin


Joined: 25 Nov 2006
Posts: 1542
Location: Chapel Hill, NC

PostPosted: Tue Feb 01, 2011 11:14 pm    Post subject: Reply with quote

The Date and Display is thought as following. If the x column is in meters and you want the axis to be in feet you set Data=m and Display=feet. The conversion will then be coordinate*Display/Data.

You can set the range of the axis inside the detail setting.

What is missing is an option where the data origin (actual grid coordinates) and the display origin is not the same. I do have that for the temperature conversion, but haven't made this more general. What I haven't decided on is what is the most logical. Code wise there are just two numbers, shift and scale. And either you do (x+shift)*scale or x*scale + shift. And then you either specify data->display or display->data. For example if you want a particular value to be the origin you are really specifying display->data. I realize that you can convert between all the different options by multiplying/dividing, adding/subtracting but I am interested in seeing what type of mapping people think is natural.

And then I could call this Shift+Scale in the menu.

Take your example. What you have is that you want average->0 and average+c*std -> c. Would it then make sense to say "origin=a" and "units=std" and then the grid coordinate x gets mapped into (x-a)/std. Or the display coordinate gets mapped into d*std + a.

Implementing this is easy since I already have most of this for the temperature mappings between F,K,C. Some care needs to be added for negative units, but that's not that bad.

David
Back to top
View user's profile Send private message Send e-mail
David
Site Admin


Joined: 25 Nov 2006
Posts: 1542
Location: Chapel Hill, NC

PostPosted: Wed Feb 02, 2011 7:07 pm    Post subject: Reply with quote

I added a Origin+Unit option to the Extra axis. I think that makes the most sense when specifying the shift and the scale. Specifying just a,b in the mapping x->a*x + b is not intuitive.

C on the axis is then Origin + Unit*C in the underlying coordinate system.

David
Back to top
View user's profile Send private message Send e-mail
Peter Yarensky



Joined: 31 Jan 2011
Posts: 3
Location: New Hampshire

PostPosted: Mon Feb 07, 2011 11:44 am    Post subject: Reply with quote

Hi David,

That makes sense to me. Thanks for doing that!

I downloaded the latest version and tried it out. Looks good! The one problem I'm having is that in specifying the origin, when graphing the data in terms of z-scores it makes sense to map the zero point on the second axis to the mean of the distribution. Although I could get the mean through a histogram, I wasn't able to figure out any way to enter it in effect as a variable (origin = mean/average). (At that point I got stuck and had to go on to other work; thus the delay in responding.)

Is that possible? If not, it strikes me that at some point including the mean and standard deviation (and sum and sample size [n] if they're not already there; I can't remember) as variables that can be used in that fashion would be desirable presumably to just about anyone using DataGraph for a variety of statistical purposes.

Best,
Peter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Feature Request All times are GMT - 3 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