Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sumrix/consoleplot
C# library for console graph plotting with customizable styles
https://github.com/sumrix/consoleplot
Last synced: 10 days ago
JSON representation
C# library for console graph plotting with customizable styles
- Host: GitHub
- URL: https://github.com/sumrix/consoleplot
- Owner: Sumrix
- License: mit
- Created: 2024-09-15T18:42:21.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-09-15T19:49:24.000Z (2 months ago)
- Last Synced: 2024-09-16T20:17:35.946Z (about 2 months ago)
- Language: C#
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ![Icon](images/icon_32x32.png) ConsolePlot
ConsolePlot is a .NET library for creating customizable line charts in the console.
Complete documentation is available at the [API documentation](docs/API.md).
[![Latest version](https://img.shields.io/nuget/v/ConsolePlot.svg)](https://www.nuget.org/packages/ConsolePlot)
## Quick Start
To use ConsolePlot, first install the [NuGet Package](https://www.nuget.org/packages/ConsolePlot):
```sh
dotnet add package ConsolePlot
```Here's a simple example to get you started:
```csharp
using ConsolePlot;Console.OutputEncoding = System.Text.Encoding.UTF8;
double[] xs = [1, 2, 3, 4, 5];
double[] ys = [1, 4, 9, 16, 25];Plot plt = new Plot(80, 22);
plt.AddSeries(xs, ys);
plt.Draw();
plt.Render();
```This will create a simple plot in your console:
## Features
- Customizable axis, grid, ticks and chart lines.
- Support for multiple data series.
- Adaptive scaling: automatically adjusts the plot to fit the console window, ensuring round axis labels, optimal tick placement, and alignment with console cells.## Examples
You can find various usage examples in the [ConsolePlot.Examples](src/ConsolePlot.Examples) project.
### Running Examples in Visual Studio:
1. Clone this repository by clicking "Open with Visual Studio" on the GitHub page.
2. Open the solution and set `ConsolePlot.Examples` as the startup project.
3. Run the project.### Running Examples from the Command Line:
```sh
git clone https://github.com/sumrix/ConsolePlot.git
cd ./ConsolePlot/src
dotnet build
dotnet run --project ConsolePlot.Examples
```## Contributing
Bug reports and contributions are welcome. Please submit them via the [Issues](https://github.com/Sumrix/ConsolePlot/issues) or [Pull Requests](https://github.com/Sumrix/ConsolePlot/pulls).