JuliaPy / JuliaPy/PyPlot.jl

Accept both row and column vectors in plot()

Offen
#101 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Julia
Sterne
488
Forks
90
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

It would be nice if the `plot()` command could accept row vectors as well as column vectors. As it is now, this code doesn't work:

```
julia> x = [1 2 3 4];
julia> y = [2 3 5 8];
julia> plot(x,y)
```

The reason is that Matplotlib is finicky about accepting row vectors vs column vectors. This is a needless limitation in Matplotlib that prevents some simple examples from working correctly. To get around this limitation, PyPlot could/should transpose the vectors as needed before giving them to Matplotlib. It is an easy fix that would make the PyPlot more useful.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start at the plot() entry point and trace how Julia vectors are passed to Matplotlib. Reproduce the row-vector example from the issue, compare it with column vectors, and consider the behavior complete when both forms plot correctly without requiring callers to transpose them.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
julia, python
Bereich
data-visualization
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

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