ahmed
ahmed

Reputation: 45

ValueError: 'box_aspect' and 'fig_aspect' must be positive

I'm trying to load and display my area of interest from a GEOJSON file . My code is bellow

country = gpd.read_file(os.path.join('C:/area.geojson'))
country_shape = country.geometry.values[-1]
country.plot()
plt.axis('off');

I get this error

ValueError: 'box_aspect' and 'fig_aspect' must be positive

Any help please !

Upvotes: 3

Views: 1685

Answers (1)

Juliette Vl
Juliette Vl

Reputation: 46

I had a similar issue and found the answer here. Try:

country.plot(aspect=1)

Upvotes: 3

Related Questions