How Can I Make X Axis and Y Axis Exchange and use multiple X Axes in ZedGraph Controls - zedgraph

I want to draw a graph with multiple vertical curves, each curve corresponds to a horizontal Axis and all these curves share a horizonal vertical Axis. Two approaches may be possible:
1. Make X Axis vertical and make Y Axis horizontal, and then use multiple Y Axes, but how to make X Axis and Y Axis exchange?
2. Use multiple X Axes, but it seems that the ZedGraph only support not more than 2 X Axes. If I want to draw more than two curves, what should I do then?

Related

Why is the x axis backwards and x and y axis not labeled in this simple scatter plot

Why doesn't this simple scatter plot work in a sane way? It seems like I'm having to jump through hoops for something that ought to "just work". I think the code below should result in plot with (0,0) as the origin and an x and y axis that each go up to 10 with nicely labeled, evenly spaced tick marks on each axis. Instead, the origin is at 1,7 and the x axis is backwards, decreasing from right to left.
Maybe I'm going blind, but I've looked through the Tutorials and Gallery and I can't find any example of a plain, simple, no-frills plot of distinct points on a coordinate plane.
x = ['7', '8', '6', '7.5', '4']
y = ['1', '2', '2', '3', '3']
plt.scatter(x,y)
plt.xlim(0,10)
plt.ylim(0,10)
plt.show()
I have also tried
plt.plot(x,y, 'ro')
plt.axis([0,10,0,10])
plt.show()
with similar results.
I've been able to get sane looking results by calling plt.gca().invert_xaxis() to get the x axis into an increasing rather than decreasing direction and manually passing a list of tickmarks to xticks and yticks, but I don't understand why that's necessary. Why doesn't setting the max and min for the x and y axis result in a graph with sensible default tick marks?
Your lists are of strings, not numbers so matplotlib doesn't really know how to handle them in the way that you expect. Remove the single quotes from the x and y lists and try it again.

How can I flip all keyframes upside down in blender?

In blender, I know there is a way to flip a group of keyframes by the x axis by copying and pasting (ctrl+shift+v) but how can I flip them upside down?
Move-rotate-scale operators can be used in 2D space too, so you can scale animation curves with S Y -1 (scale along Y axis -1 times), probably adjusting pivot point to origin first (e.g. set pivot to "2d cursor" and set 2d cursor somewhere at Y=0. The same can be done for X axis.

Matplotlib: How to place x-axis and y-axis TITLES at edges of frame, even if origin is not at bottom left?

I'm making plots where the (0,0) position is not necessarily in the bottom left corner of the plot frame, meaning that the x and y axes and their ticks cross within the plot frame. It's fine to have the lines, ticks and their values within the frame, but having the axis titles so near to their lines interferes with visualization of certain data points.
I'd simply like to force the x and y axis titles to be at the bottom and far left of the plot frame, respectively; it doesn't work to simply 'pad' the xlabel or ylabel titles because the padding I'd need would vary between plots.
How to get the titles always in these consistent locations of the plot frame, even if the corresponding axis lines, ticks/values may vary in the plot frame space?
Thank you.
I'd like to add a note here. It seemed to me that it could be possible to define the xlabel and ylabel 'labelpad' values directly from the data range:
For example, one could find the minimum x-value of the minimum y-value (this would set the position of the x-axis label), and the minimum x-value of the minimum x-value (this would set the position of the y-axis label):
xpad = ax.get_ylim()[0]
ypad = ax.get_xlim()[0]
Then use these values in xlabel and ylabel parameters as labelpads:
pylab.xlabel("X Title", fontsize=12, labelpad=abs(xpad))
pylab.ylabel("Y Title", fontsize=12, labelpad=abs(ypad))
Unfortunately, it doesn't look like labelpad can accept variables. Any suggestions that might allow a work-around?

Use free space after hiding axis

I have a horizontal bar chart where I decided to hide the Y axis and display the axis labels inside the chart:
Now I'd like to know how I can tell Dimple to use the free space (see red rectangle) available from hiding the Y axis.
You set the bounds of the plot area with setMargins or setBounds. Dimple doesn't automatically size to accommodate axes. So just set the left margin to about 10px.

matplotlib one centered axis label for two diagrams

I'd like to have one axis label centered over two axes in matplotlib.
For example, I set up the axes as follows:
figure = pyplot.figure(figsize=10,10))
diagram1 = figure.add_axes([0.01,0.62,0.90,0.30])
diagram2 = figure.add_axes([0.01,0.32,0.90,0.30])
This will generate two diagrams on top of each other. How can i now define one axis label for the y axis centered on both diagrams.
I think this can be done with subplots, but I prefer to set every diagram individually, as shown above.
You can manually change the y-coordinate of the label.
diagram1.set_ylabel('y label').set_y(0)
# Alternatively you can use
# diagram2.set_ylabel('y label').set_y(1)
The coordinate is in the axes coordinate space, meaning 0 is the bottom and 1 is the top of the Axes.
Seeing how your Axes are placed at x=0.01, you can make the label appear at the right side of the plots as well
diagram1.yaxis.set_label_position("right")