Skip to content

Radar graph#430

Merged
swharden merged 8 commits intoScottPlot:masterfrom
bclehmann:radar-graph
Jun 1, 2020
Merged

Radar graph#430
swharden merged 8 commits intoScottPlot:masterfrom
bclehmann:radar-graph

Conversation

@bclehmann
Copy link
Member

New contributors should review CONTRIBUTING.md:
https://github.com/swharden/ScottPlot/blob/master/CONTRIBUTING.md

Purpose:
#428

New functionality (code):
Provide a code example demonstrating new functionality achieved with this pull request (if applicable)

double[,] values = { { 78, 83, 84, 76, 43 }, { 100, 50, 70, 60, 90 } };
plt.PlotRadar(values);

New functionality (image):
image

image

@swharden
Copy link
Member

Wow! I saw this message in my inbox earlier in the week and thought the screenshot was of another plotting library. This is really cool! I'll make a couple tweaks but this is merging in today. Thanks so much @Benny121221!

@swharden
Copy link
Member

swharden commented Jun 1, 2020

I'm on the fence about the legend color. I'm leaning toward making it the same color as the fill...

image

Probably the best solution would be to refactor the legend to support a true rectangle shape (not just a fat line) with a definable edge color. If we go there let's do it in another PR

@swharden swharden merged commit 473c54b into ScottPlot:master Jun 1, 2020
@swharden
Copy link
Member

swharden commented Jun 1, 2020

@Benny121221 FYI, this is a nightmare topic, and something I'm not going to even to suggest trying to fix because it's broken everywhere in ScottPlot* but I wanted you to be aware of it: Many System.Drawing objects implement IDisposable and have to be manually deleted, otherwise the garbage collector has to do a ton of work. The proper way to use these objects is to wrap them in using statements.

The things you'd expect are IDisposable:

  • System.Drawing.Image
  • System.Drawing.Bitmap
  • System.Drawing.Graphics

... but so are these doozies:

  • System.Drawing.Pen
  • System.Drawing.Brush
  • System.Drawing.Font
  • System.Drawing.FontFamily
  • System.Drawing.StringFormat

*The reason I suggest not worrying about it in ScottPlot currently is I'm working toward abstracting System.Drawing out of ScottPlot to make it easier to use another rendering system. When I do this refactor I'll respect IDisposable everywhere.

swharden added a commit that referenced this pull request Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants