Skip to content

Latest commit

 

History

History
388 lines (250 loc) · 23.5 KB

docs.md

File metadata and controls

388 lines (250 loc) · 23.5 KB

Plotter Documentation

Welcome to Plotter, a bot for making data sets and graphs directly on Discord. The following documentation will list the commands you can use to access Plotter and it's functionalities.

This documentation can be found on Plotter's official github, https://github.com/Koalacards/Plotter/blob/main/docs.md

Plotter can be invited to anyone's Discord server using the following URL: https://discord.com/api/oauth2/authorize?client_id=836212383847809075&permissions=2147535872&scope=bot%20applications.commands

Table of Contents

How to Read the Documentation

Here is an example command setup:

test

/test [param1] (param2)

Description of the test command

  • param1: type : the first parameter in test
  • param2: type (default: ...): the second parameter in test

image

The command to enter is right after the forward slash (in this case, test), followed by parameters. Parameters in brackets [] are required for the command, and parameters in parenthesis () are optional.

The parameters are then listed, with the type required for the parameter (text, integer, floating point number, list of values) and a short description of what the parameter needs to be.

Help Command

help

/help (subset)

This is the default help command, which lists out all of the commands for use in Discord.

  • subset: text (default: ""): The particular page of commands to see; one of the options: dataset, features, generation, plots, utilityor no string which shows a landing page.

image

Dataset Commands

The following commands are used in order to create datasets and rows of data within the dataset, which will be used to create plots.

createdataset

/createdataset [name]

Creates a dataset under a certain name, which they will then reference when adding data.

  • name: text : The name of the dataset to create, can be any string.

image

removedataset

/removedataset [name]

Removes a pre-existing dataset the user has under a certain name (if it exists)

  • name: text : The name of the dataset to create, can be any string.

image

addnumberrow

/addnumberrow [dataset_name] [row_name] [numbers] (separator)

Adds a set of numbers to a dataset under a certain row name. If the row name does not exist, a row will be created with those numbers, and if the row name does exist the numbers will be added to the end of the row.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • row_name: text: The name of the row of data, or a pre-existing row to add to
  • numbers: text: The numbers to add as text, with the text being split by the separator given as an optional parameter
  • separator: text (default: " "): The separator for the numbers text, defaulted to a space

image

addrandomnumrow

/addrandomnumrow [dataset_name] [row_name] [amount_of_random_numbers] [minimum_number] [maximum_number]

Adds a randomly generated set of numbers to a dataset under a certain row name. If the row name does not exist, a row will be created with the numbers, and if the row name does exist the numbers will be added to the end of the row.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • row_name: text: The name of the row of data, or a pre-existing row to add to
  • amount_of_random_numbers: integer : The amount of random numbers that will be generated
  • minimum_number: floating point number: The minimum possible number to be generated (inclusive)
  • maximum_number: floating point number: The maximum possible number to be generated (inclusive)

image

addstringrow

/addstringrow [dataset_name] [row_name] [strings] (separator)

Adds a set of strings to a dataset under a certain row name. If the row name does not exist, a row will be created with those strings, and if the row name does exist the strings will be added to the end of the row.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • row_name: text: The name of the row of data, or a pre-existing row to add to
  • strings: text: The strings to add as text, with the text being split by the separator given as an optional parameter
  • separator: text (default: " "): The separator for the strings text, defaulted to a space

image

addcolorrow

/addcolorrow [dataset_name] [row_name] [strings] (separator)

Adds a set of colors (in hex code format) dataset under a certain row name. If the row name does not exist, a row will be created with those colors, and if the row name does exist the colors will be added to the end of the row.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • row_name: text: The name of the row of data, or a pre-existing row to add to
  • colors: text: The colors (in hex code format) to add as text, with the text being split by the separator given as an optional parameter
  • separator: text (default: " "): The separator for the colors text, defaulted to a space

image

addrandomcolorrow

/addrandomcolorrow [dataset_name] [row_name] [amount_of_random_colors]

Adds a randomly generated set of colors (in hex-code format) to a dataset under a certain row name. If the row name does not exist, a row will be created with the numbers, and if the row name does exist the numbers will be added to the end of the row.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • row_name: text: The name of the row of data, or a pre-existing row to add to
  • amount_of_random_colors: integer : The amount of random numbers that will be generated

image

removerow

/removerow [dataset_name] [row_name]

Removes a row of data from the given dataset, if the row and/or dataset names exist. If not the bot will do nothing

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • row_name: text: The name of the row of data, can be any string (command will not run if the user does not have a row in the dataset with the given name)

image

Viewing Datasets Commands

The following commands are used to view the data within a dataset, or to view the datasets a user has.

viewdatasets

/viewdatasets

View all datasets owned by the user.

image

viewdata

/viewdata [dataset_name]

Views the rows of data and values within rows for a given dataset.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)

image

viewdataintxt

/viewdataintxt [dataset_name]

Provides the rows of data and values within rows for a given dataset in a .txt file (this is useful for larger datasets that may not be able to show up on Discord due to Discord's 2000 character message limit).

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)

image

viewgraphdata

/viewgraphdata [dataset_name]

Views the saved graphs and properties of the graphs for a dataset. For information on how to save a graph, refer to the Plot Generation Commands.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)

image

viewgraphdataintxt

/viewgraphdataintxt [dataset_name] Provides the saved graphs and properties of the graphs for a given dataset in a .txt file (this is useful for larger datasets that may not be able to show up on Discord due to Discord's 2000 character message limit). For information on how to save a graph, refer to the Plot Generation Commands.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)

image

Plot Feature Commands

The following commands are used to set universal features of plots in a dataset, such as the title, axis options, and whether or not to include a legend. These commands should be used before the creation of a plot, unless the user wants the default matplotlib settings.

setplottitle

/setplottitle [dataset_name] [plot_title]

Sets the title of any plot created in the dataset. If this command is not called, the default title of each plot is the name of the dataset.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • plot_title: text: The title of the plot, can be any string

image

setaxisboundaries

/setaxisboundaries [dataset_name] [minimum_x] [maximum_x] [minimum_y] [maximum_y]

Sets the ranges for each of the x and y axes.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • minimum_x floating point number: The minimum x value for the axis
  • maximum_x floating point number: The maximum x value for the axis
  • minimum_y floating point number: The minimum y value for the axis
  • maximum_y floating point number: The maximum y value for the axis

image

setaxisoption

/setaxisoption [dataset_name] [axis_option]

Sets the axis option setting for each plot in the dataset. This is how axes can be scaled or slightly altered.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • axis_option: text: The axis option: which must be one of the following: on, off, equal, scaled, tight, auto, image, or square

image

setxticks

/setxticks [dataset_name] [ticks_row] (labels_row) (remove_ticks)

Sets the ticks for the x-axis of the graph, or the numbers that show ticked along the x axis. Optionally allows the user to add labels under the ticks, or to remove a pre-existing setting of ticks to go back to the matplotlib default.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • ticks_row: text: The name of a row of numbers in the dataset that will become the x ticks for the dataset plots
  • labels_row: text(default: ""): The name of a row of data (text or numbers) in the dataset that will be the x labels for the dataset plots. This row of data must be the same length as the row of ticks.
  • remove_ticks: text(default: "off"): Whether or not to remove a pre-existing ticks setting. Must be one of the following: on, off. If set to on, the settings given in the command will not be applied; the only thing that will occur is a reset of previous settings

image

setyticks

/setyticks [dataset_name] [ticks_row] (labels_row) (remove_ticks)

Sets the ticks for the y-axis of the graph, or the numbers that show ticked along the y axis. Optionally allows the user to add labels under the ticks, or to remove a pre-existing setting of ticks to go back to the matplotlib default.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • ticks_row: text: The name of a row of numbers in the dataset that will become the y ticks for the dataset plots
  • labels_row: text (default: ""): The name of a row of data (text or numbers) in the dataset that will be the y labels for the dataset plots. This row of data must be the same length as the row of ticks.
  • remove_ticks: text(default: "off"): Whether or not to remove a pre-existing ticks setting. Must be one of the following: on, off. If set to on, the settings given in the command will not be applied; the only thing that will occur is a reset of previous settings

image

legend

/legend [dataset_name] [legend]

Turns the legend option either on or off for plots in the dataset. If the legend option is on, then a legend will be created in the plot with labels equal to the label parameter in the plot commands. For more information, please refer to Plot Commands.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • legend: text: Whether the legend should be on or off, text must be one of the following options: on, off

image

Plot Commands

The following commands create the different types of graphs using the data in datasets and plot features set using the Plot Feature Commands.

scatterplot

/scatterplot [dataset_name] [x_row] [y_row] (x_label) (y_label) (size_row) (color_row_or_one_color) (transparency) (saveas)

Creates a scatterplot with the following properties and dataset data.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • x_row: text: The name of a row of numbers in the dataset corresponding to the x values in the scatterplot. Command will not run if the row does not exist or the row is not a row of numbers
  • y_row: text: The name of a row of numbers in the dataset corresponding to the y values in the scatterplot. This row must contain the same number of values as the x row. Command will not run if the row does not exist or the row is not a row of numbers
  • x_label: text(default: ""): The label for the x axis of the plot
  • y_label: text(default: ""): The label for the y axis of the plot
  • size_row: text(default: ""): The name of a row of numbers in the dataset corresponding to the size of each scatter in the scatterplot. This row must contain the same number of values as the x and y rows. Command will not run if the row does not exist or the row is not a row of numbers
  • color_row_or_one_color(default: ""): text: EITHER the name of the row of colors in the dataset corresponding to the size of each scatter OR a single color hex code for all scatters in the plot. If the input is a row, the row must contain the same number of values as the x, y and size rows, and must also exist in the dataset and contain only colors
  • transparency(default: 1): floating point number: A number between 0 and 1 determining how transparent the scatters are, from 0 being invisible to 1 being fully opaque
  • save_as(default: ""): text: A name to save the graph as so that it can be generated easily. To generate graphs, view the Plot Generation Commands. The graph will then show up in the viewgraphdata and viewgraphdataintxt commands

image

bargraph

/bargraph [dataset_name] [x_row] [height_row] (x_label) (y_label) (width) (bottom_coords_row) (align) (color_row_or_one_color) (label) (saveas)

Creates a bar graph with the following properties and dataset data.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • x_row: text: The name of a row of numbers in the dataset corresponding to the x values in the bar graph. Command will not run if the row does not exist or the row is not a row of numbers.
  • height_row: text: The name of a row of numbers in the dataset corresponding to the height values in the bar graph. This row must contain the same number of values as the x row. Command will not run if the row does not exist or the row is not a row of numbers
  • x_label: text(default: ""): The label for the x axis of the plot
  • y_label: text(default: ""): The label for the y axis of the plot
  • width: floating point number(default: 0.8): The width of all of the bars
  • bottom_coords_row: text(default: ""): The name of a row of numbers in the dataset corresponding to the initial heights of each bar in the bar graph. This row must contain the same number of values as the x row and heigh row. Command will not run if the row does not exist or the row is not a row of numbers
  • align: text(default: "center"): The alignment of the bars, must be one of: center, edge
  • color_row_or_one_color(default: ""): text: EITHER the name of the row of colors in the dataset corresponding to the size of each bar OR single color hex code for all sbars plot. If the input is a row, the row must contain the same number of values as the x and height rows, and must also exist in the dataset and contain only colors
  • save_as(default: ""): text: A name to save the graph as so that it can be generated easily. To generate graphs, view the Plot Generation Commands. The graph will then show up in the viewgraphdata and viewgraphdataintxt commands

image

Plot Generation Commands

These commands generate previous plots that were created using the save_as parameters in either graph creation or combination.

plotgenerate

/plotgenerate [dataset_name] [saved_plot_name]

Generates a plot using the given saved_plot_name, which should be the name of a previously saved plot in the dataset. The viewgraphdata command can be used to see which graph names have been saved.

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • saved_plot_name: text: The name of the previously saved plot to generate (command will not run if the name of the plot does not exist)

image

plotcombine

/plotcombine [dataset_name] [first_plot_name] [second_plot_name] (saveas)

Combines the two given saved plots into one, where both data plots will show up together. Note: The x and y labels for the graph will be from the first plot, NOT the second!

  • dataset_name: text: The name of the dataset, can be any string (command will not run if user does not have a dataset with the given name)
  • first_plot_name: text: The name of the first previously saved plot to combine, using this plot's label information for the combined plot (command will not run if the name of the plot does not exist)
  • second_plot_name: text: The name of the second previously saved plot to generate (command will not run if the name of the plot does not exist)
  • save_as(default: ""): text: A name to save the combined graph as so that it can be generated easily. The graph will then show up in the viewgraphdata and viewgraphdataintxt commands

image

Utility Commands

These commands have various functions that do not involve creating datasets or plots

report

/report [report]

Allows the user to report the bug directly for the developer(s) to see.

  • report: text: The bug/problem to report

image

suggest

/suggest [suggestion]

Allows the user to submit a feature suggestion directly for the developer(s) to see.

  • suggestion: text: The suggestion offered by the user

image

invite

/invite

Provides a URL for users to invite Plotter to their servers.

image

support

/support

Provides a link to the offical Plotter support server, where they will be able to get more in-depth assistance.

image