Swastikas and vile phrases such as "vote no to fags" have been scrawled on trains, and homes flying the rainbow flag have been attacked, in an outbreak of homophobic violence and vandalism accompanying the postal survey on same-sex marriage.

Tasmanian police have also laid charges over the alleged assault of a transgender teenager in Hobart on Friday, just a day after former prime minister Tony Abbott was headbutted by a self-proclaimed anarchist DJ in the same area.

The incidents further test Prime Minister Malcolm Turnbull's claim that "overwhelmingly, Australians are engaging in this debate respectfully", with six weeks to go until the deadline for survey forms to be received by the Australian Bureau of Statistics.

In Sydney, photos surfaced of obscene graffiti inside a train carriage, including swastikas and the phrases "vote no! to fags" and "faggots not welcome". The photos were uploaded to the Reddit website last week by a user who said they saw the "absolutely f--king disgusting" graffiti on a train journey to Circular Quay.