Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:18
    jklymak commented #21659
  • 09:55

    jklymak on main

    Inherit many macos backend docs… Merge pull request #21767 from … (compare)

  • 09:55
    jklymak closed #21767
  • 09:52
    jklymak labeled #21771
  • 09:52
    jklymak commented #21771
  • 09:52
    jklymak ready_for_review #21771
  • 09:12
    anntzer commented #21767
  • 09:09
    jklymak converted_to_draft #21771
  • 09:08
    jklymak milestoned #21771
  • 09:08
    jklymak opened #21771
  • 09:02

    QuLogic on v3.5.0-doc

    Merge pull request #21631 from … Merge pull request #21769 from … (compare)

  • 09:02
    QuLogic closed #21769
  • 08:58
    jklymak commented #14930
  • 08:45

    QuLogic on v3.5.x

    Merge pull request #21631 from … Merge pull request #21770 from … (compare)

  • 08:45
    QuLogic closed #21770
  • 08:37
    QuLogic milestoned #21769
  • 08:37
    QuLogic milestoned #21770
  • 08:37
    QuLogic edited #21770
  • 07:55
    jklymak synchronize #21769
  • 07:53
    jklymak opened #21770
Jody Klymak
@jklymak
Currently, conda-forge still can't build windows packages of scipy on windows-based CI infrastructure.
Wow!
Ryan May
@dopplershift
Stupid FORTRAN.
Jody Klymak
@jklymak
OK, but you can install scipy from anaconda?
Ryan May
@dopplershift
That and they occassionally have manually uploaded windows builds for conda-forge. My point was more, currently our windows users can build everything from source, though I'm not sure how prevalent that is. If we depend on scipy, now getting a proper fortran compiler working with visual studio is added to the set. I have no idea whether that's too much to ask, or relevant, just pointing out that it becomes part of the stack.
Jody Klymak
@jklymak
Certainly a fortran compiler showing up in a build is a big bummer. I had to instal octave the other day for a 20 minutes chore that turned into 3 hrs of my old computer grinding away compiling a gfortran that I didn't need for anything else
Jody Klymak
@jklymak
ndimage, so far as I can tell, is all written in C. maybe vendoring it would be ugly, but is another option.
Its a bummer that it is not a standalone package...
Thomas A Caswell
@tacaswell
This was one of the motivations of stating skimage
Jody Klymak
@jklymak
skimage depends on ndimage I thought?
Thomas A Caswell
@tacaswell
I think so, there is (was atleast) a goal of eventually reversing the dependency
Jody Klymak
@jklymak
scikit-image definitely has scipy as a depedency
We vendor Agg now, so I guess I'd say vending ndimage is no worse. Regardless of today's discussion, it may be worth it to get around Agg's 0-1 restriction on the filters....
Thomas A Caswell
@tacaswell
I'm sure it would just change the problems we have, but I am a bit pessimistic....
Jody Klymak
@jklymak
Well, if you don't have to pre-clip the data, it makes the logic a lot more streamlined
Thomas A Caswell
@tacaswell
but it won't get us around having to make sure we do "the right thing" with wildly ill-conditioned user data, I have faith that floats will find some other way to miss-behave :-p
Jody Klymak
@jklymak
... yeah, but then we could blame it on ndimage ;-)
I put a winky there, but actually I think there is lots of power in us not rolling our own...
Bruno Beltran
@brunobeltran
any pointers on how to deprecate a class property? @deprecated works for properties, but not being able to call it using the class scope would technically be a change of API? and _deprecate_privatize_attribute seems to make it a property under the hood, which has the same issue
Bruno Beltran
@brunobeltran

tl;dr: if I do this

class Line2D(...):
    _validJoin = ('miter', 'round', 'bevel') 
    validJoin = _deprecate_privatize_attribute('3.4.0')

Then this no longer works

>>> Line2D.validJoin
Antony Lee
@anntzer
I think combining cbook.classproperty and deprecated can be made to work relatively easily
(untested)
I guess it's just a matter, in the implementation of deprecated, of replacing if isinstance(obj, property) by isinstance(obj, (property, classproperty)), and of changing the base class of _deprecated_property from property to type(obj)
Bruno Beltran
@brunobeltran
This is 99% of the way there, thanks @anntzer!
kirk86
@kirk86

Anyone has any idea why animation is not working in Colab?
MWE:

fig, ax = plt.subplots()

x = np.arange(0, 2*np.pi, 0.01)
line, = ax.plot(x, np.sin(x))

def init():  # only required for blitting to give a clean slate.
    line.set_ydata([np.nan] * len(x))
    return line,

def animate(i):
    line.set_ydata(np.sin(x + i / 100))  # update the data.
    return line,

ani = animation.FuncAnimation(
    fig, animate, init_func=init, interval=2, blit=True, save_count=50)

plt.show()

I've tried using the notebook backend but to no avail. The only way I could get a plot was using rc('animation', html='jshtml') and HTML(ani.to_jshtml()). But, it produces two plots and one of them requires pressing the play button which is something I don't want. I need a plot to live update. How to achieve that?

This is what I get with HTML(ani.to_jshtml())
image.png
hannah
@story645

you can remove the first image by moving

ani = animation.FuncAnimation(
    fig, animate, init_func=init, interval=2, blit=True, save_count=50)

into a new cell, and putting %%capture at the top of the first one

Jody Klymak
@jklymak
@QuLogic I guess I don't understand how to run our benchmarks.... https://github.com/matplotlib/mpl-bench
Jody Klymak
@jklymak
ok. I figured it out I think: asv
Elliott Sales de Andrade
@QuLogic
Yea, I should write a readme...
You need airspeed-velocity, and then can do asv dev to test out a benchmark
Jody Klymak
@jklymak
I did asv.run but it didn't pick up the new file. Trying asv dev
Is there somewhere I need to tell it what files to look in? I made a new benchmarks/dates.py file...
Elliott Sales de Andrade
@QuLogic
The function should be named time_*, but I don't think there are any requirements for file names
Jody Klymak
@jklymak
Hmm, I stuck it in a class. Could move it up a level
Oh, duh I didn't name then time_
That works. Thanks!
Elliott Sales de Andrade
@QuLogic
See also https://asv.readthedocs.io/en/stable/writing_benchmarks.html if you haven't found that already
kirk86
@kirk86

you can remove the first image by moving

ani = animation.FuncAnimation(
    fig, animate, init_func=init, interval=2, blit=True, save_count=50)

into a new cell, and putting %%capture at the top of the first one

Thanks!

Jody Klymak
@jklymak
There are a couple of PRs there now...
danuo
@danuo
I want to render text with ax.text() outside of the axis and it shall not effect the spacing of constrained_layout=True . How would I make ax.text invisible to spacing calculation?
Jody Klymak
@jklymak
t=ax.text(); t.set_in_layout(False)
Or t = fig.text()?
danuo
@danuo
awesome, thank you!
hannah
@story645
@jklymak do you know the answer here https://twitter.com/nicolaskruchten/status/1318887800796778496?s=19 - I think the answer is if users provide timestamps that incorporate est/day, that's what gets plotted - but wanted to confirm.
Thomas A Caswell
@tacaswell
We have had some bug reports on this, I think that if you give us timezone aware data we "do the right thing"
Jody Klymak
@jklymak
We have a whole test for this, but I didn't see too many good examples: def test_date2num_dst()
Also def _test_date2num_dst (for some reason...)
Gilles Jacobs
@gillesjac_twitter
Hi, I'm building a figure and want to change the font on the axis and secondary axis, what's the best way to do that?