diff --git a/docs/mxdoc.py b/docs/mxdoc.py index 07f20998ce4c..67f1e233bbd3 100644 --- a/docs/mxdoc.py +++ b/docs/mxdoc.py @@ -214,7 +214,8 @@ def _get_source(lang, lines): out.append('') for l in lines: if in_code: - out.append(l) + if '%matplotlib' not in l: + out.append(l) else: if ('
' in l or '
' in l or '' in l or