I have some data that I'm plotting with GNUPlot. I have three different data sets for different energies. What I need to do is label the maximas on the plot. For example, I need something like (20, 4.5) for the red plot. The values do not need to be above the maximas, as they only need to be distinguishable to which is what. Is there any easy way to do this in GNUPlot? I haven't been able to find anything online.
Thanks in advanced. Below is an example plot that I'm trying to work with. It wouldn't let me post images so I'm posting the link below.
http://i.imgur.com/xA3q52I.png
I think this example can help
http://www.gnuplot.info/demo/stats.html
Related
I would like to create a ggplot2 layer that includes multiple geom_bspline(), or something similar, to point to regions on different plots after combining them into a single figure. A feature in the data seen in one plot appears in another plot after a transformation. However, it may not be clear to a non-expert they are due to the same phenomenon. The plots are to be combined into a single figure using ggarrange(), cowplot(), patchwork() or something similar.
I can get by using ggforce::geom_ellipse() on each plot but it's not as clean. Any suggestions?
Of course, after asking the question and staring at the figure in question, it came to me that I simply need to add a geom_bspline() to the combined figure. Tried that earlier but didn't give enough thought to the coordinates on the new layer. The coordinates of the spline are given in the range of 0 to 1 for both the x and y values on this new layer. Simple and obvious.
Hi there stackoverflow community!
I am a graduate student inquiring for some consultation on an aethetics R problem I am encountering.
The data I am working with is in the form of a VERY large matrix (49x51).
My problem is that my data ranges from very small to very large, with the bulk of my data falling within the "very large" end of the spectrum, so unless I convert my data to log10, the heatmap is rather boring and almost entirely the same color.
The spectrum of my data is totally within the range I am expecting, but I am hoping to display it in a more aesthetic way.
Proposed solution: I think I need to bin my data in a non-uniform way. If you look at the attached image, you will see that their heatmap looks nice and the color key shows the heat spectrum in a non-fixed bin format. I would like to do something like that, however, I am not sure how to declare cutoffs for each bin. I would ideally like to declare the cutoffs.
For example, bin 1 (0-1), bin 2 (2-50), bin 3 (51-5000). As you can see, my bins would not be fixed in equal increments.
I have been using heatmap.2 for this. Thanks so much in advance!
heatmap with color legend in non-uniform bins:
Hey #Punintended and #S Rivero,
I think I have reached the point that my heatmap will only improve marginally. Both of you contributed deeply to this success, so thanks! First, to condense the matrix values as much as possible, I normalized by column. I was then able to assign gradients. This turned out much better than I had hoped. As you can see, most of my data is clustered (check out the density in the key) at very low values, this is okay though, for I am interested in the higher values. I had to use custom color gradients to account for possible instances of colorblind attendees that might look at my poster. Anyways, if you guys have comments or recommendations, they will be much appreciated :). Again, thanks a bunch!
enter image description here
I'm currently working on forecasts with different models and i was wondering if it is possible to create a line graph in R (i'm currently working with ggplot2, but i'd gladly consider other packages) that has one colour for the actual values and afterwards changes the colour to highlight how the forecast developed?
Thanks in advance!
edit: Thank you for your suggestions but i used a different approach and plotted the forecast together with the real data in one plot which visualizes it better imo
Yes, this is possible. It's typically done by graphing two lines of different colors, but they meet at a point so there is an illusion that there is only one line.
I have a set of data that I'm trying to create a surface plot of. I have an x,y point and a to colour by.
I can create a xy plot with the points coloured but I can't find a way to create a surface plot with my data. The data isn't on a normal grid and I would prefer to not normalize it if possible (or I could just use a very fine grid).
The data won't be outside the a radius=1 circle so this part would need to be blank.
The code and the plot is shown below.
I've tried using contour, filled.contour as well as surface3d (not what I wanted). I'm not real familiar with many packages in R so I'm not even sure where to begin looking for this info.
Any help in creating this plot would be appreciated.
thanks,
Gordon
dip<-data.frame(dip=seq(0,90,10))
ddr<-data.frame(ddr=seq(0,350,10))
a<-merge(dip,ddr)
a$colour<-hsv(h=runif(nrow(a)))
degrees.to.radians<-function(degrees){
radians=degrees*pi/180
radians
}
a$equal_angle_x<-sin(degrees.to.radians(a$ddr))*tan(degrees.to.radians((90-a$dip)/2))
a$equal_angle_y<-cos(degrees.to.radians(a$ddr))*tan(degrees.to.radians((90-a$dip)/2))
plot(a$equal_angle_x,a$equal_angle_y,col=a$colour,lwd=10)
With regards to the plot I was trying to create is below. I believe the link in the first comment should get me where I'm trying to go.
I'm working in Gnuplot, and I have a graph looking roughly like the following:
If I want to have the color of the line change color depending on the curves's values, what's the most straightforward way to make that happen?
Thanks!
Does the answer to this question help?
For example:
plot "./file.dat" u 1:2:2 with lines palette
where file.dat contains your data, the first column is the x axis and the second column is the y axis.
The repetition of the 2 indicates that the second column is also used for the colour.
I know there is a function (which i use quite a bit) on the matlab file exchange by Ken Garrard called plot3k that has this functionality that you're looking for. Mayhapes you could have a look at the implementation for hints for a gnuplot port.
Maybe these three articles is helpful:
http://gnuplot-surprising.blogspot.com/2011/09/gradient-colored-curve-in-gnuplot0.html
http://gnuplot-surprising.blogspot.com/2011/09/gradient-colored-curve-in-gnuplot1.html
http://gnuplot-surprising.blogspot.com/2011/09/gradient-colored-curve-in-gnuplot2.html