How do you make an horizontal box-and-whiskers plot in gnuplot? Similarly to this one:
Gnuplot can easily be used to produce vertical box-and-whiskers plots with the 'candlesticks' and 'whiskerbars' keywords, but I have not managed to find any example of an horizontal candlesticks/box-and-whiskers horizontal plot produced via gnuplot online.
Example of a vertical plot produced by gnuplot:
example of a vertical box-and-whiskers plot http://www.cise.ufl.edu/~dts/cop3530/proj02/candlesticks.6.png
Gnuplot generally doesn't switch directions well... for example you can't plot rows instead of columns, and it's hard to make histograms (or any other kind of plot) go horizontal instead of vertical.
People have made horizontal histograms, however, and you might be able to modify the code found at this site.
Related
Basically I have a picture which is a collection of complicated shapes with its own axis and different colours and a data set of points which I can plot on top of it, that works fine, see minimized code example. I am using fortran to generate a gnuplot command file and run gnuplot.
plot "Random.png" binary filetype=png with rgbimage axis x2y2, "xydata1.dat" using 1:2 with points axis x1y1
My problems are that the picture makes it hard to see the points on top. Due to the shapes being a lot of different colours it is impossible to pick a colour for the points which is clearly visible on all shapes.
So could the picture be put in the background at say 50% transparency, without making it transparent in another program?
And is it possible to get the colour of the background on the locations of the points back so that the shape they are in can be determined automatically?
You can use the rgbalpha plotting style and given an explicit transparency value:
plot "Random.png" binary filetype=png using 1:2:3:(127) with rgbalpha axis x2y2\,
"xydata1.dat" using 1:2 with points axis x1y1
The transparency value must be between 0 (completely transparent) and 255 (fully opaque).
I want to project a 3D plot into a 2D plot. Assuming f(x,y) describes my 3D plot, I want to treat y as a parameter and simultaneously plot f(x,0), f(x,2), f(x,4), etc. in one 2D plot. Instead of going for different line/point styles and colors with a legend in a corner, I'd like to make each plot in the same style and place a label next to each individual line.
Is this even possible in gnuplot or would I have to fall back on something more complex?
I had a similar question recently. There is an option in the development version of gnuplot (4.7.0) that does this. You can change the position of line titles to be at the end/beginning of the line itself. If your plot looks like I imagine (sort of a contour plot) this may be what you want:
plot f(x,y) title 'f(x,y)' at end
Otherwise you may have to specify the labels and their positions manually:
help set label
for more info.
How to draw such a graph with gnuplot.
The demos page for gnuplot shows a similar example of this. (It's the last example on that page, and produces the plot below)
I have a set of data that I'm plotting as a scatter graph which has both positive and negative values on both axis. When I plot this in Flot, the axis are draw at the bottom and the left by default. Is there a way to make it draw the axis through the center of the graph? #X=0 and Y=0?
In other words, instead of this:
I want something like this:
That isn't possible in the default flot. I'm sure it could be hacked in if you wanted to dig into the source, but flot by itself only supports left/right for the y-axis, and top/bottom for the x-axis.
In case anybody else comes across the same need, I created a plugin for Flot and put it here:
https://github.com/burlandm/Flot-Origin-Axis
It does what I need, but I won't make any promises that it'll fit your particular scenario. If I have time, I might try and update it to cover more scenarios.
I am using gnuplot (Version 4.4 patchlevel 2) to generate rowstacked histograms, very similar to the example called "Stacked histograms by percent" from the gnuplot demo site at http://www.gnuplot.info/demo/histograms.html
I want to display the values of each stacked box within it.
I.e. I want to display the actual numerical value (in percent and/or the absolute number) of each box.
How can I do that?
How many numbers do you want to enter.
If it is just a few then have you tried
set label "label" at 2,3
If there are many then you can write a script to decide where to put the numbers - something like here
Plotting arrows with gnuplot
Don't know a way to do it by magic, although I am not very familiar with rowstacked histograms
Tom