Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improving the Subplots Tool#4

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

OceanWolf
Copy link

Okay, I have now basically achieved what I wanted to, but I have dirtied thelib/matplotlib/backends/backend_gtk3.py a bit, but I guess the not so nice bits will get tidied up by the Backend Plt/Gcf refactor.

Anyway, what do you think? I see a lot of the code inToolConfigureSubplots getting refactored out into a separate dialog class; also I see the separation of the two tasks ofFigureManager, the window logic, and the figure logic into two separate class (and thus undirty it), but I guess that will happen as part of the Gcf refactor...

farizaand others added30 commitsOctober 20, 2014 15:04
…, before filling it with tools.Added a nice utility API function, Navigation.addTools.
@@ -464,6 +469,7 @@ def destroy(self, *args):
def show(self):
# show the figure window
self.window.show()
self.window.present()
Copy link
Author

Choose a reason for hiding this comment

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

The only real change in functionality that I can see I have made, but logically this feels right to me, thatshow should always bring the window to the front, whether or not it had already been opened or not. Though feel free to disagree.

@fariza
Copy link
Owner

I like the idea, but I think it would be better to do it after the Plt/GFC refactor.
If the refactoring is well done, we will have a nice window stuff separated from the rest, then this will be easier to implement.

I'm sorry but I will have to pass on this one, it is tempting to do it now, but the more changes we do, the less probable for the PR to be accepted.
I really want the PR to be accepted so I can move on with my multi figure manager, that is my real objective.

@OceanWolf
Copy link
Author

I understand and agree with your comments, I had those concerns also, but the large number of deletions (and very few insertions) to the backend (gtk3) swayed me, together with the comment by@tacaswellmatplotlib#2624 (comment)

Do you have any idea how long until the Ptt/Gcf refactor will come out? I.e. do you think it will make it out before more backends get converted?

And yes, I really want to see your navigation thing go through (though I do have a few more suggestions to make).

One last thing, if in the future this does go though, I have one more modification to this PR to commit.

@fariza
Copy link
Owner

I have no idea when the Plt/Gfc refactor will come out.
Other idea that crossed my mind, was to implement thehttps://github.com/matplotlib/matplotlib/wiki/Mep23 as a new set of separated elements (kind of the refactor). That way, there is no backwards incompatibilities, and a "smooth" migration for the users would be possible.

@fariza
Copy link
Owner

If you want, just make the change to his PR, so the idea is not lost.

@fariza
Copy link
Owner

@OceanWolf do you mind rebasing this PR? I want to take another look

@OceanWolf
Copy link
Author

Ooh, sure thing :)! Not right now though, just decided to travel long distance tonight, so busy packing.

In the mean time could you take a look over my most recent PR#9? Then I can rebase and finish#6 :).

@OceanWolf
Copy link
Author

I don't get this rebase, it says I have merge errors in files I haven't touched, i.e.lib/matplotlib/backends/backend_tkagg.py. Confused...

@fariza
Copy link
Owner

Are you rebasing against my branch? or against master?
In my case, in the last rebase I had the same problem, because in upstream (matplotlib/master) there was a conflict with an early modification to that file, from the time I was trying to carry both backends at the same time.

Actually what I was trying to do to resolve the problem was to remove my modifications to that file from the repository, but messing with history is dark magic.

So, what I recommend is just open the file, and resolve the conflict removing my part that is in conflict

@OceanWolf
Copy link
Author

Yes, against your branch.

git checkout navigation-by-eventsgit fetch upstreamgit merge --ff-only navigation-by-eventsgit checkout navigation-by-events-subplots-toolgit rebase navigation-by-events

It gives me warnings about 5 lines containing whitespace errors and fails to mergePatch failed at 0001 tk backend. I think this happens because I rebase from a rebase, which means that your history has changed, and thus the diff looks to the wrong commits to compare with... when you look above to what github now sees as the files changed, you see it thinks that I want to add the entirety of navigation... very bizarre, it seems unable to a diff and see that no differences exist...

Should I try and delete my branch locally and rebranch fromnavigation-by-events? I could then do agit push --force.

And remove the Tk work? Updating the Tk work comes as the next task on my hit list of PRs, i.e. after my internal meddlings.

@fariza
Copy link
Owner

I wanted to remove the Tk work and leave it for when the main PR is accepted, but honestly I didn't know how to do it.
I don't want to maintain two different backends while developping the mechanics

@fariza
Copy link
Owner

Regarding the rebase, I find that sometimes it is easier to just create a new branch, instead of trying to keep up with conflicts like this.

@OceanWolf
Copy link
Author

Yes, I think I will make a new branch, while the commits/files changed looks a mess on github, naturally as I haven't rebased, it looks fine locally. I wonder if I should do the following (even wondering if it will work):

git checkout navigation-by-events-subplots-toolgit checkout -b navigation-by-events-subplots-tool-backupgit checkout navigation-by-eventsgit branch -d navigation-by-events-subplots-toolgit checkout -b navigation-by-events-subplots-toolcode code codegit commit -agit push origin --force

i.e. the aim of pushing back to this PR, but with a new fresh history.

And yes, I completely agree with you on not working on Tk while developing internal mechanics, it makes no sense with it all in flux, though as I say, I see that stage as almost over, then I see no reason why not to get Tk patched up. Both because of external mechanics, i.e. with specific tools, I want to see if they will work on both backends; and because it feels nice to have a fully polished PR to show to the owners, the (i.e. not a,it works, but don't look there, or there thing).

@fariza
Copy link
Owner

@OceanWolf Do you mind to give it a try to rebase or recreate this PR? I am interested in your work on the window stuff, I am pretty sure I will need this for my multifiguremanager

@OceanWolf
Copy link
Author

Sure, I really want to give this a rebase ASAP, but first I want to get the window stuff redone, as this subtool basically added some nasty hacks because of the lack of aWindowBase, so I want to get that work done first. It shouldn't take too much longer to get it to a finished state with all the backends. The more backends I upgrade the faster it will go.

I haven't done anything weird with the code, all fully backwards compatible, just like MEP22. But unlike MEP22, a pure refactor, no change in behaviour, no extra features, so I think/hope it will get accepted quite easily. Interested in your comments, but please put them into that PR, I would like to keep comments as concentrated as possible. Also note that the closer the code lies to the backends, the more likely it will change as I refactor more backends. Hoping to get Tk finished today, very nearly done :).

@OceanWolf
Copy link
Author

Naturally once I have completed this refactor, if it looks like it will take a while to get the thumbs up, then I shall move on to this regardless, but I would like to get refactored window code sitting there first.

@farizafarizaforce-pushed thenavigation-by-events branch 2 times, most recently froma88dc2d to5eae4e1CompareApril 7, 2015 19:14
@farizafariza closed thisApr 13, 2015
@OceanWolfOceanWolf deleted the navigation-by-events-subplots-tool branchJuly 25, 2015 20:21
fariza pushed a commit that referenced this pull requestNov 19, 2015
MNT: use IPython's signature if needed + available
fariza added a commit that referenced this pull requestSep 22, 2016
fariza pushed a commit that referenced this pull requestDec 5, 2017
This fixes some possible heap buffer overflows, such as the followingtriggered by our cmmi10.ttf:```ERROR: AddressSanitizer: heap-buffer-overflow on address 0x617000235709 at pc 0x7f95efd3c48a bp 0x7ffe41b6ecc0 sp 0x7ffe41b6ecb0READ of size 1 at 0x617000235709 thread T0    #0 0x7f95efd3c489 in utf16be_to_ascii extern/ttconv/pprdrv_tt.cpp:178#1 0x7f95efd3c489 in Read_name(TTFONT*) extern/ttconv/pprdrv_tt.cpp:339#2 0x7f95efd499ef in read_font(...) extern/ttconv/pprdrv_tt.cpp:1325#3 0x7f95efd4c602 in get_pdf_charprocs(...) extern/ttconv/pprdrv_tt.cpp:1420#4 0x7f95efd35c22 in py_get_pdf_charprocs src/_ttconv.cpp:2170x617000235709 is located 1 bytes to the right of 648-byte region [0x617000235480,0x617000235708)allocated by thread T0 here:    #0 0x7f9612262a38 in __interceptor_calloc (/usr/lib64/libasan.so.4+0xdea38)#1 0x7f95efd3b261 in GetTable(TTFONT*, char const*) extern/ttconv/pprdrv_tt.cpp:140```
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@OceanWolf@fariza

[8]ページ先頭

©2009-2025 Movatter.jp