I've done this for my 5 and 6 gallon carboys and all my 1 gallon jugs.
1 gallon jugs:
Using a measuring cup, fill the jug with 1 cup of water at a time. Once the water settles, using black electrical tape, place a piece of tap ever so slightly below the water line and one just above. You should have a slim uncovered line about 1 to 2 mm thick. Repeat this for each cup of water until you've reached the 1 gallon point.
For carboys, I do the same, but measure out 1 gallon increments only.
After I've made my lines, I use
Armor Etch Cream which can be picked up at most any craft store. This is used for chemically etching glass. It's used for all manner of glass crafting and once washed off, the container or dishes are safe for food use.
Using rubber or nitrate gloves, I smear the Armor Etch cream over the gap in the tape at each gradient. Let it set for a few minutes and then wipe off with a very wet cloth or spray it off in the sink if you have room.
Once your done, you have graduated carboys. Yeah, it takes a few moments to do, but the etching is permanent and will not scrub off like a marker or fingernail polish.
I'll also etch a small 2x3 square at the top of my carboys where I can write info about my brews with a marker and read it easier.