What about this

   pd 'reset'
   pd 'labels 0 1'
   pd i.10
   pd 'text 100 90 Hello World1';'text 140 60 Hello World2';'text 180 30 Hello 
World3'
   pd 'show'

It seems rather similar to http://jsfiddle.net/grVFk/4252/


R.E. Boss


> -----Oorspronkelijk bericht-----
> Van: programming-boun...@jsoftware.com 
> [mailto:programming-boun...@jsoftware.com] Namens June Kim (???)
> Verzonden: vrijdag 27 april 2012 17:35
> Aan: Programming forum
> Onderwerp: Re: [Jprogramming] overlapping xlabels in plot
> 
> 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.
> 
> 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

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to