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 |
|
12 can still use gnuplot 4.0, but there is no longer any way to set |
|
13 line colors with it when using the Matlab-style plot functions. |
|
14 Actually, there never was any way to do this reliably with older |
|
15 versions of gnuplot (whether run from Octave or not) since it |
|
16 only provided a limited set to choose from, and they were |
|
17 terminal dependent, so choosing color 1 with the X11 terminal |
|
18 would be different from color 1 with the PostScript terminal. |
|
19 |
|
20 + You can control the width of lines using (for example): |
|
21 |
|
22 line (x, y, "linewidth", 4, "color", [1, 0, 0.5]); |
|
23 |
|
24 (this also shows the color feature). |
|
25 |
|
26 + With gnuplot 4.2, image data is plotted with gnuplot and may be |
|
27 combined with other 2-d plot data. |
|
28 |
|
29 + Lines for contour plots are generated with an Octave function, so |
|
30 contour plots are now 2-d plots instead of special 3-d plots, and |
|
31 this allows you to plot additional 2-d data on top of a contour |
|
32 plot. |
|
33 |
|
34 + It is no longer possible to mix Matlab-style plot commands with |
|
35 the old (and now considered obsolete) style of plot commands |
|
36 (__gnuplot_set__, etc.). You can do one or the other, but not |
|
37 both for the same plot. |
|
38 |
|
39 + Plot property values are not extensively checked. Specifying |
|
40 invalid property values may produce unpredictible results. |
|
41 |
|
42 |
5814
|
43 ** The way Octave handles search paths has changed. Instead of |
|
44 setting the built-in variable LOADPATH, you must use addpath, |
|
45 rmpath, or path to manipulate the function search path. These |
|
46 functions will maintain "." at the head of the path, for |
|
47 compatibility with Matlab. |
|
48 |
|
49 Leading, trailing or doubled colons are no longer special. |
|
50 Now, all elements of the search path are explicitly included in |
|
51 the path when Octave starts. To display the path, use the path |
|
52 function. |
|
53 |
|
54 Path elements that end in // are no longer searched recursively. |
|
55 Instead, you may use addpath and the genpath function to add an |
|
56 entire directory tree to the path. For example, |
|
57 |
|
58 addpath (genpath ("~/octave")); |
|
59 |
|
60 will add ~/octave and all directories below it to the head of the |
|
61 path. |
|
62 |
|
63 |
|
64 ** Previous versions of Octave had a number of built-in variables to |
5781
|
65 control warnings (for example, warn_divide_by_zero). These |
|
66 variables have been replaced by warning identifiers that are used |
5794
|
67 with the warning function to control the state of warnings. |
|
68 |
|
69 For example, instead of writing |
2511
|
70 |
5781
|
71 warn_divide_by_zero = false; |
2452
|
72 |
5781
|
73 to disable divide-by-zero warnings, you should write |
2452
|
74 |
5781
|
75 warning ("off", "Octave:divide-by-zero"); |
2452
|
76 |
5781
|
77 You may use the same technique in your own code to control |
|
78 warnings. For example, you can use |
2452
|
79 |
5781
|
80 warning ("My-package:phase-of-the-moon", |
|
81 "the phase of the moon could cause trouble today"); |
2452
|
82 |
5781
|
83 to allow users to control this warning using the |
|
84 "My-package:phase-of-the-moon" warning identifier. |
2452
|
85 |
5781
|
86 You may also enable or disable all warnings, or turn them into |
|
87 errors: |
2452
|
88 |
5781
|
89 warning ("on", "all"); |
|
90 warning ("off", "all"); |
|
91 warning ("error", "Octave:divide-by-zero"); |
|
92 warning ("error", "all"); |
2452
|
93 |
5781
|
94 You can query the state of current warnings using |
2452
|
95 |
5781
|
96 warning ("query", ID) |
|
97 warning ("query") |
2452
|
98 |
5781
|
99 (only those warning IDs which have been explicitly set are |
|
100 returned). |
2459
|
101 |
5781
|
102 A partial list and description of warning identifiers is available |
|
103 using |
2452
|
104 |
5781
|
105 help warning_ids |
2452
|
106 |
|
107 |
5814
|
108 ** All built-in variables have been converted to functions. This |
5794
|
109 change simplifies the interpreter and allows a consistent |
|
110 interface to internal variables for user-defined packages and the |
|
111 core functions distributed with Octave. In most cases, code that |
|
112 simply accesses internal variables does not need to change. Code |
|
113 that sets internal variables will change. For example, instead of |
|
114 writing |
|
115 |
|
116 PS1 = ">> "; |
|
117 |
|
118 you will need to write |
|
119 |
|
120 PS1 (">> "); |
|
121 |
5798
|
122 If you need write code that will run in both old and new versions |
|
123 of Octave, you can use something like |
|
124 |
|
125 if (exist ("OCTAVE_VERSION") == 5) |
|
126 ## New: |
|
127 PS1 (">> "); |
|
128 else |
|
129 ## Old: |
|
130 PS1 = ">> "; |
|
131 endif |
5794
|
132 |
|
133 |
5995
|
134 ** For compatibility with Matlab, the output order of Octave's |
|
135 "system" function has changed from |
|
136 |
|
137 [output, status] = system (cmd); |
|
138 |
|
139 to |
|
140 |
|
141 [status, output] = system (cmd); |
|
142 |
|
143 |
5781
|
144 See NEWS.2 for old news. |