An implementation of matplot with nice coloring and automatic legend generation
multi_plot(data, plot_columns = NULL, legend_location = "bottomleft",
xlabel = "", ylabel = "", category = "", output_pdf = FALSE,
pdf_name = NULL, height = 5, width = 8, connect_with_lines = FALSE,
order_by_col = NULL, normalize = FALSE)
A data.frame or matrix we wish to plot.
A numeric vector of column indexes we wish to plot. Defaults to NULL in which case all columns are plotted.
Defaults to "bottomleft" but can be changed to any of "left", "topleft", "top", "topright", "right", "bottomright", "bottom".
The label we wish to give the X axis. Defaults to no label.
The label we wish to give the Y axis. Defaults to no label.
The label we wish to give to the legend box.
Defaults to FALSE. If TRUE, then the plot is output to a pdf with pdf_name to the current working directory.
The name we wish to give out pdf. No .pdf extension is required as it is automatically appended.
The height of the optional .pdf file generated by this function. Defaults to 5 (inches).
The width of the optional .pdf file generated by this function. Defaults to 8 (inches).
Logical indicating whether dots should be connected with a line, defaults to FALSE.
Defaults to NULL. If not NULL, then a column index (must be in plot_columns) may be specified. The values of this column are used to sort X values in decreasing order in the resulting plot.
Defaults to FALSE, if TRUE, then each column will be normalized by dividing it by its maximum absolute value.
A plot.