About 26,400,000 results
Open links in new tab
  1. Why do many examples use `fig, ax = plt.subplots ()`

    570 plt.subplots() is a function that returns a tuple containing a figure and axes object (s). Thus when using fig, ax = plt.subplots() you unpack this tuple into the variables fig and ax. Having fig is useful if …

  2. python - Rotate axis tick labels - Stack Overflow

    I can't figure out how to rotate the text on the X Axis. Its a time stamp, so as the number of samples increase, they get closer and closer until they overlap. I'd like to rotate the text 90 degr...

  3. python - Add colorbar to existing axis - Stack Overflow

    I'm making some interactive plots and I would like to add a colorbar legend. I don't want the colorbar to be in its own axes, so I want to add it to the existing axes. I'm having difficulties doing...

  4. python - How to put the legend outside the plot - Stack Overflow

    The legend handles and labels need to obtained from the real plot via h, l = ax.get_legend_handles_labels() and can then be supplied to the legend in the lax subplot, …

  5. How to use ax with Pandas and Matplotlib - Stack Overflow

    My question is how can I use ax.avxspan with my current code? Or do I need to convert my x='date', and y='units' to numpy arrays and use the format as in the code above?

  6. assembly - How do AX, AH, AL map onto EAX? - Stack Overflow

    AX is the lower 16-bits AL is the lower 8 bits AH is the bits 8 through 15 (zero-based), the top half of AX So AX is composed of AH:AL halves, and is itself the low half of EAX. (The upper half of EAX isn't …

  7. Change grid interval and specify tick labels - Stack Overflow

    There are several problems in your code. First the big ones: You are creating a new figure and a new axes in every iteration of your loop → put fig = plt.figure and ax = fig.add_subplot(1,1,1) outside of …

  8. python - plot a circle with Matplotlib.pyplot - Stack Overflow

    surprisingly I didn't find a straight-forward description on how to draw a circle with matplotlib.pyplot (please no pylab) taking as input center (x,y) and radius r. I tried some variants of this:

  9. How to set the axis limits in Matplotlib? - Stack Overflow

    I need help with setting the limits of y-axis on matplotlib. Here is the code that I tried, unsuccessfully.

  10. python - matplotlib Axes.plot () vs pyplot.plot () - Stack Overflow

    Apr 19, 2017 · What is the difference between the Axes.plot() and pyplot.plot() methods? Does one use another as a subroutine? It seems that my options for plotting are line = plt.plot(data) or ax = …