Parent Previous Next


plot(input[, labels[, titles[, chartType]]])


input could be a vector, tuple, matrix, or table.

labels are the label for each data point. All series of a chart share the same data labels. If input is a matrix, we can set matrix's row labels as data point labels. Otherwise, we need to specify data point labels here if necessary.

titles could be a string scalar/vector. If titles is a scalar, it is the chart title; if it is a vector, the first element is the chart title, the second is X axis title, and the third is Y axis title.

The default chart type is LINE. Other options available now are PIE, COLUMN, BAR, AREA, and SCATTER.


plot is a system function that generates a chart object.






The graph above can also be generated by plot(t[`x`y]).

plot([sin,cos](x),x,"cos and sin curve")

Note that function names are used as series names, and we specify data labels and the graph title.

plot(cumsum(x) as cumsumX, 2012.10.01+1..100, "cumulative sum of x")

plot([1..10 as x, 10..1 as y], 1..10)

plot(1..5 as value, `IBM`MSFT`GOOG`XOM`C, `rank, BAR)

plot(99 128 196 210 312 as sales, `IBM`MSFT`GOOG`XOM`C, `sales, COLUMN)

plot(99 128 196 210 312 as sales, `IBM`MSFT`GOOG`XOM`C, `sales, PIE)

x=rand(1.0, 1000);

y=x+norm(0, 0.2, 1000);

plot(x, y, ,SCATTER)