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

Skip to content

Commit 1c1b8a5

Browse files
committed
Merge remote-tracking branch 'origin/v3.1.x' into v3.2.x
Net changes: - whitespace in mpl.css and layout.html - content from #15297 was backported to v3.1.x but not v3.2.x Conflicts: .travis.yml - kept v3.2.x version, script changed to case statement not if-else doc/_static/mpl.css - whitespace related conflicts doc/_templates/layout.html - whitespace related conflicts doc/index.rst - join our community section completely re-written, kept 3.2.x version doc/devel/documenting_mpl.rst lib/matplotlib/backend_bases.py lib/matplotlib/rcsetup.py lib/matplotlib/tests/test_axes.py lib/matplotlib/tests/test_backend_qt.py lib/matplotlib/tests/test_backend_webagg.py lib/matplotlib/tests/test_image.py - kept v3.2.x version
2 parents b572eea + b126d3b commit 1c1b8a5

File tree

3 files changed

+49
-19
lines changed

3 files changed

+49
-19
lines changed

doc/_static/mpl.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
font-family: 'CarlogoRegular';
99
font-style: normal;
1010
src: local('Carlito'),
11-
url('fonts/carlogo-regular.woff2') format('woff2'),
11+
url('fonts/carlogo-regular.woff2') format('woff2'),
1212
url('fonts/carlogo-regular.woff') format('woff'),
1313
url('fonts/carlogo-regular.ttf') format('truetype')
1414
}
@@ -17,7 +17,7 @@
1717
font-family: 'CarlogoBold';
1818
font-style: bold;
1919
src: local('Carlito Bold'),
20-
url('fonts/carlogo-bold.woff2') format('woff2'),
20+
url('fonts/carlogo-bold.woff2') format('woff2'),
2121
url('fonts/carlogo-bold.woff') format('woff'),
2222
url('fonts/carlogo-bold.ttf') format('truetype')
2323
}
@@ -1150,14 +1150,14 @@ nav.main-nav{
11501150
font-family: 'CarlogoRegular', 'Carlito', sans-serif;
11511151
font-size: 16px;
11521152
}
1153-
1153+
11541154
nav.main-nav ul{
11551155
margin: 0;
11561156
padding: 0;
11571157
display: flex;
11581158
flex-direction: row;
11591159
}
1160-
1160+
11611161
nav.main-nav li{
11621162
margin: 8px 15px;
11631163
list-style-type: none;
@@ -1166,7 +1166,7 @@ nav.main-nav{
11661166
nav.main-nav a{
11671167
color: white;
11681168
}
1169-
1169+
11701170
nav.main-nav a:hover{
11711171
text-decoration: underline;
11721172
}
@@ -1217,4 +1217,4 @@ hr.box-sep {
12171217
div.box-item {
12181218
flex: 0 0 90%;
12191219
}
1220-
}
1220+
}

doc/_templates/layout.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<div style="float: left; position: absolute; width: 496px; bottom: 0; padding-bottom: 24px"><span style="float: right; color: #789; background: white">Version {{ version|e }}</span></div>
3939
<img src="{{pathto("_static/logo2_compressed.svg", 1) }}" height="125px" border="0" alt="matplotlib"/></a>
4040
{%- endif %}
41-
41+
4242
<!-- The "Fork me on github" ribbon -->
4343
<div id="forkongithub"><a href="https://github.com/matplotlib/matplotlib">Fork me on GitHub</a></div>
4444
</div>
@@ -92,9 +92,9 @@
9292
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
9393
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
9494
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
95-
95+
9696
ga('create', 'UA-55954603-1', 'auto');
9797
ga('send', 'pageview');
98-
98+
9999
</script>
100-
{%- endblock %}
100+
{%- endblock %}

doc/faq/howto_faq.rst

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _howto-faq:
22

33
******
4-
How-To
4+
How-to
55
******
66

77
.. contents::
@@ -10,8 +10,8 @@ How-To
1010

1111
.. _howto-plotting:
1212

13-
Plotting: howto
14-
===============
13+
How-to: Plotting
14+
================
1515

1616
.. _howto-datetime64:
1717

@@ -37,6 +37,36 @@ If you only want to use the `pandas` converter for `numpy.datetime64` values ::
3737

3838

3939

40+
.. _howto-figure-empty:
41+
42+
Check whether a figure is empty
43+
-------------------------------
44+
Empty can actually mean different things. Does the figure contain any artists?
45+
Does a figure with an empty `~.axes.Axes` still count as empty? Is the figure
46+
empty if it was rendered pure white (there may be artists present, but they
47+
could be outside the drawing area or transparent)?
48+
49+
For the purpose here, we define empty as: "The figure does not contain any
50+
artists except it's background patch." The exception for the background is
51+
necessary, because by default every figure contains a `.Rectangle` as it's
52+
background patch. This definition could be checked via::
53+
54+
def is_empty(figure):
55+
"""
56+
Return whether the figure contains no Artists (other than the default
57+
background patch).
58+
"""
59+
contained_artists = figure.get_children()
60+
return len(contained_artists) <= 1
61+
62+
We've decided not to include this as a figure method because this is only one
63+
way of defining empty, and checking the above is only rarely necessary.
64+
Usually the user or program handling the figure know if they have added
65+
something to the figure.
66+
67+
Checking whether a figure would render empty cannot be reliably checked except
68+
by actually rendering the figure and investigating the rendered result.
69+
4070
.. _howto-findobj:
4171

4272
Find all objects in a figure of a certain type
@@ -531,8 +561,8 @@ most GUI backends *require* being run from the main thread as well.
531561

532562
.. _howto-contribute:
533563

534-
Contributing: howto
535-
===================
564+
How-to: Contributing
565+
====================
536566

537567
.. _how-to-request-feature:
538568

@@ -619,8 +649,8 @@ or look at the open issues on github.
619649

620650
.. _howto-webapp:
621651

622-
Matplotlib in a web application server
623-
======================================
652+
How to use Matplotlib in a web application server
653+
=================================================
624654

625655
In general, the simplest solution when using Matplotlib in a web server is
626656
to completely avoid using pyplot (pyplot maintains references to the opened
@@ -672,8 +702,8 @@ contributing to these efforts that would be great.
672702

673703
.. _how-to-search-examples:
674704

675-
Search examples
676-
===============
705+
How to search for examples
706+
==========================
677707

678708
The nearly 300 code :ref:`examples-index` included with the Matplotlib
679709
source distribution are full-text searchable from the :ref:`search`

0 commit comments

Comments
 (0)