graphing

Putting newline in matplotlib label with TeX in Python?

Putting newline in matplotlib label with TeX in Python? Question: How can I add a newline to a plot’s label (e.g. xlabel or ylabel) in matplotlib? For example, plt.bar([1, 2], [4, 5]) plt.xlabel(“My x label”) plt.ylabel(r”My long label with $Sigma_{C}$ math n continues here”) Ideally I’d like the y-labeled to be centered too. Is there …

Total answers: 4

Setting axes.linewidth without changing the rcParams global dict

Setting axes.linewidth without changing the rcParams global dict Question: So, it seems one cannot do the following (it raises an error, since axes does not have a set_linewidth method): axes_style = {‘linewidth’:5} axes_rect = [0.1, 0.1, 0.9, 0.9] axes(axes_rect, **axes_style) and has to use the following old trick instead: rcParams[‘axes.linewidth’] = 5 # set the …

Total answers: 4

gnuplot vs Matplotlib

gnuplot vs Matplotlib Question: I’ve started on a project graphing Tomcat logs using gnuplot-py, specifically correlating particular requests with memory allocation and garbage collection. What is the collective wisdom on gnuplot-py vs Matplotlib for Python graphing. Are there better graphing libraries out there I haven’t heard of? My general considerations are: While gnuplot has large …

Total answers: 8