Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

silx.gui.plot.PlotWidget: Added support of dashed line gap color #3973

Merged
merged 6 commits into from
Dec 11, 2023

Conversation

t20100
Copy link
Member

@t20100 t20100 commented Nov 27, 2023

This PR adds 2 methods: get|setLineGapColor to Curve and Histogram items to configure the gap color of dashed lines.
This is implemented for the OpenGL backend and for the matplotlib backend provided that matplotlib is at least v3.6.0.

related to #3946

@t20100 t20100 added this to the 2.0.0 milestone Nov 27, 2023
@t20100 t20100 requested a review from vallsv November 27, 2023 14:47
def __init__(self):
self.__lineGapColor = self._DEFAULT_LINE_GAP_COLOR

def getLineGapColor(self):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hesitated to reuse shapes method naming: get|setLineBgColor but it's implemented slightly differently (it's not a background color here) and I choose to stick to matplotlib naming.

@payno
Copy link
Member

payno commented Dec 8, 2023

I think add of 'gapcolor' parameter to silx.gui.plot.PlotWidget.addCurve function is missing (except if you want to limit this function signature) else fine for me

@t20100
Copy link
Member Author

t20100 commented Dec 8, 2023

I didn't wanted to add more arguments to addCurve (there's already quite a few). I expect this gap color will not be widely used and so I preferred not to expose it there.

@vallsv vallsv merged commit ad0bd99 into silx-kit:main Dec 11, 2023
8 checks passed
@t20100 t20100 deleted the plot-curve-2nd-color branch January 15, 2024 12:31
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.

3 participants