SupportIf you like "Number Plotter" please consider supporting it. Number PlotterThe "Number Plotter" is a vscode extension that takes a series of selected numbers and creates a plot out of it. Example / HowtoSelect the number series below, right-click and select "Plot->Line/Bar Chart":
You should see the following: This is a line plot of the selected numbers. You can change the color with the "Color" button and you can toggle between line and bar plot with the first button. Now select this number series. Select both lines. Again right-click and select "Plot->Line/Bar Chart":
You will see 2 plots, i.e. each select line becomes one data series: Again you can change the type: Apart from line/bar charts you can also display x/y graphs (i.e. scatter charts). Please select the numbers below, right-click and select "Plot->X/Y Chart":
When parsing the data the numbers are expected as x/y pairs. When shown you can change the order to y/x pairs with the button: Again you can also select several lines:
If you select several lines you have two more options for parsing the data: a) The first line contains only x values and the other lines contain y values for different data series b) vice versa. I.e. the first line contains the y values and the other lines the different x values. E.g. select the following lines, create the X/Y chart and select "First Line X" from the button:
SelectionsThe charts do remember the selection you made. At the top you find the file and the line(s) used for the chart. Followed by a short text containing the start of the number series. If you click on the filename then vscode will take you to the file and the line(s) used for the chart. The same lines will be selected again, so that you can always check what numbers have been used for the chart. Furthermore if you click on a bar or a point the correspondent number(s) will highlighted in the document. FormatsThe number-plotter is quite tolerant on its input. E.g. if you partly select text and create a chart of it then the internal parser will skip everything that is not a number and use only the numbers to generate a chart of it. E.g. the following will create a valid chart with the number 1, 3, 2:
Also, it does not matter which number separator you use. Be it a space, a tab, a colon or what ever. If you, however, find a parsing problem please report it. Here are examples of number formats that are recognized:
AcknowledgementsThis extension makes heavy use of the "chart.js", the "chartjs-plugin-zoom" and the "hammer.js" libraries. Many thanks to the authors. |