Questions tagged [axes]

Axes - plural of axis

Axes is plural of axis used in Cartesian coordinate system.

1002 questions
32
votes
3 answers

How do I let my matplotlib plot go beyond the axes?

I have to translate an image plotting script from matlab to matplotlib/pylab, and I'm trying to achieve the same effect as the matlab image below: As you can see, the z order of the plots seem to be higher than the z order of the grid, so the…
nay
  • 864
  • 2
  • 8
  • 12
32
votes
4 answers

Removing frame while keeping axes in pyplot subplots

I am creating a figure with 3 subplots, and was wondering if there is any way of removing the frame around them, while keeping the axes in place?
branwen85
  • 1,606
  • 5
  • 20
  • 25
32
votes
1 answer

Positioning axes labels

How can I move the y axis label from the left to the right of the plot area and the x-axis label from below to above the plot area in the following graph?…
Elizabeth
  • 6,391
  • 17
  • 62
  • 90
28
votes
1 answer

How to change axis linewidth and fontsize in Octave

I am trying to resize some plots in Octave. I've been able to change the line thickness and axis labels. However, I cannot find a way to make the axes themselves thicker, or the numbers larger. What I've found online uses set(), like plot(x, y,…
qstnhr
  • 281
  • 1
  • 3
  • 3
27
votes
3 answers

Correct placement of colorbar relative to geo axes (cartopy)

Using Cartopy, I would like to have full control of where my colorbar goes. Usually I do this by getting the current axes position as basis and then create new axes for the colorbar. This works well for standard matplotlib axes but not when using…
yngwaz
  • 769
  • 1
  • 9
  • 17
24
votes
5 answers

Matplotlib coord. sys origin to top left

How can I flip the origin of a matplotlib plot to be in the upper-left corner - as opposed to the default lower-left? I'm using matplotlib.pylab.plot to produce the plot (though if there is another plotting routine that is more flexible, please let…
Nate
  • 768
  • 3
  • 9
  • 17
23
votes
4 answers

How to obtain generated x-axis and y-axis range in plotly plot?

I have a very simple bubble chart, see below. the only thing i need is to be able to get the range (or the min and max) or the x and y axis generated. trace = go.Scatter( x=df_test['total_points_mean'], y=df_test['total_points_std'], …
Steven Cunden
  • 395
  • 1
  • 3
  • 9
21
votes
5 answers

Swap x and y axis without manually swapping values

So I have a set of data that has conditional formatting. Basically it's a set of photometric measurements of stars that I want to put on a chart with different colors for stars in different ranges of Color Index (basically color them by their…
flux
  • 395
  • 1
  • 2
  • 13
19
votes
2 answers

Long tick labels getting cut off in plotly.js chart

Is it possible to give more room for tick labels in plotly.js? Long labels in my charts are getting cut off. HTML:
JavaScript: var data = [{ type: 'bar', x: [20, 14, 23], y: ['giraffes', 'orangutans', 'a looooooooong…
Ollie Glass
  • 19,455
  • 21
  • 76
  • 107
19
votes
1 answer

How to change the number of axis ticks in seaborn plots

I would like to be able to control the number of axis ticks on a seaborn plot in Python 3.5. I'm very accustomed to using R's ggplot, so I'm having some trouble with analogous functionality in Python. As a example, here is the kind of data I'm…
Nancy
  • 3,989
  • 5
  • 31
  • 49
19
votes
2 answers

Bokeh Plot with equal axes

Bokeh Plot with equal axes I created a Plot with the Python library Bokeh (see code). from bokeh.plotting import * figure() hold() rect([1,3], [1,1], [1,0.5], [1,0.5]) patch([0,0,4,4], [2,0,0,2], line_color="black", fill_color=None) show() How can…
Spirou
  • 257
  • 4
  • 10
18
votes
3 answers

Labelling logarithmic scale display in R

While plotting histogarm, scatterplots and other plots with axes scaled to logarithmic scale in R, how is it possible to use labels such as 10^-1 10^0 10^1 10^2 10^3 and so on instead of the axes showing just -1, 0, 1, 2, 3 etc. What parameters…
user744121
  • 467
  • 2
  • 7
  • 17
18
votes
2 answers

How to place the intercept of x and y axes at (0 , 0) and extend the x and y axes to the edge of the plot

Suppose I want to plot x^2. I can use curve() as follows. curve(x^2, -5, 5) However, I would like the axes to go through (0, 0). I could do something as follows: curve(x^2, -5, 5, axes=FALSE) axis(1, pos=0) axis(2,…
Alex
  • 4,030
  • 8
  • 40
  • 62
17
votes
1 answer

How can I programmatically select a specific subplot in Matplotlib?

So in a figure where three vertical subplots have been added with add_subplot, how can I select let's say the middle one? Right now I do this list comprehension: [r[0] for r in sorted([[ax, ax.get_geometry()[2]] for ax in self.figure.get_axes()],…
c00kiemonster
  • 22,241
  • 34
  • 95
  • 133
16
votes
2 answers

Enable white frames on matplotlib figure/ Disable transparent frames

I'm running ipython notebook on a dark theme. When I build a chart on this, the chart is white, but the frame is transparent (hence dark), hiding the ticks which are also dark. Is there a way to make the frame not transparent/ white? The ticks are…
Rocky Li
  • 5,641
  • 2
  • 17
  • 33
1
2
3
66 67