Should imshow display a grid by default when under seaborn style?
See original GitHub issueCurrently, if seaborn is imported, imshow
will overlay a white grid over its image:
$ python -c 'from pylab import *; import seaborn; imshow(rand(20, 20)); show()'
I feel that if one is calling directly imshow, rather than some higher level method in seaborn, it is more likely that one is just trying to plot some real image data and does not want the grid.
Is there a way to avoid adding the grid for such plots? (other than wrapping each call using set_style
…)
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Controlling figure aesthetics — seaborn 0.12.1 documentation
Seaborn splits matplotlib parameters into two independent groups. The first group sets the aesthetic style of the plot, and the second scales various...
Read more >How to get rid of grid lines when plotting with Seaborn + ...
This is the best answer since you can use it with seaborn, pandas and matplotlib alike. Just call ax.grid(False) on whatever axes you...
Read more >Seaborn is actually quite good for data visualization
Apply the default default seaborn theme, scaling, and color palette. ... Categorical variables that will determine the faceting of the grid.
Read more >Chapter 4. Visualization with Matplotlib - O'Reilly
imshow () by default follows the standard image array definition where the origin is in the upper left, not in the lower left...
Read more >Customizing Matplotlib with style sheets and rcParams
You can control the defaults of almost every property in Matplotlib: figure size and DPI, line width, color and style, axes, axis and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can also use
axes_style
in awith
statement, which will at least save you one line of code per plot:Well, that’s expected behavior. I don’t know why matplotlib draws imshow the way it does, but one way to avoid this is to set the
zorder
of the image to something greater than 0, should should put it over the grid.