Skip to content

update to plotting code: add clear() function and replace() function#174

Merged
peendebak merged 5 commits into
masterfrom
plots3
May 17, 2016
Merged

update to plotting code: add clear() function and replace() function#174
peendebak merged 5 commits into
masterfrom
plots3

Conversation

@peendebak

Copy link
Copy Markdown
Contributor

The clear() function to MatPlot provides the same functionality as the one in QtPlot. The replace() function is a convenience wrapper for clear(); add(...);

Comment thread qcodes/plots/base.py
self.traces = []
self.subplots = []
# any derived class should implement this
raise NotImplementedError

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do you really want to empty traces and subplots before raising the NotImplementedError? Perhaps these should just be "example" comments?

@alexcjohnson

Copy link
Copy Markdown
Contributor

@peendebak another useful add, thanks! I did a little style cleanup, including cutting down to only one place we specify the subplots and figsize defaults. I considered at the same time having a clear call that doesn't specify subplots and figsize keep the previous values of these, rather than reverting them to default. I didn't make that change though, as I could see arguments both ways... so aside from my one small comment, this looks good 💃

@peendebak

Copy link
Copy Markdown
Contributor Author

Thanks, I added a simple explanation to the base clear() fuction, will merge the PR.

@peendebak peendebak merged commit e119fc1 into master May 17, 2016
@peendebak peendebak deleted the plots3 branch May 25, 2016 09:56
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