Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove two sections from Plotting FAQ #19881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 0 additions & 51 deletions doc/faq/howto_faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,44 +253,6 @@ over so that the tick labels fit in the figure:

Auto Subplots Adjust

.. _howto-ticks:

Configure the tick widths
-------------------------

Wherever possible, it is recommended to use the :meth:`~.axes.Axes.tick_params`
or :meth:`~.axis.Axis.set_tick_params` methods to modify tick properties::

import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.plot(range(10))

ax.tick_params(width=10)

plt.show()

For more control of tick properties that are not provided by the above methods,
it is important to know that in Matplotlib, the ticks are *markers*. All
:class:`~matplotlib.lines.Line2D` objects support a line (solid, dashed, etc)
and a marker (circle, square, tick). The tick width is controlled by the
``"markeredgewidth"`` property, so the above effect can also be achieved by::

import matplotlib.pyplot as plt

fig, ax = plt.subplots()
ax.plot(range(10))

for line in ax.get_xticklines() + ax.get_yticklines():
line.set_markeredgewidth(10)

plt.show()

The other properties that control the tick marker, and all markers,
are ``markerfacecolor``, ``markeredgecolor``, ``markeredgewidth``,
``markersize``. For more information on configuring ticks, see
:ref:`axis-container` and :ref:`tick-container`.

.. _howto-align-label:

Align my ylabels across multiple subplots
Expand All @@ -312,19 +274,6 @@ setting in the right subplots.

Align Ylabels

.. _date-index-plots:

Skip dates where there is no data
---------------------------------

When plotting time series, e.g., financial time series, one often wants to
leave out days on which there is no data, e.g., weekends. By passing in
dates on the x-xaxis, you get large horizontal gaps on periods when there
is not data. The solution is to pass in some proxy x-data, e.g., evenly
sampled indices, and then use a custom formatter to format these as dates.
:doc:`/gallery/text_labels_and_annotations/date_index_formatter` demonstrates
how to use an 'index formatter' to achieve the desired plot.

.. _howto-set-zorder:

Control the depth of plot elements
Expand Down