Evan Martin (evan) wrote in evan_tech,
Evan Martin

lj graph of the day

Showing how friends in degree and out degree are correlated.

The result itself is uninteresting, except for making plain the effect of the friends cap. There's actually one user not shown on the graph: foma, with 2,121 friends. I hypothesize they did this before the LJ cap was put in place. (As always, keep in mind that this is biased by my crawl.)

In any case, getting an image out of R is (like all things I ever try to do) like pulling teeth. R's PNG output generates ugly aliasing, so the typical route to take is generating Postscript and then converting to a bitmap. Unfortunately, as far as I can tell Ghostscript (which is what ever Postscript-processing program such as ImageMagick uses underneath) ignores the Postscript comments -- like it ought to -- in its input file, and those comments include metadata about the image including its orientation (Landscape) as well as its bounding box. Additionally, the bounding box is specified in some sort of Postscript dimension (I imagine points?) and so a program that extracts this information from the comments needs to do some transformations. The Landscape bit can be handled with postprocessing, or (as I've seen it proposed on mailing lists as I watched this problem get uglier and uglier) your dimension-extracting program can generate some Postscript "rotate" code and insert it into Ghostscript.

In any case, mattm pointed me at imgtops and their in-depth bakeoff of test results, and that works.
Tags: livejournal

  • google ime

    Japanophiles might be interested to learn that Google released a Japanese IME. IME is the sort of NLP problem that Google is nearly uniquely…

  • megaupload captcha

    Someone make a Javascript-based captcha cracker for megaupload. It's strange to see those captchas again because I idly myself wrote a…

  • zombie ghosd

    I was tickled to discover another IBM developerworks article on one of my abandoned hacks and that both it and its predecessor have been translated…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.