KarthikRIyer / swiftplot

Swift library for Data Visualization :bar_chart:
Apache License 2.0
398 stars 36 forks source link

Add Arrow Features #102

Closed WilliamHYZhang closed 4 years ago

WilliamHYZhang commented 4 years ago

Introducing some new features to our beloved Arrow annotation.

Some code reworkings to:

New features/styles include:

There will probably be some merge conflicts after #100 is merged... I'll resolve those when that happens.

KarthikRIyer commented 4 years ago

Also could you add a new test for this?

WilliamHYZhang commented 4 years ago

The intuition behind the addition of linePoints is not really for the curve (sorry I was a bit misleading), more so that if the user wants angled arrows such as in the shape of an L, etc. I'll roll it back for now.

Regarding the arrow styles, I tried to add all specified in the matplotlib documentation here, except for those such as Bracket, Wedge, which are not really arrows and would be added as a new annotation structure. I'll add some more head styles today.

WilliamHYZhang commented 4 years ago

@KarthikRIyer should be good to go.

KarthikRIyer commented 4 years ago

I like this. Just one more change. In the examples could you make the arrow stroke thickness a little lesser? It seems very thick now.

WilliamHYZhang commented 4 years ago

Sure, I'll do that and resolve the conflicts.

WilliamHYZhang commented 4 years ago

@KarthikRIyer Just checked, the arrow thickness is now set to the default width of 5 for all tests (this is what it was like before with the exception of the wedge arrow, which I changed to default and made a little less long). Resolved merge conflicts and also updated tests to use the new anchor functionality, let me know if anything else needs to be changed. Thanks!

KarthikRIyer commented 4 years ago

Looks good. Thanks @WilliamHYZhang !