On Aug 8, 2010, at 4:04 PM, Michael D Godfrey wrote:
> On 08/08/2010 12:29 PM, Ben Abbott wrote:
>> The fltk backend now supports printing using the epslatex, pslatex, pdflatex devices (pdflatex is not yet documented, but it works the same as epslatex and pslatex).
>>
>> There is one minor problem. The alignment of rotated text is not handled correctly. I thought it best to mention it ... and hope a latex fan would take a look at what needs to be done to the gl2ps.c code to fix it.
>>
>> For example ..
>>
>> close all
>> backend fltk
>> plot (0:10)
>> xlabel ("xlabel")
>> ylabel ("ylabel")
>> print -depslatexstandalone test
>>
>> Then run latex of test.tex. In the resulting testdvi (or test.ps or test.pdf depending upon your setup) the ylabel is rotated correctly, but is not aligned correctly.
>>
>> PGF output is also available.
>>
>> print -dtikz test.pgf
>>
>> Thus far I'm not yet able to get the PGF to work. However, I'm not confident I'm using the pgf file correctly.
>>
>> Ben
>>
> Ben,
>
> I gave this a try with:
> 1015 # Octave 3.3.52+, Sun Aug 08 08:25:52 2010 PDT <address@hidden>
> 1016 plot(1:20)
> 1017 xlabel(' x label ')
> 1018 ylabel(' y label ')
> 1019 title('title')
> 1020 text(10,10,'centered')
> 1021 text(10,15,' math $\omega\gamma$ end ')
> 1022 print -depslatexstandalone test
> 1023 quit
> ========================================
> With just a bit of post-processing this produced (using pdflatex test) the attached.
> This looks GREAT to me.
>
> Michael
Notice your "ylabel" is not centered correctly. The middle of the string should be aligned to the tickmark for 10.
Looking at the latex file, the problem is with ...
\selectfont\put(39.8755,224.56){\makebox(0,0)[b]{\rotatebox{90}{\textcolor[rgb]{0,0,0}{{ylabel}}}}}
Which should be ...
\selectfont\put(39.8755,224.56){\makebox(0,0)[c]{\rotatebox{90}{\textcolor[rgb]{0,0,0}{{ylabel}}}}}
Ben