Git Product home page Git Product logo

Comments (11)

tbreloff avatar tbreloff commented on August 10, 2024

Here's another good one that should probably be a recipe:

tmp

from plots.jl.

joshday avatar joshday commented on August 10, 2024

👍 This is great. Colors based on correlations are a nice touch! Could Plots just have this as a function scatterplotmatrix(x)?

from plots.jl.

tbreloff avatar tbreloff commented on August 10, 2024

Yeah that's probably reasonable too... although it would be really cool to implement it as a recipe attached to the OnlineStats.CovarianceMatrix. We could do things like add an update! function to the recipe which could add data points to the scatters and adjust the colors on the fly as new data is added to the model. That's harder if it's just sitting as a standalone (static) method within Plots. Just brainstorming here...

from plots.jl.

joshday avatar joshday commented on August 10, 2024

I like the updating idea. Maybe OnlineStats could have an update_plot! function similar to update_get!?

from plots.jl.

tbreloff avatar tbreloff commented on August 10, 2024

I tightened up the layout and removed the inner tick labels... much nicer I think:

tmp

from plots.jl.

tbreloff avatar tbreloff commented on August 10, 2024

This works on dev now:

using Plots, OnlineStats
gadfly()
default(size=(800,800),leg=false)

n = 1000
x = randn(n)
y = 2randn(n) + 0.5x
z = 0.2randn(n) + 0.5x - 0.1y
v = -x

M = [x y z v]
C = cor(CovarianceMatrix(M))

corrplot(M, C, colors=[colorant"red", colorant"black", colorant"green"])

from plots.jl.

Evizero avatar Evizero commented on August 10, 2024

This is really cool! If you allow me a remark then it would be to reduce the overplotting a bit. The circles seem to be suboptimal for this type of plot.

from plots.jl.

tbreloff avatar tbreloff commented on August 10, 2024

See: JuliaML/MLPlots.jl#2

from plots.jl.

tbreloff avatar tbreloff commented on August 10, 2024

See: JuliaML/MLPlots.jl#5

I'm experimenting with a method Plots._apply_recipe which would get called within plot! and subplot!, and allow for implementing arbitrary recipes which can be called like:

plot(mycustomtype, otherargs...; kwargs...)

This may make PlotRecipes obsolete...

from plots.jl.

Evizero avatar Evizero commented on August 10, 2024

The purpose of recipes always appeared to me to be reusable small building blocks for things that you don't usually plot on their own. The ellipse seems like a good example. One rarely wants to plot just an ellipse, but there may be reasons (such as PCA) to include one in the plot

from plots.jl.

tbreloff avatar tbreloff commented on August 10, 2024

I agree... had the same thought after I posted. However, it probably makes more sense to bypass the PlotRecipe type and just create a new standalone type:

type EllipseRecipe
  ...
end

function Plots._apply_recipe(d::Dict, ellipse::EllipseRecipe; kw...)
  # update d
  # return (x,y)
end

I could keep PlotRecipe around just for informational purposes, but no real dispatch use.

from plots.jl.

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.