-
Notifications
You must be signed in to change notification settings - Fork 36
VBA - retain unlabeled axis plotting behavior #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -51,6 +51,7 @@ def vba_choropleth( | |||||
| legend=False, | ||||||
| legend_kwargs=None, | ||||||
| min_alpha=0.2, | ||||||
| axis_labels=False, | ||||||
| ): | ||||||
| """Generate Value by Alpha Choropleth plots. | ||||||
|
|
||||||
|
|
@@ -91,13 +92,17 @@ def vba_choropleth( | |||||
| Keyword arguments for the legend. | ||||||
| min_alpha : float = 0.2 | ||||||
| Minimum alpha threshold to prevent fully transparent masking. | ||||||
| axis_labels : bool = False | ||||||
| Remove CRS unit axis labels from the returned ``ax``. This retains default | ||||||
| behavior in ``mapclassify`` and only has an affect when ``geopandas>v1.1.3`` | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There might be 1.1.4 which will not contain new plotting. |
||||||
| is installed. | ||||||
|
|
||||||
| Returns | ||||||
| ------- | ||||||
| fig : matplotlip Figure instance | ||||||
| Figure of Value by Alpha choropleth | ||||||
| Figure of Value by Alpha choropleth. | ||||||
| ax : matplotlib Axes instance | ||||||
| Axes in which the figure is plotted | ||||||
| Axes in which the figure is plotted. | ||||||
|
|
||||||
| Examples | ||||||
| -------- | ||||||
|
|
@@ -206,6 +211,10 @@ def vba_choropleth( | |||||
| ) | ||||||
| gdf.plot(color=rgba, ax=ax) | ||||||
|
|
||||||
| if not axis_labels: | ||||||
| ax.set_xlabel("") | ||||||
| ax.set_ylabel("") | ||||||
|
Comment on lines
+214
to
+216
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, if this is going to be solved on geopandas side, we would just want to pass the keyword. |
||||||
|
|
||||||
| if legend: | ||||||
| left, bottom, width, height = [0, 0.5, 0.2, 0.2] | ||||||
| ax2 = fig.add_axes([left, bottom, width, height]) | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we wait until this is resolved in geopandas? If we're adding a keyword there, we will want it to be the same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, absolutely. I will convert to draft. I was under the impression that there would probably not be a keyword added upstream.