Skip to content
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

fix: building completeness figure #410

Merged
merged 1 commit into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- Substitute Simple Report with a Report named Minimal for testing purposes ([#342] [#385])
- Add a minimal Indicator for testing purposes ([#383])
- Remove database scripts ([#392])
- fix: building completeness figure ([#410])

### How to Upgrade

Expand Down Expand Up @@ -65,6 +66,7 @@
[#392]: https://github.com/GIScience/ohsome-quality-analyst/pull/392
[#396]: https://github.com/GIScience/ohsome-quality-analyst/pull/396
[#397]: https://github.com/GIScience/ohsome-quality-analyst/pull/397
[#410]: https://github.com/GIScience/ohsome-quality-analyst/pull/410


## 0.10.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ def create_figure(self) -> None:
ax.yaxis.set_major_formatter(mtick.PercentFormatter(10))
_, _, patches = ax.hist(
[i for i in self.completeness_ratio],
bins=10,
range=(0, 1),
bins=15, # to account for overprediction (>100% completeness)
range=(0, 1.5),
density=True,
weights=self.building_area_prediction,
edgecolor="black",
Expand All @@ -197,7 +197,7 @@ def create_figure(self) -> None:
)
ax.legend(loc="lower center", bbox_to_anchor=(0.5, -0.45))
# has to be executed after "major formatter setting"
plt.xlim(0, 1)
plt.xlim(0, 1.5)
plt.ylim(0, 10)
img_data = StringIO()
plt.savefig(img_data, format="svg", bbox_inches="tight")
Expand Down