help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Saving figures consisting of subplots generated with for loops


From: Vinicio Serment Moreno
Subject: Saving figures consisting of subplots generated with for loops
Date: Tue, 17 Nov 2015 19:35:58 -0600

Greetings everyone, I am relatively new to Octave, and I am having trouble saving a figure, consisting of a set of subplots generated with "for" loops.

To illustrate this issue, I have generated the sample code on the attached f1.m file.
We have the independent variable x = (0:1:20), and y = f(x) = 2*x.

After defining the variables, a for loop goes from i = 1:4, and each time a random number vector (err) is generated with the randn function. On each step of the for loop, a subplot is generated, which contains: (a) original data (y) illustrated as a solid line; (b) random data (y + i*err) illustrated as coloured markers.

The plot is correctly generated by the GNU interface as showed by the screenshot on the attached file "fig1_correct". The formatting of the y-axis label is also displayed as desired" "f(x) = y, f(x) = yrand".

However, when I try to save the figure with either the "print" or "saveas" functions for pdf or eps formats, only the random data (coloured markers) is kept and the yaxis label is displayed as: "f(x) = y. f(x) = y_{rand}" (see attached file "fig1.eps").

For reference, I am running Octave 4.0.0 on Ubuntu 14.04 LTS, and the Linux OS is run from a virtual machine using Windows 8.1.

Thanks for your attention, and I hope you may be able to help. Congratulations to the Octave developing and supporting teams, keep up the great work.

Have a nice day,

Sincerely,

Vinicio

--
Vinicio Serment Moreno
Ph. D. Student
Centro de Biotecnología FEMSA
Escuela de Ingeniería y Ciencias
Tecnológico de Monterrey

Attachment: f1.m
Description: Text Data

Attachment: fig1.eps
Description: PostScript document

Attachment: fig1_correct
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]