Let me start this by saying that gay people have more exposure than they have ever had in mainstream media, and that's a good thing. Every soap has at least one gay character, and dramas (on HBO, at least) are finally letting their gay characters be defined by something other than their sexuality (hooray for Omar and Lafeyette). It's also been said that the best place for gay characters is genre shows, where they aren't just dealing with coming out and homophobia, they also have to pilot spaceships and save the world.
But I've noticed a bit of a bias over the years, particularly in the world of sci-fi and superheroes. Lots of fiesty, fleshed-out lesbians, and hardly any gay men. Look at Battlestar Galactica, one of my favourite ever shows. In the TV BSG movie Razor, Admiral Cain, a relatively minor character, was shown in a lesbian relationship with the not-unattractive Six. By the time the movie aired, Cain had been killed off and her background, while interesting, didn't really add anything. Meanwhile, there was Felix Gaeta, a solid supporting character who'd been there from episode one. He was revealed as bisexual in a web series, but his sexuality was not once referenced in the main show, even though it helped make sense of his motivations throughout the series, especially his somewhat personal reaction when Gaius Baltar betrayed him and the entire human race. The makers seemed happy to show lesbians on the main show, even when it was pretty much irrelevant, but a major plot development relating to an important character was sidelined to a web show.
Then look at He Who Can Do No Wrong Joss Whedon. Willow and Tara in Buffy were just lovely. One of the best and least provocative depictions of a lesbian relationship on TV, to this day. They fought, they had sex, they supported each other, and their friends excepted them with barely a word. Elsewhere, though, I give you Andrew, a character who was clearly gay. And yet when Whedon wanted to show how Andrew had matured as a person over on Angel, he had him going off to a ball on the arms of two beautiful women. How hard would it have been for Andrew to head off into the sunset with a hot guy in a tux? Again, a lesbian couple who were treated sensitively and sympathetically, and a gay character who was comic relief, and then inexplicably straight.
Comics are much the same. Marvel is doing better, in their earnest way, with Young Avengers Wiccan and Hulkling and X-Factor's Rictor and Shatterstar, but DC is disgracefully devoid of gay male characters. Not gay characters, I'll stress, because they currently boast three brilliant lesbians: Renee Montoya, Scandal Savage and even Batwoman. They are often sidelined by some writers, but in the hands of their principle writers (Greg Rucka and Gail Simone) they are three of DC's best characters.
But where are DC's gay male characters? Um... Todd Rice, his lawyer boyfriend, Creote... erm... Kyle Rayner's mate, who was gay-bashed... Please, tell me if I'm missing anyone, but those are the only ones I can think of. I'm not sure exactly what percentage of people are gay in the real world, but I'm pretty certain it's a larger percentage than is depicted in the DCU, male and female. Would it be that difficult for them to introduce a gay Teen Titan? (teenagers are meant to experiment with their sexuality, the Titans seems like the natural home for a new gay character). And there are plenty of existing characters who could fairly organically be revealed as gay or bisexual. Connor Hawke, Tim Drake, Dinah Lance, Joseph Wilson.
When it comes to the dominance of lesbian characters over gay ones in the sci-fi genre, I can only reach one (sad) conclusion: the male, middle-aged Powers That Be don't feel threatened by lesbians. They think they're hot. Gay men, however, represent the fear of the unknown, something they consider a little bit, well, disgusting. Something they don't want to corrupt the young male viewers/readers with. They recognise that in these modern days they need to acknowledge the existance of homosexuals, but they go for what they view as the 'safe' option: lesbians. Added to that is the assumption that lesbians are more masculine, and therefore more likely to be tough heroes, whereas gay men are considered to be effeminate, so hardly hero material.
Luckily, this thinking has allowed some brilliant female characters to sneak through the misogynistic net and carve a vivid, powerful route of their own. But the arse-kicking, swashbuckling gay heroes are still trapped in the red tape, waiting for a new generation of Big Boss Men to let them do their stuff. And who wouldn't want to watch a show about a gay space pirate?