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 |
7189
|
23 This also affects patch objects used in the bar, countour, meshc |
|
24 and surfc functions, where the bars and contours will be |
|
25 monochrome. A workaround for this is to type "colormap gmap40" |
|
26 that loads a colormap that in many cases will be adequate for |
|
27 simple bar and contour plots. |
|
28 |
6329
|
29 + You can control the width of lines using (for example): |
|
30 |
|
31 line (x, y, "linewidth", 4, "color", [1, 0, 0.5]); |
|
32 |
|
33 (this also shows the color feature). |
|
34 |
|
35 + With gnuplot 4.2, image data is plotted with gnuplot and may be |
|
36 combined with other 2-d plot data. |
|
37 |
|
38 + Lines for contour plots are generated with an Octave function, so |
|
39 contour plots are now 2-d plots instead of special 3-d plots, and |
|
40 this allows you to plot additional 2-d data on top of a contour |
|
41 plot. |
|
42 |
7189
|
43 + With the gnuplot "extended" terminals the TeX interpreter is |
|
44 emulated. However, this means that the TeX interpreter is only |
|
45 supported on the postscript terminals with gnuplot 4.0. Under |
|
46 gnuplot 4.2 the terminals aqua, dumb, png, jpeg, gif, pm, windows, |
|
47 wxt, svg and x11 are supported as well. |
|
48 |
7038
|
49 + The following plot commands are now considered obsolete and will |
|
50 be removed from a future version of Octave: |
|
51 |
|
52 __gnuplot_set__ |
|
53 __gnuplot_show__ |
|
54 __gnuplot_plot__ |
|
55 __gnuplot_splot__ |
|
56 __gnuplot_replot__ |
|
57 |
|
58 Additionally, these functions no longer have any effect on plots |
|
59 created with the Matlab-style plot commands (plot, line, mesh, |
|
60 semilogx, etc.). |
6329
|
61 |
|
62 + Plot property values are not extensively checked. Specifying |
|
63 invalid property values may produce unpredictible results. |
|
64 |
6835
|
65 + Octave now sends data over the same pipe that is used to send |
6834
|
66 commands to gnuplot. While this avoids the problem of |
|
67 cluttering /tmp with data files, it is no longer possible to use |
|
68 the mouse to zoom in on plots. This is a limitation of gnuplot, |
|
69 which is unable to zoom when the data it plots is not stored in |
7038
|
70 a file. Some work has been done to fix this problem in newer |
|
71 versions of gnuplot (> 4.2.2). See for example, this thread |
|
72 |
|
73 http://www.nabble.com/zooming-of-inline-data-tf4357017.html#a12416496 |
|
74 |
|
75 on the gnuplot development list. |
6329
|
76 |
5814
|
77 ** The way Octave handles search paths has changed. Instead of |
|
78 setting the built-in variable LOADPATH, you must use addpath, |
|
79 rmpath, or path to manipulate the function search path. These |
|
80 functions will maintain "." at the head of the path, for |
|
81 compatibility with Matlab. |
|
82 |
|
83 Leading, trailing or doubled colons are no longer special. |
|
84 Now, all elements of the search path are explicitly included in |
|
85 the path when Octave starts. To display the path, use the path |
|
86 function. |
|
87 |
|
88 Path elements that end in // are no longer searched recursively. |
|
89 Instead, you may use addpath and the genpath function to add an |
|
90 entire directory tree to the path. For example, |
|
91 |
|
92 addpath (genpath ("~/octave")); |
|
93 |
|
94 will add ~/octave and all directories below it to the head of the |
|
95 path. |
|
96 |
|
97 |
|
98 ** Previous versions of Octave had a number of built-in variables to |
5781
|
99 control warnings (for example, warn_divide_by_zero). These |
|
100 variables have been replaced by warning identifiers that are used |
5794
|
101 with the warning function to control the state of warnings. |
|
102 |
|
103 For example, instead of writing |
2511
|
104 |
5781
|
105 warn_divide_by_zero = false; |
2452
|
106 |
5781
|
107 to disable divide-by-zero warnings, you should write |
2452
|
108 |
5781
|
109 warning ("off", "Octave:divide-by-zero"); |
2452
|
110 |
5781
|
111 You may use the same technique in your own code to control |
|
112 warnings. For example, you can use |
2452
|
113 |
5781
|
114 warning ("My-package:phase-of-the-moon", |
|
115 "the phase of the moon could cause trouble today"); |
2452
|
116 |
5781
|
117 to allow users to control this warning using the |
|
118 "My-package:phase-of-the-moon" warning identifier. |
2452
|
119 |
5781
|
120 You may also enable or disable all warnings, or turn them into |
|
121 errors: |
2452
|
122 |
5781
|
123 warning ("on", "all"); |
|
124 warning ("off", "all"); |
|
125 warning ("error", "Octave:divide-by-zero"); |
|
126 warning ("error", "all"); |
2452
|
127 |
5781
|
128 You can query the state of current warnings using |
2452
|
129 |
5781
|
130 warning ("query", ID) |
|
131 warning ("query") |
2452
|
132 |
5781
|
133 (only those warning IDs which have been explicitly set are |
|
134 returned). |
2459
|
135 |
5781
|
136 A partial list and description of warning identifiers is available |
|
137 using |
2452
|
138 |
5781
|
139 help warning_ids |
2452
|
140 |
|
141 |
5814
|
142 ** All built-in variables have been converted to functions. This |
5794
|
143 change simplifies the interpreter and allows a consistent |
|
144 interface to internal variables for user-defined packages and the |
|
145 core functions distributed with Octave. In most cases, code that |
|
146 simply accesses internal variables does not need to change. Code |
|
147 that sets internal variables will change. For example, instead of |
|
148 writing |
|
149 |
|
150 PS1 = ">> "; |
|
151 |
|
152 you will need to write |
|
153 |
|
154 PS1 (">> "); |
|
155 |
5798
|
156 If you need write code that will run in both old and new versions |
|
157 of Octave, you can use something like |
|
158 |
|
159 if (exist ("OCTAVE_VERSION") == 5) |
|
160 ## New: |
|
161 PS1 (">> "); |
|
162 else |
|
163 ## Old: |
|
164 PS1 = ">> "; |
|
165 endif |
5794
|
166 |
|
167 |
5995
|
168 ** For compatibility with Matlab, the output order of Octave's |
|
169 "system" function has changed from |
|
170 |
|
171 [output, status] = system (cmd); |
|
172 |
|
173 to |
|
174 |
|
175 [status, output] = system (cmd); |
|
176 |
6617
|
177 ** For compatibility with Matlab, normcdf, norminv, normpdf, and |
|
178 normrnd have been modified to compute distributions using the |
|
179 standard deviation instead of the variance. |
5995
|
180 |
6777
|
181 ** For compatibility with Matlab, gamcdf, gaminv, gampdf, gamrnd, |
|
182 expcdf, expinv, exppdf and exprnd have been modified to compute |
|
183 the distributions using the standard scale factor rather than |
|
184 one over the scale factor. |
|
185 |
5781
|
186 See NEWS.2 for old news. |