plot2 new line



Dnia Mon, 19 Jul 2010 14:20:04 +0100, Jaime Villate napisa?(a):

> On Mon, 2010-07-19 at 10:43 +0000, Adam Majewski wrote:
>> How can I brake a title line to 2 lines ? ( puting /n sign into
>> title_string does not work for me
>> 
>> title_string :concat(" 'Apollonian Gasket /n defined by curvatures
>> (",string(r0*k0),", ",string(nk1),", ",string(nk1),", ",string (nk1),"
>> )" ); /* this does not work */
> 
> Of course not; you have two errors:
> 1- You didn't close the single quote. 2- For \n to work in Gnuplot, you
> should use double quote " rather than single one.
> 
> Try:
> title_string :concat(" \"Apollonian Gasket /n defined by curvatures
> (",string(r0*k0),", ",string(nk1),", ",string(nk1),", ",string (nk1),"
> )\" " );  /* this should work */
> 
> Regards,
> Jaime

Thx Jaime,

I have changed to :

title_string :concat("\"Apollonian Gasket /n defined by curvatures 
(",string(r0*k0),", ",string(nk1),", ",string(nk1),", ",string(nk1)," ) 
\" " );

.....
It shows string but displayed in one row.
(:-(

Adam

my (partial) code :
===================================
plot_list:[];
/* ------------------------------- step 0 = outer circle --------- */
plot_list:cons(plot_ck(ck0),plot_list);
/* ---------step 1  -------------------------------------*/
plot_list:cons(plot_ck(ck1a),plot_list);

set_plot_option([plot_format, gnuplot]);
set_plot_option([nticks, 80]);
set_plot_option([t,-%pi,%pi]); 
nk1:float(r0*k1);
title_string :concat("\"Apollonian Gasket /n defined by curvatures 
(",string(r0*k0),", ",string(nk1),", ",string(nk1),", ",string(nk1)," ) 
\" " );
/* title_string :concat(" 'Apollonian Gasket defined by curvatures 
(",string(r0*k0),", ",string(nk1),", ",string(nk1),", ",string
(nk1)," )" ); */
my_preamble:sconcat("unset key; set size ratio 1; set title 
",title_string);
set_plot_option([gnuplot_preamble,my_preamble])$ 

plot2d (plot_list)$

================ end of code ========================
(%i39) build_info()$
Maxima version: 5.20.1
Maxima build date: 8:52 2/16/2010
Host type: x86_64-unknown-linux-gnu
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.7