diff --git a/docs/examples/heatmap-slicer.rst b/docs/examples/heatmap-slicer.rst index f27ce1fd..a67f0d3a 100644 --- a/docs/examples/heatmap-slicer.rst +++ b/docs/examples/heatmap-slicer.rst @@ -3,11 +3,11 @@ Compare Slices of 2D Arrays =========================== .. note:: - Unfortunately the interactive plots won't work on a website as there is no Python kernel - running. So all the interactive outputs have been replaced by gifs of what you should expect. + Unfortunately the interactive plots do not work on a website because there is no Python kernel + running. All of the interactive outputs have therefore been replaced by gifs of what you should expect. The :meth:`~mpl_interactions.heatmap_slicer` function allow you to compare horizontal and/or vertical -slices of an arbitrary number of 2D arrays with just your mouse. +slices of an arbitrary number of 2D arrays using just your mouse. .. code-block:: python @@ -28,14 +28,14 @@ Options The ``interaction_type`` argument controls how the plot updates. You can either use ``'move'`` in which case all mouse movements will be tracked, or you can use ``'click'`` -and then the plot will only update when you click on one the arrays. +and the plot will only update when you click on one of the arrays. -The ``slices`` argument controls which slices to compare. It accepts values of ``'vertical'``, ``'horizontal'`` and ``'both'`` +The ``slices`` argument controls which slices to compare. It accepts values of ``'vertical'``, ``'horizontal'``, and ``'both'``. -Potential Improvements +Potential improvements ^^^^^^^^^^^^^^^^^^^^^^ -Do you wish the heatmap_slicer was better or worked with arbitrary angles? Then you should consider helping out +Do you wish the ``heatmap_slicer`` was better or worked with arbitrary angles? Then you should consider helping out on one of the open issues for improving it! 1. `Improve the slices argument `_ diff --git a/docs/examples/image-segmentation.rst b/docs/examples/image-segmentation.rst index 83b20dd2..78bc09a6 100644 --- a/docs/examples/image-segmentation.rst +++ b/docs/examples/image-segmentation.rst @@ -2,11 +2,11 @@ Image Segmentation ================== -Hopefully you won't often be faced with the task of manually segmenting images. However, for the times when you must +Hopefully you won't often be faced with the task of manually segmenting images. However, for the times when you must, it's nice to not need to leave the comfort of python for some other program. Thus we arrive at the :class:`~mpl_interactions.image_segmenter` class. -(Credit where it's due: This tool was developed as part of a final project in Pavlos Protopapas' class `AC295 `_, you can read more about it -in the project's final write up on `towards data science `_) +(Credit where it's due: This tool was developed as part of a final project in Pavlos Protopapas' class `AC295 `_ and you can read more about it +in the project's final write up on `towards data science `_.) .. code-block:: python @@ -23,22 +23,25 @@ in the project's final write up on `towards data science ` argument. +When you add a legend to the resulting plot, the function names will be used as the labels unless overriden +using the :ref:`plot_kwargs ` argument. .. code-block:: python @@ -102,18 +103,18 @@ override that using the :ref:`plot_kwargs ` argument. Styling ------- -Calling ``interactive_plot`` will create and display a new figure for you. After that you can -use standard ``pyplot`` command to continue to modify the plot or you can use the references to the ``figure`` and ``axis`` -that are returned by interactive_plot. Though be careful, anything you add will not be affected by the sliders. +Calling ``interactive_plot`` will create and display a new figure. Then you can either +use the standard ``pyplot`` command to continue modifying the plot, or you can use the references to the ``figure`` and ``axis`` +that are returned by ``interactive_plot``. Though be careful, anything you add will not be affected by the sliders. -Slider Precision +Slider precision ^^^^^^^^^^^^^^^^ -You can change the precision of individual slider displays by passing slider_format_string as a dictionary. -The below example will give the tau slider 99 decimal points of precision and use scientific notation to display it. The -beta slider will use the default 1 decimal point of precision +You can change the precision of individual slider displays by passing ``slider_format_string`` as a dictionary. +The example below gives the tau slider 99 decimal points of precision and uses scientific notation to display it. The +beta slider uses the default 1 decimal point of precision. .. code-block:: python @@ -126,26 +127,24 @@ Axis limits You can control how the ``xlim/ylim`` behaves using the ``xlim/ylim`` arguments. The options are: -1. ``'stretch'`` - The default, allow the x/y axes to expand but never shrink -2. ``'auto'`` - autoscale the limits for every plot update -3. ``'fixed'`` - never automatically update the limits +1. ``'stretch'`` - The default; allows the x/y axes to expand but never shrink +2. ``'auto'`` - Autoscales the limits for every plot update +3. ``'fixed'`` - Never automatically update the limits 4. [``float``, ``float``] - This value will be passed through to ``plt.xlim`` or ``plt.ylim`` Reference parameter values in the Title ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -You can make the title auto update with information about the values by using ``title`` argument. -Just use the name of one of the parameters as in a format specifier in the string. -e.g. to put the value of `tau` in the title and round it to two decimals use the following -title string: ``{'tau:.2f}'`` +You can make the Title automatically update with information about the values by using ``title`` argument. +Use the name of one of the parameters as a format specifier in the string. For example use the following title string +to put the value of `tau` in the title and round it to two decimalsg: ``{'tau:.2f}'`` .. _plot-kwargs-section: Matplolitb keyword arguments ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -You can pass keyword arguments (kwargs) through to the ``plt.plot`` calls using the ``plot_kwargs`` -argument to ``interactive_plot``. For example to add a label and some styling to one of the functions you -can do the following: +You can pass keyword arguments (*kwargs*) through to the ``plt.plot`` calls using the ``plot_kwargs`` +argument to ``interactive_plot``. For example, to add a label and some styling to one of the functions try the following: .. code-block:: python