Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:40
  • Nov 25 15:12
  • Nov 25 10:46
    keorn closed #126
  • Nov 22 05:20
  • Nov 21 00:17
    PythonNut commented #391
  • Nov 21 00:17
    PythonNut commented #391
  • Nov 20 01:40
    pauljmyers starred JuliaPlots/PlotDocs.jl
  • Nov 20 01:40
    pauljmyers starred JuliaPlots/RecipesBase.jl
  • Nov 19 10:29
    HenriDeh opened #404
  • Nov 19 08:17
    github-actions[bot] opened #403
  • Nov 19 08:17

    github-actions[bot] on new_version

    CompatHelper: bump compat for "… (compare)

  • Nov 18 08:49
    JackDevine commented #138
  • Nov 18 08:48

    JackDevine on master

    [WIP] Non-Working Example for c… (compare)

  • Nov 18 08:48
    JackDevine closed #138
  • Nov 17 18:52
    davidzentlermunro opened #402
  • Nov 17 13:36
    HenriDeh opened #401
  • Nov 17 10:27
    enuit commented #138
  • Nov 17 10:26
    enuit synchronize #138
  • Nov 16 20:29
    stephenholtz starred JuliaPlots/PlotDocs.jl
  • Nov 16 10:13
    joaogui1 opened #400
gideonsimpson
@gideonsimpson
hi, i have a problem that the tick labels on my color bar are partially cut off because i used larger font sizes. how can I extend the figure size so they're fully rendered?
BridgingBot
@GitterIRCbot
[slack] <loki._.> you can set the figure size with size = ( width, height )
BridgingBot
@GitterIRCbot
[slack] <daschw> Or you could increase the margin, like e.g bottom_margin = http://5Plots.mm , you have to find the value and unit that fits your needs.
BridgingBot
@GitterIRCbot
This message was deleted
Roman Bange
@rbange
hey guys, any idea on how to decrease the padding between multiple subplots in a layout?
BerndR
@bernd1995
Hey guys, is it somehow possible to 'load' a previously created plot again into julia and retrieve data like x-, y- and z-components?
In particular I would be interested to do this for a *.html file created with the plotly-backend.
HelgavonLichtenstein
@HelgavonLichtenstein

Hello, how could I plot negative numbers with log10? I have

@df df_final_biomass_diff_array_fw_10_industry_high scatter(:body_mass_fw_1,:bio_diff_S33_1, xaxis = :log10, yaxis = log10.(:bio_diff_S33_1 .+ 10))
Which works, but then the yaxis disappears.

image.png
I am using Plots with Julia 1.5
Roman Bange
@rbange
@HelgavonLichtenstein obviously you cannot simply calculate the log10 of negative values, thats why Plots fails to do this
had the same issue a while ago
i modified my data by applying a log-modulus transformation beforehand https://blogs.sas.com/content/iml/2014/07/14/log-transformation-of-pos-neg.html
HelgavonLichtenstein
@HelgavonLichtenstein
Yes, I understand, but I try to make the values positive by adding 10 to the yaxis
A MWE
x = -10:0.01:10
y = x
plot(x, y)
plot(x, y, yaxis = log10.(y .+ 100))
It works, but the scale disappears from y
Roman Bange
@rbange
Ah i see
HelgavonLichtenstein
@HelgavonLichtenstein
I like this log-modulus transformation you shared
Roman Bange
@rbange
Its nice as you can boundlessly plot negative to positive values
I also tested the sample you shared, it does work as expected, but yaxis = log10.(y .+ 100) only yields values from 1.95 to 2.04 so its a straight line
Maybe the yaxis is displayed, but outside of the value space? Meaning y samples are distributed e.g. 0-100, but the yaxis is shown at e.g. y=300
HelgavonLichtenstein
@HelgavonLichtenstein
How do you change the value space?
Roman Bange
@rbange
Guess its fitted to the given data
i think the proper solution is @df df_final_biomass_diff_array_fw_10_industry_high scatter(:body_mass_fw_1,log10.(:bio_diff_S33_1 .+ 10), xaxis = :log10)
HelgavonLichtenstein
@HelgavonLichtenstein
Neato, using the log-modulus transformation it looks like
@df df_final_biomass_diff_array_fw_10_industry_high scatter(:body_mass_fw_1, sign.(:bio_diff_S33_1).*log10.(abs.(:bio_diff_S33_1).+1), xaxis = :log10)
image.png
Roman Bange
@rbange
Nice! Glad to help
HelgavonLichtenstein
@HelgavonLichtenstein
Thanks!
Do you know how to make the yaxis show 10^ like on the xaxis? That would be perfect if possible
Roman Bange
@rbange
I only know the workaround by specifing the ticks manually yticks!([-1:1:1;], ["min", "zero", "max"])
guess you can also pass a tuple to the yticks attribute withtin the scatter() call, there is an example somewhere in the documentation
Ah yes, like this yticks = ([0:0.2:1;], ["$i\\%" for i in 0:20:100])
HelgavonLichtenstein
@HelgavonLichtenstein
I don't understand the second half of that
Roman Bange
@rbange
the content doesnt matter, this is just from one of my plots and generates the yaxis labels
scatter(..., yticks = (ticks, labelsforeachtick))
HelgavonLichtenstein
@HelgavonLichtenstein
Unfortunately I can't figure it out plot(x, sign.(y).*log10.(abs.(y).+1),yticks = ([-1.0:0.1:1.0], 10^$ticks)) doesn't work because $ is only for strings.
Nonetheless, thank you very much for your suggestion!
BridgingBot
@GitterIRCbot
[slack] <dpsanders> Is it possible to change the way that arrows are displayed by Plots (with GR backend) in plot(x, y, arrow=true)?

[slack] <Moelf> I think the answer is no by looking at the

Supported arguments
in docs' GR page

[slack] <dpsanders> Hmm OK, thanks
BridgingBot
@GitterIRCbot
[slack] <loki._.> Plots allows to pass an Arrow contructor to change some parameters, but I don’t know whether this is implemented in the backend
BridgingBot
@GitterIRCbot
[slack] <dpsanders> How do you use that?
BridgingBot
@GitterIRCbot
[slack] <loki._.> arrow = Arrow(0.5, 0.1)
BridgingBot
@GitterIRCbot

[slack] <pfitzseb> Anyone know why I'm getting
```julia> graphplot(wheel_digraph(10))
ERROR: MethodError: no method matching plot(::GraphRecipes.GraphPlot)
Stacktrace:
[1] graphplot(::SimpleDiGraph{Int64}; kw::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/pfitzseb/.julia/packages/RecipesBase/92zOw/src/RecipesBase.jl:357
[2] graphplot(::SimpleDiGraph{Int64}) at /home/pfitzseb/.julia/packages/RecipesBase/92zOw/src/RecipesBase.jl:357
[3] top-level scope at REPL[13]:1

(@v1.5) pkg> st
Status ~/.julia/environments/v1.5/Project.toml
[bd48cda9] GraphRecipes v0.5.4
[093fc24a] LightGraphs v1.3.0
[626554b9] MetaGraphs v0.6.6
[91a5bcdd] Plots v1.8.1```

[slack] <pfitzseb> maybe something going wrong with Requires or whatnot?
BridgingBot
@GitterIRCbot
[slack] <daschw> It works for me with the same versions:
(@graphplots) pkg> st Status `~/.julia/environments/graphplots/Project.toml` [bd48cda9] GraphRecipes v0.5.4 [093fc24a] LightGraphs v1.3.0 [626554b9] MetaGraphs v0.6.6 [91a5bcdd] Plots v1.8.1
[slack] <pfitzseb> oh wait
[slack] <pfitzseb> I think I forgot to load Plots...
[slack] <pfitzseb> :bang-head-on-wall:
BridgingBot
@GitterIRCbot

[slack] <dpsanders> ```
julia> using Plots: Arrow

julia> plot([(3, 4), (5, 6)], arrow=Arrow(0.5, 0.2))
ERROR: MethodError: no method matching Arrow(::Float64, ::Float64)```

[slack] <dpsanders> Thanks. arrow=Arrow(:simple, :head, 1.0, 1.0) works, but indeed doesn’t change the arrowhead in GR 😕. I think the syntax arrow=arrow(1.0, 1.0) is also supposed to work.