How to concatenate strings in gnuplot?

Say we have two lines:

String1 = 'This is ' String2 = 'a mouse.' 

How can I combine these 2 lines to form the line 'This is a mouse.' in gnuplot?

+6
source share
1 answer

Given two lines

 String1 = 'This is ' String2 = 'a mouse.' 

To combine them you can use

 String3 = String1.String2 

or more flexible:

 String3 = sprintf("%s%s", String1, String2) 

type help string or help sprintf for more information on these two methods.

+13
source

All Articles