Skip to content

Conversation

@mfalt
Copy link
Member

@mfalt mfalt commented Oct 31, 2019

It seems that we have removed every dependency on Plots.jl with this fix. We Still have to update examples, manual and manual generation, but we should consider getting rid of Plots.jl completely like this.
The only downside is that the user has to write using Plots before using any of our plot methods.

@mfalt mfalt changed the title No Plots.jl WIP: No Plots.jl Oct 31, 2019
@baggepinnen
Copy link
Member

Yeah this is a good idea, will make loading quite a bit faster for those who do not want to plot.

I think there are a lot of plot functions in pidplots that are not yet converted to recipies that would also need conversion

function pidplots(P::LTISystem, args...; kps=0, kis=0, kds=0, time=false, series=false, ω=0, grid = false, kwargs...)

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.2%) to 53.204% when pulling a984e46 on noplots2 into 1e113ca on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.2%) to 53.204% when pulling a984e46 on noplots2 into 1e113ca on master.

@mfalt mfalt added this to the 0.6.0 milestone Dec 19, 2019
@mfalt mfalt self-assigned this Oct 14, 2020
@albheim albheim added the v1 Issues to resolve before releasing v1 label Nov 9, 2021
Change plots->recipesbase

Fix gangoffour margin line
drops the last usages of Plots.jl
@baggepinnen
Copy link
Member

I've decided to push this over the finish line

# Before
julia> @time using ControlSystems
 11.099141 seconds (29.88 M allocations: 1.968 GiB, 7.44% gc time, 29.25% compilation time)
 
# Removing Plots.jl
julia> @time using ControlSystems
  7.169636 seconds (20.90 M allocations: 1.369 GiB, 5.69% gc time, 29.55% compilation time)

a sizable improvement to the loading time. The following is a list of dependencies that goes away with the change :)

(ControlSystems) pkg> rm Plots
    Updating `~/.julia/dev/ControlSystems/Project.toml`
  [91a5bcdd] - Plots v1.25.2
    Updating `~/.julia/dev/ControlSystems/Manifest.toml`
  [35d6a980] - ColorSchemes v3.15.0
  [d38c429a] - Contour v0.5.7
  [c87230d0] - FFMPEG v0.4.1
  [59287772] - Formatting v0.4.2
  [28b8d3ca] - GR v0.62.1
  [5c1252a2] - GeometryBasics v0.4.1
  [42e2da0e] - Grisu v1.0.2
  [cd3eb016] - HTTP v0.9.17
  [83e8ac13] - IniFile v0.5.0
  [682c06a0] - JSON v0.21.2
  [23fbe1c1] - Latexify v0.15.9
  [739be429] - MbedTLS v1.0.3
  [442fdcdd] - Measures v0.3.1
  [ccf2f8ad] - PlotThemes v2.0.1
  [995b91a9] - PlotUtils v1.1.0
  [91a5bcdd] - Plots v1.25.2
  [01d81517] - RecipesPipeline v0.4.1
  [6c6a2e73] - Scratch v1.1.0
  [992d4aef] - Showoff v1.0.3
  [09ab397b] - StructArrays v0.6.3
  [5c2747f8] - URIs v1.3.0
  [1cfade01] - UnicodeFun v0.4.1
  [6e34b625] - Bzip2_jll v1.0.8+0
  [83423d85] - Cairo_jll v1.16.1+1
  [5ae413db] - EarCut_jll v2.2.3+0
  [2e619515] - Expat_jll v2.2.10+0
  [b22a6f82] - FFMPEG_jll v4.4.0+0
  [a3f928ae] - Fontconfig_jll v2.13.93+0
  [d7e528f0] - FreeType2_jll v2.10.4+0
  [559328eb] - FriBidi_jll v1.0.10+0
  [0656b61e] - GLFW_jll v3.3.5+1
  [d2c73de3] - GR_jll v0.62.0+0
  [78b55507] - Gettext_jll v0.21.0+0
  [7746bdde] - Glib_jll v2.68.3+2
  [3b182d85] - Graphite2_jll v1.3.14+0
  [2e76f6c2] - HarfBuzz_jll v2.8.1+1
  [aacddb02] - JpegTurbo_jll v2.1.0+0
  [c1c5ebd0] - LAME_jll v3.100.1+0
  [dd4b983a] - LZO_jll v2.10.1+0
  [e9f186c6] - Libffi_jll v3.2.2+1
  [d4300ac3] - Libgcrypt_jll v1.8.7+0
  [7e76a0d4] - Libglvnd_jll v1.3.0+3
  [7add5ba3] - Libgpg_error_jll v1.42.0+0
  [94ce4f54] - Libiconv_jll v1.16.1+1
  [4b2f31a3] - Libmount_jll v2.35.0+0
  [89763e89] - Libtiff_jll v4.3.0+0
  [38a345b3] - Libuuid_jll v2.36.0+0
  [e7412a2a] - Ogg_jll v1.3.5+1
  [458c3c95] - OpenSSL_jll v1.1.10+0
  [91d4177d] - Opus_jll v1.3.2+0
  [2f80f16e] - PCRE_jll v8.44.0+0
  [30392449] - Pixman_jll v0.40.1+0
  [ea2cea3b] - Qt5Base_jll v5.15.3+0
  [a2964d1f] - Wayland_jll v1.19.0+0
  [2381bf8a] - Wayland_protocols_jll v1.23.0+0
  [02c8fc9c] - XML2_jll v2.9.12+0
  [aed1982a] - XSLT_jll v1.1.34+0
  [4f6342f7] - Xorg_libX11_jll v1.6.9+4
  [0c0b7dd1] - Xorg_libXau_jll v1.0.9+4
  [935fb764] - Xorg_libXcursor_jll v1.2.0+4
  [a3789734] - Xorg_libXdmcp_jll v1.1.3+4
  [1082639a] - Xorg_libXext_jll v1.3.4+4
  [d091e8ba] - Xorg_libXfixes_jll v5.0.3+4
  [a51aa0fd] - Xorg_libXi_jll v1.7.10+4
  [d1454406] - Xorg_libXinerama_jll v1.1.4+4
  [ec84b674] - Xorg_libXrandr_jll v1.5.2+4
  [ea2f1a96] - Xorg_libXrender_jll v0.9.10+4
  [14d82f49] - Xorg_libpthread_stubs_jll v0.1.0+3
  [c7cfdc94] - Xorg_libxcb_jll v1.13.0+3
  [cc61e674] - Xorg_libxkbfile_jll v1.1.0+4
  [12413925] - Xorg_xcb_util_image_jll v0.4.0+1
  [2def613f] - Xorg_xcb_util_jll v0.4.0+1
  [975044d2] - Xorg_xcb_util_keysyms_jll v0.4.0+1
  [0d47668e] - Xorg_xcb_util_renderutil_jll v0.3.9+1
  [c22f9ab0] - Xorg_xcb_util_wm_jll v0.4.1+1
  [35661453] - Xorg_xkbcomp_jll v1.4.2+4
  [33bec58e] - Xorg_xkeyboard_config_jll v2.27.0+4
  [c5fb5394] - Xorg_xtrans_jll v1.4.0+3
  [3161d3a3] - Zstd_jll v1.5.0+0
  [0ac62f75] - libass_jll v0.15.1+0
  [f638f0a6] - libfdk_aac_jll v2.0.2+0
  [b53b4c65] - libpng_jll v1.6.38+0
  [f27f6e37] - libvorbis_jll v1.3.7+0
  [1270edf5] - x264_jll v2021.5.5+0
  [dfaa095f] - x265_jll v3.5.0+0
  [d8fb68d0] - xkbcommon_jll v0.9.1+5

@codecov
Copy link

codecov bot commented Jan 21, 2022

Codecov Report

Merging #235 (32e051d) into master (d20740f) will increase coverage by 1.10%.
The diff coverage is 98.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #235      +/-   ##
==========================================
+ Coverage   85.70%   86.81%   +1.10%     
==========================================
  Files          31       31              
  Lines        3226     3239      +13     
==========================================
+ Hits         2765     2812      +47     
+ Misses        461      427      -34     
Impacted Files Coverage Δ
src/ControlSystems.jl 100.00% <ø> (ø)
src/simulators.jl 87.50% <ø> (ø)
src/synthesis.jl 86.00% <ø> (ø)
src/plotting.jl 85.18% <98.41%> (+8.05%) ⬆️
src/pid_design.jl 78.57% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d20740f...32e051d. Read the comment docs.

Co-authored-by: Albin Heimerson <albin.heimerson@control.lth.se>
@baggepinnen baggepinnen changed the title WIP: No Plots.jl No Plots.jl Jan 21, 2022
@JuliaControlBot
Copy link

Something failed when generating plots. See the log at https://github.com/JuliaControl/ControlExamplePlots.jl/actions/runs/1727639720?check_suite_focus=true for more details.

@baggepinnen
Copy link
Member

The plot bot fails with

ERROR: LoadError: ArgumentError: Package ControlSystems does not have RecipesBase in its dependencies:

which is expected, I've run and looked at the plots locally and they look as expected

Copy link
Member

@albheim albheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@baggepinnen baggepinnen merged commit 5d009b8 into master Jan 21, 2022
@baggepinnen baggepinnen deleted the noplots2 branch January 21, 2022 09:32
@mfalt
Copy link
Member Author

mfalt commented Jan 21, 2022

Does it look reasonable even with MIMO systems?
Great work!

@baggepinnen
Copy link
Member

With #605 it looks like this
mimo

@mfalt
Copy link
Member Author

mfalt commented Jan 21, 2022

Nice. I think it was actually vector of systems that was tricky to solve, but there are other ways to do that now i guess.

@baggepinnen
Copy link
Member

The vector of systems is handled using the same mechanism as bodeplot and friends, i.e., by the call to

_processfreqplot(Val{:bode}(), p.args...)

which is a quite okay solution

@albheim
Copy link
Member

albheim commented Jan 21, 2022

Played around a little with plotting on this branch and found some odd behaviours. Though testing on last release they also appeared, so since they seem unrelated to the PR I will add them in separate issues instead of here.

@baggepinnen
Copy link
Member

try the #605 branch, some updates there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1 Issues to resolve before releasing v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants