How to export plots from matplotlib with transparent background?

Use the matplotlib savefig function with the keyword argument transparent=True to save the image as a png file. In [30]: x = np.linspace(0,6,31) In [31]: y = np.exp(-0.5*x) * np.sin(x) In [32]: plot(x, y, ‘bo-‘) Out[32]: [<matplotlib.lines.Line2D at 0x3f29750>] In [33]: savefig(‘demo.png’, transparent=True) Result: Of course, that plot doesn’t demonstrate the transparency. Here’s a screenshot … Read more

Make UINavigationBar transparent

If anybody is wondering how to achieve this in iOS 7+, here’s a solution (iOS 6 compatible too) In Objective-C [self.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; self.navigationBar.shadowImage = [UIImage new]; self.navigationBar.translucent = YES; In swift 3 (iOS 10) self.navigationBar.setBackgroundImage(UIImage(), for: .default) self.navigationBar.shadowImage = UIImage() self.navigationBar.isTranslucent = true In swift 2 self.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: .Default) self.navigationBar.shadowImage = UIImage() self.navigationBar.translucent … Read more

Drop shadow for PNG image in CSS

Yes, it is possible using filter: dropShadow(x y blur? spread? color?), either in CSS or inline: img { width: 150px; -webkit-filter: drop-shadow(5px 5px 5px #222); filter: drop-shadow(5px 5px 5px #222); } <img src=”https://cdn.freebiesupply.com/logos/large/2x/stackoverflow-com-logo-png-transparent.png”> <img src=”https://cdn.freebiesupply.com/logos/large/2x/stackoverflow-com-logo-png-transparent.png” style=”-webkit-filter: drop-shadow(5px 5px 5px #222); filter: drop-shadow(5px 5px 5px #222);”>

SVG fill color transparency / alpha?

You use an addtional attribute; fill-opacity: This attribute takes a decimal number between 0.0 and 1.0, inclusive; where 0.0 is completely transparent. For example: <rect … fill=”#044B94″ fill-opacity=”0.4″/> Additionally you have the following: stroke-opacity attribute for the stroke opacity for the entire object

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)