Looking for fix or work around for Multi-line title plot export in Octave 4.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
RT
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Looking for fix or work around for Multi-line title plot export in Octave 4.0

RT
clf(1);
 plot (1:10, 1:10, 1:10, fliplr (1:10));
 title ({"Use properties to place legend text to the left of key", ...
         "Legend text color is magenta"});
 h = legend ({"I am blue", "I am orange"}, "location", "east");
 legend ("right");
 set (h, "textposition", "left");
 set (h, "textcolor", [1 0 1]);
 print(figure(1),'/tmp/test.jpg');

The title looks correct on the screen but when it's exported as an image to a file the titles shows on only one line (the newline in the title does not work is their a work around?)  see attached image of what is exported to the file.

I'm using Octave 4.0 Ubuntu 64bit


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

title_multiline_not_working.jpg (66K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Looking for fix or work around for Multi-line title plot export in Octave 4.0

NJank
On Tue, Mar 28, 2017 at 12:08 PM, RT <[hidden email]> wrote:
clf(1);
 plot (1:10, 1:10, 1:10, fliplr (1:10));
 title ({"Use properties to place legend text to the left of key", ...
         "Legend text color is magenta"});
 h = legend ({"I am blue", "I am orange"}, "location", "east");
 legend ("right");
 set (h, "textposition", "left");
 set (h, "textcolor", [1 0 1]);
 print(figure(1),'/tmp/test.jpg');

The title looks correct on the screen but when it's exported as an image to a file the titles shows on only one line (the newline in the title does not work is their a work around?)  see attached image of what is exported to the file.

I'm using Octave 4.0 Ubuntu 64bit

Using Octave 4.2.1 on Windows. The title stays split. Tried all three graphics toolkits and no change. What graphics toolkit are you using and does that affect the output?


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Looking for fix or work around for Multi-line title plot export in Octave 4.0

Pantxo
In reply to this post by RT
RT wrote
clf(1);
 plot (1:10, 1:10, 1:10, fliplr (1:10));
 title ({"Use properties to place legend text to the left of key", ...
         "Legend text color is magenta"});
 h = legend ({"I am blue", "I am orange"}, "location", "east");
 legend ("right");
 set (h, "textposition", "left");
 set (h, "textcolor", [1 0 1]);
 print(figure(1),'/tmp/test.jpg');

The title looks correct on the screen but when it's exported as an image to
a file the titles shows on only one line (the newline in the title does not
work is their a work around?)  see attached image of what is exported to
the file.

I'm using Octave 4.0 Ubuntu 64bit

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave


title_multiline_not_working.jpg (66K) <http://octave.1599824.n4.nabble.com/attachment/4682642/0/title_multiline_not_working.jpg>
Hi,

You either need to use gnuplot graphics_toolkit or Octave 4.2.

Pantxo
Loading...