New Plottables: RepeatingAxisLine and AxisLineVector#1557
New Plottables: RepeatingAxisLine and AxisLineVector#1557swharden merged 13 commits intoScottPlot:masterfrom
Conversation
New plots proposed after the discussion in ScottPlot#1535 - The `RepeatingAxisLine` behaves as an `AxisLine` with additional surrounding lines - The first line is positionned at `Position` - The subsequent `Count - 1` lines are positionned according to parameters `Offset` , `Shift` and `RelativePosition` - The first line is thicker by default but this can be disabled with the `HighlightReferenceLine` property - The `AxisLineVector` behaves as an undraggable `AxisLine` and multiple lines are plotted according to the values in a `double[]` object.
|
@swharden I feel my two PRs are a bit messy ! Sorry in advance for the inconvenience. |
to prevent file from being treated as modified by PR ScottPlot#1557
No worries! I cleaned it up a bit and resolved some merge conflicts introduced by #1556 Would you be up for adding a cookbook recipe to demonstrate this new plot type? Here's an example recipe to help you get started. You can add your own recipes by adding a similar code blocks to the end of this file demonstrating how to use these new plot types and perhaps showing-off what they're capable of. Note that just by adding to the bottom of this file your recipe will appear in the cookbook on the website automatically (e.g., that code above becomes https://scottplot.net/cookbook/4.1/category/plottable-axis-line-and-span/#axis-line) and also in the demo application which has the interactive cookbook browser. |
|
I am currently working on the PR, but could you clarify which project I should try to compile in order to have the CookBook pop up so I can see if it works properly ? |
I made this video to help you out real quick... but I can see the utility of making/advertising a better video to help people in the future because I'm sure this is a common question! Let me know if this is still unclear and I'd be happy to help. ScottPlot has a Discord we almost never use but if that's a more convenient form of discussion I'd be happy to connect there. You've been making fantastic contributions so far - thanks for all your work! output-32.mp4 |
|
womp, sorry about the audio quality - I was a little too aggressive with OBS Studio's noise gate 🤷 |
|
That's awesome ! Thanks. I will try to finish the examples tomorrow ! |
That's very generous, I am mostly building on your canvas ! |
|
Hi @BambOoxX! I see the cookbook example was there but the tests were complaining of an extra space at the bottom of the file 😝 The formatting of these cookbook recipes is a bit particular since the source code is parsed to generate the content of the website, and it was the double line break that failing test was complaining about. I'll try to make this less finnicky in the future! This is looking good, and about ready to merge. Before I do, can I confirm with you that this is the correct behavior, or give you the opportunity to change it once more? I'm noticing that when dragged to the right labels disappear one by one, but when dragged to the left labels disappear all at once. I'm guessing this is because harmonic labels are only drawn if the primary label is drawn? I didn't look deep into the code yet but thought I'd bounce this off you before I continue. Thanks for your input! |
|
Actually this is working so well already I'm going to go ahead and merge it in so it gets in tonight's release. If you want to refine the label behavior in a new PR, you're welcome to! As it is now, it's pretty good, and worth including in its present state. |
I will correct this. Also, I totally missed the Do I have to create a new branch, or can this one still support these developments ? |
I already merged this branch, and I recommend making a new branch 😅 Multiple, smaller, shorter-lived branches seem to be easier to work with than larger longer-lived branches which are more prone to merge conflicts. |


New Plottables -
RepeatingAxisLineandAxisLineVectorNew plots proposed after the discussion in #1535
RepeatingAxisLinebehaves as anAxisLinewith additional surrounding linesPositionCount - 1lines are positioned according to parametersOffset,ShiftandRelativePositionHighlightReferenceLinepropertyAxisLineVectorbehaves as an undraggableAxisLineand multiple lines are plotted according to the values in adouble[]object.