Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:26
    isentropic commented #250
  • Sep 17 20:07

    BeastyBlacksmith on gh-pages

    build based on 1c47893 (compare)

  • Sep 17 20:05

    BeastyBlacksmith on gh-pages

    build based on 1c47893 (compare)

  • Sep 17 15:53
    t-bltg commented #250
  • Sep 17 15:51
    t-bltg commented #250
  • Sep 17 15:40
    isentropic commented #250
  • Sep 17 15:39
    isentropic commented #250
  • Sep 17 15:30
    t-bltg commented #250
  • Sep 17 15:11
    isentropic commented #250
  • Sep 17 13:25

    BeastyBlacksmith on gh-pages

    build based on 1c47893 (compare)

  • Sep 17 10:29

    BeastyBlacksmith on gh-pages

    build based on 1c47893 (compare)

  • Sep 17 08:00

    BeastyBlacksmith on gh-pages

    build based on 1c47893 (compare)

  • Sep 17 06:13

    BeastyBlacksmith on gh-pages

    build based on 1c47893 (compare)

  • Sep 17 06:08

    BeastyBlacksmith on gh-pages

    build based on 1c47893 (compare)

  • Sep 16 11:41
    itsdfish opened #466
  • Sep 15 10:55

    BeastyBlacksmith on gh-pages

    build based on 1c47893 (compare)

  • Sep 15 09:49

    BeastyBlacksmith on gh-pages

    build based on 1c47893 (compare)

  • Sep 15 06:12
  • Sep 15 03:26
    infovisualnetwork starred JuliaPlots/PlotDocs.jl
  • Sep 14 23:56

    BeastyBlacksmith on gh-pages

    build based on 1c47893 (compare)

BridgingBot
@GitterIRCbot

[slack] <dilumaluthge> That's a fair point. I figured that since we don't really have any other options right now, yank would be the least disruptive, since:

  1. We're not actually removing anything from the registry.
  2. You can still install from manifests.
  3. It prevents e.g. Pkg.add("StatPlots").
  4. It is easy enough to reverse later by un-yanking.
    IIUC, the proposed deprecated flag would prevent REPL mode tab-completion, but it wouldn't e.g. prevent it if someone copies Pkg.add(StatPlots) from an old Discourse post and pastes it in. So I'm not sure if the deprecated flag would address #3 above.

I also think this is kind of an edge case, because by having both StatPlots and StatsPlots, the package has basically typo-squatted itself, which I think is not a good situation, since they look so similar visually.

BridgingBot
@GitterIRCbot
[slack] <loki._.> JuliaPlots/Plots.jl#2501
BridgingBot
@GitterIRCbot
[slack] <loki._.> but you can loop to workaround
BridgingBot
@GitterIRCbot
[slack] <loki._.> also JuliaPlots/Plots.jl#3572
BridgingBot
@GitterIRCbot
[slack] <Ricardo M. S. Rosa> Oh, I see. Yeah, I was trying to avoid looping, but that is okay. Thanks a lot!
BridgingBot
@GitterIRCbot
[slack] <kristofferc> I don't think we should prevent people copy pasting old code from discourse posts. Yeah, one person did it by accident and had some other packages downgraded but this feels a bit little like an over reaction.
BridgingBot
@GitterIRCbot
[slack] <Ricardo M. S. Rosa> Actually, I already have a loop, so that is fine.
BridgingBot
@GitterIRCbot
[slack] <dilumaluthge> Would you mind posting those thoughts on JuliaRegistries/General#38626
BridgingBot
@GitterIRCbot
[slack] <dilumaluthge> To be fair, Matt's not the only person to do this - it's happened at least a few other times in the past.
BridgingBot
@GitterIRCbot
[slack] <dilumaluthge> And because StatPlot and StatsPlots look so similar visually, it's not just that it can happen when copy-pasting; it's also possible for someone to misspell it when they type
BridgingBot
@GitterIRCbot
[slack] <oxinabox> This is the issue on adding something to unlist things
JuliaLang/Pkg.jl#2194
[slack] <oxinabox> One thing suggested in that issue is the this deprecation/unlisting could also display a message (configured in the registry) to the user if they did type it in rather than tab-completing.
So in this case we would for StatPlot display a message something like "StatPlot was renamed to StatsPlot in 1901, while the code StatPlot will install works, it is a long way behind on new features/bugfixes etc"
[slack] <oxinabox> IIRC last time we talked about that issue, someone said it was functionally the same as yanking all releases.
Is that not correct?
Does yanking outright disable add? and only allow Manifest?
BridgingBot
@GitterIRCbot
[slack] <kristofferc> If you yank all versions, then there is nothing to install on add, Pkg will tell you that no versions are installable
BridgingBot
@GitterIRCbot
[slack] <Seth Axen> I was trying to fill below the curve just for negative x and was surprised that this almost worked but failed in an unexpected way. Is there a right way to do this?
using Plots plot(x -&gt; exp(-x^2); fill=x -&gt; x &lt; 0): https://files.slack.com/files-pri/T68168MUP-F0264N3DW9J/download/test.png
BridgingBot
@GitterIRCbot
[slack] <Seth Axen> Oh I see, it's because fill when pass a function f fills between the current y-value and the value of f(x). Too bad we need to recompute the y-value to do this.
BridgingBot
@GitterIRCbot
[slack] <loki._.> Related: JuliaPlots/Plots.jl#3546
[slack] <loki._.> Set primary = false for same color
BridgingBot
@GitterIRCbot
[slack] <Seth Axen> Thanks!
BridgingBot
@GitterIRCbot
[slack] <learnedfool> Is there any way to connect the medians of a boxplot with a line?
Here is a MWE:
using StatsPlots a = rand(10, 5) boxplot(a)
This gives an image that plots a boxplot with each column of the matrix as a series, but I couldnt find any docs on how to connect these boxplots with a line.
Thanks!
BridgingBot
@GitterIRCbot
[slack] <davidrp25> Hello, new here. I'm trying to add a horizontal line to a subplot, and from this discussion: https://discourse.julialang.org/t/vline-with-subplots/25479/2, I have the following
x = [1,2,3] y1 = 2x y2 = x.^2 plot([x, x], [y1, y2], layout = (2, 1)) hline!([4 4])
Which produces the image attached. Now what I'm trying to do is do the horizontal line on the bottom plot, but not the top one. If I just specify hline!([4]) , it defaults to the top one. Is there a way to do the bottom one only?: https://files.slack.com/files-pri/T68168MUP-F026G2ZD0G3/download/test.png
BridgingBot
@GitterIRCbot

[slack] <isentropic> ```x = [1,2,3]
y1 = 2x
y2 = x.^2

p1 = plot(x, y1)
hline!([4])

p2 = plot(x, y2)
hline!([4])

plot(p1,p2, layout=(2,1))`` I changed your script a little, but I usually find it better to split subplots and stitch them at the last step. Or you could use thesubplot` kw in order to specify which subplot you are targeting

BridgingBot
@GitterIRCbot

[slack] <afisher> what's the best way to draw a square on a heatmap? for example to draw a boundary around something

heatmap(zeros(10, 10))
plot!(square(xy coords)))

what i've got right now is
rectangle(w, h, x, y) = Shape(x .+ [0,w,w,0], y .+ [0,0,h,h])
heatmap(zeros(10, 10))
plot!(rectangle(3,2,0.5,0.5)))

but this messes with the axes, and more importantly i don't know how to make the inside transparent but preserve the outline.
any help is highly appreciated!

rectangle function from https://discourse.julialang.org/t/how-to-draw-a-rectangular-region-with-plots-jl/1719

BridgingBot
@GitterIRCbot
[slack] <briochemc> I agree with @isentropic but if you really need to do it your way, you could do
x = [1,2,3] y1 = 2x y2 = x.^2 plot([x, x], [y1, y2], layout = (2, 1)) hline!([[NaN], [4]])
[slack] <davidrp25> Thanks for the answers! Nice to see it the way I approached it, and also great to learn some better practices. Thank you both!
[slack] <briochemc> By default plot resizes things so that they sit inside the xlim/ylim, so you have to set them yourself, e.g., with xlim=(0.5, 10.5), ylim=(0.5, 10.5)
BridgingBot
@GitterIRCbot
[slack] <afisher> thanks!
BridgingBot
@GitterIRCbot
[slack] <briochemc> What’s the function that defines the colorbar ticks? And is it possible to “grab” the colorbar ticks in a recipe that plots a heatmap overlaid with contours? (The goal being to automatically use the colorbar’s ticks as the levels for the contours)
BridgingBot
@GitterIRCbot
[slack] <isentropic> Check out https://discourse.julialang.org/t/gnuplot-gaston-jl-backend-for-plots/64122 for new gnuplot backend for Plots
BridgingBot
@GitterIRCbot
[slack] <hperez16> Hi, does anybody know if the following is possible (specify a color map based on the groups in a plot)? https://discourse.julialang.org/t/color-gradient-by-factor-in-statsplots/30704
BridgingBot
@GitterIRCbot
[slack] <mkborregaard> Not sure what the question is - does the group keyword not do what you want, e.g. scatter(x, y, group = my_awesome_factor)?
BridgingBot
@GitterIRCbot
[slack] <hperez16> It does. But can you specify the colors that you want for your group? Or use a colormap?
BridgingBot
@GitterIRCbot
[slack] <mkborregaard> Yes, you can do both. The important part being, when you use Plots, to use a 1-row matrix, because each group will become a new series: color = [:blue :red :violet] (note the lack of commas)
BridgingBot
@GitterIRCbot
[slack] <hperez16> Thank you Michael. It works with a row matrix of colors, but not with a color gradient. Any thoughts?
[slack] <hperez16> Never mind, I was using the key word color. It works if I use palette
BridgingBot
@GitterIRCbot
[slack] <hperez16> Is it possible to increase the linewidth on a plot legend?
BridgingBot
@GitterIRCbot
[slack] <axsk> Can someone guide me through Plot recipes? I have a struct Heaven clouds::Matrix; ...; end which wraps clouds::Matrix and additional data. Now I want to be able to call a custom recipe for plotting clouds, i.e. cloudplot(clouds::Matrix) but also have a convenience wrapper plot(heaven::Heaven) which plots the contained clouds. So I thought I’d define a custom “User Recipe” for plotting the general cloud matrices with the help of @userplot . However I don’t know how to call it from the convenience recipe (“Type Recipe?“) for Heaven . Then I tried defining a “Series recipe” for the clouds/matrices, since I can call that from the Heaven type recipe via seriestype. However, the series recipe gets passed the cloud matrices as individual vectors whereas I need the whole matrix for plotting. How would you solve this?
BridgingBot
@GitterIRCbot
[slack] <axsk> TL;DR How can I call a User Recipe from another User Recipe?
BridgingBot
@GitterIRCbot
[slack] <axsk> Think I found the answer in the docs https://docs.juliaplots.org/latest/recipes/#User-Recipes-2. Will try it
BridgingBot
@GitterIRCbot
[slack] <axsk> Two user recipes and returning Clouds((heaven.data,)) in the Heaven recipe worked out well.
BridgingBot
@GitterIRCbot
[slack] <eirikeb> Hi, how hard would it be for me to try to get horizontal legends (JuliaPlots/Plots.jl#2206) working on Plots.jl (at least with the GR backend)? Is it something I could be able to do with almost no experience with the Plots.jl and GR.jl code?
BridgingBot
@GitterIRCbot
[slack] <aramirezreyes> There is some work on this, maybe a good starting point? JuliaPlots/Plots.jl#2854
BridgingBot
@GitterIRCbot

[slack] <eirikeb> Wow, I guess it looks like a lot because it’s also fixing a lot of other stuff.

So from browsing the thread and changes it’s not clear to me what’s missing. Im afraid this is a bit too involved for me to contribute too, at least at the moment.

BridgingBot
@GitterIRCbot
[slack] <hperez16> @eirikeb You can use Makie.jl for horizontal legends: http://makie.juliaplots.org/v0.15.2/examples/layoutables/legend/index.html#horizontal_legend
BridgingBot
@GitterIRCbot
[slack] <loki._.> Its mainly finished, what is needed is to find good test cases this doesn't break recipes, so help on that front would be very welcome, if you are interested feel free to reach out to me
BridgingBot
@GitterIRCbot
[slack] <loki._.> this is an on and off debate, see JuliaPlots/Plots.jl#2616 and JuliaPlots/Plots.jl#2655, so currently its tied to the fontsize
[slack] <loki._.> (at least for GR, Plotly and PyPlot)
BridgingBot
@GitterIRCbot

[slack] <hperez16> I just did some updates and seriestype is no longer being accepted as a series attribute (I'm trying to make a stepplot):

using Plots
x=1:10
plot!(x,seriestype=:steppost)

ERROR: MethodError: no method matching Val{:steppost}(::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char, ::Char)
Stacktrace:
[1] apply_recipe(plotattributes::Dict{Symbol, Any}, #unused#::Type{Val{:steppost}}, plt::Plots.Plot{Plots.GRBackend})
@ Plots C:\Users\HD\.julia\packages\Plots\avj9X\src\recipes.jl:50
[2] _process_plotrecipe(plt::Any, kw::Any, kw_list::Any, still_to_process::Any)
@ RecipesPipeline C:\Users\HD\.julia\packages\RecipesPipeline\3x4B9\src\plot_recipe.jl:32
[3] _process_plotrecipes!(plt::Any, kw_list::Any)
@ RecipesPipeline C:\Users\HD\.julia\packages\RecipesPipeline\3x4B9\src\plot_recipe.jl:18
[4] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any)
@ RecipesPipeline C:\Users\HD\.julia\packages\RecipesPipeline\3x4B9\src\RecipesPipeline.jl:81
[5] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any)
@ Plots C:\Users\HD\.julia\packages\Plots\avj9X\src\plot.jl:207
[6] plot!(plt::Plots.Plot, args::Any; kw::Any)
@ Plots C:\Users\HD\.julia\packages\Plots\avj9X\src\plot.jl:197
[7] plot!(args::Any; kw::Any)
@ Plots C:\Users\HD\.julia\packages\Plots\avj9X\src\plot.jl:187
[8] top-level scope
@ REPL[9]:1

Any thoughts?
Plots v1.21.1

BridgingBot
@GitterIRCbot
[slack] <hperez16> I have downgraded RecipesPipeline to v0.3.5 and it now works again. I'll submit an issue.
BambOoxX
@BambOoxX

Hello, I just discovered the recipes mechanism, but I can't figure something.
How can I create two recipes for plots with identical arguments ?
For instance, I have

@recipe function plot1(x::TypeX,y::TypeY)
    <some recipe code>
end
@recipe function plot2(x::TypeX,y::TypeY)
    <some recipe code>
end

But the second definition overwrites the first one, as both are called with plot(x,y)