OmniGraffle device for R
Ken Case
kc at omnigroup.com
Tue Jul 18 16:12:32 PDT 2006
On Jul 18, 2006, at 13:10 , Fernando Diaz wrote:
> 1. It seems that the graffle format expects the formatting (color,
> font, size, etc) to be embedded in the rtf-formated string, despite
> the presence of xml elements defining the font characteristics. Is
> this accurate? Is there a way to exclude the formatting
> information from the string and for graffle to use the alternative
> definition?
I believe those basic attributes are only used if there's no RTF, so
I'm pretty certain you'd have to write the RTF.
> 2. Is there a suggested method for getting the bounding box in
> OmniGraffle from a string of text? For now, I'm just assuming that
> I can use sizeWithAttributes: .
That bounding box calculation is somewhat complicated: I know we've
had to address a number of issues with Japanese text, for example.
But for simple cases I think it's based on -sizeWithAttributes: plus
margins.
However, you could just set the size to {1, 1} and turn on FitText
and Resize Flow on the shape to make OmniGraffle figure out the size
itself:
<key>FitText</key>
<string>YES</string>
<key>Flow</key>
<string>Resize</string>
Alternatively, you might explore writing a document using the
GraphViz DOT file format <http://www.research.att.com/sw/tools/
graphviz/>. OmniGraffle doesn't support the full range of DOT
commands (the commands which are supported are document in
OmniGraffle's Help), but it's a standard file format which is better
documented.
> I know I'm interested in getting such bridge between R and
> OmniGraffle up and running. I was also wondering if other folks
> would be interested.
I'd certainly use it! (I usually use R's pdf() device right now, and
I'd love to be able to make that output look better by using
OmniGraffle.)
Cheers,
Ken
More information about the OmniGraffle-Users
mailing list