does someone know how to elegantly draw a horizontal colorbar over two of three subplots and one additional horizontal colorbar over the third subplot.
Ideally, the colorbars should have the same x-dimensions as the corresponding image axis. I did…
I made the following plot in Excel:
But then I thought I would make it prettier by using ggplot. I got this far:
If you're curious, the data is based on my answer here, although it doesn't really matter. The plot is a standard ggplot2 construct…
I am really pretty new to matplotlib, though I know that it can be very powerful.
I've been reading number of tutorials and examples and it's a real hassle to understand how does matplotlib's Figure and Axes work. I am illustrating, what I am trying…
Consider the following example:
data(iris)
pairs(iris[1:4],xlim=c(0,8), ylim = c(0,8))
As you can see, the axes limits for all subpanels have been altered.
However, the alteration required is the specification of xlim and ylim for each subpanel…
I am currently attempting to use passed axis object created in function, e.g.:
def drawfig_1():
import matplotlib.pyplot as plt
# Create a figure with one axis (ax1)
fig, ax1 = plt.subplots(figsize=(4,2))
# Plot some data
…
Context:
I have a (programmatic) GUI which contains several axes objects inside some uipanel parenting structure. Some of these axes have legend objects associated, some don't.
I want to include a button in my GUI which copies the currently visible…
I have two columns of data, X and Y with each entry having 4 places of data after the decimal in both the vectors.
When I make the simple plot with plot(x,y) the axes have the data shown up to 2 decimal point accuracy. How do I change this to a 4…
I'm using ggplot2 to make line graphs of some log-transformed data that all have large values (between 10^6 and 10^8); since the axes doesn't start at zero, I'd prefer not to have them intersect at the "origin."
Here's what the axes currently look…
I have made my GUI using GUIDE. I have an axes (tag=axes1). An image is displayed in the axes.
When i click on the image(inside axes) I need to get the coordinates.
I get the coordinate values when image is not added to axes.But image is displayed…
I just can't find it. How to set up axis and labels in matlab so they cross at zero point, with the labels just below the axis not on left/bottom of the plot ?
If I didn't make myself clear - I just want the plot to look like like we all used to…
I'm trying to make a plot with pylab/matplotlib, and I have two different sets of units for the x axis. So what I would like the plot to have is two axis with different ticks, one on the top and one on the bottom. (E.g. one with miles and one with…
I'm trying to plot 3d bars using bar3d and Axes3D of matplotlib and limiting the z-axis range to [0,1], but .set_zlim3d(0,1) method is not properly working and there is extra offset relative to bounding ticks. These extra offsets are shown by…
I have a large data set that is logarithmic in distribution. I want to make a heat map, so I do a 2D histogram and pass that to implot. Because the data is logarithmic, I am passing the log of the data to the histogram. When I make the plot,…
According to the documentation, ax.autoscale(tight=True) should
If True, set view limits to data limits;
With ax.axis('tight') being similar:
‘tight’ Limits set such that all data is shown
(sic)
And we even see that it works in the…
I am trying to plot a polygon with geom_sf() in any projection other than lat-long.
I am using the example found in the manual pages for geom_sf()
Importing the dataset:
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet =…