Gradient coloring 3D vectors in Gnuplot - vector

Does anyone know how to apply gradient coloring for 3D vectors in Gnuplot?
I would like to do something like written here, but applying for vectors instead of points: http://gnuplot.sourceforge.net/demo_4.5/rgb_variable.html
Thank You in advance!

Related

Plotting three-dimensional vector field as coherent structures using Matlab

I have a three-dimensional vectorfield containing of coherent structures in the form of counter-rotating circles.
I would like to show these structures three-dimensionally.
So far I have used contour() in order to plot the strucutres on the y,z plane as shown in the figure below, where circles of constant magnitude are plotted.
Now I would like to plot these circles three-dimensionally, this would result in the circles being tilted in the direction of the viewer as one can see from the next plot.
How would I be able to plot such three-dimensional strucutres, where the circles are tilted in the direction of the viewer?
Functions as isosurface() do not seem to help.
I would very much appreciate any kind of help.
I have tried various functions such as isosurface(), quiver3() and streamtube() however I am not able to show the plot I am interested in: a single slice of circles being tilted in the direction of the viewer shown in a three-dimensional plot.

How can I convert a scatterplot into a hexagonal/honeycomb chart?

I have data in a scatterplot that places colors respective of their lightness (x-axis) and saturation (y-axis):
Here's the data set in a spreadsheet.
I would like to transform this into a hexagonal/honeycomb chart. I did this by hand...finding some "lines" in the data for the edges, and then filling in the middle based on intuition:
I'm not sure if that's the "best" honeycomb representation of the data, but something that looks okay to me.
Does anyone have a suggestion on how I could make this process into an algorithm? I have a feeling there's some math or algorithms that would fit this problem which I am unaware of.
Thanks!

Coloring markers in a scatter plot according to RGB values with Plots.jl

I have been looking for a way to color markers in a scatter plot without creating an entire new series for every point. Is there a way to color them individually with different RGB values for each?
a single color gradient (the solution to the question asked in:
How do you color (x,y) scatter plots according to values in z using Plots.jl?)
is not what I´m looking for. Maybe if I could overlap 3 gradients, one for each RBG color, that could work. Thanks.
As Fredrik said, you can pass a vector... it's pretty flexible, and if your vector is too short it should cycle.
using Plots
scatter(sin, c=[:red, colorant"blue", RGB(0,1,0)])

R - Heatmap from sparse 2d data

I'd like to achieve what this person has achieved without using ggplot. Any ideas?
How do I create a continuous density heatmap of 2D scatter data in R?
You can see what I get when using the solution detailed in that question.
ggplot(df,aes(x=x,y=y))+
stat_density2d(aes(alpha=..level..), geom="polygon") +
scale_alpha_continuous(limits=c(0,1),breaks=seq(0,1,by=0.1))+
geom_point(colour="red",alpha=0.2)+
theme_bw()
The heatmap is so sparse. I want it to cover much more than what it is covering now. It's terribly hard to see anything about the density. Any ideas of different ways to make density heatmaps from 2D data besides this ggplot solution?
One idea I had was instead of using linear color labeling (see the black to white spectrum on the left, which is linear), using logarithmic scale for the density labeling. Any ideas how I could do this?
"The heatmap is so sparse. I want it to cover much more than what it is covering now. It's terribly hard to see anything about the density."
Please be specific: what do you want to see in areas with most or all NAs?
if you use geom_point with alpha-blending and position_jitter, the current plot is as good as it gets
if some solid color, then use geom_hex(), see http://mfcovington.github.io/r_club/solutions/2013/02/28/peer-produced-plots-solutions/ for code. Then play with the continuous color_scale... you probably want a nonlinear transform. Post us your revised attempt, if you want a critique.
I actually ended up using smoothScatter, which works well and uses classic R plotting.

3d Vector plotting and visualization in R

Anyone know of any packages in R that can plot 3D vectors? I would like to plot some vectors over a 3 dimensional data set. I know scatterplot3d looks like it should be able to do the job, but I didn't see any documentation for vectors specifically (I would like to be able to change the origin of vectors as well).
rgl is a great package for 3d plotting. It is very like 2d plotting except that you use plot3d instead of plot. This answer on SO suggests a way to draw arrows in rgl.

Resources