Plots can be embedded in Baysig documents generated on BayesHive. To generate a plot, put a value of a
Plot type in a question block, for instance:
Here is my plot ?> distPlot (normal 0 1) Thanks for watching!
In the following sections, we describe the different ways to create and manipulate Plot values.
There are a number of functions that take data of different types and turn them into plots
distPlot takes a distribution over real numbers and returns a histogram plot.
The hitogram plots give you a small input control to set the number of bins. This can be dynamically changed by the user.
distPlot (normal 0 1)
histogram takes a list of numbers (real or integers) as its argument and returns a histogram plot
fromTo 1 10 ⇒ [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
histogram (fromTo 1 10)
scatterPlot takes a list of pairs of numbers (either of which can be real or integers) and creates a scatter plot using the pairs as coordinates (as is conventional, the first pair component is plotted on the x-axis and the second on the y-axis).
xyData = zipWithNats (linspace 0 10 8) 1
xyData ⇒ [(1,0.0000), (2,1.2500), (3,2.5000), (4,3.7500), (5,5.0000), (6,6.2500), (7,7.5000), (8,8.7500)]
sigPlot plots a timeseries from a value of type
We Solve a simple differential equation to generate data for this example, but you can also use uploaded timeseries.
dt = 0.1 tmax = 10 s_0 = 1.0 D s t = - s t
psigPlot is the probabilistic equivalent of
sigPlot which takes a probability distribution over timeseries instead of a single value. Let's plot the
wiener distribution over Wiener processes: