Repository navigation
Matplotlib parity for subplots: format strings, shared axes, scale options, axes-coordinate text, legend() - #99
Merged
Conversation
…s, shared axes, scale options, text in axes coordinates, legend()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Porting a set of Matplotlib plot scripts to a
Canvas(to save them with the TikZ backend) showed a few calls that Matplotlib accepts and maxplotlib did not. This adds them.ax.plot(x, y, "o--"),ax.plot(y)against the index, andc,ls,lw,ms,mfc,mecnext to the long names (utils/plot_format.py:parse_plot_format,canonical_line_kwargs,apply_plot_format,draws_no_line). A marker-only format draws no line in the Plotly and plotext backends as well.Canvas(sharex=..., sharey=...)withTrue,"all","row","col", in the Matplotlib, TikZ and Plotly backends.set_xscale/set_yscalepass keyword arguments through, e.g.set_yscale("symlog", linthresh=1.0).ax.text(..., transform="axes" | "figure" | "data").ax.legend(**kwargs)as a method (location, font size, columns), in place of the boolean property.Tests and docs
tests/test_matplotlib_parity.py: 30 tests over the backends.test_plot_rejects_wrong_ndimis removed:canvas.plot(y)with a single 1D array is now valid and plots against the index.The full test suite and the pre-commit hooks pass locally.