5913
|
1 Summary of important user-visible changes for version 3.0: |
|
2 --------------------------------------------------------- |
2452
|
3 |
6329
|
4 ** Compatibility with Matlab graphics is much better now. We now |
|
5 have some graphics features that work like Matlab's Handle |
|
6 Graphics (tm): |
|
7 |
|
8 + You can make a subplot and then use the print function to |
7038
|
9 generate a file with the plot. |
6329
|
10 |
|
11 + RGB line colors are supported if you use gnuplot 4.2. Octave |
6426
|
12 can still use gnuplot 4.0, but there is no way to set arbitrary |
6329
|
13 line colors with it when using the Matlab-style plot functions. |
6426
|
14 There never was any way to do this reliably with older versions |
|
15 of gnuplot (whether run from Octave or not) since it only |
|
16 provided a limited set to choose from, and they were terminal |
|
17 dependent, so choosing color 1 with the X11 terminal would be |
6465
|
18 different from color 1 with the PostScript terminal. Valid RGB |
|
19 colors for gnuplot 4.0 are the eight possible combinations of 0 |
|
20 and 1 for the R, G and B values. Invalid values are all mapped |
|
21 to the same color. |
6329
|
22 |
|
23 + You can control the width of lines using (for example): |
|
24 |
|
25 line (x, y, "linewidth", 4, "color", [1, 0, 0.5]); |
|
26 |
|
27 (this also shows the color feature). |
|
28 |
|
29 + With gnuplot 4.2, image data is plotted with gnuplot and may be |
|
30 combined with other 2-d plot data. |
|
31 |
|
32 + Lines for contour plots are generated with an Octave function, so |
|
33 contour plots are now 2-d plots instead of special 3-d plots, and |
|
34 this allows you to plot additional 2-d data on top of a contour |
|
35 plot. |
|
36 |
7038
|
37 + The following plot commands are now considered obsolete and will |
|
38 be removed from a future version of Octave: |
|
39 |
|
40 __gnuplot_set__ |
|
41 __gnuplot_show__ |
|
42 __gnuplot_plot__ |
|
43 __gnuplot_splot__ |
|
44 __gnuplot_replot__ |
|
45 |
|
46 Additionally, these functions no longer have any effect on plots |
|
47 created with the Matlab-style plot commands (plot, line, mesh, |
|
48 semilogx, etc.). |
6329
|
49 |
|
50 + Plot property values are not extensively checked. Specifying |
|
51 invalid property values may produce unpredictible results. |
|
52 |
6835
|
53 + Octave now sends data over the same pipe that is used to send |
6834
|
54 commands to gnuplot. While this avoids the problem of |
|
55 cluttering /tmp with data files, it is no longer possible to use |
|
56 the mouse to zoom in on plots. This is a limitation of gnuplot, |
|
57 which is unable to zoom when the data it plots is not stored in |
7038
|
58 a file. Some work has been done to fix this problem in newer |
|
59 versions of gnuplot (> 4.2.2). See for example, this thread |
|
60 |
|
61 http://www.nabble.com/zooming-of-inline-data-tf4357017.html#a12416496 |
|
62 |
|
63 on the gnuplot development list. |
6329
|
64 |
5814
|
65 ** The way Octave handles search paths has changed. Instead of |
|
66 setting the built-in variable LOADPATH, you must use addpath, |
|
67 rmpath, or path to manipulate the function search path. These |
|
68 functions will maintain "." at the head of the path, for |
|
69 compatibility with Matlab. |
|
70 |
|
71 Leading, trailing or doubled colons are no longer special. |
|
72 Now, all elements of the search path are explicitly included in |
|
73 the path when Octave starts. To display the path, use the path |
|
74 function. |
|
75 |
|
76 Path elements that end in // are no longer searched recursively. |
|
77 Instead, you may use addpath and the genpath function to add an |
|
78 entire directory tree to the path. For example, |
|
79 |
|
80 addpath (genpath ("~/octave")); |
|
81 |
|
82 will add ~/octave and all directories below it to the head of the |
|
83 path. |
|
84 |
|
85 |
|
86 ** Previous versions of Octave had a number of built-in variables to |
5781
|
87 control warnings (for example, warn_divide_by_zero). These |
|
88 variables have been replaced by warning identifiers that are used |
5794
|
89 with the warning function to control the state of warnings. |
|
90 |
|
91 For example, instead of writing |
2511
|
92 |
5781
|
93 warn_divide_by_zero = false; |
2452
|
94 |
5781
|
95 to disable divide-by-zero warnings, you should write |
2452
|
96 |
5781
|
97 warning ("off", "Octave:divide-by-zero"); |
2452
|
98 |
5781
|
99 You may use the same technique in your own code to control |
|
100 warnings. For example, you can use |
2452
|
101 |
5781
|
102 warning ("My-package:phase-of-the-moon", |
|
103 "the phase of the moon could cause trouble today"); |
2452
|
104 |
5781
|
105 to allow users to control this warning using the |
|
106 "My-package:phase-of-the-moon" warning identifier. |
2452
|
107 |
5781
|
108 You may also enable or disable all warnings, or turn them into |
|
109 errors: |
2452
|
110 |
5781
|
111 warning ("on", "all"); |
|
112 warning ("off", "all"); |
|
113 warning ("error", "Octave:divide-by-zero"); |
|
114 warning ("error", "all"); |
2452
|
115 |
5781
|
116 You can query the state of current warnings using |
2452
|
117 |
5781
|
118 warning ("query", ID) |
|
119 warning ("query") |
2452
|
120 |
5781
|
121 (only those warning IDs which have been explicitly set are |
|
122 returned). |
2459
|
123 |
5781
|
124 A partial list and description of warning identifiers is available |
|
125 using |
2452
|
126 |
5781
|
127 help warning_ids |
2452
|
128 |
|
129 |
5814
|
130 ** All built-in variables have been converted to functions. This |
5794
|
131 change simplifies the interpreter and allows a consistent |
|
132 interface to internal variables for user-defined packages and the |
|
133 core functions distributed with Octave. In most cases, code that |
|
134 simply accesses internal variables does not need to change. Code |
|
135 that sets internal variables will change. For example, instead of |
|
136 writing |
|
137 |
|
138 PS1 = ">> "; |
|
139 |
|
140 you will need to write |
|
141 |
|
142 PS1 (">> "); |
|
143 |
5798
|
144 If you need write code that will run in both old and new versions |
|
145 of Octave, you can use something like |
|
146 |
|
147 if (exist ("OCTAVE_VERSION") == 5) |
|
148 ## New: |
|
149 PS1 (">> "); |
|
150 else |
|
151 ## Old: |
|
152 PS1 = ">> "; |
|
153 endif |
5794
|
154 |
|
155 |
5995
|
156 ** For compatibility with Matlab, the output order of Octave's |
|
157 "system" function has changed from |
|
158 |
|
159 [output, status] = system (cmd); |
|
160 |
|
161 to |
|
162 |
|
163 [status, output] = system (cmd); |
|
164 |
6617
|
165 ** For compatibility with Matlab, normcdf, norminv, normpdf, and |
|
166 normrnd have been modified to compute distributions using the |
|
167 standard deviation instead of the variance. |
5995
|
168 |
6777
|
169 ** For compatibility with Matlab, gamcdf, gaminv, gampdf, gamrnd, |
|
170 expcdf, expinv, exppdf and exprnd have been modified to compute |
|
171 the distributions using the standard scale factor rather than |
|
172 one over the scale factor. |
|
173 |
5781
|
174 See NEWS.2 for old news. |