ef

sdff
 avatar
unknown
abap
2 years ago
1.2 kB
7
Indexable
import matplotlib.pyplot as plt
import numpy as np

# Data for the six plant species
species = ["Jade", "Indian Hawthorn", "Lantana", "Tabacco", "Purslane", "Ivy"]
rwc_values = [51, 79, 66.7, 80, 63.6, 66.66]  # Replace with your RWC values
rwc_error = [5.3, 9.2, 35, 4.12, 9.1, 13]  # Replace with your RWC standard deviation values
succulence_values = [0.44, 0.15, 0.01, 0.026, 0.05, 0.02]  # Replace with your succulence values
succulence_error = [0.07, 0.02, 0.01, 0.00, 0.01, 0.01]  # Replace with your succulence standard deviation values

# Create subplots for RWC and succulence
fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(10, 8))

# Bar graph for RWC
ax1.bar(species, rwc_values, yerr=rwc_error, capsize=5, color='skyblue', label='RWC (%)')
ax1.set_ylabel('RWC (%)')
ax1.set_title('Relative Water Content (RWC) for Six Plant Species')
ax1.set_ylim(0, 100)
ax1.legend()

# Bar graph for succulence
ax2.bar(species, succulence_values, yerr=succulence_error, capsize=5, color='lightcoral', label='Succulence (mm)')
ax2.set_ylabel('Succulence (mm)')
ax2.set_title('Succulence for Six Plant Species')
ax2.legend()

# Adjust layout for better visibility
plt.tight_layout()

# Show the plot
plt.show()
Editor is loading...