Learn R Programming

swissMrP (version 0.62)

plot: Plots swissMrP Objects

Description

This function plots the results of swissMrP.

Usage

# S3 method for swissMrP
plot(x, conf.int = 0.95, col, design.dot = TRUE, lab, ...)

Arguments

x

Object returned from swissMrP().

conf.int

Confidence interval that should be displayed. Only meaningful if x is a matrix with dimensions 26*Number.sim.

col

Color for plot.

design.dot

Logical. If design.dot=TRUE the plot will display dots. If design.dot=FALSE the plot will display the cantonal abbreviations (ZH, BE, LU, ...).

lab

Label for x-axis. If there is no user specified label the default is Degree of Estimated Support.

Further graphical arguments can be used, e.g. main to specify a title.

Details

The design, when design.dot=FALSE, was added for Fabio Wasserfallen.

See Also

swissMrP, map.MrP

Examples

Run this code
# NOT RUN {
# fake data example
vec <- pnorm(rnorm(26))
class(vec) <- "swissMrP"
plot(vec, design.dot=FALSE, main="Simulated Data", 
             lab="Heterogeneous Preferences", col="green")

plot(vec, design.dot=TRUE, main="Simulated Data", 
             lab="Heterogeneous Preferences", col="blue")
# }

Run the code above in your browser using DataLab