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

  • blog moved

    As described elsewhere, I've quit LiveJournal. If you're interested in my continuing posts, you should look at one of these (each contains feed…

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • treemaps

    I finally wrote up my recent adventures in treemapping, complete with nifty clickable visualizations.

  • 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.