Changes in version 1.0.1 (2026-02-26) IMPROVEMENTS - Preserve the user-defined order of variables in plots when multiple variables are provided. - Derive Dominance levels from input data (sim and obs) instead of using hard-coded values for intercrop case - If the Dominance column is missing or contains NA, a default value (Single Crop) is applied to ensure consistent legends. BUG FIXES - Fix axis limit assignment in scatter plots when using faceting to prevent inconsistencies caused by variable ordering mismatches. - Fix save_plot_png() behavior when saving a single ggplot object (instead of a list of plots), ensuring proper device handling and clean function return. - Improve input validation in plotting functions: - Ensure all sim objects inherit from class cropr_simulation. - Provide clearer error messages when validation fails. - Fix unnecessary ggplot2 warnings related to unknown shapes during plot generation. Changes in version 1.0.0 (2026-01-23) NEW FEATURES - New plotting capabilities: - Residuals can now be used as reference variables on the X-axis of scatter plots. - Simulated variables can now be plotted against various reference variables. - Scatter plots are now displayed in a square format with identical boundaries on both axes. - New combinations of plotting options are now supported, allowing more flexible and customizable graphics. BUG FIXES - Support for ggplot2 >= 4.0.0. - Minor bug fixes and stability improvements resulting from the major refactoring of the code base. DOCUMENTATION & TESTS - Documentation has been significantly improved and expanded. - Many new unit tests have been added to improve robustness and reliability. INTERNAL CHANGES - Major refactoring of the internal code base to improve clarity, maintainability, and long-term evolution. - Reduced dependencies on external packages, simplifying installation and maintenance. Changes in version 0.11.0 (2025-31-10) NEW FEATURES - Improved package startup message: now includes automatic citation information. - Added a user warning about temporary incompatibility with ggplot2 ≥ 4.0.0. - Scatter plots now support the reference_var argument for simulated variables. - Error bars in scatter plots are now drawn using the same colors as their associated points. BUG FIXES - Fixed several issues in scatter plots: - Corrected rendering for the "crop mixture - all_situations" case with shape = "symbol" and shape = "group". - Ensured identical x and y scales for sim/obs scatter plots. - Increased max.overlaps to avoid text overlap warnings when using symbol = "txt". - Fixed computation of residuals when using reference variables. - Removed non-ASCII characters from the startup message to ensure CRAN portability. - Cleaned up unused package dependencies in DESCRIPTION. DOCUMENTATION & TESTS - Improved documentation for plotting and data formatting functions. - Strengthened test coverage, particularly for dynamic and scatter plots. - Clarified several error and warning messages for easier debugging. INTERNAL CHANGES - Dropped unnecessary dependencies (crayon, rstudioapi, stringr). - Increased the minimal R version requirement to 4.2.0 (previously 4.1.0) to ensure compatibility with Hmisc (ggplot2). - Continuous integration (CI) improvements: - Temporarily force installation of ggplot2 3.5.2 to avoid test failures. - Adjusted R versions and OS settings in GitHub Actions (Windows/Linux). - General code styling and minor cleanup across functions and tests. Changes in version 0.10.0 Minor improvements and bug fixes - Character vectors in simulated results no more mess up dynamic graphs - Filtered zeros in obs/sim vectors when they are used as denominator in stat. criteria (=> MAPE and RME no more take Inf values) - An error is now detected when plots of unknown variables are requested - Added tests to automatically compare generated graphs with reference ones - Fixed a few other bugs (missing regression line for scatter plots in some cases, number of labels for shape_sit="txt", ...) Misc. - Changed license to LGPL Changes in version 0.9.0 New features - Added the possibility to plot residuals of variables in function of residuals of other variables Minor improvements and bug fixes - Fixed warnings generated by last version of ggplot2 due to existing fields provided in aes but that are not actually used (#10). - Fixed a bug in plot that occurred when trying to plot several versions of simulated results and without intercrop situations. - Fixed cff file generation using github action. Now generated on each commit that modifies the Description file + on release. - Minor changes to clean the code following CRAN checks procedure application. Changes in version 0.8.0 For users: - Update functions names to be homogeneous across SticsRPacks - Add a method for [ for cropr_simulation, i.e. we can now index the output of plots using [ - Deprecate bind_rows_sim for bind_rows - Fix issue in scatter plot with all_situations = FALSE to get the situation name as hover in plotly - More documentation - Compatibility with R >= 4.0.0 + making sure it still works with 3.6.0 <= R < 4.0.0 - Fix issue in format_cropr - Fix issue where points and lines were drawn twice - Fix issue where points were not colored properly - Fix issue when overlapping (not grouped properly) - Fix issue where lines were not colored properly - Fix issue for plots with residuals + custom x variable - Fix issue with several versions but only one has common values btw obs and sim Internals: - Add golden tests (using {vdiffr}) - Remove SticsRPacks dependency for tests - Using third edition of testthat - Format the code using {styler} and {goodpractice} - Simplify a lot cat_situations and make it faaaast - Use the .id in bind_rows if provided - Improved computation of LCS to remove a warning Changes in version 0.7.2 - Added labels so that situation names appear in ggplotly graphs - Fixed bug with successive argument: - did not work with several lists of situations, - did not work with observations of only a subset of the situations. - Fixed save_plot_pdf function Changes in version 0.7.1 - Updated README wrt changes in SticsRFiles package - Fixed position of situation label when using shape_sit = "txt" in scatter plots. Changes in version 0.7.0 - Add bind_rows_sim and split_df2sim helper functions to either bind a list of simulations into a single data.frame or to split it back. Works also on observations. - summary can now be grouped by crops. Useful for cases where we have different usms with different crops, and for intercropping. - Rename plot saving functions: plot_save -> save_plot_png & save_plot -> save_plot_pdf - Fix a bug in the legend when plotting two versions in sole crop without observations (only one legend instead of two). See #8039. - Graphs of residues are no longer plotted with square axes - Fix an issue on extract_plot for residues plots - Update documentation - Several little fixes: added quotes on situation to remove a warning, Changes in version 0.6.0 - All crop models wrapped with CroptimizR can now automatically use CroPlotR. For that, the sim_list element of the variable returned by the wrapper must have the attribute cropr_simulation, please refer to the guidelines for implementing a crop model R wrapper for CroptimizR for more details. - some bugs fixed (coloring for model comparison and overlapping variables, absence of Plant columns in obs and/or sim, ...) - license changed to CeCILL-C Changes in version 0.5.0 - First release version, with dynamic plots, scatter plots, statistics. Changes in version 0.1.0.9000 - Added a NEWS.md file to track changes to the package.