Mercurial > web-octave
comparison pages/NEWS-3.md @ 215:dedb85c54245
Reorganize homepage.
author | Kai T. Ohlhus <k.ohlhus@gmail.com> |
---|---|
date | Thu, 10 Sep 2020 17:47:36 +0900 |
parents | |
children | c8126c010d67 |
comparison
equal
deleted
inserted
replaced
214:fe5dcb23372a | 215:dedb85c54245 |
---|---|
1 --- | |
2 layout: page | |
3 title: GNU Octave Version 3 | |
4 menu: false | |
5 permalink: NEWS-3.html | |
6 --- | |
7 | |
8 ## Summary of important user-visible changes | |
9 | |
10 December 21, 2007 | |
11 | |
12 {% include release_news_select.md %} | |
13 | |
14 <ul> | |
15 <li>Compatibility with Matlab graphics is much better. We now | |
16 have some graphics features that work like Matlab's Handle | |
17 Graphics (tm): | |
18 <ul> | |
19 <li> You can make a subplot and then use the print function to | |
20 generate file with the plot.</li> | |
21 | |
22 <li> RGB line colors are supported if you use gnuplot 4.2. Octave | |
23 can still use gnuplot 4.0, but there is no way to set arbitrary | |
24 line colors with it when using the Matlab-style plot functions. | |
25 There never was any way to do this reliably with older versions | |
26 of gnuplot (whether run from Octave or not) since it only | |
27 provided a limited set to choose from, and they were terminal | |
28 dependent, so choosing color 1 with the X11 terminal would be | |
29 different from color 1 with the PostScript terminal. Valid RGB | |
30 colors for gnuplot 4.0 are the eight possible combinations of 0 | |
31 and 1 for the R, G and B values. Invalid values are all mapped | |
32 to the same color. | |
33 <p> | |
34 This also affects patch objects used in the bar, countour, meshc | |
35 and surfc functions, where the bars and contours will be | |
36 monochrome. A workaround for this is to type "colormap gmap40" | |
37 that loads a colormap that in many cases will be adequate for | |
38 simple bar and contour plots.</li> | |
39 | |
40 <li> You can control the width of lines using (for example): | |
41 <pre> | |
42 line (x, y, "linewidth", 4, "color", [1, 0, 0.5]); | |
43 </pre> | |
44 (this also shows the color feature).</li> | |
45 | |
46 <li> With gnuplot 4.2, image data is plotted with gnuplot and may be | |
47 combined with other 2-d plot data.</li> | |
48 | |
49 <li> Lines for contour plots are generated with an Octave function, so | |
50 contour plots are now 2-d plots instead of special 3-d plots, and | |
51 this allows you to plot additional 2-d data on top of a contour | |
52 plot.</li> | |
53 | |
54 <li> With the gnuplot "extended" terminals the TeX interpreter is | |
55 emulated. However, this means that the TeX interpreter is only | |
56 supported on the postscript terminals with gnuplot 4.0. Under | |
57 gnuplot 4.2 the terminals aqua, dumb, png, jpeg, gif, pm, windows, | |
58 wxt, svg and x11 are supported as well.</li> | |
59 | |
60 <li> The following plot commands are now considered obsolete and will | |
61 be removed from a future version of Octave: | |
62 <pre> | |
63 __gnuplot_set__ | |
64 __gnuplot_show__ | |
65 __gnuplot_plot__ | |
66 __gnuplot_splot__ | |
67 __gnuplot_replot__ | |
68 </pre> | |
69 Additionally, these functions no longer have any effect on plots | |
70 created with the Matlab-style plot commands | |
71 (<tt>plot</tt>, <tt>line</tt>, <tt>mesh</tt>, <tt>semilogx</tt>, | |
72 etc.). | |
73 | |
74 <li> Plot property values are not extensively checked. Specifying | |
75 invalid property values may produce unpredictible results.</li> | |
76 | |
77 <li> Octave now sends data over the same pipe that is used to send | |
78 commands to gnuplot. While this avoids the problem of | |
79 cluttering /tmp with data files, it is no longer possible to use | |
80 the mouse to zoom in on plots. This is a limitation of gnuplot, | |
81 which is unable to zoom when the data it plots is not stored in | |
82 a file. Some work has been done to fix this problem in newer | |
83 versions of gnuplot (> 4.2.2). See for example, | |
84 <a href="http://www.nabble.com/zooming-of-inline-data-tf4357017.html#a12416496">this thread</a> on the gnuplot development list. | |
85 </ul></li> | |
86 | |
87 | |
88 <li>The way Octave handles search paths has changed. Instead of | |
89 setting the built-in variable <tt>LOADPATH</tt>, you must | |
90 use <tt>addpath</tt>, <tt>rmpath</tt>, or <tt>path</tt> to | |
91 manipulate the function search path. These functions will | |
92 maintain <tt>"."</tt> at the head of the path, for compatibility | |
93 with Matlab. | |
94 <p> | |
95 Leading, trailing or doubled colons are no longer special. | |
96 Now, all elements of the search path are explicitly included in | |
97 the path when Octave starts. To display the path, use | |
98 the <tt>path</tt> function. | |
99 <p> | |
100 Path elements that end in <tt>//</tt> are no longer searched recursively. | |
101 Instead, you may use addpath and the genpath function to add an | |
102 entire directory tree to the path. For example, | |
103 <pre> | |
104 addpath (genpath ("~/octave")); | |
105 </pre> | |
106 will add ~/octave and all directories below it to the head of the | |
107 path.</li> | |
108 | |
109 | |
110 <li>Previous versions of Octave had a number of built-in variables to | |
111 control warnings (for example, <tt>warn_divide_by_zero</tt>). These | |
112 variables have been replaced by warning identifiers that are used | |
113 with the warning function to control the state of warnings. | |
114 <p> | |
115 For example, instead of writing | |
116 <pre> | |
117 warn_divide_by_zero = false; | |
118 </pre> | |
119 to disable divide-by-zero warnings, you should write | |
120 <pre> | |
121 warning ("off", "Octave:divide-by-zero"); | |
122 </pre> | |
123 You may use the same technique in your own code to control | |
124 warnings. For example, you can use | |
125 <pre> | |
126 warning ("My-package:phase-of-the-moon", | |
127 "the phase of the moon could cause trouble today"); | |
128 </pre> | |
129 to allow users to control this warning using the | |
130 <tt>"My-package:phase-of-the-moon"</tt> warning identifier. | |
131 <p> | |
132 You may also enable or disable all warnings, or turn them into | |
133 errors: | |
134 <pre> | |
135 warning ("on", "all"); | |
136 warning ("off", "all"); | |
137 warning ("error", "Octave:divide-by-zero"); | |
138 warning ("error", "all"); | |
139 </pre> | |
140 You can query the state of current warnings using | |
141 <pre> | |
142 warning ("query", ID) | |
143 warning ("query") | |
144 </pre> | |
145 (only those warning IDs which have been explicitly set are | |
146 returned). | |
147 <p> | |
148 A partial list and description of warning identifiers is available | |
149 using | |
150 <pre> | |
151 help warning_ids | |
152 </pre></li> | |
153 | |
154 | |
155 <li>All built-in variables have been converted to functions. This | |
156 change simplifies the interpreter and allows a consistent | |
157 interface to internal variables for user-defined packages and the | |
158 core functions distributed with Octave. In most cases, code that | |
159 simply accesses internal variables does not need to change. Code | |
160 that sets internal variables will change. For example, instead of | |
161 writing | |
162 <pre> | |
163 PS1 = ">> "; | |
164 </pre> | |
165 you will need to write | |
166 <pre> | |
167 PS1 (">> "); | |
168 </pre> | |
169 If you need write code that will run in both old and new versions | |
170 of Octave, you can use something like | |
171 <pre> | |
172 if (exist ("OCTAVE_VERSION") == 5) | |
173 ## New: | |
174 PS1 (">> "); | |
175 else | |
176 ## Old: | |
177 PS1 = ">> "; | |
178 endif | |
179 </pre></li> | |
180 | |
181 | |
182 <li>For compatibility with Matlab, the output order of Octave's | |
183 <tt>"system"</tt> function has changed from | |
184 <pre> | |
185 [output, status] = system (cmd); | |
186 </pre> | |
187 to | |
188 <pre> | |
189 [status, output] = system (cmd); | |
190 </pre></li> | |
191 | |
192 | |
193 <li>For compatibility with Matlab, <tt>normcdf</tt>, <tt>norminv</tt>, | |
194 <tt>normpdf</tt>, and <tt>normrnd</tt> have been modified to | |
195 compute distributions using the standard deviation instead of the | |
196 variance.</li> | |
197 | |
198 | |
199 <li>For compatibility with Matlab, the output of Octave's fsolve | |
200 function has been changed from | |
201 <pre> | |
202 [x, info, msg] = fsolve (...); | |
203 </pre> | |
204 to | |
205 <pre> | |
206 [x, fval, info] = fsolve (...); | |
207 </pre></li> | |
208 | |
209 | |
210 <li>For compatibility with Matlab, <tt>normcdf</tt>, <tt>norminv</tt>, | |
211 <tt>normpdf</tt>, and <tt>normrnd</tt> have been modified to | |
212 compute distributions using the standard deviation instead of the | |
213 variance.</li> | |
214 | |
215 | |
216 <li>For compatibility with | |
217 Matlab, <tt>gamcdf</tt>, <tt>gaminv</tt>, <tt>gampdf</tt>, | |
218 <tt>gamrnd</tt>, <tt>expcdf</tt>, <tt>expinv</tt>, <tt>exppdf</tt> | |
219 and <tt>exprnd</tt> have been modified to compute the | |
220 distributions using the standard scale factor rather than one over | |
221 the scale factor. | |
222 </ul> |