You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing the order of what is being rendered may alter the extent being shown in the plot.
Here below is not a way to reproduce the bug because it would be laborious, but it shows an example of what is going on. This code
importmatplotlib.pyplotaspltimportspatialdata_plot# otherwise pre-commits will remove the "unused" import_=spatialdata_plotax=plt.gca()
sdata.pl.render_shapes(element="by_polygons", na_color=(1.0, 0.7, 0.7, 0.5)).pl.show(ax=ax)
sdata.pl.render_shapes(element="by_circles", na_color=(1.0, 0.7, 0.7, 0.5)).pl.show(ax=ax)
sdata.pl.render_shapes(element="values_polygons", color="categorical_in_obs").pl.show(ax=ax)
sdata.pl.render_shapes(element="values_circles", color="categorical_in_obs").pl.show(ax=ax)
sdata.pl.render_points(color="categorical_in_ddf", size=10.0, palette="tab10").pl.show(ax=ax)
# sdata.pl.render_shapes(element="values_circles", color="categorical_in_obs").pl.show(ax=ax) # <- this line is identical to the one 2 lines above!plt.show()
gives this plot:
If we uncomment the last line, we get this plot instead:
If we plot only the line that is commented in the code above, this is shown:
Expected behaviors:
the final extent should not dependent of the order of elements being plot
the expected extent is the screenshots above doesn't fit the actual extent of the data
The text was updated successfully, but these errors were encountered:
Note: I didn't look at the extent code but I saw a few PRs modifying it. If the problem arises because of edges cases of coordinate transformations I am happy to help refactoring the get_extent() code inside SpatialData.
Changing the order of what is being rendered may alter the extent being shown in the plot.
Here below is not a way to reproduce the bug because it would be laborious, but it shows an example of what is going on. This code
gives this plot:
If we uncomment the last line, we get this plot instead:
If we plot only the line that is commented in the code above, this is shown:
Expected behaviors:
The text was updated successfully, but these errors were encountered: