Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/344.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用seaborn在特定x轴点标记绘图_Python_Dataframe_Matplotlib_Graph_Statistics - Fatal编程技术网

Python 使用seaborn在特定x轴点标记绘图

Python 使用seaborn在特定x轴点标记绘图,python,dataframe,matplotlib,graph,statistics,Python,Dataframe,Matplotlib,Graph,Statistics,我已经试着解决这个问题好几个小时了,我真的很沮丧。我唯一想做的就是突出显示时间点2、6和10处的绘图(如图所示) 我想创建多个绘图(我有不同的特征(y轴)和组(遮光),我想要这些绘图) 这是我的代码: for elem in mylist: for title in myotherlist: to_mark = [False, True, False, False, False, True, False, False, False, True] to_ma

我已经试着解决这个问题好几个小时了,我真的很沮丧。我唯一想做的就是突出显示时间点2、6和10处的绘图(如图所示)

我想创建多个绘图(我有不同的特征(y轴)和组(遮光),我想要这些绘图)

这是我的代码:

for elem in mylist:
    for title in myotherlist:
        to_mark = [False, True, False, False, False, True, False, False, False, True]
        to_mark2 = [1,5,9]

        sns.lineplot(data=data, x="time_point", y=elem, hue=title, err_style="bars", ci=95, markevery = [1,5,9], marker = '|', markersize=20, fillstyle='none', markeredgewidth=1.5, markeredgecolor='black')
        plt.savefig(file_path)
        plt.clf()
        plt.cla()
        plt.close()
我试过了

markevery = to_mark and
markevery = to_mark2
但似乎什么都不管用。我收到了错误信息

    IndexError                                Traceback (most recent call last)
    ~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in _mark_every_path(markevery,     tpath, affine, ax_transform)
    215         try:
--> 216             return Path(verts[markevery],
    217                     _slice_or_none(codes, markevery))

IndexError: index 5 is out of bounds for axis 0 with size 2

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
<ipython-input-318-7c71faf85be6> in <module>()
     65 
     66         #plt.plot()
---> 67         plt.savefig(file_path)
     68         #with open(file_path, 'wb') as f:
     69             #plt.savefig(file_path)

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\pyplot.py in savefig(*args, **kwargs)
    708 def savefig(*args, **kwargs):
    709     fig = gcf()
--> 710     res = fig.savefig(*args, **kwargs)
    711     fig.canvas.draw_idle()   # need this if 'transparent=True' to reset colors
    712     return res

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\figure.py in savefig(self, fname, **kwargs)
   2033             self.set_frameon(frameon)
   2034 
-> 2035         self.canvas.print_figure(fname, **kwargs)
   2036 
   2037         if frameon:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
   2261                 orientation=orientation,
   2262                 bbox_inches_restore=_bbox_inches_restore,
-> 2263                 **kwargs)
   2264         finally:
   2265             if bbox_inches and restore_bbox:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\backends\backend_pdf.py in print_pdf(self, filename, **kwargs)
   2584                 RendererPdf(file, image_dpi, height, width),
   2585                 bbox_inches_restore=_bbox_inches_restore)
-> 2586             self.figure.draw(renderer)
   2587             renderer.finalize()
   2588             if not isinstance(filename, PdfPages):

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\figure.py in draw(self, renderer)
   1473 
   1474             mimage._draw_list_compositing_images(
-> 1475                 renderer, self, artists, self.suppressComposite)
   1476 
   1477             renderer.close_group('figure')

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\axes\_base.py in draw(self, renderer, inframe)
   2605             renderer.stop_rasterizing()
   2606 
-> 2607         mimage._draw_list_compositing_images(renderer, self, artists)
   2608 
   2609         renderer.close_group('axes')

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in draw(self, renderer)
    809                 if markevery is not None:
    810                     subsampled = _mark_every_path(markevery, tpath,
--> 811                                                   affine, self.axes.transAxes)
    812                 else:
    813                     subsampled = tpath

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in _mark_every_path(markevery, tpath, affine, ax_transform)
    220             raise ValueError('`markevery` is iterable but '
    221                 'not a valid form of numpy fancy indexing; '
--> 222                 'markevery=%s' % (markevery,))
    223     else:
    224         raise ValueError('Value of `markevery` is not '

ValueError: `markevery` is iterable but not a valid form of numpy fancy indexing; markevery=[1, 5, 9]

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in _mark_every_path(markevery, tpath, affine, ax_transform)
    215         try:
--> 216             return Path(verts[markevery],
    217                     _slice_or_none(codes, markevery))

IndexError: index 5 is out of bounds for axis 0 with size 2

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
~\Anaconda3\lib\site-packages\IPython\core\formatters.py in __call__(self, obj)
    330                 pass
    331             else:
--> 332                 return printer(obj)
    333             # Finally look for special method names
    334             method = get_real_method(obj, self.print_method)

~\Anaconda3\lib\site-packages\IPython\core\pylabtools.py in <lambda>(fig)
    235 
    236     if 'png' in formats:
--> 237         png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
    238     if 'retina' in formats or 'png2x' in formats:
    239         png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs))

~\Anaconda3\lib\site-packages\IPython\core\pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs)
    119 
    120     bytes_io = BytesIO()
--> 121     fig.canvas.print_figure(bytes_io, **kw)
    122     data = bytes_io.getvalue()
    123     if fmt == 'svg':

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
   2210                     orientation=orientation,
   2211                     dryrun=True,
-> 2212                     **kwargs)
   2213                 renderer = self.figure._cachedRenderer
   2214                 bbox_inches = self.figure.get_tightbbox(renderer)

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\backends\backend_agg.py in print_png(self, filename_or_obj, *args, **kwargs)
    511 
    512     def print_png(self, filename_or_obj, *args, **kwargs):
--> 513         FigureCanvasAgg.draw(self)
    514         renderer = self.get_renderer()
    515         original_dpi = renderer.dpi

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\backends\backend_agg.py in draw(self)
    431             # if toolbar:
    432             #     toolbar.set_cursor(cursors.WAIT)
--> 433             self.figure.draw(self.renderer)
    434             # A GUI class may be need to update a window using this draw, so
    435             # don't forget to call the superclass.

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\figure.py in draw(self, renderer)
   1473 
   1474             mimage._draw_list_compositing_images(
-> 1475                 renderer, self, artists, self.suppressComposite)
   1476 
   1477             renderer.close_group('figure')

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\axes\_base.py in draw(self, renderer, inframe)
   2605             renderer.stop_rasterizing()
   2606 
-> 2607         mimage._draw_list_compositing_images(renderer, self, artists)
   2608 
   2609         renderer.close_group('axes')

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in draw(self, renderer)
    809                 if markevery is not None:
    810                     subsampled = _mark_every_path(markevery, tpath,
--> 811                                                   affine, self.axes.transAxes)
    812                 else:
    813                     subsampled = tpath

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in _mark_every_path(markevery, tpath, affine, ax_transform)
    220             raise ValueError('`markevery` is iterable but '
    221                 'not a valid form of numpy fancy indexing; '
--> 222                 'markevery=%s' % (markevery,))
    223     else:
    224         raise ValueError('Value of `markevery` is not '

ValueError: `markevery` is iterable but not a valid form of numpy fancy indexing; markevery=[1, 5, 9]
索引器错误回溯(最近一次调用)
~\AppData\Roaming\Python\Python36\site packages\matplotlib\lines.py在每一个路径中(每一个标记、第三个路径、仿射、ax变换)
215尝试:
-->216返回路径(顶点[markevery],
217 _slice_或_none(代码、标记)
索引器:索引5超出大小为2的轴0的界限
在处理上述异常期间,发生了另一个异常:
ValueError回溯(最近一次调用上次)
在()
65
66#plt.plot()
--->67 plt.savefig(文件路径)
68#打开(文件路径,'wb')作为f:
69#plt.savefig(文件路径)
savefig中的~\AppData\Roaming\Python\Python36\site packages\matplotlib\pyplot.py(*args,**kwargs)
708 def savefig(*参数,**kwargs):
709图=gcf()
-->710分辨率=图savefig(*args,**kwargs)
711 fig.canvas.draw_idle()#如果“transparent=True”重置颜色,则需要此选项
712返回res
savefig中的~\AppData\Roaming\Python\Python36\site packages\matplotlib\figure.py(self、fname、**kwargs)
2033自我设置框架(框架)
2034
->2035自我。画布。打印图(fname,**kwargs)
2036
2037如果框架开启:
~\AppData\Roaming\Python\Python36\site packages\matplotlib\backend\u base.py in print\u figure(self、文件名、dpi、facecolor、edgecolor、方向、格式,**kwargs)
2261方向=方向,
2262 bbox\u inches\u restore=\u bbox\u inches\u restore,
->2263**夸尔格)
2264最后:
2265如果bbox_英寸,则恢复bbox:
~\AppData\Roaming\Python\Python36\site packages\matplotlib\backends\backend\u pdf.py打印格式\u pdf(self,filename,**kwargs)
2584渲染器PDF(文件、图像、dpi、高度、宽度),
2585 bbox\u inches\u restore=\u bbox\u inches\u restore)
->2586 self.figure.draw(渲染器)
2587.finalize()
2588如果不存在(文件名,PdfPages):
绘图包装中的~\AppData\Roaming\Python\Python36\site packages\matplotlib\artist.py(艺术家、渲染器、*args、**kwargs)
53.start_filter()
54
--->55返回绘制(艺术家、渲染器、*args、**kwargs)
56.最后:
57如果artist.get_agg_filter()不是None:
绘图中的~\AppData\Roaming\Python\Python36\site packages\matplotlib\figure.py(self,渲染器)
1473
1474模拟图像。\绘制\列表\合成\图像(
->1475渲染器,自我,艺术家,自我(合成)
1476
1477.关闭_组(“图”)
~\AppData\Roaming\Python\Python36\site packages\matplotlib\image.py in\u draw\u list\u compositing\u图像(渲染器、父级、艺术家、抑制合成)
139如果没有\u复合或没有\u图像:
140对于一个艺术家:
-->141 a.draw(渲染器)
142.其他:
143#将任何相邻图像合成在一起
绘图包装中的~\AppData\Roaming\Python\Python36\site packages\matplotlib\artist.py(艺术家、渲染器、*args、**kwargs)
53.start_filter()
54
--->55返回绘制(艺术家、渲染器、*args、**kwargs)
56.最后:
57如果artist.get_agg_filter()不是None:
绘图中的~\AppData\Roaming\Python\Python36\site packages\matplotlib\axes\\u base.py(self、renderer、inframe)
2605.停止光栅化()
2606
->2607模拟图像。\绘制\列表\合成\图像(渲染器、自身、艺术家)
2608
2609渲染器。关闭_组(“轴”)
~\AppData\Roaming\Python\Python36\site packages\matplotlib\image.py in\u draw\u list\u compositing\u图像(渲染器、父级、艺术家、抑制合成)
139如果没有\u复合或没有\u图像:
140对于一个艺术家:
-->141 a.draw(渲染器)
142.其他:
143#将任何相邻图像合成在一起
绘图包装中的~\AppData\Roaming\Python\Python36\site packages\matplotlib\artist.py(艺术家、渲染器、*args、**kwargs)
53.start_filter()
54
--->55返回绘制(艺术家、渲染器、*args、**kwargs)
56.最后:
57如果artist.get_agg_filter()不是None:
绘图中的~\AppData\Roaming\Python\Python36\site packages\matplotlib\lines.py(self,渲染器)
809如果markevery不是None:
810二次抽样=_标记_每条路径(标记每一条路径,第三条路径,
-->811仿射、自轴、变速)
812其他:
813二次取样=t次取样
~\AppData\Roaming\Python\Python36\site packages\matplotlib\lines.py在每一个路径中(每一个标记、第三个路径、仿射、ax变换)
220 raise VALUE ERROR('markevery'可编辑,但'
221“不是有效的numpy花式索引形式;”
-->222“标记间隔=%s%”(标记间隔,)
223其他:
224 raise Value ERROR('markevery'的值不是'
ValueError:`markevery`是iterable,但不是numpy花式索引的有效形式;markevery=[1,5,9]
---------------------------------------------------------------------------
索引器回溯(最后一次最近调用)
~\AppData\Roaming\Python\Python36\site packages\matplotlib\lines.py在每一个路径中(每一个标记、第三个路径、仿射、ax变换)
215
IndexError                                Traceback (most recent call last)
~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in _mark_every_path(markevery, tpath, affine, ax_transform)
    215         try:
--> 216             return Path(verts[markevery],
    217                     _slice_or_none(codes, markevery))

IndexError: boolean index did not match indexed array along dimension 0; dimension is 2 but corresponding boolean dimension is 10

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
<ipython-input-319-ce96ba06eb23> in <module>()
     65 
     66         #plt.plot()
---> 67         plt.savefig(file_path)
     68         #with open(file_path, 'wb') as f:
     69             #plt.savefig(file_path)

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\pyplot.py in savefig(*args, **kwargs)
    708 def savefig(*args, **kwargs):
    709     fig = gcf()
--> 710     res = fig.savefig(*args, **kwargs)
    711     fig.canvas.draw_idle()   # need this if 'transparent=True' to reset colors
    712     return res

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\figure.py in savefig(self, fname, **kwargs)
   2033             self.set_frameon(frameon)
   2034 
-> 2035         self.canvas.print_figure(fname, **kwargs)
   2036 
   2037         if frameon:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
   2261                 orientation=orientation,
   2262                 bbox_inches_restore=_bbox_inches_restore,
-> 2263                 **kwargs)
   2264         finally:
   2265             if bbox_inches and restore_bbox:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\backends\backend_pdf.py in print_pdf(self, filename, **kwargs)
   2584                 RendererPdf(file, image_dpi, height, width),
   2585                 bbox_inches_restore=_bbox_inches_restore)
-> 2586             self.figure.draw(renderer)
   2587             renderer.finalize()
   2588             if not isinstance(filename, PdfPages):

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\figure.py in draw(self, renderer)
   1473 
   1474             mimage._draw_list_compositing_images(
-> 1475                 renderer, self, artists, self.suppressComposite)
   1476 
   1477             renderer.close_group('figure')

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\axes\_base.py in draw(self, renderer, inframe)
   2605             renderer.stop_rasterizing()
   2606 
-> 2607         mimage._draw_list_compositing_images(renderer, self, artists)
   2608 
   2609         renderer.close_group('axes')

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in draw(self, renderer)
    809                 if markevery is not None:
    810                     subsampled = _mark_every_path(markevery, tpath,
--> 811                                                   affine, self.axes.transAxes)
    812                 else:
    813                     subsampled = tpath

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in _mark_every_path(markevery, tpath, affine, ax_transform)
    220             raise ValueError('`markevery` is iterable but '
    221                 'not a valid form of numpy fancy indexing; '
--> 222                 'markevery=%s' % (markevery,))
    223     else:
    224         raise ValueError('Value of `markevery` is not '

ValueError: `markevery` is iterable but not a valid form of numpy fancy indexing; markevery=[False, True, False, False, False, True, False, False, False, True]

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in _mark_every_path(markevery, tpath, affine, ax_transform)
    215         try:
--> 216             return Path(verts[markevery],
    217                     _slice_or_none(codes, markevery))

IndexError: boolean index did not match indexed array along dimension 0; dimension is 2 but corresponding boolean dimension is 10

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
~\Anaconda3\lib\site-packages\IPython\core\formatters.py in __call__(self, obj)
    330                 pass
    331             else:
--> 332                 return printer(obj)
    333             # Finally look for special method names
    334             method = get_real_method(obj, self.print_method)

~\Anaconda3\lib\site-packages\IPython\core\pylabtools.py in <lambda>(fig)
    235 
    236     if 'png' in formats:
--> 237         png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
    238     if 'retina' in formats or 'png2x' in formats:
    239         png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs))

~\Anaconda3\lib\site-packages\IPython\core\pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs)
    119 
    120     bytes_io = BytesIO()
--> 121     fig.canvas.print_figure(bytes_io, **kw)
    122     data = bytes_io.getvalue()
    123     if fmt == 'svg':

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
   2210                     orientation=orientation,
   2211                     dryrun=True,
-> 2212                     **kwargs)
   2213                 renderer = self.figure._cachedRenderer
   2214                 bbox_inches = self.figure.get_tightbbox(renderer)

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\backends\backend_agg.py in print_png(self, filename_or_obj, *args, **kwargs)
    511 
    512     def print_png(self, filename_or_obj, *args, **kwargs):
--> 513         FigureCanvasAgg.draw(self)
    514         renderer = self.get_renderer()
    515         original_dpi = renderer.dpi

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\backends\backend_agg.py in draw(self)
    431             # if toolbar:
    432             #     toolbar.set_cursor(cursors.WAIT)
--> 433             self.figure.draw(self.renderer)
    434             # A GUI class may be need to update a window using this draw, so
    435             # don't forget to call the superclass.

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\figure.py in draw(self, renderer)
   1473 
   1474             mimage._draw_list_compositing_images(
-> 1475                 renderer, self, artists, self.suppressComposite)
   1476 
   1477             renderer.close_group('figure')

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\axes\_base.py in draw(self, renderer, inframe)
   2605             renderer.stop_rasterizing()
   2606 
-> 2607         mimage._draw_list_compositing_images(renderer, self, artists)
   2608 
   2609         renderer.close_group('axes')

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
    139     if not_composite or not has_images:
    140         for a in artists:
--> 141             a.draw(renderer)
    142     else:
    143         # Composite any adjacent images together

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
     53                 renderer.start_filter()
     54 
---> 55             return draw(artist, renderer, *args, **kwargs)
     56         finally:
     57             if artist.get_agg_filter() is not None:

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in draw(self, renderer)
    809                 if markevery is not None:
    810                     subsampled = _mark_every_path(markevery, tpath,
--> 811                                                   affine, self.axes.transAxes)
    812                 else:
    813                     subsampled = tpath

~\AppData\Roaming\Python\Python36\site-packages\matplotlib\lines.py in _mark_every_path(markevery, tpath, affine, ax_transform)
    220             raise ValueError('`markevery` is iterable but '
    221                 'not a valid form of numpy fancy indexing; '
--> 222                 'markevery=%s' % (markevery,))
    223     else:
    224         raise ValueError('Value of `markevery` is not '

ValueError: `markevery` is iterable but not a valid form of numpy fancy indexing; markevery=[False, True, False, False, False, True, False, False, False, True]