Skip to content

Plot: Allows drawing gridlines above the plottables#1780

Merged
swharden merged 4 commits intoScottPlot:mainfrom
bclehmann:feature/draw-grid-above-plottables
Apr 29, 2022
Merged

Plot: Allows drawing gridlines above the plottables#1780
swharden merged 4 commits intoScottPlot:mainfrom
bclehmann:feature/draw-grid-above-plottables

Conversation

@bclehmann
Copy link
Member

Purpose:
#1779
image

// You can insert code examples like this
plt.DrawGridAbovePlottables = true;

I have one small note about these changes, it doesn't technically draw just the grid lines after the plottables, it draws the entire axes after. This should be the same thing as I don't believe any other part of the axis can be drawn in the data area (or any plottables can be drawn outside the data area). Just a note in case that isn't a safe assumption.

@swharden
Copy link
Member

This looks great, thanks so much @bclehmann!

To avoid accumulating styling flags in Plot I hid the flag in Plot.Settings and let users define it like this

plt.Grid(onTop: true);

@swharden swharden enabled auto-merge April 29, 2022 12:35
@swharden swharden linked an issue Apr 29, 2022 that may be closed by this pull request
@swharden swharden merged commit 45ec51a into ScottPlot:main Apr 29, 2022
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.

Feature: option to draw grid above plottables

2 participants