On Sat, Apr 28, 2012 at 12:35 AM, June Kim (김창준) <junea...@gmail.com> wrote:

> On Fri, Apr 27, 2012 at 9:53 PM, Andrew Nikitin <ns...@hotmail.com> wrote:
>
>>
>> > From: June Kim (???) <junea...@gmail.com>
>> >
>> > That's too bad. How is plot's drawtext implemented in the low level? It
>> > seems like to call 11!:0 y. Is there any possibility to implement a new
>> > feature easily?
>>
>> Define "easily".
>> For exmaple, you can place labels with
>>
>> plot i.10
>> pd 'textc 100 20 asdf'
>> pd 'show'
>>
>> and adjust values of 100 and 20 appropriately. It will even preserve
>> relative
>> position if you scale your form a little bit. Not sure how to do rotation,
>> though.
>>
>>
> I found a way to do the rotation. As a starting point,
>
>    pd 'reset'
>    pd 'labels 0 1'
>    pd i.10
>    pd 'textfont Arial 9 angle900'
>    pd 'text 100 0 Hello World'
>    pd 'show'
>
> Now I need to increase the bottom margin to make space for rotated
> xlabels.
>

I am not sure if this is the right approach to increase the bottom margin,
but it seems to work anyway:

pd 'reset'
pd 'textfont Arial 9 angle900'
pd 'textr  50 220 Hello World'
pd 'textr 150 220 J Language'
pd 'textr 250 220 APL'
pd 'textr 350 220 Kenneth Iverson'
pd 'sub 0 180 1000 900'
pd 'clear 0'
pd 'labels 0 1'
pd 'type bar'
pd >:i.10
pd 'show'




>
> BTW, do not be too bent on generating everything with J. You can save
>> properly
>> resized plot into bmp and then edit category names there the way you
>> want. If
>> your categories are same all the time and only data changes -- save the
>> bottom portion of your plot into another bmp and use it with subsequent
>> plot
>> of same size and layout.
>>
>
> Yeah. Thanks for reminding me of good heuristics : do not try to use your
> favorite tool for everything.
>
>
>>
>> > That's a clever idea, but looking at a 90 degrees rotated histogram is
>> > unnatural to many people. :(
>>
>> Reading 90 degrees rotated text on x axis is also unnatural to many
>> people.
>> There is no best solution, you have to make some hard choices here.
>>
>
> You are right. I have to choose between rotated bars and rotated xlabels
> if I want to follow rotation approach.
>
> Thanks.
>
>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to