« Return to Thread: Single vs Double Quotes control characters plot titles

Single vs Double Quotes control characters plot titles

by gOS :: Rate this Message:

Reply to Author | View in Thread

I know GNU plot is being phased out, but I think this goes a bit deeper than GNU plot. Run both of these without jhandles and pay attention to the title:

function ptest1
  a = 1:100;
  b = 1:100;
 
  plot(a,b)
  title('This is \n a test')  
 
end

- - - - - - - - - - - - - - - - - - -

function ptest2
  a = 1:100;
  b = 1:100;
 
  plot(a,b)
  title("This is \n a test")  
 
end

- - - - - - - - - - - -

Output:
Test1

This is n a test

Test2

This is
a test

- - - - - - - - - -

I do not think using double or single quotes should have this kind of an impact on formatting, and I would consider it a bug.

 « Return to Thread: Single vs Double Quotes control characters plot titles