Re: [julia-users] Uniform axis across subplots in Plots.jl
Works great for gr and pyplot backends, but still trouble with plotlyjs On Wednesday, October 12, 2016 at 2:53:19 PM UTC-4, Tom Breloff wrote: > > This should be fixed on master now. Just add "link = :all" to your > original example. > > On Wed, Oct 12, 2016 at 2:48 PM, r5823 <jmel...@gmail.com > > wrote: > >> Tom, I appreciate the quick response. Your example does produce a plot >> with the appropriate ylimits, however the use of subplots is important for >> my application since I have multiple data sets of varying size that I would >> like to show on different subplots with a common set of ylimits (or >> xlimits). Thanks for looking into this! >> >> >> >> On Wednesday, October 12, 2016 at 2:23:33 PM UTC-4, Tom Breloff wrote: >>> >>> This should work as you want: >>> >>> plot([[1, 2, 4],[1,5,10,3]], layout=2, link=:all) >>> >>> There seems to be a bug with the link attribute when combining >>> subplots. I'll look into it. >>> >>> On Wed, Oct 12, 2016 at 2:13 PM, r5823 <jmel...@gmail.com> wrote: >>> >>>> Is there a way to make the yaxis and/or the xaxis limits uniform across >>>> subplots in Plots.jl? >>>> >>>> For example, given the code: >>>> >>>> using Plots >>>> gr() >>>> p1 = Plots.plot([1, 2, 4]) >>>> p2 = Plots.plot([1,5,10,3]) >>>> Plots.plot(p1,p2,layout=(1,2)) >>>> >>>> The hope would be to substitute something along the lines of >>>> Plots.plot(p1,p2,layout=(1,2), layout_ylim=:auto) that would result in a >>>> ymax for both subplots being 10. Similarly, something along the lines of >>>> Plots.plot(p1,p2,layout=(1,2), layout_xlim=:auto) to make the xmax for >>>> both >>>> subplots be 4 >>>> >>> >>> >
Re: [julia-users] Uniform axis across subplots in Plots.jl
Tom, I appreciate the quick response. Your example does produce a plot with the appropriate ylimits, however the use of subplots is important for my application since I have multiple data sets of varying size that I would like to show on different subplots with a common set of ylimits (or xlimits). Thanks for looking into this! On Wednesday, October 12, 2016 at 2:23:33 PM UTC-4, Tom Breloff wrote: > > This should work as you want: > > plot([[1, 2, 4],[1,5,10,3]], layout=2, link=:all) > > There seems to be a bug with the link attribute when combining subplots. > I'll look into it. > > On Wed, Oct 12, 2016 at 2:13 PM, r5823 <jmel...@gmail.com > > wrote: > >> Is there a way to make the yaxis and/or the xaxis limits uniform across >> subplots in Plots.jl? >> >> For example, given the code: >> >> using Plots >> gr() >> p1 = Plots.plot([1, 2, 4]) >> p2 = Plots.plot([1,5,10,3]) >> Plots.plot(p1,p2,layout=(1,2)) >> >> The hope would be to substitute something along the lines of >> Plots.plot(p1,p2,layout=(1,2), layout_ylim=:auto) that would result in a >> ymax for both subplots being 10. Similarly, something along the lines of >> Plots.plot(p1,p2,layout=(1,2), layout_xlim=:auto) to make the xmax for both >> subplots be 4 >> > >
[julia-users] Error setting limits on log scale in Plots.jl
When I call: using Plots plotlyjs() plot( xlims = (0,2), xscale = :log10, ) I get a plot where the xaxis is log scale and ranges from 1 to 100, as I would expect. However, if I call: plot( xlims = (-3,2), xscale = :log10, ) I do not get a plot where the xaxis is log scale and ranges from 0.001 to 100, as I would have expected. Instead I get a domain error. Is this a bug?
[julia-users] Uniform axis across subplots in Plots.jl
Is there a way to make the yaxis and/or the xaxis limits uniform across subplots in Plots.jl? For example, given the code: using Plots gr() p1 = Plots.plot([1, 2, 4]) p2 = Plots.plot([1,5,10,3]) Plots.plot(p1,p2,layout=(1,2)) The hope would be to substitute something along the lines of Plots.plot(p1,p2,layout=(1,2), layout_ylim=:auto) that would result in a ymax for both subplots being 10. Similarly, something along the lines of Plots.plot(p1,p2,layout=(1,2), layout_xlim=:auto) to make the xmax for both subplots be 4
[julia-users] Re: Unexpected results with typeof(DataFrame)
Looking back at this I agree I misunderstood Kristoffer, however I don't think that this is the problem. For context, my custom type is defined as follows: type Parjm x::Array{Float64,1} y::Array{Float64,1} end So the subelements of, say, temp[1,:A] are always arrays of Float64. If instead the Parjm type had been defined as type Parjm x::Array{Any,1} y::Array{Any,1} end I would think it could cause the problem you and Kristoffer have pointed to. On Friday, October 7, 2016 at 3:23:04 AM UTC-4, Fengyang Wang wrote: > > I think you have misunderstood Kristoffer. It's possible the Int values > themselves are of distinct types; note for instance > > julia> Array{Int, Int32(1)} > Array{Int64,1} > > julia> Array{Int, 1} > Array{Int64,1} > > julia> Array{Int, Int32(1)} == Array{Int, 1} > false > > > > > On Thursday, October 6, 2016 at 10:52:24 PM UTC-4, r5823 wrote: >> >> All elements of temp and DF are of type ParType.Parjm so I don't think >> there is any mixing going on in terms of different types within :A of each >> variable >> >> >> On Monday, October 3, 2016 at 5:45:55 AM UTC-4, Kristoffer Carlsson wrote: >>> >>> The int value "1" is an Int32 in one case and an Int64 in another? >> >>
[julia-users] Re: Unexpected results with typeof(DataFrame)
All elements of temp and DF are of type ParType.Parjm so I don't think there is any mixing going on in terms of different types within :A of each variable On Monday, October 3, 2016 at 5:45:55 AM UTC-4, Kristoffer Carlsson wrote: > > The int value "1" is an Int32 in one case and an Int64 in another?
[julia-users] Unexpected results with typeof(DataFrame)
I have a custom type ParType.Parjm and two DataFrames,temp and DF, where the elements are of this type: typeof(temp[:A]) DataArrays.DataArray{ParType.Parjm,1} and typeof(DF[:A]) DataArrays.DataArray{ParType.Parjm,1} However, the following comparison returns false. typeof(temp[:A]) == typeof(DF[:A]) false Any thoughts on what is going on here?
[julia-users] Problems with Jitter in Gadfly
If I call, plot(layer(x=c1, y=c2,Stat.x_jitter,Geom.point), layer(x=c1, y=c2,Geom.boxplot)) I successfully generate a plot showing jittered data points overlaid on top of a boxplot. If I remove the boxplot layer and call, plot(layer(x=c1, y=c2,Stat.x_jitter,Geom.point)) I get the following error: LoadError: ArgumentError: reducing over an empty collection is not allowed while loading In[350], in expression starting on line 11 in _mapreduce at reduce.jl:139 Any thoughts on what is going on here?