 |
visualdatatools.com Discussion for DataTank and DataGraph
|
| View previous topic :: View next topic |
| Author |
Message |
space
Joined: 15 Mar 2010 Posts: 2
|
Posted: Wed Feb 08, 2012 3:30 am Post subject: Request "Marker": Arrow with direction |
|
|
Hi, I want to use datagraph to draw some graph that contains "wind direction" information, The idea way to present these data is by showing an arrow with direction on the graph (see sample picture inside the link).
http://www.flickr.com/photos/76167273@N02/6839781825/
Three information are shown in the graph
(time - x bar; wind speed - y bar; wind direction - arrow direction)
To do this on datagraph, it need additional features:
1. new Markers - "Arrow" shape
2.under each "Marker" properties, need "Rotation" checkbox, user may type any value from "0" to "360" or choose any "columns" that contains this information.
I think other users may also benefit from this new function, I would love to see this feature in the next version of datagraph.
Best Regards. |
|
| Back to top |
|
 |
Mike
Joined: 05 May 2008 Posts: 254 Location: Christchurch, New Zealand
|
Posted: Wed Feb 29, 2012 7:57 pm Post subject: Re: Request "Marker": Arrow with direction |
|
|
Sorry for late reply but just came across your post.
This could be achieved currently with a bit of trig. I assume you have three variables: x, y , and angle. First just plot y vs x to get your line graph, with no symbols. Then we can overlay a "Connect" command to draw tiny lines with arrows at each data point.
The Connect command needs x and y coordinates for each end of its arrow. You could use the original x and y variables for one end, but the other end will require two expression columns, X2 and Y2:
If your angle variable was called "Angle", you would create two expressions:
X2:
x+cos(Angle)*someSmallConstant
Y2:
y+sin(Angle)*someSmallConstant
Using your Connect command, draw arrows linking (x,y) with (X1, Y2) |
|
| Back to top |
|
 |
|
|
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
|