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 

X axis as categories in Points graph

 
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started
View previous topic :: View next topic  
Author Message
bnicole



Joined: 10 Jul 2017
Posts: 7

PostPosted: Mon Jul 10, 2017 11:53 am    Post subject: X axis as categories in Points graph Reply with quote

Dear all,

apologies for the simple question - I am completely stuck.

I would like to make a Points graph where the x axis is categories, and the data that is plotted is the data corresponding to a sample that belongs within that category.

For example, I would have a dataset that looks like this:

Sample rivertype data
A downstream 1
B mouth 2
C black 3
D white 4
E downstream 5
F black 6

Then, when I plot data vs river type I would like a point for each sample's data plotted on the Y based on their data value, and on the X based on its category.

So on the X axis it would say:

downstream, mouth, black, white

and the values for downstream (1 and 5 would be plotted above that category), Black (3 and 6) and so on.



This is what I am trying now and it is not working:
I have mapped the category to a numerical value - 1 for downstream, 2 for white, 3 for confluence, 4 for mouth, 5 for Black.
Then, under the axis settings, I have chosen the X tick marks as categories and the labels as the category in my datable.
Then, I can choose to plot category (because it is now mapped to a numerical value) vs data in a Points plot, but what I get on the X axis is:

Downstream, White, Confluence, Downstream, Mouth.....


And Im not entirely sure what is being plotted with it.

Could someone please help me out on this? I would really appreciate it.

Ive tried to attach a screenshot of my setup for help.

Thanks a lot for any help.

[/img]
_________________
~BNicole
Back to top
View user's profile Send private message
David
Site Admin


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

PostPosted: Tue Jul 11, 2017 9:58 am    Post subject: Reply with quote

Image didn't get through. Can you e-mail me a sample file (david@visual...)

But the idea you have is right. You define a mapping to take the text label to numbers. You can use a Map column or the mapping inside the text column. Then you use that as the x coordinate. If you define a mapping inside the text column you can use the column where DG expects a numerical column.

David
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    visualdatatools.com Forum Index -> Getting Started 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