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 

Range command issues with colour scheme

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



Joined: 01 Jun 2017
Posts: 24
Location: London, UK

PostPosted: Mon Apr 30, 2018 12:35 pm    Post subject: Range command issues with colour scheme Reply with quote

I'm having troubles using a colour scheme with a range command.

In short I would like to colour everything below a line/function using a colour scheme that maps it's colour based upon the value of the y-axis. I can sort of fudge it using a gradient to match my intended colour scheme but I'm not sure where I'm going wrong using the colour scheme option. See basic example screenshots below.

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


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

PostPosted: Tue May 01, 2018 10:42 am    Post subject: Reply with quote

One way to get this effect is by using the Scalar Field command in the beta. It's a little bit of a workaround, since the Scalar Field command is intended to draw a field of values coming from the data table.

The steps are:
    Create a Scalar Field Command

    Leave the "Values:" blank, and switch Layout to "Uniform Row" or "Uniform Column". Specify the grid to cover the area that you want. In your case, origin might be "1,0" and size is "9,10" to cover the rectangle [1,10]x[0,10]. Set the step size to something reasonable like 0.1 so you get a 90x100 grid of values.

    In the gear menu for the drawing command, extract the y values as a column, let's call the column in the table "y"

    Create a second Scalar Field command and use the same exact layout as the first command, but this time select the recently created y column as the Values column. In the coloring sub block, select the ramp you want. You can create your own color ramp, but it has to be a continuous color color ramp, which you are approximating with the multiple colors in the Color Scheme Variable

    The Scalar Field drawing command does not allow you to select a clipping path, so to clip this rectangular gradient patch with the path you need to do the following:

    Put the Scalar Field drawing command in a group, and in that group select the "Clip with" variable as your plot command


The Scalar Field is still in the beta, and is still being refined based on user feedback.

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



Joined: 01 Jun 2017
Posts: 24
Location: London, UK

PostPosted: Tue May 01, 2018 7:22 pm    Post subject: Reply with quote

Nice workaround, a little confusing to start with but makes sense - also didn't know about the group option in the graph commands Very Happy



However, can you explain what / how the colour scheme option works as it doesn't appear to do anything?
Back to top
View user's profile Send private message
David
Site Admin


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

PostPosted: Tue May 01, 2018 7:38 pm    Post subject: Reply with quote

You mean the Color Scheme in the global variables?

Some drawing commands, such as Points, Range, Lines allow you to color discrete values based on the color scheme or color ramp.

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