I'm writing a function that modifies the axes size and position on a figure, but when comes twin axes it makes a problem:
import matplotlib.pyplot as plt
def fig_layout(fig, vspace = 0.3): # function to make space at the bottom for legend box…
I am drawing a graph using the plot() function, but by default it doesn't show the axes.
How do we enable showing the axes at x=0 and y=0 on the graph?
Actually my graph is something like:
And I want a horizontal line corresponding to y=0. How do I…
I've got a GUI in MATLAB with a set of axes pre-placed. I'm using the location property of the legend to place it to the right hand side of the axes. However, by doing this the axes get re-scaled so that the axes+legend take up the original width…
I have an image:
Here in the y-axis I would like to get 5x10^-5 4x10^-5 and so on instead of 0.00005 0.00004.
What I have tried so far is:
fig = plt.figure()
ax = fig.add_subplot(111)
y_formatter =…
I am trying to fix the axes to scientific notation of two different sets of data where one is [1-9]x1e-3 and the other is [1-9]x1e-4. I would like to set both axes to be 10^-4 and have the one digits after decimal (e.g. %.1e). Here is a simple…
I would like to edit the axes in my series of images being displayed.
This is what my image looks like:
As you can see, it ranges from 0 to about 500 from top to bottom. Can I invert that?
Plus, I want to mirror the image being shown, so that it…
I'm trying to make a VERY simple graph with the chart control in SSRS 2008 and, of course, Microsoft wants to make things as difficult as possible. The x-axis contains stations on an assembly line and the y-axis contains some numerical value that…
Minimal example:
[x,y,z] = peaks(50);
figure;
subplot(5,1,1:4);
pcolor(x,y,z);
shading flat;
colorbar;
subplot(5,1,5);
plot(x(end/2,:), z(end/2,:));
In this example I'd like to have the lower subplot show the cross-section of peaks along y=0 and…
figure('Color', 'w')
box on
x = 1:10;
y = 5 * x + 2;
area(x, y, 'FaceColor', 'b', 'EdgeColor', 'b')
This code creates a figure with the area under the curve shaded blue. The EdgeColor property sets the trapezoidal line around the filled area to…
Is there an easy way to remove a plotted line from a set of axes without clearing everything else on the axes? I'm trying to implement a GUI with a listbox containing several data sets. I can make the callback function plot the selected data, but…
I would like to write the radian units of the axes as proportional to \pi: something like
$\frac{\pi}{4}$, $\frac{\pi}{2}$, ...
in place of
0.785, 1.5707 ...
Is there any standard way?
As an example, what should I add to the following…
I am plotting data in a plot using wxPython where the data limits on the y- axis are changing with the data. I would like to change the axis dynamically without redrawing the whole canvas like canvas.draw() rather I'd like to use blitting for this…
I want to make a bar chart in Matlab, where one of the categories is "breaking through the roof" of the axes, over the y-axis limit, but I can't figure how to do this. When I change the upper limit to a lower value, the bar gets trucked.
What can I…
I have a figure with a log axis
and I would like to relabel the axis ticks with logs of the values, rather than the values themselves
The way I've accomplished this is with
plt.axes().set_xticklabels([math.log10(x) for x in…