JuliaPlots / Plots.jl

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

Missing colorschemes in heatmap plot #542

Closed juliohm closed 7 years ago

juliohm commented 8 years ago

I couldn't find an example in the docs nor an issue mentioning this function, how can we get access to imshow() from PyPlot to visualize large 2D matrices?

tbreloff commented 8 years ago

heatmap? If they are really large you shouldn't use pyplot.

On Wednesday, October 19, 2016, Júlio Hoffimann Mendes < notifications@github.com> wrote:

Hi,

I couldn't find an example in the docs nor an issue mentioning this function, how can we get access to imshow() from PyPlot to visualize large 2D matrices?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tbreloff/Plots.jl/issues/542, or mute the thread https://github.com/notifications/unsubscribe-auth/AA492sJxLg55TWoaXwWLdCsoPOt2VkUHks5q1bkjgaJpZM4Kam3b .

juliohm commented 8 years ago

@tbreloff I am actually talking about matrices that represent images. They have 400x400 pixels for example.

tbreloff commented 8 years ago

What is the precise type that you want to display? (show me the output of typeof(mat))

juliohm commented 8 years ago

The type is Array{Float64,2}, nothing fancy.

tbreloff commented 8 years ago

so then: heatmap(mat, yflip=true)

juliohm commented 8 years ago

I don't know why it didn't work before! I was probably doing something wrong somewhere else in the code. Closing the issue :+1:

juliohm commented 8 years ago

How to change the colormap? I tried passing the option cmap, colormap, cm, none worked.

Where in the source I can find information on these keyword arguments that are valid across functions?

tbreloff commented 8 years ago

fillcolor or fc, or also seriescolor, color, c should do it. See the attributes page of the docs

juliohm commented 8 years ago

I tried color=:jet but it didn't work. Where I can find a list of all these symbols?

tbreloff commented 8 years ago
julia> PlotUtils._gradients |> keys |> showall
Symbol[:phase,:lightrainbow,:ice,:curl,:matter,:speed,:turbid,:sand_grad,:tempo,:solarized_light_grad,:gray,:reds,:blues,:redsblues,:darkrainbow,:viridis,:algae,:greens,:balance,:solar,:solarized_grad,:dark_grad,:haline,:oxy,:plasma,:deep,:heat,:magma,:inferno,:rainbow,:orange_grad,:bluesreds,:amp,:dense,:darktest,:lime_grad,:grays,:thermal,:delta,:lighttest]
juliohm commented 8 years ago

Thanks! So, the standard jet is not available currently?

tbreloff commented 8 years ago

jet kinda sucks... you should try something else :)

juliohm commented 8 years ago

Well, jet is kind of very famous, no harm in include it to the list :)

KristofferC commented 8 years ago

It is harmful since it is so bad.

juliohm commented 8 years ago

Why is it so bad? Do you have links?

tbreloff commented 8 years ago

https://github.com/matplotlib/matplotlib/issues/875

juliohm commented 8 years ago

My eyes are not that sensitive, but if experts are saying jet is harmful, I accept it.

juliohm commented 8 years ago

I tried the :ice color listed above and it is also not recognized. Could you please update the docs and the code to translate the supported colorschemes? Many users like myself will open issues about it.

juliohm commented 8 years ago

Could you please help on this issue? I am gradually moving to Plots.jl, but there are still some corners I need to round for my day-to-day usage.

tbreloff commented 8 years ago

I'm sorry... I don't see anything actionable (besides a request for more docs?) What do you need help with? The gitter channel is good for getting help when learning (as opposed to reporting a bug in the issues).

juliohm commented 8 years ago

Hi Tom, the :ice color scheme is not working for me even though it is listed above. I will double check again today the script to see if it was something else.

tbreloff commented 8 years ago

This works for me: using Plots; heatmap(rand(100,100),c=:ice)

You might need to check out Plots/PlotUtils. I'll tag a new version in a couple months

juliohm commented 8 years ago

Hi Tom, the :ice color scheme is not working for me even though it is listed above.

-Júlio

tbreloff commented 7 years ago

Pkg.checkout("Plots"); Pkg.checkout("PlotUtils") should work for you.

ttparker commented 6 years ago

@tbreloff your command PlotUtils._gradients |> keys |> showall didn't work for me. I might be worth adding the list of gradient schemes to the documentation.

juliohm commented 6 years ago

See https://discourse.julialang.org/t/current-list-of-colorschemes-in-plots-jl/5420

mkborregaard commented 6 years ago

You could also actually check the documentation: http://docs.juliaplots.org/latest/colors/ :joy:

ttparker commented 6 years ago

@mkborregaard I did - by searching for several of the color scheme names using the documentation's built-in search function. This got no results, because the names are listed in an image file :-)

mkborregaard commented 6 years ago

I see, good point. It would be nice with a revision of that page that changed the display of each gradient to a narrow rectangle with a markdown title.