Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to concatenate strings in gnuplot?

Tags:

gnuplot

Let's say we have two strings:

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

How can I concatenate these 2 strings to form the string 'This is a mouse.' in gnuplot?

like image 864
GiniPig Avatar asked Mar 21 '16 17:03

GiniPig


1 Answers

Given two strings

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

To concatenate them, you can use either

String3 = String1.String2

or a more flexible:

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

type help string or help sprintf for more information about the two methods.

like image 157
bibi Avatar answered Oct 16 '22 10:10

bibi