If you need a grap bar to be installed by the toilet you can install it on the wall next to the toilet. You may want to sit on the toilet to determine what height to put it. You will want it to be high enough to pull your self up but not to high that it is awkward when trying to get up.
If you need it to be by the shower or tub. Put one up and down vertically at the entry and one horizontally across the side or back wall it all depends on the layout of you bathroom.
Just be sure there a studs behind the place where you are securing the grab bars to the wall for stability otherwise it will not hold up should you lose your balance and put most of your weight on the grab bar. Hope this helps.