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 |
|
9 generate file with the plot. |
|
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 |
|
37 + It is no longer possible to mix Matlab-style plot commands with |
|
38 the old (and now considered obsolete) style of plot commands |
|
39 (__gnuplot_set__, etc.). You can do one or the other, but not |
|
40 both for the same plot. |
|
41 |
|
42 + Plot property values are not extensively checked. Specifying |
|
43 invalid property values may produce unpredictible results. |
|
44 |
6834
|
45 + Octave no longer creates temporary data files for plotting, but |
|
46 instead sends data over the same pipe that is used to send |
|
47 commands to gnuplot. While this avoids the problem of |
|
48 cluttering /tmp with data files, it is no longer possible to use |
|
49 the mouse to zoom in on plots. This is a limitation of gnuplot, |
|
50 which is unable to zoom when the data it plots is not stored in |
|
51 a file. |
6329
|
52 |
5814
|
53 ** The way Octave handles search paths has changed. Instead of |
|
54 setting the built-in variable LOADPATH, you must use addpath, |
|
55 rmpath, or path to manipulate the function search path. These |
|
56 functions will maintain "." at the head of the path, for |
|
57 compatibility with Matlab. |
|
58 |
|
59 Leading, trailing or doubled colons are no longer special. |
|
60 Now, all elements of the search path are explicitly included in |
|
61 the path when Octave starts. To display the path, use the path |
|
62 function. |
|
63 |
|
64 Path elements that end in // are no longer searched recursively. |
|
65 Instead, you may use addpath and the genpath function to add an |
|
66 entire directory tree to the path. For example, |
|
67 |
|
68 addpath (genpath ("~/octave")); |
|
69 |
|
70 will add ~/octave and all directories below it to the head of the |
|
71 path. |
|
72 |
|
73 |
|
74 ** Previous versions of Octave had a number of built-in variables to |
5781
|
75 control warnings (for example, warn_divide_by_zero). These |
|
76 variables have been replaced by warning identifiers that are used |
5794
|
77 with the warning function to control the state of warnings. |
|
78 |
|
79 For example, instead of writing |
2511
|
80 |
5781
|
81 warn_divide_by_zero = false; |
2452
|
82 |
5781
|
83 to disable divide-by-zero warnings, you should write |
2452
|
84 |
5781
|
85 warning ("off", "Octave:divide-by-zero"); |
2452
|
86 |
5781
|
87 You may use the same technique in your own code to control |
|
88 warnings. For example, you can use |
2452
|
89 |
5781
|
90 warning ("My-package:phase-of-the-moon", |
|
91 "the phase of the moon could cause trouble today"); |
2452
|
92 |
5781
|
93 to allow users to control this warning using the |
|
94 "My-package:phase-of-the-moon" warning identifier. |
2452
|
95 |
5781
|
96 You may also enable or disable all warnings, or turn them into |
|
97 errors: |
2452
|
98 |
5781
|
99 warning ("on", "all"); |
|
100 warning ("off", "all"); |
|
101 warning ("error", "Octave:divide-by-zero"); |
|
102 warning ("error", "all"); |
2452
|
103 |
5781
|
104 You can query the state of current warnings using |
2452
|
105 |
5781
|
106 warning ("query", ID) |
|
107 warning ("query") |
2452
|
108 |
5781
|
109 (only those warning IDs which have been explicitly set are |
|
110 returned). |
2459
|
111 |
5781
|
112 A partial list and description of warning identifiers is available |
|
113 using |
2452
|
114 |
5781
|
115 help warning_ids |
2452
|
116 |
|
117 |
5814
|
118 ** All built-in variables have been converted to functions. This |
5794
|
119 change simplifies the interpreter and allows a consistent |
|
120 interface to internal variables for user-defined packages and the |
|
121 core functions distributed with Octave. In most cases, code that |
|
122 simply accesses internal variables does not need to change. Code |
|
123 that sets internal variables will change. For example, instead of |
|
124 writing |
|
125 |
|
126 PS1 = ">> "; |
|
127 |
|
128 you will need to write |
|
129 |
|
130 PS1 (">> "); |
|
131 |
5798
|
132 If you need write code that will run in both old and new versions |
|
133 of Octave, you can use something like |
|
134 |
|
135 if (exist ("OCTAVE_VERSION") == 5) |
|
136 ## New: |
|
137 PS1 (">> "); |
|
138 else |
|
139 ## Old: |
|
140 PS1 = ">> "; |
|
141 endif |
5794
|
142 |
|
143 |
5995
|
144 ** For compatibility with Matlab, the output order of Octave's |
|
145 "system" function has changed from |
|
146 |
|
147 [output, status] = system (cmd); |
|
148 |
|
149 to |
|
150 |
|
151 [status, output] = system (cmd); |
|
152 |
6617
|
153 ** For compatibility with Matlab, normcdf, norminv, normpdf, and |
|
154 normrnd have been modified to compute distributions using the |
|
155 standard deviation instead of the variance. |
5995
|
156 |
6777
|
157 ** For compatibility with Matlab, gamcdf, gaminv, gampdf, gamrnd, |
|
158 expcdf, expinv, exppdf and exprnd have been modified to compute |
|
159 the distributions using the standard scale factor rather than |
|
160 one over the scale factor. |
|
161 |
5781
|
162 See NEWS.2 for old news. |