get.ggplot: Get ggplot objects from ''

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/get.ggplot.R


get.ggplot generates ggplot objects from data-set


get.ggplot(data, data_network = NULL, correlated_group = NULL,
  merge_g_and_s = TRUE, ggplot.type = NULL, ggplot.display = NULL,
  ggplot.on = "son", x.axis = NULL, in.col = NULL, vec_variables = NULL,
  nb_parameters_per_plot_x.axis = NULL,
  nb_parameters_per_plot_in.col = NULL, vertex.size = 3,
  vertex.color = "year", = FALSE, labels.on = "son", = "all", = TRUE,
  labels.generation = "local", labels.size = 3, = "france",
  pie.size = 0.5)



output from with query.type = "network" or query.type = "data-...".


for ggplot.type == "", the network ot plot the variable coming from data argument (that must be "data-classic").


Name of the group of correlation in data. NULL by default meaning that$data$data is taken.


Fuse germplasm and selection name information in a column named germplasm. TRUE by default.


the type of plot you wish. NULL by default: according to the type of data, it will be "network-all" or "data-all". "X-all" means that all the "X-" objects are done. The possibilites are:

  • for "network-": "network-network", "network-reproduction-sown", "network-reproduction-harvested", "network-reproduction-positive-inter-selected", "network-reproduction-negative-inter-selected", "network-reproduction-crossed", "network-diffusion-sent", "network-diffusion-received", "network-diffusion-relation", "network-mixture", "network-positive-intra-selected", "network-Mdist".

  • for "data-":

    • "data-barplot"

    • "data-boxplot"

    • "data-interaction"

    • "data-radar"

    • "data-biplot"

    • "" (only for data-classic).

    • "" (only for data-classic).


For "network-" data: "barplot", "map". It can be a vector of several elements i.e. c("barplot", "map"). NULL by default: both are done.


For "data-" type. "father" or "son" depending on which seed-lot you want to plot.


factor displayed on the x.axis of a plot: "germplasm", "year" or "person" referring to the attributes of a seed-lots. If NULL, all the combinaison are done for x.axis and in.col.


factor displayed in color of a plot: "germplasm", "year" or "person" referring to the attributes of a seed-lot. If NULL, in.col is not displayed. Note that it is compulsory for data-biplot and data-radar as in these cases x.axis is not used.


For "data-" type : a vector of variables displayed.


The number of parameters per plot on x axis arguments


The number of parameters per plot for in.col arguments


For ggplot.type = "network", size of the vertex


For ggplot.type = "network", color of the vertex. It can be chosen according to "person", "germplasm" or "year". If NULL, it is in black.

For ggplot.type = "network", organizes seed-lots for an easier visualization


"son" or "father". For ggplot.type = "data-biplot" chooses if labels are on son or father seed-lots. For other "data-..." plots, there are no labels as it is managed by x.axis and in.col.

For ggplot.type = network-network and data-biplot. Parts of the label hidden: "germplasm", "person", "year", "person:germplasm", "year:germplasm", "person:year", "all". "all" means that no labels are dispayed. If NULL labels are displayed. Labels are based on seed-lots names under the form germplasm_year_person_digit. For "data-biplot", the default value is NULL. For an easier visualization, digit is never displayed unless you choose NULL. Note that with ggplot.type "network-" and ggplot.display = "map", hide.labels.part can be NULL or "all" as only person can be displayed.

For ggplot.type = "network-network". If TRUE, displays the sex of the seed-lot if it has been used in a cross. Nothing is displayed if = "all".


For ggplot.type = "network-network". If "local", displays generation number on a given location for each reproduction. If "total", displays generation number since the information is known for each reproduction. A confidence in the information is given between brackets: 0 or 1. For exemple F8 (0) for the 8th generation with a confidence of 0.


Size of the labels

Location of the map. See ?map_data, argument map, for more details.


Size of the pie when using pies


For data coming from query.type = "data-S" and "data-SR", NA are put when there are no data for bouquet AND vrac

For data-radar, it is the mean which is represented

For data-biplot note that no plots are possible for between raw data linked to individuals and raw data linked to relation.


The function returns a list with several ggplot objects according to the data and ggplot.type used.

  1. For "network-" type it returns a list with ggplot objects representing the network and for each relation (i) barplots with the number of populations (ii) maps for each year

    • the network (ggplot.type = "network-network")

    • a series of ggplots for reproduction:

      • sown seed-lots (ggplot.type = "network-reproduction-sown")

      • harvested seed-lots (ggplot.type = "network-reproduction-harvested")

      • positive inter selected seed-lots (ggplot.type = "network-reproduction-positive-inter-selected")

      • negative inter selected seed-lots (ggplot.type = "network-reproduction-negative-inter-selected")

      • seed-lots involved in crosses (ggplot.type = "network-reproduction-crossed")

    • a series of ggplots for diffusion representing:

      • the seed-lots sent (ggplot.type = "network-diffusion-sent")

      • the seed-lots received (ggplot.type = "network-diffusion-received")

      • the relation between seed-lots on maps (ggplot.type = "network-diffusion-relation"). The size of the arrows is proportionnal to the number of diffusions.

    • a series of ggplots for mixtures representing:

      • the seed-lots coming from 'real' mixtures (ggplot.type = "network-mixture-real")

      • the seed-lots coming from mixtures of replication (ggplot.type = "network-mixture-rep")

      • the seed-lots coming from all mixtures (ggplot.type = "network-mixture-all")

    • a series of ggplots for selection (ggplot.type = "network-positive-intra-selected")

  2. For "data-" type, plots are displayed for each variable of vec_variables for "data-barplot", "data-boxplot", "data-interation". It is all possible pairs for "data-biplot". It is all the variables for "data-radar".


Pierre Riviere

See Also


# See the vignette

priviere/shinemas2R documentation built on Oct. 17, 2017, 11:24 a.m.