Plots.jl: backends/gr.jl needs :match_dimensions added

Created on 25 Aug 2018  路  12Comments  路  Source: JuliaPlots/Plots.jl

As discussed in #273 and #196, the option transpose=true should help those of us who like f(x,y) not f(y,x). (I work with a lot of 3D images and strongly prefer f(x,y,z) to f(y,x,z)...)
However, the transpose=true option currently throws a warning with the GR backend:
Warning: Keyword argument match_dimensions not supported with Plots.GRBackend

It can be fixed simply by adding the keyword :match_dimensions to backends/gr.jl in the long list of supported keywords there.

Here's a MWE that generates the warning:
using Plots # uses gr() by default
x=-10:10; y=-3:3; f=x.^2 .+ 0*y'
heatmap(x, y, f, transpose=true)

I'm using Plots v0.19.3 with Julia 0.7.0

Most helpful comment

Thanks for merging in my little change, and thanks for the instructions on how to do this more smoothly next time!

All 12 comments

Absolutely. In the mood for a quick PR? :-p

Sure. It wasn't so quick because it's my first PR (!) so hopefully I did it correctly...
The CI tests failed it seems but the failures didn't seem related to my tiny modification...

Yay! welcome to the wonderful world of collaborative open source development!
Do you know how to rebase your PR on current master?

I did my one-line edit and PR in the browser. The rebase instructions seem to be for someone who has a local copy of the repo on their host:
https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request
Is there a way to rebase a PR on the website in the browser?
Maybe it would be easier to make my one-line change as a new PR on the current master?

Are you talking about #1696 ? Why would this need to be rebased, @mkborregaard ?

Ah, sorry, I thought the tests could just be run again against current master. Apparently I was wrong.

Yes, exactly, it was just to run the tests. But I think it's fine. Thank you @JeffFessler !

@JeffFessler, honestly I don't know how to do this in the browser. To do this locally, you can open julia and run

(v1.0) pkg> dev Plots

this clones the current master of Plots in your julia dev directory. Head over to this directory and add your fork as a remote:

julia> cd(joinpath(homedir(), ".julia", "dev", "Plots"))
shell> git remote add forked [email protected]:JeffFessler/Plots.jl.git

Fetch origin and your fork and checkout the branch you want to rebase:

shell> git fetch origin
shell> git fetch forked
shell> git checkout patch-1

Now rebase and push with

shell> git rebase origin/master
shell> git push -f forked patch-1

... apparently I was too slow, but maybe this helps for the future.

I don't know any of that, I just click and drag in GitKraken :-)

skaermbillede 2018-08-26 kl 23 04 43

(no you weren't too slow, @daschw I just thought it was a bit much of me to ask for a small change)

Thanks for merging in my little change, and thanks for the instructions on how to do this more smoothly next time!

Here's another neat trick for next time ;-) : if you end the title of your PR with the words "fixes #1694" , the issue will automatically close when the PR is merged.

That feels rather like magic

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kleinschmidt picture kleinschmidt  路  3Comments

apalugniok picture apalugniok  路  3Comments

daschw picture daschw  路  3Comments

nebuta picture nebuta  路  3Comments

crstnbr picture crstnbr  路  3Comments