{"id":27455088,"url":"https://github.com/pravetz/cs-gnuplot","last_synced_at":"2025-04-15T15:16:36.271Z","repository":{"id":287429811,"uuid":"963250454","full_name":"Pravetz/CS-Gnuplot","owner":"Pravetz","description":"Minimalistic \"binding\" of gnuplot for C#","archived":false,"fork":false,"pushed_at":"2025-04-11T17:38:17.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-15T15:16:32.166Z","etag":null,"topics":["c-sharp","gnuplot"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pravetz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-09T11:46:53.000Z","updated_at":"2025-04-11T17:38:21.000Z","dependencies_parsed_at":"2025-04-11T17:48:20.772Z","dependency_job_id":"a0cb2a01-3e93-480e-9a0d-fb4f1722dda6","html_url":"https://github.com/Pravetz/CS-Gnuplot","commit_stats":null,"previous_names":["pravetz/cs-gnuplot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pravetz%2FCS-Gnuplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pravetz%2FCS-Gnuplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pravetz%2FCS-Gnuplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pravetz%2FCS-Gnuplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pravetz","download_url":"https://codeload.github.com/Pravetz/CS-Gnuplot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249094935,"owners_count":21211837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","gnuplot"],"created_at":"2025-04-15T15:16:35.501Z","updated_at":"2025-04-15T15:16:36.265Z","avatar_url":"https://github.com/Pravetz.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## CS-Gnuplot\nThis is a simple Gnuplot \"binding\" for C# in one `Gnuplot.cs` file, which provides user with Gnuplot class with possibilities plotting data to `.png` files plus some configurations like type of plots and colors.\nFor this utility to work, one needs gnuplot installed in his system and then provide path to it in any of the `Gnuplot` class constructors(`gp_path` argument).\n\n## Gnuplot constructors\nThere's a plenty of different constructors for Gnuplot, which serve for different use-cases:\n```csharp\n\npublic Gnuplot(string gp_path, string plot_save_path);\n```\nIs used to create Gnuplot instance with empty lists of line coordinates, colors and names, use it if you don't know your plot figures ahead of time and want to dynamically add objects to a plot.\n\n```csharp\n\npublic Gnuplot(string gp_path, string plot_save_path, int line_count, bool generate_colors);\n```\n\nIs used to create Gnuplot instance with pre-allocated `line_count` number of lines, their corresponding colors(generates random colors if `generate_colors` is `true`) and names, use it if you know the number of figures on your plot, but don't want to specify their colors and names beforehand.\n\n\n```csharp\n\npublic Gnuplot(string gp_path, string plot_save_path, string[] colors);\n```\n\nIs used to create Gnuplot instance with pre-allocated `colors.Length` number of lines, colors and names, use it if you know the colors of figures on your plot, but don't want to specify their names or explicit line count.\n\n\n```csharp\n\npublic Gnuplot(string gp_path, string plot_save_path, string[] names, bool generate_colors);\n```\n\nIs used to create Gnuplot instance with pre-allocated `names.Length` number of lines and colors, use it if you know the names of figures on your plot, but don't want to specify their colors or explicit line count.\n\n```csharp\n\npublic Gnuplot(string gp_path, string plot_save_path, string[] colors, string[] names);\n```\n\nIs used to create Gnuplot instance with pre-allocated `names.Length` number of lines and `colors.Length` number of colors, usually `names.Length == colors.Length`, but this is not mandatory for cases like ahead of time name/color definitions, for any reason user has to do so.\n\n## Important functions\nGnuplot class offers functions to create new lines(plot objects), set their gnuplot types(e.g. `linespoints`, `points`, `lines`), hex color values and, most importantly, coordinates.\n\n```csharp\n\npublic void create_lines(string[] names);\n```\n\n`create_lines` is used to grow list of lines and their data by `names.Length` entries, new entries immediately receive names from `names` array. Use this to dynamically add lines to your plots.\n\n```csharp\n\npublic void set_line_HEX_color(int line_id, string hex_value);\n```\n\n`set_line_HEX_color`, obviously, sets line color. Line is specified by `line_id`, `color` is a string containing hex-value in following format: \"#RRGGBB\", so, for bright red `color = \"#ff0000\";`\n\n```csharp\n\npublic void set_line_name(int line_id, string name);\n```\n\n`set_line_name` sets or updates `line_id`'s line name.\n\n```csharp\n\npublic void add_coords(double x, double y, int line_id);\n```\n\n`add_coords` appends new (x, y) pair to line at index `line_id`.\n\n\n```csharp\n\npublic void init_to_coords(double x, double y);\n```\n\n`init_to_coords` adds the initial (x, y) coordinate for ALL lines, that were allocated before it's call.\n\n```csharp\n\npublic void set_plot_type(string plot_type, int line_id);\n```\n`set_plot_type` sets gnuplot style for line at `line_id`, you can use any style specified in gnuplot's documentation (http://gnuplot.info/docs/Plotting_Styles.html)\n\n```csharp\n\npublic void set_default_plot_type_linespoints();\n```\n`set_default_plot_type_linespoints` sets `linespoints` style for all lines, that were allocated before it's call. This function is called automatically by all `Gnuplot` class constructors, that's why user usually doesn't need to explicitly call this, unless adding dynamically adding lines to `Gnuplot` and there's a need to set default style \"just in case\".\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpravetz%2Fcs-gnuplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpravetz%2Fcs-gnuplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpravetz%2Fcs-gnuplot/lists"}