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

Skip to content

[WIP] Deprecate gtk, gdk and wx backends and remove Cocoaagg on 2.x #6582

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 9 commits into from
Jun 29, 2016

Conversation

jenshnielsen
Copy link
Member

I still need to add an api_change note and update the documentation to reflect the deprecation.

The inheritance between the various Gtk backends is a bit complicated but this solution correctly prints the deprecation warning when using the Gtk and Gdk backends but not the GtkAgg og GtkCairo backends.

I also removed some references to the long since removed fltk and emf backends

Fixes #6541
#6574 targeting 2.x as originally intended.

@OceanWolf
Copy link
Member

What do you think of using this instead in __init__

if self.__class__ == FigureCanvasX:
  warn.deprecated(...)

It feels safer and cleaner to me, checking as early as possible and ensures we warn only if someone trys to create an instance of this base class.

@jenshnielsen
Copy link
Member Author

Fine with me. I will get back to this as soon as I have a chance

@OceanWolf
Copy link
Member

Cool, do we still want this in for 2.0?

@jenshnielsen
Copy link
Member Author

Yes thats my intention. We either need to do this or fix the GDK/GTK backend which is broken. Like this we will at least warn users about this and encurage them to use GTKAgg instead.

@OceanWolf OceanWolf added this to the 2.0 (style change major release) milestone Jun 15, 2016
@OceanWolf
Copy link
Member

I don't know enough about the graphics plotting to know why someone would not want to use Agg or Cairo.

@jenshnielsen
Copy link
Member Author

I don't think many users will but it you have to select a GTK backend and don't read the docs carefully it's very easy to select the GTK backend over the GTKAgg since it's just

import matplotlib
matploltlib.use('GTK')

@OceanWolf
Copy link
Member

Sure, I have done that, I didn't realise that a difference existed between Gtk and GtkAgg. Gtk feels like it should alias GtkAgg, i.e. due to most systems not installing cairo by default. As a simple user I wouldn't want to mess around figuring out whether I should use Agg or Cairo. Maybe something for a Getting Started guide that puts it real simple why users would choose one over the other.

@tacaswell tacaswell merged commit 6a798f0 into matplotlib:v2.x Jun 29, 2016
@jenshnielsen jenshnielsen deleted the deprecategtkwxcocoaagg branch June 29, 2016 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants