python,numpy,matplotlib,draw,imshow

You seem to be missing the limits on the y value in the histogram redraw in update_data. The high index and low index are also the wrong way around. The following looks more promising, Z, xedges, yedges = np.histogram2d(x[high_index:low_index],y[high_index:low_index], bins=150) (although I'm not sure it's exactly what you want) EDIT:...

matlab,user-interface,matlab-guide,axes,imshow

You GUI organization seems a bit chaotic. You have to be careful where you place the extra code in the .m file generated by the GUIDE. I suggest you replace all the code you placed in the middle of the function by a call to your own initialization function: myGuiInitialization(handles)...

python,data,matplotlib,matplotlib-basemap,imshow

I now understand. You are trying to combine answers you received from here-imshow and here-hexbin. Your problem boils down to the fact that you want to use your Basemap as the "canvas" on which you plot your 2D histogram. But instead of doing that, you are making a Basemap then...

According to the im.show docs: X : array_like, shape (n, m) or (n, m, 3) or (n, m, 4) Display the image in `X` to current axes. `X` may be a float array, a uint8 array or a PIL image. So X may be an array with dtype uint8. When...

Unfortunately, the answer is no. cv::polylines accepts only continuously stored data. So it can't process points stored in std::list. If you don't want to store your points in std::vector you may implement polylines for std::list. For example: void polylines(cv::Mat& img, const std::list<std::list<cv::Point2i>>& polylines) { for (auto& polyline : polylines) {...

python,datetime,matplotlib,plot,imshow

I have put together some example code which should help you with your problem. The code first generates some randomised data using numpy.random. It then calculates your x-limits and y-limits where the x-limits will be based off of two unix timestamps given in your question and the y-limits are just...

To control the extent of the histogram independently of the data passed in to numpy.histogram2d, specify the bin locations as arrays. For example, something like: import numpy as np import matplotlib.pyplot as plt # Known ranges for the histogram and plot xmin, xmax = 20, 220 ymin, ymax = -1,...

opencv,imshow,opencv-stitching

Actually, that's not a bug. result is a 3 channel matrix of int16, and you cannot display it with imshow (it shows a gray image). Just convert it to a regular Mat3b like: Mat3b visibleResult; convertScaleAbs(result, visibleResult); imshow("visibleResult", visibleResult); waitKey(); and you should be able to see it. Hope it...

You have a two step problem. First you need to combine to RGBA images, then you want to map RGBA -> RGB. Note that mapping your first image from RGB -> RGBA is trivial by setting the alpha mask to fully opaque. Both of these questions have already been solved...

Try this: im=imread('spinpie.bmp'); n=fix(size(im,1)/2); A = repmat(255,size(im)); %// PreAllocating with white pixels A(n+1:end,:,:) = im(n+1:end,:,:); %// Assigning only the required pixels to original image imshow(uint8(A)); %// lastly converting double to uint8 before displaying ...

matlab,image-processing,dicom,imshow

Just calculate the highest and lowest value by low = center - width / 2 high = center + width / 2 and use this values for imshow imshow(ct, [low, high]) ...

I'm not exactly sure what's going on in there with all those indices but I think I may be able to offer an alternative. Check out the third paragraph of the documentation, here, for return value information. I suggest using a cell array for clarity. function main() workingDir = 'E:\MASTERS\MatLAB\FullVideo_R_OF_HOF\Images';...

As mentioned by Rattus Ex Machina that's hard to debug without seeing the rest of your code. If that could be of any help, here is a simple GUI which does what you seem to be after. Take the time to play around with it to see what might have...

python,matplotlib,pyqt4,imshow

Matplotlib uses its own event so that they are independent of the UI toolkits (wx-windows, Qt, etc). Therefore the wxcursor_demo is easily adapted to Qt, as is your case. First add the following line to the constructor of your Canvas class self.mpl_connect('motion_notify_event', self.mouse_moved) This will call the mouse_moved method every...

So, to get to the color of pixels, you have to look at how matplotlib maps the scalar values of the pixels to colors: It is a two step process. First, a normalization is applied to map the values to the interval [0,1]. Then, the colormap maps from [0,1] to...

Thank you very much for your help Ander, the approach using colormaps was just not the efficient solution i was looking for. Although I am sure it would work too, there is a way easier solution for the problem :) To receive the impression of being red-green-blind I took the...

After several trials/hours of troubleshooting I finally got it running. It was sort of steamroller tactics, but whatever. I just formatted my laptop and installed 10.10 Yosemite on a fresh partition. After some building issues with OpenCV, which are initially explained here and solved here it now runs perfectly.

python,matplotlib,annotations,imshow

Q: But i dont know how to modify the number of significant digits. A: Pre-process the value to be displayed round( 1.234567890123456e-2, 5 )...

python,matplotlib,colorbar,imshow

Use the LogFormatter class and set labelOnlyBase to False: import matplotlib.pyplot as plt import numpy as np import matplotlib.colors from matplotlib.ticker import LogFormatter A = np.random.rand(50,50)*50 plt.imshow(A, norm=matplotlib.colors.LogNorm()) formatter = LogFormatter(10, labelOnlyBase=False) cb = plt.colorbar(ticks=[1,5,10,20,50], format=formatter) plt.show() ...

python,matplotlib,plot,subplot,imshow

Have you tried the tight layout functionality? plt.tight_layout() See also HERE EDIT: Alternatively, you can use gridspec: import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl images = [np.random.rand(40, 40) for x in range(68)] gs = mpl.gridspec.GridSpec(17, 4) gs.update(wspace=0.1, hspace=0.1, left=0.1, right=0.4, bottom=0.1, top=0.9) for i in...