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

Skip to content

tutorial on how autoscaling works #17530

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 905 commits into from
Closed

tutorial on how autoscaling works #17530

wants to merge 905 commits into from

Conversation

sarthakforwet
Copy link

@sarthakforwet sarthakforwet commented May 28, 2020

PR Summary

Resolves #17417.
Tutorial about autoscaling has been added.
This convers :

  • margins
  • what artist participate
  • how to explicitly enable/disable autoscaling

What left :

  • 'sticky edges'
  • when / how the bounding boxes are collected
  • what implicitly disables autoscaling
  • when and how you need to manually kick off the autoscaling
  • how to "manually" get the same effect

PR Checklist

  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You appear to have deleted the file during a rebase?

@sarthakforwet
Copy link
Author

You appear to have deleted the file during a rebase?

Guess so but added the file now..

timhoffm and others added 28 commits July 14, 2020 21:10
It's redundant to "Creating multiple subplots using plt.subplots"
and the topic is better covered therein.
... preliminary to more refactoring.

Nearly everything is mechanical; the only subtle point is that figure()
does not need to handle the figure.foo rcParams as the Figure
constructor takes care of that.
Added density and combination hatching examples
FIX: new date rcParams weren't being evaluated
…ample

Remove the example "Easily creating subplots"
This is a bit particular anyway, but let's make it practical by
generating a real bar code and not only some random lines.

Fun fact: The used code is the GTIN-13 for "The Visual Display of
Quantitative Information", Edward R. Tufte.
frame_format to support all listed by animation writers
Updated doc in images.py by adding direct link to 24-bit stink bug png
Remove unnecessary file save during test
Refresh what's new page for 3.3.0
Just like Qt, the drawing should only be done in the draw (paint) event,
so move the rubberband draw there. Also, make it black-and-white like
the Qt one.

Fixes #17773.
The reference rendering for `$\operatorname{cos} x$` was incorrect. Since this
is also tested with `test_operator_space`, it can be safely dropped.
Fix drawing zoom rubberband on GTK backends.
BF: ignore CLOSEPOLY after NaN in PathNanRemover
* Force origin='upper' in specgram function

Specify origin='upper' in call to imshow within specgram to override rcparams setting for origin without changing rcparams itself. Delete origin from kwargs so there are not two occurrences of the origin parameter in the call to imshow (this also means the origin kwarg cannot be changed by the caller).

* DOC: indicate that origin is force set to upper

* Adding test for issue 17878

* DOC: Change rcParam from 'origin' to 'image.origin'

* TST: try changing origin in specgram call

* Document behavior change for specgram

* Document api behavior change

* Raise exception if origin kwarg passed to specgram

This ensures the origin kwarg is not silently ignored if passed to pyplot.specgram.

* TST: passing origin kwarg to specgram should fail

The function pyplot.specgram should raise a TypeError if origin is passed as a keyword argument.

* DOC: Remove note that origin='upper' in specgram

This note referenced the call to imshow inside of specgram, which might confuse users who do not know the implementation of specgram.

* TST: change from pytest xfail to pytest raises

Passing origin as a keyword argument should raise a type error, so test_specgram_origin_kwarg should raise an exception. Therefore, raises is a more precise check than xfail.

Co-authored-by: David Stansby <[email protected]>
Co-authored-by: Theodor Athanasiadis <[email protected]>
Co-authored-by: Tim Hoffmann <[email protected]>
dopplershift and others added 4 commits July 31, 2020 10:32
DOC: Update paths for moved API/what's new fragments
... in particular regarding the undocumented *font_class* parameter.

Also rename an unrelated variable also named `font_class` to avoid
confusion.

Also remove redundant entry for mathfrak+mathit in `stix_virtual_fonts`
-- there's actually no frak+it font, the table just duplicates frak+rm,
but we already fallback to rm by default anyways.
As can be checked with
```
rcParams["ps.useafm"] = True
figtext(.5, .5, "$\\Lambda\varphi$")
savefig("/tmp/test.ps")
```
and inspecting the resulting file.
Typos and docs for mathtext fonts.
@tacaswell
Copy link
Member

@sarthakforwet Are you still interested in working on this? At a minimum the warnings and documentation build failures will need to be fixed.

These are reasonable examples, but when I wrote the original issue I had in mind something that explained the logic of code and more about why/how they work.

QuLogic and others added 4 commits July 31, 2020 20:42
The ResizeObserver spec changed, though Firefox still does the old way.
Previous Chrome implemented an even older version, and 84 implements the
latest version, but not this in-between one we're using.
This is only implemented on Chrome, but prevents some blurriness.
@sarthakforwet
Copy link
Author

@sarthakforwet Are you still interested in working on this?

Yes @tacaswell I am still interested in working on this. Please let me know what enhancement I should make to the tutorial.

I had in mind something that explained the logic of code and more about why/how they work.

I have described the code wherever possible. Please let me know specifically where should I add more description.

Also please help me add those missing checkboxes listed above (if possible), I am quite unable to find their relation with autoscaling.

Thanks!

tomneep and others added 18 commits August 1, 2020 12:01
and put that directory in the Travis cache, for perhaps an additional
speedup and to reduce the traffic we cause to the download sites
and use two processes for ccache compilation
$HOME/Downloads did not get cached, .cache/matplotlib already is
Fix ToolManager inconsistencies with regular toolbar
gtk/tk: Ensure no flicker when hovering over images.
Sort 3d sizes along with other properties
Deprecate various vector-backend-specific mathtext helpers.
Copy docstring description from Axes.legend() to Figure.legend()
DOC: fix align_xlabels() typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tutorial on how autoscaling works