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

Skip to content

Add a pane color key to change the 3d plot pane color (matplotlibrc) #20776

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

Closed
wants to merge 61 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
2aa869f
Backport PR #19975: CI: remove workflow to push commits to macpython/…
QuLogic Apr 16, 2021
97f47ba
Merge pull request #20186 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic May 8, 2021
3afd4d0
Backport PR #19849: FIX DateFormatter for month names when usetex=True
tacaswell May 14, 2021
c315e45
Merge pull request #20228 from meeseeksmachine/auto-backport-of-pr-19…
QuLogic May 14, 2021
c5e3ac5
Backport PR #19636: Correctly check inaxes for multicursor
timhoffm Mar 13, 2021
fe65fdc
Merge pull request #20232 from meeseeksmachine/auto-backport-of-pr-19…
jklymak May 14, 2021
46ae61c
Backport PR #20225: FIX: correctly handle ax.legend(..., legendcolor=…
QuLogic May 15, 2021
de18beb
Merge pull request #20234 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic May 15, 2021
3693d1d
Backport PR #20212: Update span_selector.py
timhoffm May 16, 2021
86acc0c
Merge pull request #20241 from meeseeksmachine/auto-backport-of-pr-20…
timhoffm May 16, 2021
1b8b060
Backport PR #20248: Replace pgf image-streaming warning by error.
QuLogic May 18, 2021
b25263e
Merge pull request #20259 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic May 18, 2021
88da530
Backport PR #20265: Legend edgecolor face
QuLogic May 20, 2021
dcfc7a1
Merge pull request #20267 from meeseeksmachine/auto-backport-of-pr-20…
jklymak May 20, 2021
71fa50c
Backport PR #20275: Fix some examples that are skipped in docs build
timhoffm May 22, 2021
93a91ee
Merge pull request #20285 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic May 26, 2021
1ef141e
Backport PR #20154: ci: Bump Ubuntu to 18.04 LTS.
jklymak May 13, 2021
02088df
Merge pull request #20307 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic May 26, 2021
9df08db
Backport PR #20381: Prevent corrections and completions in search field
QuLogic Jun 7, 2021
bc6cb1b
Merge pull request #20383 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic Jun 7, 2021
e1206cc
Backport PR #20403: FIX: if we have already subclassed mixin class ju…
tacaswell Jun 10, 2021
88f23d3
Merge pull request #20404 from tacaswell/auto-backport-of-pr-20403-on…
anntzer Jun 10, 2021
2d99ead
Backport PR #20395: Pathing issue
diegopetrola Jun 11, 2021
4fa8ab1
Merge pull request #20417 from meeseeksmachine/auto-backport-of-pr-20…
jklymak Jun 11, 2021
9847771
Backport PR #20416: Fix missing Patch3DCollection._z_markers_idx
jklymak Jun 15, 2021
1803541
Merge pull request #20441 from meeseeksmachine/auto-backport-of-pr-20…
timhoffm Jun 15, 2021
db0a179
Backport PR #20453: Remove `Tick.apply_tickdir` from 3.4 deprecations.
anntzer Jun 17, 2021
09dcdf2
Merge pull request #20456 from meeseeksmachine/auto-backport-of-pr-20…
jklymak Jun 17, 2021
fd55320
Backport PR #20473: _GSConverter: handle stray 'GS' in output gracefully
tacaswell Jun 21, 2021
0580c0d
Merge pull request #20478 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic Jun 22, 2021
c7f2f42
Backport PR #20480: Fix str of empty polygon.
timhoffm Jun 22, 2021
df9fa06
Merge pull request #20483 from meeseeksmachine/auto-backport-of-pr-20…
tacaswell Jun 22, 2021
dcb3708
Backport PR #20488: FIX: Include 0 when checking lognorm vmin
QuLogic Jun 24, 2021
156a0f6
Merge pull request #20503 from meeseeksmachine/auto-backport-of-pr-20…
timhoffm Jun 24, 2021
4ff7827
Backport PR #20565: FIX: PILLOW asarray bug
anntzer Jul 3, 2021
56269d8
Merge pull request #20568 from meeseeksmachine/auto-backport-of-pr-20…
jklymak Jul 3, 2021
1626281
Backport PR #20511: Fix calls to np.ma.masked_where
dstansby Jul 5, 2021
ad27c9e
Merge pull request #20578 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic Jul 6, 2021
3adeb00
Backport PR #20584: FIX: do not simplify path in LineCollection.get_s…
anntzer Jul 6, 2021
171f055
Merge pull request #20587 from tacaswell/auto-backport-of-pr-20584-on…
jklymak Jul 6, 2021
16af382
Backport PR #20590: Fix class docstrings for Norms created from Scales.
tacaswell Jul 7, 2021
f75fd10
Merge pull request #20594 from meeseeksmachine/auto-backport-of-pr-20…
dstansby Jul 7, 2021
49ad0fc
Backport PR #20609: FIX: fix figbox deprecation
QuLogic Jul 10, 2021
c19a4d3
Merge pull request #20624 from meeseeksmachine/auto-backport-of-pr-20…
timhoffm Jul 10, 2021
649c07d
Backport PR #20629: Add protection against out-of-bounds read in ttconv
jkseppan Jul 13, 2021
76e1ce5
Backport PR #20597: Fix TTF headers for type 42 stix font
QuLogic Jul 13, 2021
0a9139e
Merge pull request #20643 from jkseppan/auto-backport-of-pr-20597-on-…
QuLogic Jul 13, 2021
a518b74
Merge pull request #20642 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic Jul 13, 2021
cce1048
Backport PR #20645: Fix leak if affine_transform is passed invalid ve…
QuLogic Jul 19, 2021
d5de944
Merge pull request #20683 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic Jul 20, 2021
70f8858
Re-enable PyPy wheels.
QuLogic May 4, 2021
7a5b9eb
Define Py_DTSF_ADD_DOT_0 to fix older PyPy.
QuLogic May 4, 2021
10a2a40
Backport PR #20662: Don't forget to disable autoscaling after interac…
jklymak Jul 20, 2021
fafc53c
Merge pull request #20696 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic Jul 20, 2021
32b594e
Backport PR #20710: Fix tests with Inkscape 1.1.
timhoffm Jul 22, 2021
3664dc3
Merge pull request #20687 from QuLogic/pypy34
timhoffm Jul 22, 2021
51989b4
Merge pull request #20713 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic Jul 22, 2021
c7e8507
Backport PR #20748: Ensure _static directory exists before copying CSS.
QuLogic Jul 27, 2021
30b9e16
Merge pull request #20751 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic Jul 28, 2021
5b64248
Backport PR #20761: Fix suplabel autopos
QuLogic Jul 29, 2021
5435e6f
Merge pull request #20763 from meeseeksmachine/auto-backport-of-pr-20…
QuLogic Jul 29, 2021
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
7 changes: 2 additions & 5 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,10 @@ jobs:
run: |
python -m cibuildwheel --output-dir dist
env:
CIBW_BUILD: "pp3?-*"
CIBW_BUILD: "pp37-*"
CIBW_BEFORE_BUILD: pip install certifi numpy==${{ env.min-numpy-version }}
CIBW_ARCHS: ${{ matrix.cibw_archs }}
if: >
runner.os != 'Windows' && (
startsWith(github.ref, 'refs/heads/v3.3') ||
startsWith(github.ref, 'refs/tags/v3.3') )
if: runner.os != 'Windows' && matrix.cibw_archs != 'aarch64'

- name: Validate that LICENSE files are included in wheels
run: |
Expand Down
28 changes: 15 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ jobs:
matrix:
include:
- name-suffix: "(Minimum Versions)"
os: ubuntu-16.04
os: ubuntu-18.04
python-version: 3.7
extra-requirements: '-c requirements/testing/minver.txt'
pyqt5-ver: '==5.8 sip==4.19.7' # oldest versions with a Py3.7 wheel.
delete-font-cache: true
XVFB_RUN: xvfb-run -a
- os: ubuntu-16.04
- os: ubuntu-18.04
python-version: 3.7
extra-requirements: '-r requirements/testing/extra.txt'
XVFB_RUN: xvfb-run -a
CFLAGS: "-fno-lto" # Ensure that disabling LTO works.
- os: ubuntu-16.04
- os: ubuntu-18.04
python-version: 3.8
extra-requirements: '-r requirements/testing/extra.txt'
XVFB_RUN: xvfb-run -a
Expand Down Expand Up @@ -128,10 +128,10 @@ jobs:
~/.cache/matplotlib
!~/.cache/matplotlib/tex.cache
!~/.cache/matplotlib/test_cache
key: ${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-${{ github.sha }}
key: 1-${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-
${{ runner.os }}-py${{ matrix.python-version }}-mpl-
1-${{ runner.os }}-py${{ matrix.python-version }}-mpl-${{ github.ref }}-
1-${{ runner.os }}-py${{ matrix.python-version }}-mpl-

- name: Install Python dependencies
run: |
Expand All @@ -156,12 +156,8 @@ jobs:
# libraries cannot be loaded at runtime, so an actual import is a
# better check).
if [[ "${{ runner.os }}" != 'macOS' ]]; then
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12;
# pycairo 1.20+ requires a new version of Cairo, unavailable on
# Ubuntu 16.04, so PyGObject must be installed without build
# isolation in order to pick up the lower pre-installed version.
python -m pip install --upgrade 'pycairo<1.20.0' 'cairocffi>=0.8' &&
python -m pip install --upgrade --no-build-isolation PyGObject &&
# PyGObject, pycairo, and cariocffi do not install on OSX 10.12.
python -m pip install --upgrade pycairo 'cairocffi>=0.8' PyGObject &&
python -c 'import gi; gi.require_version("Gtk", "3.0"); from gi.repository import Gtk' &&
echo 'PyGObject is available' ||
echo 'PyGObject is not available'
Expand All @@ -180,7 +176,7 @@ jobs:
echo 'PySide2 is not available'
fi
python -m pip install --upgrade \
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 \
wxPython &&
python -c 'import wx' &&
echo 'wxPython is available' ||
Expand Down Expand Up @@ -226,3 +222,9 @@ jobs:
if: ${{ runner.os != 'macOS' }}
- name: Upload code coverage
uses: codecov/codecov-action@v1

- uses: actions/upload-artifact@v2
if: failure()
with:
name: "${{ matrix.python-version }} ${{ matrix.os }} ${{ matrix.name-suffix }} result images"
path: ./result_images
34 changes: 0 additions & 34 deletions .github/workflows/wheels.yml

This file was deleted.

6 changes: 3 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
strategy:
matrix:
Linux_py37:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
python.version: '3.7'
Linux_py38:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
python.version: '3.8'
Linux_py39:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-18.04'
python.version: '3.9'
macOS_py37:
vmImage: 'macOS-10.15'
Expand Down
2 changes: 1 addition & 1 deletion doc/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<li><a href="{{ pathto('devel/index') }}">Contributing</a></li>
<li class="nav-right">
<form class="search" action="{{ pathto('search') }}" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" placeholder="Search"/>
<input type="text" name="q" aria-labelledby="searchlabel" placeholder="Search" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
</form>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion doc/_templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1 id="search-documentation">{{ _('Search') }}</h1>
"codex ellipse".
</p>
<form action="" method="get">
<input type="text" name="q" value="" />
<input type="text" name="q" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="{{ _('search') }}" />
<span id="search-progress" style="padding-left: 10px"></span>
</form>
Expand Down
6 changes: 0 additions & 6 deletions doc/api/prev_api_changes/api_changes_3.4.0/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ similar replacements.
``STYLE_FILE_PATTERN``, ``load_base_library``, and ``iter_user_libraries`` are
deprecated.

``Tick.apply_tickdir`` is deprecated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``apply_tickdir`` didn't actually update the tick markers on the existing
Line2D objects used to draw the ticks; use `.Axis.set_tick_params` instead.

``dpi_cor`` property of `.FancyArrowPatch`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
7 changes: 4 additions & 3 deletions examples/event_handling/pipong.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ class Game:
def __init__(self, ax):
# create the initial line
self.ax = ax
ax.set_ylim([-1, 1])
ax.xaxis.set_visible(False)
ax.set_xlim([0, 7])
ax.yaxis.set_visible(False)
ax.set_ylim([-1, 1])
pad_a_x = 0
pad_b_x = .50
pad_a_y = pad_b_y = .30
Expand Down Expand Up @@ -168,7 +170,6 @@ def __init__(self, ax):
self.res = 100.0
self.on = False
self.inst = True # show instructions from the beginning
self.background = None
self.pads = [Pad(pA, pad_a_x, pad_a_y),
Pad(pB, pad_b_x, pad_b_y, 'r')]
self.pucks = []
Expand All @@ -177,7 +178,7 @@ def __init__(self, ax):
verticalalignment='center',
horizontalalignment='center',
multialignment='left',
textcoords='axes fraction',
xycoords='axes fraction',
animated=False)
self.canvas.mpl_connect('key_press_event', self.on_key_press)

Expand Down
4 changes: 2 additions & 2 deletions examples/user_interfaces/fourier_demo_wx_sgskip.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, parent, label, param):
self.sliderText = wx.TextCtrl(parent, -1, style=wx.TE_PROCESS_ENTER)
self.slider = wx.Slider(parent, -1)
# self.slider.SetMax(param.maximum*1000)
self.slider.SetRange(0, param.maximum * 1000)
self.slider.SetRange(0, int(param.maximum * 1000))
self.setKnob(param.value)

sizer = wx.BoxSizer(wx.HORIZONTAL)
Expand Down Expand Up @@ -99,7 +99,7 @@ def sliderTextHandler(self, event):

def setKnob(self, value):
self.sliderText.SetValue('%g' % value)
self.slider.SetValue(value * 1000)
self.slider.SetValue(int(value * 1000))


class FourierDemoFrame(wx.Frame):
Expand Down
2 changes: 1 addition & 1 deletion examples/user_interfaces/svg_histogram_sgskip.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
""" % json.dumps(hist_patches)

# Add a transition effect
css = tree.getchildren()[0][0]
css = tree.find('.//{http://www.w3.org/2000/svg}style')
css.text = css.text + "g {-webkit-transition:opacity 0.4s ease-out;" + \
"-moz-transition:opacity 0.4s ease-out;}"

Expand Down
10 changes: 6 additions & 4 deletions examples/widgets/span_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ def onselect(xmin, xmax):

region_x = x[indmin:indmax]
region_y = y[indmin:indmax]
line2.set_data(region_x, region_y)
ax2.set_xlim(region_x[0], region_x[-1])
ax2.set_ylim(region_y.min(), region_y.max())
fig.canvas.draw()

if len(region_x) >= 2:
line2.set_data(region_x, region_y)
ax2.set_xlim(region_x[0], region_x[-1])
ax2.set_ylim(region_y.min(), region_y.max())
fig.canvas.draw()

#############################################################################
# .. note::
Expand Down
82 changes: 46 additions & 36 deletions extern/ttconv/pprdrv_tt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,33 +798,36 @@ void ttfont_sfnts(TTStreamWriter& stream, struct TTFONT *font)
** Find the tables we want and store there vital
** statistics in tables[].
*/
for (x=0; x < 9; x++ )
{
do
{
diff = strncmp( (char*)ptr, table_names[x], 4 );

if ( diff > 0 ) /* If we are past it. */
{
tables[x].length = 0;
diff = 0;
}
else if ( diff < 0 ) /* If we haven't hit it yet. */
{
ptr += 16;
}
else if ( diff == 0 ) /* Here it is! */
{
tables[x].newoffset = nextoffset;
tables[x].checksum = getULONG( ptr + 4 );
tables[x].oldoffset = getULONG( ptr + 8 );
tables[x].length = getULONG( ptr + 12 );
nextoffset += ( ((tables[x].length + 3) / 4) * 4 );
count++;
ptr += 16;
}
}
while (diff != 0);
ULONG num_tables_read = 0; /* Number of tables read from the directory */
for (x = 0; x < 9; x++) {
do {
if (num_tables_read < font->numTables) {
/* There are still tables to read from ptr */
diff = strncmp((char*)ptr, table_names[x], 4);

if (diff > 0) { /* If we are past it. */
tables[x].length = 0;
diff = 0;
} else if (diff < 0) { /* If we haven't hit it yet. */
ptr += 16;
num_tables_read++;
} else if (diff == 0) { /* Here it is! */
tables[x].newoffset = nextoffset;
tables[x].checksum = getULONG( ptr + 4 );
tables[x].oldoffset = getULONG( ptr + 8 );
tables[x].length = getULONG( ptr + 12 );
nextoffset += ( ((tables[x].length + 3) / 4) * 4 );
count++;
ptr += 16;
num_tables_read++;
}
} else {
/* We've read the whole table directory already */
/* Some tables couldn't be found */
tables[x].length = 0;
break; /* Proceed to next tables[x] */
}
} while (diff != 0);

} /* end of for loop which passes over the table directory */

Expand All @@ -841,17 +844,24 @@ void ttfont_sfnts(TTStreamWriter& stream, struct TTFONT *font)

/* Now, generate those silly numTables numbers. */
sfnts_pputUSHORT(stream, count); /* number of tables */
if ( count == 9 )
{
sfnts_pputUSHORT(stream, 7); /* searchRange */
sfnts_pputUSHORT(stream, 3); /* entrySelector */
sfnts_pputUSHORT(stream, 81); /* rangeShift */

int search_range = 1;
int entry_sel = 0;

while (search_range <= count) {
search_range <<= 1;
entry_sel++;
}
entry_sel = entry_sel > 0 ? entry_sel - 1 : 0;
search_range = (search_range >> 1) * 16;
int range_shift = count * 16 - search_range;

sfnts_pputUSHORT(stream, search_range); /* searchRange */
sfnts_pputUSHORT(stream, entry_sel); /* entrySelector */
sfnts_pputUSHORT(stream, range_shift); /* rangeShift */

#ifdef DEBUG_TRUETYPE
else
{
debug("only %d tables selected",count);
}
debug("only %d tables selected",count);
#endif

/* Now, emmit the table directory. */
Expand Down
15 changes: 4 additions & 11 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4130,33 +4130,24 @@ def _set_view_from_bbox(self, bbox, direction='in',
Whether this axis is twinned in the *y*-direction.
"""
if len(bbox) == 3:
Xmin, Xmax = self.get_xlim()
Ymin, Ymax = self.get_ylim()

xp, yp, scl = bbox # Zooming code

if scl == 0: # Should not happen
scl = 1.

if scl > 1:
direction = 'in'
else:
direction = 'out'
scl = 1/scl

# get the limits of the axes
tranD2C = self.transData.transform
xmin, ymin = tranD2C((Xmin, Ymin))
xmax, ymax = tranD2C((Xmax, Ymax))

(xmin, ymin), (xmax, ymax) = self.transData.transform(
np.transpose([self.get_xlim(), self.get_ylim()]))
# set the range
xwidth = xmax - xmin
ywidth = ymax - ymin
xcen = (xmax + xmin)*.5
ycen = (ymax + ymin)*.5
xzc = (xp*(scl - 1) + xcen)/scl
yzc = (yp*(scl - 1) + ycen)/scl

bbox = [xzc - xwidth/2./scl, yzc - ywidth/2./scl,
xzc + xwidth/2./scl, yzc + ywidth/2./scl]
elif len(bbox) != 4:
Expand Down Expand Up @@ -4209,8 +4200,10 @@ def _set_view_from_bbox(self, bbox, direction='in',

if not twinx and mode != "y":
self.set_xbound(new_xbound)
self.set_autoscalex_on(False)
if not twiny and mode != "x":
self.set_ybound(new_ybound)
self.set_autoscaley_on(False)

def start_pan(self, x, y, button):
"""
Expand Down
Loading