I am using Scatter Plot from Python. I have a quiver plot that contains an arrow going out of every point(x,y). and I have a specific point that I am interested in let us call it (c,d). My question is how can I know the points that are pointing to that point(c,d)?
ax.quiver(x_pos, y_pos, x_direct, y_direct)
For this code, how can I know if this arrow is directing to that point (c,d)? or to something else
Related
I need to draw additional graphics on top of plotly go.Box traces, therefore I need to know X and Y coordinates for boxplot rectangle vertices. So far the only solution I came up with is basically recalculating everything (quartiles; X positions based on boxgap, boxgroupgap, etc.), then manually setting the y-axis range to know where everything will end up on the plot. This seems very cumbersome.
Is there a way in python to get the coordinates of go.Box boxplot elements, especially the grouped boxplots with categorical x-axis? As far as I understand these coordinates are calculated in JS frontend -- maybe there is some trick to get them back with Dash using callbacks?
I'm building a dashboard using Dash in Python . My requirement is to plot a Scatter plot with values and move those values manually up and down which will perform a call back based on the new value the dot is moved inside the scatter plot.
My question is there a way to move the dots inside the scatter plot ? I read through internet and I was not able to find any solution . However I can see hovering/clicking the dots that does a call back but was not moved. Can anyone help me with this question.
Thanks,
Prathap
I have added a secondary x-axis to my plot. The aim is just to provide another snippet of information to the data shown by the primary x and y axes. As you can see from the attached image, I have used twiny() command to share the y-axis and get_shared_x_axes().join(ax1,ax2) to align the secondary axis with the primary x-axis.
However, this results in plotting duplicate data. What I really need is in fact for the rectangular markers to provide another scale of information given by the circular markers in the attached image. Matplotlib examples handle this situation by writing a function for instance to convert Celsius degrees to Fahrenheit. In my case, there is no apparent relationship, just scatter data points. Could you please point me towards to the right direction? Many thanks!
I want to plot boxplots on top of the scattered points like this.
I know I have to bin the data into intervals first but I couldn't find the function that does all of this. Sample x and y data are saved here as .npy.
I would look into using matplotlib. Boxes can be drawn as such:
https://matplotlib.org/gallery/pyplots/boxplot_demo_pyplot.html?highlight=boxplot
and scatter plots can also be drawn as such: https://matplotlib.org/gallery/lines_bars_and_markers/scatter_demo2.html?highlight=scatter
There is a search functionality on their site, along with plenty of documentation on how to utilize their library.
As for your specific question, you can specify zorder when drawing many of the things in matplotlib, and you could use that to define your boxplots to be on top. I believe if no zorder is defined that it draws items in the order they are encountered in your program (so you could draw scatter plots and then box plots and they should appear correctly as in your diagram above!
Here is an example, i want to know if this is possible in matplotlib with wxpython
Basically there are coloured parts around the side of the graph which correspond to points on the graph, and when you click on either the blue or the red part it highlights the points on the graph that are related to it
If there is anyway of doing this are there any examples online, or if anyone has done anything similar could they please help to put me on the right track
I am wanting to use wxpthon and matplotlib to create this
Thanks in advance
Dave