Plotting
Plot Graph
The primary method for visualizing Collections is the plot_graph
function. It has many different versions.
The function plot_graph(col::Collection, ticker::String, ind::Integer; data_field=:default_price_field)
: plots the graph for a specific asset with the given ticker at a specified index/sample within the asset. A negative index will plot the corresponding index from the end where -1 represents the last index.
There are also versions where the ticker or the index are not specified. The first one may be used in the case the Collection contains only one asset and the second one plots the last index of the asset. These may also be used in conjunction with the Collection Manipulation methods.
Another, related function for plotting is:
plot_whole_graph(col::Collection, ticker::String; data_field=:default_price_field)
: Similar to the plot_graph
function, it provides a way to plot a graph over all the samples of an asset. Not all Layer types implement this function.
Plotting for Discrete Collections
For discrete Collections, where you need to specify a date in addition to the ticker and sample index:
Utility Functions
TFire provides several utility functions for creating custom plots:
plot_line
: Creates a line plotplot_bar
: Creates a bar plotplot_marker
: Creates a scatter plot with markers
Setting Color Theme
Set the global color theme using:
set_color_theme(theme::Symbol)
Available themes are :light
and :dark
.