Help:Drawing graphs: Difference between revisions
m (→See also) |
|||
Line 162: | Line 162: | ||
* Upload the file to Opasnet and copy a link to the original Google document to the image page. | * Upload the file to Opasnet and copy a link to the original Google document to the image page. | ||
* Use like any image. | * Use like any image. | ||
=== Sankey diagrams === | |||
There is no established approach to Sankey diagrams. A few packages provide with functionalities, but the usebility and user-friendliness has not been tested. | |||
* [http://tagteam.harvard.edu/hub_feeds/1981/feed_items/227688 Harvard tagteam: rCharts] [http://www.r-bloggers.com/generating-sankey-diagrams-from-rcharts/ R bloggers] | |||
** [http://timelyportfolio.github.io/rCharts_d3_sankey/example_build_network_sankey.html Sankey from scratch using rCharts] | |||
* [https://gist.github.com/aaronberdanier/1423501 Aaronberdanier: SankeyR function] | |||
** [http://biologicalposteriors.blogspot.fi/2010/07/sankey-diagrams-in-r.html Biological posteriors: Sankey diagrams] | |||
* [http://stackoverflow.com/questions/9968433/sankey-diagrams-in-r Riverplot (and SankeyR?)] | |||
* [http://www.sankey-diagrams.com/ General Sankey diagram website] | |||
==See also== | ==See also== |
Revision as of 10:53, 15 May 2014
Moderator:Jouni (see all) |
|
Upload data
|
Question
How to draw graphs in Opasnet?
Answer
R-tools
In R-tools, you have the functionalities of R available. We recommend that you use the package ggplot2 whenever possible. It is very powerful, and borrowing good ideas from others is easier if we all use the same approach. Of course, it is also possible to use plot' (a kind of basic graph) as well, but the limits come sooner. This is an example code that contains all kinds of examples with comments.
rlnorm
- Graph for cumulative probability distributions
Colours and ordering of bars
Google charts
This is how you can make fancy Google motion or map charts. See documentation for R package googleVis and Google's help.
Maps and GIS-based data
There are several methods to produce maps. These are described on Opasnet map.
GoogleDocs
GoogleDocs is the method of choice for drawing causal diagrams.
- Make a drawing.
- Share it with everyone with open editing.
- Download is in png or svg format.
- Upload the file to Opasnet and copy a link to the original Google document to the image page.
- Use like any image.
Sankey diagrams
There is no established approach to Sankey diagrams. A few packages provide with functionalities, but the usebility and user-friendliness has not been tested.
- Harvard tagteam: rCharts R bloggers
- Aaronberdanier: SankeyR function
- Riverplot (and SankeyR?)
- General Sankey diagram website
See also
- Plotting means and error bars
- Cookbook for R: Scatterplots
- Scales of x and y axes
- Add a smoothed conditional mean
- theme_grey
- Different histograms
- Scale and flip graphs with coord_cartesian. Note that coord_flip() can take coord_cartesian() parameters.
- Parameters for geom_density (adjust, fill,...)