Minor bug fix: Prior to this release, FC was unable to convert a Matlab FIG file which contained single-precision floating-point-valued scalars or arrays (by default in Matlab, scalars and arrays are double-precision). Now the Fig-to-FypML import engine checks for single-precision float scalars and arrays and converts them to double-precision.
New property to control scaling of tick mark labels: 2D and 3D axes -- including colorbar axes -- now feature a Scale property. This property specifies an integer exponent N such that tick mark numeric values are scaled by 10N before they are rendered. Tick mark scaling can offer a cleaner, more compact appearance under certain scenarios (eg, an axis range of [1E-8 .. 5E-8] with a tick interval of 1E-8). When such scaling happens (N != 0), the string "(1xEN)" is appended to the axis label (unless it's an empty string) to clarify that the tick mark labels are scaled. The default value for Scale is 0, so existing figures are unaffected by this addition to the FypML schema. NOTE: Tick mark scaling was introduced in V5.2.1 as an automated feature. However, the algorithm did not always produce satisfactory results, so we decided to let the user control the scaling.
Regression bug fix (from V5.2.0): An error occurred that prevented saving a figure containing a colorbar if the colorbar's edge property was anything other than "right", or the cmode property was "log".
Introduced limited support for representing a 4D data set as a 3D bubble plot. Added a 4D point set format, xyzwset, in which each 4-tuple {x, y, z, w} is a point in 4D space. The only data presentation element that can render a 4D set is scatter3d in one of its "bubble plot" display modes; here, the w-coordinate is reflected by the color and/or size of each marker symbol in the 3D scatter plot.
Added support for a "boxed" graph legend. You can now set the background fill color and border width for the bounding box of a graph legend. Legends in any existing .fyp figures are unaffected by this change (the fill color is set to transparent black and the border width to 0in).
Added display mode normhist to the raster element. In this mode, the height of each histogram bar is the sample count for the corresponding bin divided by the total number of data samples.
Support for expressing raw data, as well as properties like axis and tick mark ranges, in scientific notation. The numeric text fields in which you enter axis range and similar parameters now support scientific notation, as does the Data Set Editor dialog. When a property value or a datum is less than 0.001 or greater than or equal to 10000, it will be displayed in scientific instead of decimal notation. The Data Set Editor preserves up to 6 significant digits for each data value; for axis range and similar properties, up to 4 significant digits are preserved.
Improved format of tick mark labels when scientific notation is required. In past versions of FC, if the axis and tick set range was [0.00001 .. 0.00005] and the tick interval was 0.00001, all of the 5 tick labels would read "0". In this scenario, all of the labels should be in scientific notation: "1E-5 2E-5 ... 5E-5", but repeating "E-5" on each label is rather redundant. Instead, FC now renders the labels as "1 2 3 4 5" and augments the corresponding axis label with the axis scale factor: "axis label (x1E-5)".
Sundry changes in matfig2fyp() and the FIG-to-FypML import engine to improve the fidelity with which which Matlab figures are imported into FigureComposer:
Converting a Matlab "histogram" plot object to a FypML raster element: The histogram object's "Normalization" property selects the raster's display mode: "count" -> "histogram", "probability" to "normhist", "pdf" -> "pdf", and "cdf" -> "cdf". If the "Normalization" property is any unsupported value, the histogram object will not be imported. Also, the fill color and stroke properties for the Matlab "histogram" plot object are more accurately reflected in its FypML counterpart. In particular, when "FaceColor=auto" (the default in Matlab), the fill color is now selected from Matlab's list of 7 default colors based on the ordinal position of the histogram object among the plot objects in the graph.
Correctly parse Matlab "color" properties that are expressed as 3-digit hexadecimal strings (e.g, #FF00FF, #F0F, and #f0f all represent the color magenta).
Color bars: Space between axis line and gradient bar is now 0in, as is always the case in Matlab. More accurate reproduction of the color bar width, the gap separating it from the parent graph, the axis label offset, the tick label gap, and tick length.
2D graph axes: Space between axis line and the graph data box is now 0in, as it always is in Matlab. More accurate reproduction of the axis label offset, the tick label gap, and tick length.
Graph legend: More accurate reproduction of the legend's position, layout (but multi-column and horizontal layouts are not supported!), and font properties. Imported graph legends now have a boxed appearance, as they do in Matlab by default.
Polar axes: Fixed calculation of the bounding box when a Matlab "polar axes" (R2016b or later) is converted to a FypML pgraph element.
Minor bugs fixed: (1) Export to PDF failed if a graph with a flipped X- and/or Y-axis (start > end) contained a heatmap (contour element). (2) Closing multiple figures at once sometimes left stale content in the figure canvas after the figures were closed.
Added support for a "color bar" associated with a 3D graph. Prior to this change, the 3D graph only had a defined color map, and one could not display a color bar with an associated axis line illustrating how the Z data range maps to the color map's look-up table. Updated matfig2fyp() and the FIG-to-FypML import engine to support converting a color bar attached to a 3D Matlab axes.
Limited support for a 3D bar plot similar to that generated by Matlab's bar3() function. The scatter3d element was modified to support two additional display modes in which the xyzset source data are rendered as a set of 3D bars parallel to the Z-axis. All bars start on the base plane Z=Zo, where Zo is specified by the baseline property. In the barPlot display mode, all bars are filled IAW the fillColor property and stroked IAW the node's stroke properties. In the colorBarPlot display mode, the two vertical faces of the bar corresponding to data point (X,Y,Z) are painted with a linear color gradient representative of the Z-coordinate range [Zo..Z] spanned by the bar, IAW the parent graph's colormap. The barWidth property specifies the size of each bar's square cross-section as an integer percentage of the X-axis extent.
Fine-tuned how 3D axes and their tick marks are rendered on a 3D graph. The Z-axis is now always on the left and the X,Y axes below the 3D graph box -- consistent with 3D plots in Matlab. Improved positioning of tick marks and axis label at very eccentric orientations (e.g., elevation angle near 0 deg).
Revised matfig2fyp() and the FIG-to-FypML import engine to include support for importing color bars defined on a 3D graph, or a 3D bar plot ("detached" style only) generated by Matlab's bar3() function. Also, when importing a 3D graph, the "spacer" property of each 3D axis is explicitly set to "0in" to reflect the fact that there is no gap separating an axis from the adjacent 3D box edge.
Minor bug fixes: (1) Text labels and the color bar were incorrectly positioned WRT the 3D graph in certain orientations due to an error in the calculation of the graph's tight bounding box. (2) Automated legend still showed the entry for a data group in a bar plot after that data group was deleted. (3) If the YZ plane of a 3D graph has a translucent or transparent fill, other parts of the graph would not be rendered when the figure was exported to PDF.
Eliminated FC's dependence on a third party library, the XML Pull Parser API, that handled reading/parsing and writing FypML files. As of this release, FC uses the StAX API (Streaming API for XML) that is part of the Java Runtime Environment.
FigureComposer now requires a Java 8 runtime. As of this release, FC is now compiled against a Java 8 SDK (detailed build version 1.8.0_242-b08) and will not run on JRE versions prior to version 8. This change is, in part, to encourage all FC users to update their installed Java Runtime Environment (JRE) to version 8. Earlier versions of the JRE are hopelessly out-of-date, unsupported, and considered a security issue. Please be sure to install an up-to-date version of the JRE before installing this or future releases of FC. Note that, given the new release cadence for Java, new versions are released every six months instead of every several years. We have tested FC on Java 8 and Java 11 runtimes (Amazon Corretto) in macOS and WIndows. Both Java 8 and 11 are long-term support (LTS) releases of the Java runtime that will continue to be updated until at least 2023 (Java 8) or 2024 (Java 11).
FigureComposer should now run seamlessly on Windows machines that have a Java 9 or better runtime environment installed. The release of Java 9 introduced a change in the names of the Windows registry keys for the file system path of an installed Java 9 JRE or JDK. As a result, the Windows .EXE wrapper for FigureComposer would fail to launch the application, instead displaying the somewhat cryptic "Failed to find Java VM" message. While a workaround was possible, you would lose the better Windows integration that came with the wrapper. I've since found a new version of the WinRun4J wrapper that addresses the registry key issue and have updated FC's Windows installer accordingly. Contact the developer if you have a Java 9 or better runtime installed on Windows and run into problems launching FigureComposer.