.. _devTest_plots_w_m21:

.. WARNING: DO NOT EDIT THIS FILE:
   AUTOMATICALLY GENERATED.
   PLEASE EDIT THE .py FILE DIRECTLY.

Testing Plotting with Music21
=============================

``Music21`` used to manipulate the environment somewhat when loading
matplotlib in Jupyter. This seems to no longer be needed after:
https://github.com/ipython/ipython/issues/12190

But some issues still arise with double plotting of graphs and returning
Axes, so this file helps test them.

.. code:: ipython3

    from music21 import corpus

.. code:: ipython3

    corpus.parse('bwv66.6').plot()



.. image:: devTest_plots_w_m21_2_0.png
   :width: 817px
   :height: 540px


.. code:: ipython3

    x = corpus.parse('bwv66.6').plot()



.. image:: devTest_plots_w_m21_3_0.png
   :width: 817px
   :height: 540px


.. code:: ipython3

    x is None




.. parsed-literal::
   :class: ipython-result

    True



.. code:: ipython3

    corpus.parse('bwv66.6').plot(returnInNotebook=True)




.. parsed-literal::
   :class: ipython-result

    <music21.graph.plot.HorizontalBarPitchSpaceOffset for <music21.stream.Score bach/bwv66.6.mxl>>




.. image:: devTest_plots_w_m21_5_1.png
   :width: 817px
   :height: 540px


.. code:: ipython3

    out = corpus.parse('bwv66.6').plot(returnInNotebook=True)



.. image:: devTest_plots_w_m21_6_0.png
   :width: 817px
   :height: 540px


.. code:: ipython3

    out




.. parsed-literal::
   :class: ipython-result

    <music21.graph.plot.HorizontalBarPitchSpaceOffset for <music21.stream.Score bach/bwv66.6.mxl>>



.. code:: ipython3

    dir(out)




.. parsed-literal::
   :class: ipython-result

    ['_DOC_ATTR',
     '_DOC_ORDER',
     '__annotations__',
     '__class__',
     '__del__',
     '__delattr__',
     '__dict__',
     '__dir__',
     '__doc__',
     '__eq__',
     '__format__',
     '__ge__',
     '__getattribute__',
     '__getstate__',
     '__gt__',
     '__hash__',
     '__init__',
     '__init_subclass__',
     '__le__',
     '__lt__',
     '__module__',
     '__ne__',
     '__new__',
     '__reduce__',
     '__reduce_ex__',
     '__repr__',
     '__setattr__',
     '__setstate__',
     '__sizeof__',
     '__slots__',
     '__str__',
     '__subclasshook__',
     '__weakref__',
     '_classSetCacheDict',
     '_classTupleCacheDict',
     '_dataColorIndex',
     '_doneAction',
     '_partsToColor',
     '_reprInternal',
     'allAxes',
     'alpha',
     'applyFormatting',
     'applyFormattingToOneAxis',
     'applyGrid',
     'assignColorsToParts',
     'axesClasses',
     'axis',
     'axisKeys',
     'axisRangeHasBeenSet',
     'axisX',
     'axisY',
     'barHeight',
     'barSpace',
     'callDoneAction',
     'classFilterList',
     'classSet',
     'classes',
     'colorBackgroundData',
     'colorBackgroundFigure',
     'colorByPart',
     'colorGrid',
     'colors',
     'data',
     'doneAction',
     'dpi',
     'extractChordDataMultiAxis',
     'extractChordDataOneAxis',
     'extractData',
     'figure',
     'figureSize',
     'figureSizeDefault',
     'fillValueLists',
     'fontFamily',
     'graphType',
     'grid',
     'hideAxisSpines',
     'hideLeftBottomSpines',
     'hideXGrid',
     'hideYGrid',
     'id',
     'isClassOrSubclass',
     'keywordConfigurables',
     'labelFontSize',
     'margin',
     'marker',
     'markersize',
     'matchPitchCountForChords',
     'nextColor',
     'plt',
     'postProcessData',
     'postProcessElement',
     'process',
     'processOneElement',
     'recurse',
     'renderSubplot',
     'run',
     'savedKeywords',
     'setAxisKeywords',
     'setAxisLabel',
     'setAxisRange',
     'setIntegerTicksFromData',
     'setTicks',
     'show',
     'streamObj',
     'subplot',
     'tickColors',
     'tickFontSize',
     'title',
     'titleFontSize',
     'write',
     'xTickLabelHorizontalAlignment',
     'xTickLabelRotation',
     'xTickLabelVerticalAlignment']



.. code:: ipython3

    out.streamObj




.. parsed-literal::
   :class: ipython-result

    <music21.stream.Score bach/bwv66.6.mxl>



.. code:: ipython3

    out.streamObj.metadata.corpusFilePath




.. parsed-literal::
   :class: ipython-result

    'bach/bwv66.6.mxl'


