plot.mldr: Generates graphic representations of an mldr object

Description Usage Arguments Examples

View source: R/graphics.R

Description

Generates graphic representations of an mldr object

Usage

1
2
3
## S3 method for class 'mldr'
plot(x, type = "LC", labelCount, labelIndices, title,
  ask = length(type) > prod(par("mfcol")), ...)

Arguments

x

The mldr object whose features are to be drawn

type

Indicates the type(s) of plot to be produced. Possible types are:

  • "LC" Draws a circular plot with sectors representing each label and links between them depicting label co-occurrences

  • "LH" for label histogram

  • "LB" for label bar plot

  • "CH" for cardinality histogram

  • "AT" for attributes by type pie chart

  • "LSH" for labelset histogram

  • "LSB" for labelset bar plot

labelCount

Samples the labels in the dataset to show information of only labelCount of them

labelIndices

Establishes the labels to be shown in the plot

title

A title to be shown above the plot. Defaults to the name of the dataset passed as first argument

ask

Specifies whether to pause the generation of plots after each one

...

Additional parameters to be given to barplot, hist, etc.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
library(mldr)
## Not run: 
# Label concurrence plot
plot(genbase, type = "LC") # Plots all labels
plot(genbase) # Same as above
plot(genbase, title = "genbase dataset", color.function = heat.colors) # Changes the title and color
plot(genbase, labelCount = 10) # Randomly selects 10 labels to plot
plot(genbase, labelIndices = genbase$labels$index[1:10]) # Plots info of first 10 labels

# Label bar plot
plot(emotions, type = "LB", col = terrain.colors(emotions$measures$num.labels))

# Label histogram plot
plot(emotions, type = "LH")

# Cardinality histogram plot
plot(emotions, type = "CH")

# Attributes by type
plot(emotions, type = "AT", cex = 0.85)

# Labelset histogram
plot(emotions, type = "LSH")

## End(Not run)

fcharte/mldr documentation built on Dec. 16, 2019, 12:56 p.m.