[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ylabel kills plot?
From: |
Ben Abbott |
Subject: |
Re: ylabel kills plot? |
Date: |
Thu, 23 Jul 2009 08:47:20 -0400 |
On Thursday, July 23, 2009, at 08:14AM, "Matthias Brennwald" <address@hidden>
wrote:
>
>----
>Matthias Brennwald, Käferholzstrasse 173, CH-8046 Zürich, +41 44 364
>17 03
>
>On Jul 23, 2009, at 2:01 PM, address@hidden wrote:
>
>>> Dear All
>>>
>>> Consider the following code:
>>>
>>> -------
>>> plot (rand(1,10));
>>> xlabel ('x-label','fontsize',22);
>>> ylabel ('y-label','fontsize',22);
>>> -------
>>>
>>> For some reason, this does not produce the expected plot. I just get
>>> an empty plot window. If I omit the 'fontsize',22 part, everything
>>> works as expected. What am I doing wrong?
>>>
>>> (This is on Mac OS X with Octave 3.2.0 and gnuplot 4.2 patchlevel 5,
>>> both from MacPorts.)
>>>
>>> Matthias
>>
>> I get a plot window with the line and the ticklabels, but no x/y
>> labels.
>>
>> When I change the fontname to "Times", everything works
>>
>>> plot (rand(1,10));
>>> xlabel ('x-label','fontsize',22,'fontname','Times');
>>> ylabel ('y-label','fontsize',22,'fontname','Times');
>>
>> I assume the default x11 font does not support 22pt.
>>
>> Ben
>>
>> p.s. I'm also running Mac OSX 10.5.7 with xquartz 2.3.3 and Gnuplot
>> 4.2.5.
>
>Ok, the 'fontname' thing also fixes the problem in my case. Is there a
>way to tell gnuplot to use a different font by default (e.g. Times or
>Helvetica, which work well with 22pt)?
>
>Matthias
Add the following lines to your ~/.octaverc
set (0, "defaultaxesfontname", "Helvetica")
set (0, "defaulttextfontname", "Helvetica")
However, you may find that bitmaped output does not have a Helvetica font
available. You can check by ...
print -dpng test.png
Ben