Generic function to plot different objects returned by some Rbitcoin functions. The plot produce basic visualization of the data. The plots will likely be subject to change in future versions.

Usage

1
2
3

Arguments

x

object to be plotted, result of Rbitcoin function, currently supported: market.api.process with action in c("trades","order_book"), wallet_manager with archive_read = TRUE.

mask

logical, default FALSE, setting TRUE will mask values on wallet manager plot with the ratio of value to the initial value. Use this when you want to share the plot. See examples to mask the bitcoin address.

export

logical default FALSE, if TRUE the plot will be exported to file instead of plot to ploting device.

export.args

list of arguments to be passed to target graphic device function, ex. svg() or png(), list gives the control over width and height which by default for png are quite small. Element export.args[['format']] will be mapped to the function name, by default svg(), any others as its args.

...

additional params to be passed to plot function.

verbose

integer. Rbitcoin processing messages, print to console if verbose > 0, each subfunction reduce verbose by 1. If missing then getOption("Rbitcoin.verbose",0) is used, by default 0.

Value

TRUE

Export

Element format in the export.args list defines the export format, default "svg", tested and supported formats are "svg" and "png", other might work also.
To use custom export filename just pass the filename arg to export.args list. By default NULL results timestamped by last wallet_id filename. Use custom export.args[['filename']] with no file extension while declaring.
You may notice the legend is different on exported files. The same legend was not scalling well between export to file and plot to interactive device.

input trades, order_book

The plot function for trades, order_book do not process the data, it plot the data as is, so it may result poor visibility due to the data itself (ex. order_book containing asks with enormously high price). See examples how this can be handled.

input wallet manager

To be able to track wallet assets value over time user needs to use archive_write=TRUE at least twice in wallet manager processing (with non-NA measures). Using the cryptocurrency which do not have any exchange path to transfer_currency_pair and/or value_currency will result NA as value. Error on data downloading from external sources (wallets or exchange rates) will also result NA. Any wallet processing batch which will contain at least one NA measure will be omitted from plot. If you have some crypto not currenctly supported you may extend dictionary for more currencies or provide its value as manual source to wallet_manager already calculated in common value currency, remember to comment out the previous source which returns the NA measure. To plot wallet manager data load wallet archive data, see examples. Plotting function will produce dashboard panel to track different measures of your assets and its value. Use mask if you want to share the results to somebody, it will overwrite value with value ratio.
Target value currency is taken from the last execution of wallet_manager.