I tried to gray an image but it does not work properly like it should. It just applied a kind of filter as you can see by using cv2.COLOR_BGR2GRAY function. Kindly someone help me to get over with this issue.
Your issue is that you're using matplotlib to show your grayscale image. Matplotlib applies a colormap. By default that's a colorful one.
Add cmap="gray" in your imshow call: plt.imshow(img_gray, cmap="gray")
I have the same issue as described in link below, where the axes of my plot aren't rendered correctly if I set the Qt.AA_Use96Dpi attribute of my QApplication to make my application invariant across different display settings.
How to stop display resolution from affecting axes in pyqtgraph plots
The solutions proposed solve the issue of broken axes if Qt.AA_Use96Dpi is not used, but wondering if there is fix that works with it enabled.
I tried to do a box plot with salary and loan. However its not showing even though the code is correct. And I tried with matplotlib plots, it doesnt work as well.
Here is the code
I am having some real trouble trying to plot nice things with Julia.
I first used PyPlot which I was happy with but I had to be able to change the angle on a 3D plots (in that case using surface) so I now use Plots directly with the camera speficication. I would like to remove the background on a 3D plot.
using PyPlot, the following command :
ax=gca(); ax:set_axis_off
works fine.
When using Plots, I tried the following :
using Plots; pyplot(grid=false)
and then my code for the surface, and it does not change the output.
I also tried the first example on this page :https://github.com/JuliaPlots/Plots.jl/pull/695 and grid specification does not work (grids are the same on every area of the layout).
I tried after updating every package and it still does not work.
Does anyone have an idea about what would the problem be please?
Thank you in advance !
I am trying to use both seaborn and matplotlib defaults to create plots in an ipython notebook, each plot with it's own default mpl or sns style. I have followed the instructions outlined in this question, and this one, however they don't quite do what I need.
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot([1,2,3,4], [1,4,9,16])
import seaborn as sns
plt.plot([1,2,3,4], [1,4,9,16])
sns.reset_orig()
plt.plot([1,2,3,4], [1,4,9,16])
The last plot saves without the grey border, however the size is still different than the original. And the inline display is not the same as the original. Ideally I would like to be able to set the style on a per plot basis. Does anyone have any suggestions on how to achieve this?