Non-linear axes for imshow in matplotlib

In my view, it is better to use pcolor and regular (non-converted) x and y values. pcolor gives you more flexibility and regular x and y axis are less confusing. import pylab as plt import numpy as np from matplotlib.colors import LogNorm from matplotlib.ticker import LogFormatterMathtext x=np.logspace(1, 3, 6) y=np.logspace(0, 2,3) X,Y=np.meshgrid(x,y) z = np.logspace(np.log10(10), … Read more

Is it OK to HTTP redirect images?

Yes, you can redirect images and browsers will follow redirects. But you’ll generally want to keep redirection to a minimum for performance reasons, because each redirect requires a separate HTTP request, which adds server overhead and increases end-user page load time a little. The one thing you should definitely avoid is redirecting many images on … Read more

What is the difference between “JPG” / “JPEG” / “PNG” / “BMP” / “GIF” / “TIFF” Image?

Yes. They are different file formats (and their file extensions). Wikipedia entries for each of the formats will give you quite a bit of information: JPEG (or JPG, for the file extension; Joint Photographic Experts Group) PNG (Portable Network Graphics) BMP (Bitmap) GIF (Graphics Interchange Format) TIFF (or TIF, for the file extension; Tagged Image … Read more

How can I set a website image that will show as preview on Facebook?

1. Include the Open Graph XML namespace extension to your HTML declaration <html xmlns=”http://www.w3.org/1999/xhtml” xmlns:fb=”http://ogp.me/ns/fb#”> 2. Inside your <head></head> use the following meta tag to define the image you want to use <meta property=”og:image” content=”fully_qualified_image_url_here” /> Read more about open graph protocol here. After doing the above, use the Facebook “Object Debugger” if the image … Read more