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 |
|
45 |
5814
|
46 ** The way Octave handles search paths has changed. Instead of |
|
47 setting the built-in variable LOADPATH, you must use addpath, |
|
48 rmpath, or path to manipulate the function search path. These |
|
49 functions will maintain "." at the head of the path, for |
|
50 compatibility with Matlab. |
|
51 |
|
52 Leading, trailing or doubled colons are no longer special. |
|
53 Now, all elements of the search path are explicitly included in |
|
54 the path when Octave starts. To display the path, use the path |
|
55 function. |
|
56 |
|
57 Path elements that end in // are no longer searched recursively. |
|
58 Instead, you may use addpath and the genpath function to add an |
|
59 entire directory tree to the path. For example, |
|
60 |
|
61 addpath (genpath ("~/octave")); |
|
62 |
|
63 will add ~/octave and all directories below it to the head of the |
|
64 path. |
|
65 |
|
66 |
|
67 ** Previous versions of Octave had a number of built-in variables to |
5781
|
68 control warnings (for example, warn_divide_by_zero). These |
|
69 variables have been replaced by warning identifiers that are used |
5794
|
70 with the warning function to control the state of warnings. |
|
71 |
|
72 For example, instead of writing |
2511
|
73 |
5781
|
74 warn_divide_by_zero = false; |
2452
|
75 |
5781
|
76 to disable divide-by-zero warnings, you should write |
2452
|
77 |
5781
|
78 warning ("off", "Octave:divide-by-zero"); |
2452
|
79 |
5781
|
80 You may use the same technique in your own code to control |
|
81 warnings. For example, you can use |
2452
|
82 |
5781
|
83 warning ("My-package:phase-of-the-moon", |
|
84 "the phase of the moon could cause trouble today"); |
2452
|
85 |
5781
|
86 to allow users to control this warning using the |
|
87 "My-package:phase-of-the-moon" warning identifier. |
2452
|
88 |
5781
|
89 You may also enable or disable all warnings, or turn them into |
|
90 errors: |
2452
|
91 |
5781
|
92 warning ("on", "all"); |
|
93 warning ("off", "all"); |
|
94 warning ("error", "Octave:divide-by-zero"); |
|
95 warning ("error", "all"); |
2452
|
96 |
5781
|
97 You can query the state of current warnings using |
2452
|
98 |
5781
|
99 warning ("query", ID) |
|
100 warning ("query") |
2452
|
101 |
5781
|
102 (only those warning IDs which have been explicitly set are |
|
103 returned). |
2459
|
104 |
5781
|
105 A partial list and description of warning identifiers is available |
|
106 using |
2452
|
107 |
5781
|
108 help warning_ids |
2452
|
109 |
|
110 |
5814
|
111 ** All built-in variables have been converted to functions. This |
5794
|
112 change simplifies the interpreter and allows a consistent |
|
113 interface to internal variables for user-defined packages and the |
|
114 core functions distributed with Octave. In most cases, code that |
|
115 simply accesses internal variables does not need to change. Code |
|
116 that sets internal variables will change. For example, instead of |
|
117 writing |
|
118 |
|
119 PS1 = ">> "; |
|
120 |
|
121 you will need to write |
|
122 |
|
123 PS1 (">> "); |
|
124 |
5798
|
125 If you need write code that will run in both old and new versions |
|
126 of Octave, you can use something like |
|
127 |
|
128 if (exist ("OCTAVE_VERSION") == 5) |
|
129 ## New: |
|
130 PS1 (">> "); |
|
131 else |
|
132 ## Old: |
|
133 PS1 = ">> "; |
|
134 endif |
5794
|
135 |
|
136 |
5995
|
137 ** For compatibility with Matlab, the output order of Octave's |
|
138 "system" function has changed from |
|
139 |
|
140 [output, status] = system (cmd); |
|
141 |
|
142 to |
|
143 |
|
144 [status, output] = system (cmd); |
|
145 |
|
146 |
5781
|
147 See NEWS.2 for old news. |