Learn R Programming

QuantumOps (version 3.0.1)

plotprobs: plotprobs

Description

Plots the probabilities of each of the amplitudes of ket in a barplot

Usage

plotprobs(v,color=rep("Blue",length(v)),customLegend=FALSE,lgNm="",lgCl="")

Arguments

v

ket that is to be plotted

color

Text, possibly an array, specifying the colors of the bars

customLegend

Boolean specifying if a custom legend should be inserted

lgNm

Vector of legend names

lgCl

Vector of legend colors

Value

A plot

Examples

Run this code
# NOT RUN {
 plotprobs(ket(1,0,1,0),color=c("Red","Blue","Red","Blue"))
# }

Run the code above in your browser using DataLab