ep3 = plt.errorBarY("S1", t, "X", "Y", "YLow", "YHigh").show()
epBy3 = plt.errorBarYBy("S1", t, "X", "Y", "YLow", "YHigh", "USym").show()

doubles = [3, 4, 3, 5, 4, 5]
time = 1491946585000000000
t = tt.newTable(tt.col("USym", ["A", "B", "A", "B", "A", "B"]),
                tt.doubleCol("Open", doubles), tt.doubleCol("High", doubles),
                tt.doubleCol("Low", doubles), tt.doubleCol("Close", doubles))

t = t.updateView("Time = new DateTime(time + (MINUTE * i))")

ohlc = plt.ohlcPlot("Test1", t, "Time", "Open", "High", "Low", "Close")

ohlcPlotBy = plt.figure().newChart(0)\
    .chartTitle("Chart Title")\
    .newAxes()\
    .xLabel("X")\
    .yLabel("Y")\
    .ohlcPlotBy("Test1", t, "Time", "Open", "High", "Low", "Close", "USym")

categories = ["Samsung", "Others", "Nokia", "Apple", "MSFT"]
valuesD = [27.8, 55.3, 16.8, 17.1, 23.1]
valuesI = [27, 55, 16, 17, 15]

ap = plt.plot("S1", valuesD, valuesI).show()
ap = plt.plot3d("S1", valuesI, valuesI, valuesI).show()

acp = plt.catPlot("S1", categories, valuesI).show()
acp2 = plt.catPlot3d("S1", categories, categories, valuesD).show()

achp = plt.catHistPlot("S1", categories).show()
Exemple #2
0
# Category Histogram
catHist = Plot.catHistPlot("Number of Trades", trades, "Sym")\
   .chartTitle("Trades per Symbol")\
   .show()

# Open, High, Low and Close
ohlcPlot = Plot.ohlcPlot("MSFT", summaries.where("Ticker=`MSFT`"), "EODTimestamp", "Open", "High", "Low", "Close")\
   .chartTitle("Microsoft Activity")\
   .show()

# Grouping Multiple Plots in the Same Figure
multipleCharts = Plot.figure(2, 3)\
   .figureTitle("Trade Plots")\
   \
   .colSpan(3)\
   .plot("Microsoft", trades.where("Sym=`MSFT`"), "ExchangeTimestamp", "Last")\
   .twinX()\
   .plot("Apple", trades.where("Sym=`AAPL`"), "ExchangeTimestamp", "Last")\
   .chartTitle("Price Over Time")\
   \
   .newChart()\
   .histPlot("MSFT", trades.where("Sym=`MSFT`"), "Last", 3)\
   .chartTitle("Price Intervals")\
   \
   .newChart()\
   .colSpan(2)\
   .ohlcPlot("MSFT", summaries.where("Ticker=`MSFT`"), "EODTimestamp", "Open", "High", "Low", "Close")\
   .chartTitle("Microsoft Activity")\
   \
   .show()