How to set a different axes system on a matplotlib plot? - python

I have a matplotlib plot on which I found the coordinates of given points like this:
I am trying to find a way to add different axes on the same plot, and get the coordinates of the same points but according to the new axis system, like this:
I am very much a python beginner and I have been struggling with this. Is there a way to do that ?

Related

Is it possible to plot multidimensional points in parallel aligned axes with python

I want to plot multidimensional points in a graph. To do so, I want each axis lined up in parallel. So every point becomes a line in this plot. Maybe there is also a special name for this type of graphs/plots? In the figure below, I have sketched a picture of such a plot with exemplarily 4 axes and the point (5, 60, -10, 7.5). It would be fantastic if the axes are scalable seperately.
Does anybody know a plot-package in python which is capable to plot in this way, and how to do it in that library?
I don't know of a straightforward way to do that.
However, I can recommend using Radar Plots, it shows exactly the information you want to show:
https://williamhuster.com/radar-chart-in-python/

How to overlap plot in python?

I have a program to plot some values.
I want to change some values in my script and plot it overlap.
How can i do it?
Thanks
plot in python
You just do it again.
For instance, if you did:
plt.scatter(x,y,z, etc)
plt.scatter(x1,y1,z1, etc)
You'd get a plot with both of those.
You may want to specify the colors of the second one because otherwise, it will start over with the first color it would use.
I regularly plot a contour over a contourf that way.

Creating a box-plot like scatter-plot with matplotlib

Is there any (simple or complex) way to recreate this plot in matplotlib?
I've tried plotting it using a scatter plot with two different x-values, while adding a small random number to it, but obviously it didn't produce the nice "ordered" effect seen above.
There's a package built on top of matplotlib called beeswarm that positions the points as requested.

Plotting histogram by using igraph python package

I'm new to igraph package as well as python. I wanted to plot a histogram for degree distribution of a graph. Here's what i did:
plot(g.degree_distribution()) #here g is my graph object
My problem is that i'm not able to change the X-Y axis scale and also display them. I looked through the documentation but was not able to find the correct attribute for doing this.
Also i tried to display the X-Y axis label using
plot(g.degree_distribution(), xlab="Degree", ylab="No. Of AS")
but the labels don't show up. Can anyone please help to sought out this problem ?

3D scatterplots in sage

Is it possible to create 3D scatterplots in sage?
By scatterplot I mean graph like this:
Absolutely. If you've got a list of tuples that represent your points, something like:
point_list=[(0.,1.,2.), (2.,2.,3.)]
point3d(point_list)
that will plot the two points given in point_list, you can add axis labels with standard sage plotting options.
You can, as indicated in the accepted answer. To produce exactly that graph (http://matplotlib.org/examples/mplot3d/scatter3d_demo.html) from Sage you can use matplotlib: copy the code of the example in a cell (I'm assuming you are using the notebook) and substitute the last line
plt.show()
with
plt.savefig("")
plt.close("all")

Categories

Resources