Friday, March 16, 2012

The diffrence among various forms of quotation marks

There are three different forms of quotation marks in gnuplot. They are single quote, double quote and backquote.

The main difference between sing and double quote marks is whether backslash processing of special characters can be used. In double quote the backslash pattern is effective, so if you type in the following command
print "The first line.\nThe second line."
Then it will comes out to be
The first line.
The second line.
While if you type in the command like this:
print 'The first line.\nThe second line.'
Then the out coming string will be
The first line.\nThe second line.

The back quotes have a absolutely different utility. It is used to enclose system commands for substitution into the command lines. (Note that this utility is not supported on all platforms.) For example in a Linux platform you can add a watermark to your graph like this:

set label "By gnuplot-surprising at `date +%Y-%m-%d`" center\
    at screen 0.5,0.5 tc rgb"#cccccc"
plot sin(x)

The watermarked picture looks like this
Back quotes in gnuplot --- substitution

4 comments:

  1. IOT Training in Bangalore - Live Online & Classroom
    Iot Training course observes iot as the platform for networking of different devices on the internet and their inter related communication. Iot Training in Bangalore

    ReplyDelete
  2. Gaining Python certifications will validate your skills and advance your career.
    python certification

    ReplyDelete
  3. You are totally right. This post actually made my day. You can not imagine just how much time I
    had spent for this info! Thanks!

    instagram sign up
    tutuapp apk ios

    ReplyDelete

Creative Commons License
Except as otherwise noted, the content of this page is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.