## How to change border width of a matplotlib graph

Maybe this is what you are looking for? It sets the value globally. import matplotlib as mpl mpl.rcParams[‘axes.linewidth’] = 0.1

Maybe this is what you are looking for? It sets the value globally. import matplotlib as mpl mpl.rcParams[‘axes.linewidth’] = 0.1

You can use plot or vlines to draw a vertical line, but to draw a vertical line from the bottom to the top of the y axis, axvline is the probably the simplest function to use. Here’s an example: In [80]: import numpy as np In [81]: import matplotlib.pyplot as plt In [82]: np.random.seed(6789) In … Read more

Nevermind, I figured it out. ax.tick_params(axis=”x”, which=”minor”, bottom=False)

use the align_yaxis() function: import numpy as np import matplotlib.pyplot as plt def align_yaxis(ax1, v1, ax2, v2): “””adjust ax2 ylimit so that v2 in ax2 is aligned to v1 in ax1″”” _, y1 = ax1.transData.transform((0, v1)) _, y2 = ax2.transData.transform((0, v2)) inv = ax2.transData.inverted() _, dy = inv.transform((0, 0)) – inv.transform((0, y1-y2)) miny, maxy = … Read more

solution for matplotlib >= 2.0.2 Let’s consider the following example which is produced by this code: import matplotlib.pyplot as plt import matplotlib.ticker import numpy as np y = np.arange(12) x = 10.0**y fig, ax=plt.subplots() ax.plot(x,y) ax.set_xscale(“log”) plt.show() The minor ticklabels are indeed gone and usual ways to show them (like plt.tick_params(axis=”x”, which=”minor”)) fail. The first … Read more

You should be able to use d3.format instead of writing your own format function for this. d3.svg.axis() .tickFormat(d3.format(“d”)); You can also use tickFormat on your scale which the axis will automatically use by default.

You can move the ylabel using ax.yaxis.set_label_coords, which does accept negative numbers. For your example, I removed the line with set_label_position, and added: axPres.yaxis.set_label_coords(-0.1,1.02) From the documentation: Axis.set_label_coords(x, y, transform=None) Set the coordinates of the label. By default, the x coordinate of the y label and the y coordinate of the x label are determined … Read more

I don’t know if this was ever solved, but I spent some time googling for a solution to this same problem. I found a fix here – https://jax-ws.dev.java.net/issues/show_bug.cgi?id=228 The solution is to run wsimport with the -B-XautoNameResolution (no spaces)

This error is probably related to a byte order mark (BOM) prior to the actual XML content. You need to parse the returned String and discard the BOM, so SAXParser can process the document correctly. You will find a possible solution here.

tf.transpose provides the same functionality as np.swapaxes, although in a more generalized form. In your case, you can do tf.transpose(orig_tensor, [1, 0, 2]) which would be equivalent to np.swapaxes(orig_np_array, 0, 1).