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

Matplotlib updates #337

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions qcodes/plots/qcmatplotlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@


class MatPlot(BasePlot):
plot_kwargs_1D = {}
plot_kwargs_2D = {}
plot_1D_kwargs = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really want to have this a class attributes?

plot_2D_kwargs = {}
"""
Plot x/y lines or x/y/z heatmap data. The first trace may be included
in the constructor, other traces can be added with MatPlot.add()
Expand Down Expand Up @@ -176,7 +176,7 @@ def _draw_plot(self, ax, y, x=None, fmt=None, subplot=1, **kwargs):
# part of trace['config'].
args = [arg for arg in [x, y, fmt] if arg is not None]

full_kwargs = {**self.plot_kwargs_1D, **kwargs}
full_kwargs = {**self.plot_1D_kwargs, **kwargs}
line, = ax.plot(*args, **full_kwargs)
return line

Expand Down Expand Up @@ -255,7 +255,7 @@ def _draw_pcolormesh(self, ax, z, x=None, y=None, subplot=1,

# Include default plotting kwargs, which can be overwritten by given
# kwargs
full_kwargs = {**self.plot_kwargs_2D, **kwargs}
full_kwargs = {**self.plot_2D_kwargs, **kwargs}
pc = ax.pcolormesh(*args, **full_kwargs)

# Set x and y limits if arrays are provided
Expand Down