2.2 Describe the data

The different representations are done with the plot function.

2.2.1 unipart network on seed lots

For network representation, set plot_type = "network" diffusion event are displayed with a curve. in_col can be settled to customize color of vertex.

p_net = plot(net_unipart_sl, plot_type = "network", in_col = "location")
p_net
## [[1]]
## [[1]]$network

In order to get the network organized in a chronologiical order and by location, set organize_sl = TRUE. This representation is possible if the seed lots are under the following format : GERMPLASM_LOCATION_YEAR_DIGIT.

p_net_org = plot(net_unipart_sl, plot_type = "network", in_col = "location", 
                              organize_sl = TRUE)
p_net_org
## [[1]]
## [[1]]$network

To have information on the seed lots that are represented, plot_type = "barplot" can be used. Choose what to represent on the x axis and in color as well as the number of parameter per plot.

p_bar = plot(net_unipart_sl, plot_type = "barplot", in_col = "location", 
                          x_axis = "germplasm", nb_parameters_per_plot_x_axis = 5, 
                          nb_parameters_per_plot_in_col = 5)
p_bar[[1]]$barplot$`germplasm-1|location-1` # first element of the plot

2.2.2 unipart network on location

For network representation, set plot_type = "network" diffusion event are display with curve. in_col can be settle to customize color of vertex. The curve between location represent the diffusion, the number of diffusion is displayed on a color scale.

p_net = plot(net_unipart_location_g, plot_type = "network", 
                          labels_on = TRUE, labels_size = 4)
## Warning in plot.data_network(net_unipart_location_g, plot_type =
## "network", : The following element are not taken into account because they
## have only one edge: M1 ,M2 ,M3 ,M4. igraph objet with only one edge are not
## handle by ggnetwork. See https://github.com/briatte/ggnetwork/pull/18
## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color
names(p_net) # one element per germplasm, the first element with all the data
## [1] "C1-C2-C3-C4-C5-C6-M1-M2-M3-M4" "C1"                           
## [3] "C2"                            "C3"                           
## [5] "C4"                            "C5"                           
## [7] "C6"
p_net$C1
## $network

p_net = plot(net_unipart_location_y, plot_type = "network", 
                          labels_on = TRUE, labels_size = 4)
## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color
names(p_net) # one element per year, the first element with all the data
## [1] "2012-2013-2014" "2012"           "2013"           "2014"
p_net$`2012-2013-2014`
## $network

2.2.3 bipart network on germplasm and location

p_net = plot(net_bipart, plot_type = "network", 
                          labels_on = TRUE, labels_size = 4)
## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color

## Warning: Ignoring unknown parameters: segment.color
names(p_net) # one element per year, the first element with all the data
## [1] "2010-2011-2012-2013-2014" "2010"                    
## [3] "2011"                     "2012"                    
## [5] "2013"                     "2014"
p_net$`2014`
## $network

With barplots, it represents the number of edges per vertex for each germplasm and each location.

p_bar = plot(net_bipart, plot_type = "barplot")
names(p_bar) # one element per year, the first element with all the data
## [1] "2010-2011-2012-2013-2014" "2010"                    
## [3] "2011"                     "2012"                    
## [5] "2013"                     "2014"
p_bar = p_bar$`2010-2011-2012-2013-2014`$barplot
p_bar$germplasm

p_bar$location