octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Treat TeX in plot text in a Matlab compatible matter with gnuplot en


From: David Bateman
Subject: Re: Treat TeX in plot text in a Matlab compatible matter with gnuplot enhanced mode
Date: Mon, 26 Nov 2007 17:43:10 +0100
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

John W. Eaton wrote:
> On 19-Nov-2007, David Bateman wrote:
>
> | Shai Ayal wrote:
> | > I have 2 comments:
> | > 1) It's going to be really hard to live up to the features of the
> | > gnuplot backend, and it keeps getting harder.
> | > 2) Why do you use the string_property type for the interpreter
> | > property and not radio_value?
> | >   
> | Shai,
> | 
> | Here is my updated version of this patch. It adds the \bf, \it modes
> | etc, fixes a few incorrect symbols and correctly implements the super-
> | and sub-scripts. The super- and sub-scripts were rather messy as gnuplot
> | requires that the shorter of the two comes first to get the correct
> | alignment. The definition of shorter is not obvious as the fonts might
> | be proportional, nested {} and  there might be  non-printed characters
> | like /fontsize{20} that need to be ignored.. I also added documentation
> | and an example
> | 
> | x = 0:0.01:3;
> | plot(x,erf(x));
> | hold on;
> | plot(x,x,'r');
> | axis([0, 3, 0, 1]);
> | text(0.65, 0.6175, strcat('\leftarrow x = {2/\surd\pi', ...
> | ' {\fontsize{16}\int_{\fontsize{8}0}^{\fontsize{8}x}}', ...
> | ' e^{-t^2} dt} = 0.6175'))
> | 
> | which demonstrates the capabilities of the patch to layout mathematical
> | formula. I included your string_property, caseless_str patch in this
> | patch to get rid of he conflict between our patches. So your patch
> | shouldn't be applied, as its included here..
>
> | 2007-11-19  David Bateman  <address@hidden>
> | 
> |     * plot/drawnow.m (open_gnuplot_stream, init_gnuplot_stream):
> |     Return whether the terminal supports enhanced text or not.
> |     (drawnow:enhanced_term): New sub-function to determine is terminal
> |     supported enhanced mode.
> |     * plot/__go_draw_figure__.m: Accept enhanced flag and pass to
> |     __go_draw_axes__.
> |     * plot/__go_draw_axes__.m: Accept enhanced flag and munge text if
> |     needed to support the enhanced mode.
> |     * plot/print.m: Remove "enhanced" option as this is now treated in
> |     drawnow.m.
> | 
> | 2007-11-19  David Bateman  <address@hidden>
> | 
> |     * graphics.h.in (class figure): Add __enhanced__ property to cache
> |     whether the terminal supports enhanced mode. Add interpreter
> |     property to all text classes, to determine the renderer for the
> |     text.
> |     * graphics.cc (class figure): ditto.
> | 
> | 2007-11-19  Shai Ayal  <address@hidden>
> | 
> |     * graphics.cc (string_properties): delete class 
> |     (property_name): rename class to caseless_str. 
> |     (radio_values::possible_vals): change type to caseless_str.
> | 
> | 2007-11-19  David Bateman  <address@hidden>
> | 
> |     * interpreter/plot.txi: Document the new text properties and the
> |     TeX interpreter mode of text objects.
> |     * interpreter/plotimages.m: Add an example for the TeX
> |     interpreter.
> |     * interpreter/Makefile.in (PLOTIMAGES): Add the TeX example
> | 
> | 2007-11-19  David Bateman  <address@hidden>
> | 
> |     * NEWS: Document the TeX interpreter mode and its limitations with
> |     gnuplot 4.0.
>
> I haven't tried this patch yet, but from reading it, it appears that
> it converts TeX commands for special characters to "/Symbol X" even
> for the (e)pslatex terminal.  I'm not sure that is best.  I think I
> would expect the TeX commands to be rendered by TeX in that case
> instead of being converted to PostScript symbols.
>   
That is fairly easy to address in drawnow:enhanced_term.. We just have
to check if the terminal is (e)pslatex, and don't flag this as an
enhanced terminal. I can't easily regenerate a new patch, for this patch
at this point, but will make this change if you accept this patch..

> Also, I noticed two instances of \Symbol instead of /Symbol.  Is that
> intentional?
>   
No that isn't intentional.. I'll fix it before committing if you accept
the patch.

D.
> Thanks,
>
> jwe
>
>   


-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]