e2b-dev / e2b-dev/code-interpreter

Inconsistent Elements Data in Charts When All Values Are Equal

オープン
#104 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

@mishushakov がすでに取り組んでいます。

2025年5月19日 から。

bug Code Interpreter
主要言語
Python
スター
2.4k
フォーク
228
平均マージ
48分
マージ済み PR(30日)
5

説明

I encountered an issue when generating a bar chart using the provided code. When all the values in the incident_counts list are equal, the elements data in the resulting chart object is incorrect. Specifically, the label and value attributes of the elements are not as expected. The value is always fixed at 0.8, which does not match the actual data.
Steps to Reproduce:
Run the following code to generate a bar chart:
Python
复制
import matplotlib.pyplot as plt

Data for the supplier locations and incident counts

supplier_locations = [
"aa",
"bb",
"cc",
"dd",
"ee",
"44"]

incident_counts = [2, 2, 2, 2,2,2]

Create a bar chart

plt.figure(figsize=(10, 6))
plt.plot(supplier_locations, incident_counts, color='blue')
plt.xlabel('Supplier Location ID')
plt.ylabel('Incident Count')
plt.title('Incident Counts by Supplier Location')
plt.xticks(rotation=45, ha="right")
plt.tight_layout()

Store the result for testing or further analysis

result = plt.gcf()
Inspect the elements data of the chart object. You will notice that the label and value attributes are incorrect. The value is always 0.8, regardless of the actual data.
Expected Behavior:
When all the values in the incident_counts list are equal, the elements data in the chart object should still accurately reflect the actual data. The label should correspond to the supplier locations, and the value should match the incident counts.
Actual Behavior:
The elements data is incorrect. The label and value attributes are not as expected. The value is always fixed at 0.8.
Additional Information:
This issue only occurs when all the values in the incident_counts list are equal.
When the values are not all equal, the elements data is correct.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。