KwaungPark created ZEPPELIN-3584:
------------------------------------
Summary: pyplot Error using datetime for x axis
Key: ZEPPELIN-3584
URL: https://issues.apache.org/jira/browse/ZEPPELIN-3584
Project: Zeppelin
Issue Type: Bug
Affects Versions: 0.8.0
Reporter: KwaungPark
{code:java}
// 코드 자리 표시자
%python
import numpy
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import pandas
N = 20
numpy.random.seed(N)
dates = pandas.date_range('1/1/2014', periods=N, freq='m')
df = pandas.DataFrame(
data=numpy.random.randn(N),
index=dates,
columns=['A']
)
fig, ax = plt.subplots(figsize=(10, 6))
ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y-%m'))
plt.bar(df.index, df['A'], width=25, align='center')
plt.show()
{code}
Use pyplot.
I formatted it as a dateformatter using datetime on the x axis.
The result is the following error.
*+ValueError: DateFormatter found a value of x = 0, which is an illegal date.
This usually occurs because you have not informed the axis that it is plotting
dates, e.g., with ax.xaxis_date ()+*
However, if i run the code directly from Pycharm, the chart will be good.
Why does running zeppelin produce different results?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)