[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Adding Greek Characters To Plots
From: |
Ben Abbott |
Subject: |
Re: Adding Greek Characters To Plots |
Date: |
Wed, 15 Oct 2008 16:53:54 -0400 |
On Wednesday, October 15, 2008, at 03:57PM, "David Bateman" <address@hidden>
wrote:
>Ben Abbott wrote:
>> On Wednesday, October 15, 2008, at 02:39PM, "John W. Eaton" <address@hidden>
>> wrote:
>>> The following works for me with the current development sources:
>>>
>>> axis ([-pi, pi, 0, 1]);
>>> set (gca, 'fontname', 'symbol')
>>> set (gca, 'xtick', [-pi, -pi/2, 0, pi/2, pi])
>>> set (gca, 'xticklabel', {'-p', '-p/2', '0', 'p/2', 'p'})
>>>
>>> and I think this is compatible behavior. However, it does not seem
>>> like a good general solution to me as I don't see how you would mix
>>> symbol and non-symbol 'p' this way. Also, shouldn't we be able to use
>>> TeX notation in the tick labels to avoid that problem? That doesn't
>>> work for me.
>>>
>>> jwe
>>
>> I agree it is compatible behavior. Unfortunately for me, my gnuplot doesn't
>> handle the symbol font correctly.
>>
>> I also agree it is not a good solution. Do you suggest we deviate from
>> Matlab's approach? ... perhaps we should add an "interpreter" property to
>> the axes? (that it is missing in Matlab is a long frustration for me).
>
>I can't test this at the moment, but is it really the compatible
>behavior? The "Right (TM)" way to do this would be to replace
>[x|y|z]ticklabel with a text object in the same manner as [x|y|z]label
>of the axes are. However, that certainly isn't compatible.
>
>I also don't think its a good idea to include a an interpreter property
>in the axes object itself..
>
>Maybe a reasonable hack would be just to assume that the interpreter
>property for the ticks are set to "tex" and munge the text for the ticks
>with
>
>for i = 1 : numel(labels)
> labels{i} = __tex2enhanced__ (labels{i}, "Helvetica", false, false);
>endfor
>
>at the appropriate place in "__go_draw_axes__.m (do_tics_1)".
>
>D.
ok, I like that idea.
I should be able to get that done in the next few days.
Ben