Skip to content

Fix png scaling#6364

Merged
rchiodo merged 2 commits intomasterfrom
rchiodo/dpi
Jun 28, 2019
Merged

Fix png scaling#6364
rchiodo merged 2 commits intomasterfrom
rchiodo/dpi

Conversation

@rchiodo
Copy link
Copy Markdown

@rchiodo rchiodo commented Jun 27, 2019

For #6344

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Has a news entry file (remember to thank yourself!)
  • Appropriate comments and documentation strings in the code
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated
  • Test plan is updated as appropriate
  • package-lock.json has been regenerated by running npm install (if dependencies have changed)
  • The wiki is updated with any design decisions/details.

export const ChangeDirectoryCommentIdentifier = '# ms-python.python added'; // Not translated so can compare.
export const MatplotLibInit = `import matplotlib\n%matplotlib inline\n${Identifiers.MatplotLibDefaultParams} = dict(matplotlib.rcParams)\n%config InlineBackend.figure_format = 'svg'`;
export const MatplotLibInitSvg = `import matplotlib\n%matplotlib inline\n${Identifiers.MatplotLibDefaultParams} = dict(matplotlib.rcParams)\n%config InlineBackend.figure_format = 'svg'`;
export const MatplotLibInitPng = `import matplotlib\n%matplotlib inline\n${Identifiers.MatplotLibDefaultParams} = dict(matplotlib.rcParams)\n%config InlineBackend.figure_format = 'png'`;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Only real question on this review. Before the SVG change I don't think that we specified InlineBackend. So should the two init options be either (SVG || PNG) or (SVG || )? Like should we not specify inline at all if we don't enable the plot viewer.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Well except that then I don't know what the output of plots is going to be. It might be SVG and then we'd show our image viewer.

Although I could change the code to check the setting where it adds the svg stuff.

Not sure. I think I'd like to start this way and see if we get any problems with it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

There were two people that explicitly needed png. So forcing it this way solves it for them.

Copy link
Copy Markdown
Member

@IanMatthewHuff IanMatthewHuff left a comment

Choose a reason for hiding this comment

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

:shipit:

@rchiodo rchiodo merged commit 7134c95 into master Jun 28, 2019
@rchiodo rchiodo deleted the rchiodo/dpi branch June 28, 2019 16:46
@lock lock Bot locked as resolved and limited conversation to collaborators Jul 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants