Removed redundancy between 'fmt' and 'linestyle' when using plot_date by JAAlvarado-Montes · Pull Request #530 · astropy/astroplan · GitHub
Skip to content

Removed redundancy between 'fmt' and 'linestyle' when using plot_date#530

Merged
bmorris3 merged 1 commit into
astropy:mainfrom
JAAlvarado-Montes:JAAlvarado-Montes-fixed-redundancy
Nov 2, 2022
Merged

Removed redundancy between 'fmt' and 'linestyle' when using plot_date#530
bmorris3 merged 1 commit into
astropy:mainfrom
JAAlvarado-Montes:JAAlvarado-Montes-fixed-redundancy

Conversation

@JAAlvarado-Montes

Copy link
Copy Markdown

Dear Astropy Maintainers,

This PR intends to remove the redundancy and consequent Matplotlib UserWarning when using plot_date. In plot_date, fmt is set by default to 'o', so changing this to fmt='-' makes linestyle='-' redundant and produces a UserWarning advising of this redundancy. Such a warning is unnecessary and can be avoided if the line style_kwargs.setdefault('linestyle', '-') is removed, thus letting fmt to define the linestyle as desired.

With my best regards,

Jaime A. Alvarado-Montes

This commit removes the redundancy and consequent Matplotlib UserWarning when plotting. It is only necessary to define fmt='-', since defining linestyle='-' is redundant and produces an unnecessary warning.
@bmorris3

bmorris3 commented Nov 2, 2022

Copy link
Copy Markdown
Contributor

@bmorris3 bmorris3 merged commit 920f189 into astropy:main Nov 2, 2022
@JAAlvarado-Montes JAAlvarado-Montes deleted the JAAlvarado-Montes-fixed-redundancy branch November 2, 2022 12:34
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