Giter Site home page Giter Site logo

Comments (2)

dajtmullaj avatar dajtmullaj commented on July 22, 2024

Hi @XuanZhoudiffer,
The figure that comes out of visualize_plot() is a matplotlib.axes.Axes. You can therefore update its values by changing the axis attributes!

  1. For the background for example you can change the facecolor attribute:
ax = plotter_object.visualize_plot()
ax.set_facecolor('white')  # Add your desired color here
ax.figure.savefig(fname='plot.png')
  1. For the dot sizes you can modify the collection of the plot size:
ax = plotter_object.visualize_plot()
ax.collections[0].set_sizes([300])  # Add your size here instead of 300
ax.figure.savefig(fname='plot.png')

from chemplot.

dajtmullaj avatar dajtmullaj commented on July 22, 2024

These manipulations require some knowledge of the Axis attributes of matplotlib. I am leaving the issue open as to make it easier we will add the possibility to pass kwargs used by matplotlib.axes.Axes.scatter(), over which the scatter version of visualize_plot() is built on top, directly to visualize_plot(). This way you won't have to manipulate the figure after it is created.

from chemplot.

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.