Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

single colorbox legend in imagesc multiplot #26

Open
thelinuxmaniac opened this issue Apr 14, 2016 · 0 comments
Open

single colorbox legend in imagesc multiplot #26

thelinuxmaniac opened this issue Apr 14, 2016 · 0 comments

Comments

@thelinuxmaniac
Copy link

Hi all,
I wish to create a imagesc multiplot with a common colorbox legend for all subplots. I know how to include a multiplot with colorbox for each subplot (as shown in the image below and the corresponding lua code attached below).
imagesc_multiplot

I would like to have a single colorbox legend with range [-1,+1] and the color of x1 and x2 updated according to this common colorbox legend. Any advice would be greatly appreciated.

require 'gnuplot'

x1 = torch.rand(100,100)
x2 = torch.rand(100,100)*2
x2:add(-1)

gnuplot.raw('unset xtics')
gnuplot.raw('unset ytics')
gnuplot.raw("set multiplot layout 1,2")

-- first subplot
gnuplot.raw("set title 'x1'")
gnuplot.imagesc(x1, 'color')

-- second subplot
gnuplot.raw("set title 'x2'")
gnuplot.imagesc(x2, 'color')

gnuplot.raw('unset multiplot')
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

No branches or pull requests

1 participant