Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

plot: The aspect ratio can't be specified

Offen
#443 1 Kommentar 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
go

Rechercherichtung

Das Issue schlägt ein Aspect-Feld für plot.Plot vor; beginne damit, diesen Typ zu finden und nachzuverfolgen, wie die Canvas-Größe derzeit die Skalierung des Plots bestimmt. Überprüfe, dass der Standardwert 0 das bisherige Verhalten beibehält und dass ein positiver Wert das angeforderte Verhältnis für geometrische Formen und 1:1-Linien erzwingt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

What are you trying to do?

I would like to be able to specify the aspect ratio of the plots, for instance to make sure geometric shapes look right and make sure the 1:1 line in scatter plots is at 45 degrees: For example: https://matplotlib.org/gallery/subplots_axes_and_figures/axis_equal_demo.html

I think, in terms of API, this could be accomplished by adding an Aspect field to plot.Plot. With the default 0 value, the aspect ratio would be determined based on the size of the canvas as normal, but if it is set to a positive number (e.g., 1) then the aspect ratio would be forced to that number.

What version of Go and Gonum/plot are you using?

go 1.10
07f44254b21cff40a59809f4c926aa023286107d

Does this issue reproduce with the current master?

yes

Vorherrschende Sprache
Go
Sterne
3k
Forks
202
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus gonum/plot

Alle Issues in gonum/plot

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.