I found a vast number of libraries for plotting in Julia that includes the following:
Winston: 2D plotting for julia looks like it requires Cairo and Color. Examples look like it supports line plots, histograms, scatterplot, and regression.
Gadfly: Looks to support Dataframes and uses the Color library. Graphs has a fairly clean look to them. Supports boxplot, line plots, bar plots, histograms, scatter plots, regression, densities, and contours. Runs on vector graphics library Compose.jl
Pyplot: A wrapper for Matplotlib in python
Gaston: Basically a wrapper for GNUplot
Which graphing library is preferred for speed? Are one of the plots using a wrapper faster than the julia based ones?
I use Matplotlib so I am aware it is not the fastest, but has a lots of features. It seems like Gadfly would be the prefer julia based plotting library due to its ability to plot different graphs, is it customizable as matplotlib in terms of being able to control line thickness, point shapes, create dotted lines?
Speed is a tough question to answer because it depends strongly on exactly what you are plotting, and what you are plotting to. There is not a fastest overall.
Gadfly has the best interface, I think, because it is in Julia and is written for Julia. Compose is also very powerful in its own right (see, e.g. graph plotting).
For publication-quality plots though, I feel you still need to use PyPlot/matplotlib. It has more control over how the plot appears - e.g. right now Gadfly doesn't support different dashed lines. I find myself using Gadfly where possible, and using PyPlot for more "final" graphics for black-and-white publication purposes.
Related
I would need create a chart like the one on the picture. I don't want to draw it by hand, since I need more of them. I prefer R CRAN for drawing charts, but would do also any other programming or plotting program. If possible pdf or eps outputs are preferable. Does anybody have an idea, what type of chart, or which R (or other SW) package would support something like that?
I have found the solution. Orange software package makes the charts.
https://docs.orange.biolab.si/3/data-mining-library/reference/evaluation.cd.html
I would like to draw $3$ dimensional scatter plots, or more precisely I have a program that gives me the mass distribution in the unit cube with respect to a 3 dimensional equidistant grid. You can interpret this as a continuous relaxation of a $3$ dimensional assignment problem if you want.
Anyway this is just to give you a very brief background since my actual problem is not really concerned with the maths behind the procedure but with the visualization. I have:
$n$ points in the unit cube $[0,1]^3$
each of the $n$ points is assigned a "weight" between $0$ and $\frac1n$ (typically a lot of the weights coincide, if there are too many different values, i use the cut command to reduce the range to, say $60$ different values)
And I'd like to plot the $n$ points in a color which corresponds to their weight.
Now I found the rgl Package in R which allows me to do exactly that and also provides a very nice interactive plot window but it doesn't seem to allow a "col key" parameter, i.e. I cannot add a continuous color legend to my plot.
On the other hand the package plot3D provides a function to do a $3$ dimensional scatterplot and easily allows me to add the col key. However plot3D does not work with interactive plots but merely gives me the option to specify the angle at which I want to look at the cube. In a $3$D setting I strongly prefer the interactive alternative.
Now is there a way to automatically add a continuous color legend to an rgl plot? If not, do you know why this hasn't been implemented? Or would you solve my problem completely different altogether?
P.S. sorry for the formatting, I'm new to SO and the math environment "$" doesn't seem to work here.
The reason this hasn't been implemented is because until fairly recently it wasn't easy to have a static legend and a dynamic plot in the same window.
Now it's easy; there's a legend3d() function that might do what you want, but I think you probably want a different sort of legend than it will draw. If you know how to draw what you want in 2D, you can use the bgplot3d() function to put it in the background of your plot.
Both of those options give bitmapped legends. It would also be possible to do vector-based legends, but that would be quite a bit more work.
I am trying to implement violin plots using Qt. I have checked the internet for resources about the matter but so far I have only found examples that have been implemented using R and Python. Does Qt -or maybe Qwt for that matter- possess the relevant tools to implement these, or should I switch my platform? Thanks.
Qt has a suite of various drawing tools, as violin plots are no different to any other diagram, you should easily be able to draw them yourself using QPainter.
Just to be clear, I'm talking about drawing violin plots, you will of course have to implement the math and data structures for them yourself.
I am trying to render 739455 data point on a graph using R, but on the x-axis I can not view all those numbers, is there a way I can do that?
I am new to R.
Thank you
As others suggested, try hist, hexbin, plot(density(node)), as these are standard methods for dealing with more points than pixels. (I like to set hist with the parameter breaks = "FD" - it tends to have better breakpoints than the default setting.)
Where you may find some joy is in using the iplots package, an interactive plotting package. The corresponding commands include ihist, iplot, and more. As you have a Mac, the more recent Acinonyx package may be even more fun. You can zoom in and out quite easily. I recommend starting with the iplots package as it has more documentation and a nice site.
If you have a data frame with several variables, not just node, then being able to link the different plots such that brushing points in one plot highlights them in another will make the whole process more stimulating and efficient.
That's not to say that you should ignore hexbin and the other ideas - those are still very useful. Be sure to check out the options for hexbin, e.g. ?hexbin.
It is possible to use the shingles to define specific ranges in ggplot2. As far as i understand shingles are a way to generate groups. Can we create such shingles and use them in ggplot2 facet_grid to obtain graphs?
Following up from the comments, ggplot can't draw shingles (in the way lattice draws shingles with special indicators in the strip) and by default doesn't have a means of producing the overlapping groups.
However, I cam across this excellent PDF document which aims to produce a gpplot2 version of every figure in Depayan's excellent Lattice book (Lattice: Multivariate Data Visualization with R).
Page 31 contains a custom function fn() which replicates the behaviour of equal.count(), as far as I can tell, to provide the correct data structure to plot with overlapping shingles. The PDF contains plenty of examples of "shingles" in ggplot that you can play with.
So not sure if this answers the Q - but at least it appears one can fudge ggplot into producing plots that use the shingle concept.