Skip to content

Conversation

BestLocation
Copy link
Collaborator

@BestLocation BestLocation commented Sep 28, 2025

This pull request updates the ScatterPlot class in MatPlus/ScatterPlot.py to add support for specifying plot height and made width do something, improving the flexibility and accuracy of plot sizing. The changes ensure that both plot width and height are configurable and correctly used throughout the plotting logic.

Enhancements to plot sizing:

  • Added a height parameter to the ScatterPlot class docstring and constructor, allowing users to specify the plot's height. (MatPlus/ScatterPlot.py) [1] [2]
  • Stored the new height parameter as an instance variable in the class initializer. (MatPlus/ScatterPlot.py)

Updates to plotting logic:

  • Updated the plot method to use both width and height for the figure size by passing them to plt.subplots(figsize=(self.width, self.height)). (MatPlus/ScatterPlot.py)
  • Modified marker size calculations in the plot method to use both width and height, ensuring correct scaling for variable aspect ratios. (MatPlus/ScatterPlot.py) [1] [2]

Description by Korbit AI

What change is being made?

Add a new height parameter to ScatterPlot to customize the figure's vertical size and use it when creating the plot.

Why are these changes being made?

To give users control over the aspect ratio of scatter plots and ensure sizing logic accounts for the new height; an updated example notebook demonstrates using width and height together.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Documentation Incomplete height parameter documentation ▹ view ✅ Fix detected
Files scanned
File Path Reviewed
MatPlus/ScatterPlot.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@liamjdavis
Copy link
Collaborator

Addresses #34

Copy link
Collaborator

@liamjdavis liamjdavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@liamjdavis liamjdavis merged commit fd42a71 into main Sep 28, 2025
12 checks passed
@liamjdavis liamjdavis deleted the scatterplot-size branch September 28, 2025 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants