How to fix wrong bone axes to edit the animation in the graph editor?
The bones to wich nothing is connected (free or keep offset only) can be freely rotate in edit mode: if you select your armature and in the properties tab check the "axes", you can freely rotate those bones to align their axes with the world axes; in the photo i've changed the alignement of the hips of your model to match world's alignement.
This procedure, of course, changes the pivot point of the rotations, so you should move the head of the bone to the previous location.

Sometimes this is not a good solution, even worse if another bone is connected to the one you want aligned. In those cases the solution is to add a new control bone, aligned with the world coordinates, and make it parent with the deform bone, so you can animate an aligned bone controlling a non aligned deform bone.
For a better use of the graph editor you should also avoid the use of quaternion rotation, wich is useful only in the cases where a bone needs to rotate in all the three axes: if you know that a bone will rotate just a little (er even better it can be locked) in one of his axes (let's say the "z"), choose euler rotation putting that axe in the center (I.E. euler XZY): in this way the graph editor should be more usable to edit rotations.

Anyway, in my experience, lots of animators nearly do not use the graph editor, except for choosing wich type of keyframe they want (vector, bezier, etc..) and they do their editings directly in the action editor, dopesheet and directly posing the character, also because a lot of animation is done by rotating bones and quaternion is mainly used.

https://www.youtube.com/watch?v=c-0oBXJZwQE
This is an amazing serie of tutorals to deeply understand some priciples of advanced rigging.