Removing frame while keeping axes in pyplot subplots

If you want to remove the axis spines, but not the other information (ticks, labels, etc.), you can do that like so: fig, ax = plt.subplots(7,1, sharex=True) t = np.arange(0, 1, 0.01) for i, a in enumerate(ax): a.plot(t, np.sin((i + 1) * 2 * np.pi * t)) a.spines[“top”].set_visible(False) a.spines[“right”].set_visible(False) a.spines[“bottom”].set_visible(False) or, more easily, using seaborn: … Read more

Axes class – set explicitly size (width/height) of axes in given units

The axes size is determined by the figure size and the figure spacings, which can be set using figure.subplots_adjust(). In reverse this means that you can set the axes size by setting the figure size taking into acount the figure spacings: import matplotlib.pyplot as plt def set_size(w,h, ax=None): “”” w, h: width, height in inches … Read more

Plotting two axes in gnuplot

You can have the axes handled automatically without you having to scale them yourself and keep auto-scaling: set terminal jpeg set output ‘graph.jpg’ set xrange [-10:10] set ytics 10 nomirror tc lt 1 set ylabel ‘2*x’ tc lt 1 set y2tics 20 nomirror tc lt 2 set y2label ‘4*x’ tc lt 2 plot 2*x linetype … Read more

Matlab: How to obtain all the axes handles in a figure handle?

Use FINDALL: allAxesInFigure = findall(figureHandle,’type’,’axes’); If you want to get all axes handles anywhere in Matlab, you could do the following: allAxes = findall(0,’type’,’axes’); EDIT To answer the second part of your question: You can test for whether a list of handles are axes by getting the handles type property: isAxes = strcmp(‘axes’,get(listOfHandles,’type’)); isAxes will … Read more

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