Skip to content

AddHeatMapCoordinated → AddHeatmapCoordinated#963

Merged
swharden merged 3 commits intoScottPlot:masterfrom
bclehmann:recapitalize-addheatmapcoordinated
Apr 10, 2021
Merged

AddHeatMapCoordinated → AddHeatmapCoordinated#963
swharden merged 3 commits intoScottPlot:masterfrom
bclehmann:recapitalize-addheatmapcoordinated

Conversation

@bclehmann
Copy link
Member

New Contributors:
please review CONTRIBUTING.md

Purpose:
#955

This renaming preserves the previous method signature but marks it as obsolete. The warning points to the new method.

I also used [EditorBrowsable(EditorBrowsableState.Never)] so that IDEs which respect this attribute will not show it in code completion. Note it will always be shown on the ScottPlot assembly, but not in projects which use the library. I think this attribute can be controversial, I'm using it here because the previous method signature is nearly identical and does the same thing, which can make the two difficult to differentiate. I wouldn't use this attribute on obsolete methods like PlotHeatmap because that method does actually do something different and thus shouldn't be hidden. I think it's okay in this case since anyone who is looking for AddHeatMapCoordinated should use AddHeatmapCoordinated and they wouldn't notice the difference, while still protecting people from accidentally using the deprecated method through code completion.

There was discussion on #955 about refactoring the heatmap plottables and potentially adding other scaling options such as cropping, zooming, scaling only one axis, etc. That might be interesting for a future PR, depending on your opinion.

New Functionality:
N/A

@swharden
Copy link
Member

Hi @bclehmann, I agree with this - thanks for the PR!

Also I learned about EditorBrowsable(EditorBrowsableState.Never) and this has a lot of utility! There are many objects in the Plot module that I think could benefit from this 🤔

@swharden swharden mentioned this pull request Apr 10, 2021
48 tasks
to prevent these lines from appearing to be modified by PR ScottPlot#963
@swharden swharden changed the title Recapitalize AddHeatMapCoordinated to AddHeatmapCoordinated for consistency's sake AddHeatMapCoordinated → AddHeatmapCoordinated Apr 10, 2021
@swharden swharden merged commit 89ce7de into ScottPlot:master Apr 10, 2021
@swharden swharden mentioned this pull request May 17, 2021
82 tasks
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