Code Monkey home page Code Monkey logo

Comments (8)

vsimko avatar vsimko commented on June 13, 2024

Could you come up with a minimal reproducible example ?

from corrplot.

FabianRoger avatar FabianRoger commented on June 13, 2024

sure!

M <- matrix(rnorm(70), ncol = 7)
corrplot(M, is.corr = F)

here the matrix is 10 x 7. I would like to get a plot with an aspect ratio 1:1 (for the main plot, not talking about labels and legends) and hence with the single panels having an aspect ration of 0.7:1.

from corrplot.

vsimko avatar vsimko commented on June 13, 2024

Would this be the desired output?

M <- matrix(rnorm(70), ncol = 7)
M2 <- matrix(0, nrow=10, ncol=10)
M2[,1:7] <- M
corrplot(M2, is.corr = F)

image

from corrplot.

FabianRoger avatar FabianRoger commented on June 13, 2024

Depends on what you mean. Yes, it is the desired output in the sense as here the core plot has an aspect ratio of 1:1, but no, I rather would not achieve this by adding empty columns.

I would like to get something were the small squares were not quadratic but rectangular so that the main plot would be quadratic. I used to produce a custom graphic that looked like this:

rplot02

However I'd rather use corrplot as it looks nicer and requires much less code (on my side of things)

from corrplot.

vsimko avatar vsimko commented on June 13, 2024

I now understand. Do you also want the circles to be ellipses or circles centered inside the rectangles?

from corrplot.

vsimko avatar vsimko commented on June 13, 2024

In my fork, I've added a new parameter win.asp which controls the aspect ratio of the plotted matrix.
(now it only works for "circle" and "square" methods when win.asp != 1)

If @taiyun is ok with this, I can merge it into the main branch.
Example:

M <- matrix(rnorm(70), ncol = 7)
corrplot(M, is.corr = F, win.asp = .7)

image

from corrplot.

FabianRoger avatar FabianRoger commented on June 13, 2024

great! that's exactly what I was looking for!

from corrplot.

vsimko avatar vsimko commented on June 13, 2024

merged to master

from corrplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.