Description Usage Arguments Details Value Author(s) See Also
View source: R/plot.data_network.R
plot.data_network
returns ggplot to visualize outputs from format_data_PPBstats()
1 2 3 4 5 6 7 | ## S3 method for class 'data_network'
plot(x, data_to_pie = NULL, variable = NULL,
pie_size = 0.2, plot_type = "network", in_col = "location",
labels_on = FALSE, labels_size = 4, organize_sl = FALSE,
x_axis = "germplasm", nb_parameters_per_plot_x_axis = 5,
nb_parameters_per_plot_in_col = 5, vec_variables = NULL, zoom = 6,
...)
|
x |
output from |
data_to_pie |
output from format_data_PPBstats with data_type = "data_agro" |
variable |
when data_to_pie is not NULL, variable to plot in a pie |
pie_size |
when data_to_pie is not NULL, size of the pie |
plot_type |
"network", "barplot" or "map" |
in_col |
factor in color that fill the barplot or the vertex of the network. It can be germplasm, location or year |
labels_on |
for plot_type = "network", labels to display on network for each vertex or location for map |
labels_size |
for plot_type = "network", size of the labels |
organize_sl |
for plot_type = "network", if TRUE, organize the network for unipart seed lots format with year in the chronological order on the x axis, location separated on the y axis |
x_axis |
for plot_type = "barplot" and unipart seed lots network, factor on the x axis It can be germplasm, location or year |
nb_parameters_per_plot_x_axis |
for plot_type = "barplot" and unipart seed lots network, number of parameter on the x_axis |
nb_parameters_per_plot_in_col |
for plot_type = "barplot" and unipart seed lots network, number of paramter by color that fill |
vec_variables |
for plot_type = "barplot" and unipart seed lots network, name of a relation type to display |
zoom |
zoom of the map, see ?get_map for more details |
... |
further arguments passed to or from other methods |
For network diffusion are represented by a curve. For organize_sl, The representation is possible if the seed_lots are under the following format : GERMPLASM_LOCATION_YEAR_DIGIT.
The seed_lot column from data_to_pie must refer to the seed_lot of the network. The results is a list of two elements for each variable:
nb_received: number of seed lots that end the relation
nb_given: number of seed lots that start the relation
S3 method. See the book for more details : https://priviere.github.io/PPBstats_book/describe-data-network.html
A list with ggplot object. For plot_type = "network", a list with as many elements as net with the network representation in ggplot format For plot_type = "barplot" and bipart network, it represents the number of edges per vertex for each germplasm and each location. For plot_type = "barplot" and unipart network on seed lots, it represents the number of edges per vertex for each germplasm and each location.
Pierre Riviere
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.