JuliaPlots / Plots.jl

Powerful convenience for Julia visualizations and data analysis
https://docs.juliaplots.org
Other
1.83k stars 354 forks source link

[BUG] areaplot mixes up input #3447

Open janrpeters opened 3 years ago

janrpeters commented 3 years ago

Details

For

plot(x,z_Maenner,line = (3, :solid),label=reshape(y_labels, 1, :), legend = :left)

I get

image

which is reasonable. But for

areaplot(x, z_Maenner, fillalpha = 0.3, label = reshape(y_labels, 1, :), legend = :left)

I get

image

which makes no sense and even messes up the x-axis.

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) X
pyplot X
plotly X
plotlyjs X
pgfplotsx X
inspectdr X

Versions

Plots.jl version: v1.10.3

Backend version (]st -m): Status ~/.julia/environments/v1.5/Manifest.toml [621f4979] AbstractFFTs v0.5.0 [1520ce14] AbstractTrees v0.3.4 [79e6a3ab] Adapt v3.2.0 [c7e460c6] ArgParse v1.1.1 [56f22d72] Artifacts v1.3.0 [bf4720bc] AssetRegistry v0.1.0 [ab4f0b2a] BFloat16s v0.1.0 [6e34b625] Bzip2_jll v1.0.6+5 [fa961155] CEnum v0.4.1 [70588ee8] CSSUtil v0.1.1 [052768ef] CUDA v2.4.2 [83423d85] Cairo_jll v1.16.0+6 [324d7699] CategoricalArrays v0.9.3 [d360d2e6] ChainRulesCore v0.9.29 [da1fd8a2] CodeTracking v1.0.5 [35d6a980] ColorSchemes v3.10.2 [3da002f7] ColorTypes v0.10.9 [5ae59095] Colors v0.12.6 [34da2185] Compat v3.25.0 [e66e0078] CompilerSupportLibraries_jll v0.3.4+0 [8f4d0f93] Conda v1.5.0 [d38c429a] Contour v0.5.7 [a8cc5b0e] Crayons v4.0.4 [9a962f9c] DataAPI v1.6.0 [a93c6f00] DataFrames v0.22.5 [864edb3b] DataStructures v0.18.9 [e2d170a0] DataValueInterfaces v1.0.0 [31c24e10] Distributions v0.24.12 [5ae413db] EarCut_jll v2.1.5+1 [2e619515] Expat_jll v2.2.7+6 [e2ba6199] ExprTools v0.1.3 [8f5d6c58] EzXML v1.1.0 [c87230d0] FFMPEG v0.4.0 [b22a6f82] FFMPEG_jll v4.3.1+4 [48062228] FilePathsBase v0.9.10 [1a297f60] FillArrays v0.11.5 [53c48c17] FixedPointNumbers v0.8.4 [a3f928ae] Fontconfig_jll v2.13.1+14 [59287772] Formatting v0.4.2 [d7e528f0] FreeType2_jll v2.10.1+5 [559328eb] FriBidi_jll v1.0.5+6 [de31a74c] FunctionalCollections v0.5.0 [0656b61e] GLFW_jll v3.3.2+1 [781609d7] GMP_jll v6.1.2+6 [0c68f7d7] GPUArrays v6.2.1 [61eb1bfa] GPUCompiler v0.8.3 [28b8d3ca] GR v0.54.0 [d2c73de3] GR_jll v0.53.0+0 [c43c736e] Genie v1.16.1 [5c1252a2] GeometryBasics v0.3.9 [78b55507] Gettext_jll v0.20.1+7 [7746bdde] Glib_jll v2.59.0+4 [42e2da0e] Grisu v1.0.0 [708ec375] Gumbo v0.8.0 [528830af] Gumbo_jll v0.10.1+1 [cd3eb016] HTTP v0.9.5 [77172c1b] HttpCommon v0.5.0 [7073ff75] IJulia v1.23.1 [83e8ac13] IniFile v0.5.0 [c601a237] Interact v0.10.3 [d3863d7c] InteractBase v0.10.6 [41ab1584] InvertedIndices v1.0.0 [c8e1da08] IterTools v1.3.0 [82899510] IteratorInterfaceExtensions v1.0.0 [692b3bcd] JLLWrappers v1.2.0 [97c1335a] JSExpr v0.5.2 [682c06a0] JSON v0.21.1 [aacddb02] JpegTurbo_jll v2.0.1+3 [aa1ae85d] JuliaInterpreter v0.8.9 [bcebb21b] Knockout v0.2.4 [c1c5ebd0] LAME_jll v3.100.0+3 [929cbde3] LLVM v3.6.0 [dd4b983a] LZO_jll v2.10.0+3 [b964fa9f] LaTeXStrings v1.2.0 [23fbe1c1] Latexify v0.14.7 [dd192d2f] LibVPX_jll v1.9.0+1 [e9f186c6] Libffi_jll v3.2.1+4 [d4300ac3] Libgcrypt_jll v1.8.5+4 [7e76a0d4] Libglvnd_jll v1.3.0+3 [7add5ba3] Libgpg_error_jll v1.36.0+3 [94ce4f54] Libiconv_jll v1.16.0+7 [4b2f31a3] Libmount_jll v2.34.0+3 [89763e89] Libtiff_jll v4.1.0+2 [38a345b3] Libuuid_jll v2.34.0+7 [e6f89c97] LoggingExtras v0.4.5 [6f1432cf] LoweredCodeUtils v1.2.9 [1914dd2f] MacroTools v0.5.6 [739be429] MbedTLS v1.0.3 [c8ffd9c3] MbedTLS_jll v2.16.8+1 [442fdcdd] Measures v0.3.1 [39ec1447] Millboard v0.2.5 [e1d29d7a] Missings v0.4.5 [872c559c] NNlib v0.7.17 [77ba4419] NaNMath v0.3.5 [49dea1ee] Nettle v0.5.0 [4c82536e] Nettle_jll v3.4.1+2 [ca575930] NetworkOptions v1.2.0 [4d1e1d77] Nullables v1.0.0 [510215fc] Observables v0.3.3 [e7412a2a] Ogg_jll v1.3.4+2 [458c3c95] OpenSSL_jll v1.1.1+6 [efe28fd5] OpenSpecFun_jll v0.5.3+4 [91d4177d] Opus_jll v1.3.1+3 [bac558e1] OrderedCollections v1.4.0 [2f80f16e] PCRE_jll v8.42.0+4 [90014a1f] PDMats v0.10.1 [69de0a69] Parsers v1.0.15 [fa939f87] Pidfile v1.2.0 [30392449] Pixman_jll v0.40.0+0 [ccf2f8ad] PlotThemes v2.0.1 [995b91a9] PlotUtils v1.0.10 [91a5bcdd] Plots v1.10.3 [2dfb63ee] PooledArrays v1.2.1 [08abe8d2] PrettyTables v0.11.1 [438e738f] PyCall v1.92.2 [ede63266] Qt_jll v5.15.2+3 [1fd47b50] QuadGK v2.4.1 [3cdcf5f2] RecipesBase v1.1.1 [01d81517] RecipesPipeline v0.2.1 [189a3867] Reexport v0.2.0 [ae029012] Requires v1.1.2 [295af30f] Revise v3.1.14 [79098fc4] Rmath v0.6.1 [f50d1b31] Rmath_jll v0.2.2+2 [6c6a2e73] Scratch v1.0.3 [992d4aef] Showoff v0.3.2 [b85f4697] SoftGlobalScope v1.1.0 [a2af1166] SortingAlgorithms v0.3.1 [276daf66] SpecialFunctions v1.3.0 [90137ffa] StaticArrays v1.0.1 [2913bbd2] StatsBase v0.33.3 [4c63d2b9] StatsFuns v0.9.6 [4acbeb90] Stipple v0.9.7 [30ddb3f0] StippleCharts v0.5.0 [a3c5d34a] StippleUI v0.2.4 [09ab397b] StructArrays v0.5.0 [856f2bd8] StructTypes v1.4.0 [24249f21] SymPy v1.0.40 [3783bdb8] TableTraits v1.0.0 [bd369af6] Tables v1.3.2 [b718987f] TextWrap v1.0.1 [a759f4b9] TimerOutputs v0.5.8 [30578b45] URIParser v0.4.1 [5c2747f8] URIs v1.2.0 [81def892] VersionParsing v1.2.0 [a2964d1f] Wayland_jll v1.17.0+4 [2381bf8a] Wayland_protocols_jll v1.18.0+4 [0f1e0344] WebIO v0.8.15 [104b5d7c] WebSockets v1.5.9 [cc8bc4a8] Widgets v0.6.2 [fdbf4ff8] XLSX v0.7.6 [02c8fc9c] XML2_jll v2.9.10+3 [aed1982a] XSLT_jll v1.1.33+4 [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 [ddb6d928] YAML v0.4.6 [c2297ded] ZMQ v1.2.1 [8f1865be] ZeroMQ_jll v4.3.2+6 [a5390f91] ZipFile v0.9.3 [83775a58] Zlib_jll v1.2.11+18 [3161d3a3] Zstd_jll v1.4.8+0 [0ac62f75] libass_jll v0.14.0+4 [f638f0a6] libfdk_aac_jll v0.1.6+4 [b53b4c65] libpng_jll v1.6.37+6 [a9144af2] libsodium_jll v1.0.18+1 [f27f6e37] libvorbis_jll v1.3.6+6 [1270edf5] x264_jll v2020.7.14+2 [dfaa095f] x265_jll v3.0.0+3 [d8fb68d0] xkbcommon_jll v0.9.1+5 [2a0f44e3] Base64 [ade2ca70] Dates [8bb1440f] DelimitedFiles [8ba89e20] Distributed [7b1f6079] FileWatching [9fa8497b] Future [b77e0a4c] InteractiveUtils [76f85450] LibGit2 [8f399da3] Libdl [37e2e46d] LinearAlgebra [56ddb016] Logging [d6f4376e] Markdown [a63ad114] Mmap [44cfe95a] Pkg [de0858da] Printf [3fa0cd96] REPL [9a3f8284] Random [ea8e919c] SHA [9e88b42a] Serialization [1a1011a3] SharedArrays [6462fe0b] Sockets [2f01184e] SparseArrays [10745b16] Statistics [4607b0f0] SuiteSparse [8dfed614] Test [cf7118a7] UUIDs [4ec0a83e] Unicode

Output of versioninfo(): Julia Version 1.5.1 Commit 697e782ab8 (2020-08-25 20:08 UTC) Platform Info: OS: macOS (x86_64-apple-darwin19.5.0) CPU: Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-9.0.1 (ORCJIT, skylake)

BioTurboNick commented 2 years ago

Just stumbled across this old issue. It's been a while, but do you have a dataset that can be used to reproduce this?

Do I correctly understand that the issue is that the points that should be at the end have been, somehow, inserted somewhere in the middle?