Skip to content

Allow matplotlib plot display in pyspark context - #1422

Closed
hafizur-rahman wants to merge 4 commits into
apache:masterfrom
hafizur-rahman:patch-1
Closed

Allow matplotlib plot display in pyspark context#1422
hafizur-rahman wants to merge 4 commits into
apache:masterfrom
hafizur-rahman:patch-1

Conversation

@hafizur-rahman

Copy link
Copy Markdown

What is this PR for?

Similar to %python context, allow matplotlib plot display in %pyspark context

What type of PR is it?

Improvement

How should this be tested?

The following code should display a graph:

%pyspark
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
x = np.linspace(0, 1)
y = np.sin(4 * np.pi * x) * np.exp(-5 * x)
plt.figure()
plt.fill(x, y, 'r')
plt.grid(True)
z.show(plt, fmt="svg")
plt.close()

@Leemoonsoo

Copy link
Copy Markdown
Member

Could you try indent code with 2 spaces like other part of codes do?

@hafizur-rahman

Copy link
Copy Markdown
Author

Ok, giving a try...

@Leemoonsoo

Copy link
Copy Markdown
Member

LGTM and merge if there're no more discussions.

@hafizur-rahman

Copy link
Copy Markdown
Author

Ok, please merge

@bzz

bzz commented Sep 15, 2016

Copy link
Copy Markdown
Member

LGTM. BTW, this code looks very similar to the one we have in python interpreter, contributed by @bustios and @agoodm

@FRosner

Copy link
Copy Markdown
Contributor

Can we have some integration test to verify this one?

@felixcheung

Copy link
Copy Markdown
Member

where are we on this?

@asfgitasfgit closed this in c38a0a0May 9, 2018
asfgit pushed a commit that referenced this pull request May 9, 2018
close#83close#86close#125close#133close#139close#146close#193close#203close#246close#262close#264close#273close#291close#299close#320close#347close#389close#413close#423close#543close#560close#658close#670close#728close#765close#777close#782close#783close#812close#822close#841close#843close#878close#884close#918close#989close#1076close#1135close#1187close#1231close#1304close#1316close#1361close#1385close#1390close#1414close#1422close#1425close#1447close#1458close#1466close#1485close#1492close#1495close#1497close#1536close#1545close#1561close#1577close#1600close#1603close#1678close#1695close#1739close#1748close#1765close#1767close#1776close#1783close#1799
Sign up for freeto 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.

5 participants

@hafizur-rahman@Leemoonsoo@bzz@FRosner@felixcheung