Skip to content
IT Nursery
  • Home
  • Programming
    • Mac / IOS
    • Android
    • Web Applications
    • PHP
    • Java
    • C
    • C++
  • DataBase
    • MySQL
  • CMS
    • WordPress
  • System and Network
    • Serverfault

matplotlib

Error when updating conda packages: RemoveError: ‘setuptools’ is a dependency of conda

by IT Nursery

I think this issue in github may be related. This response mentions doing an update of conda using the force flag, which seemed … Read more

Tags anaconda, linux, matplotlib, python

Scatter plot with different text at each data point

by IT Nursery

I’m not aware of any plotting method which takes arrays or lists but you could use annotate() while iterating over the values in … Read more

Tags annotate, matplotlib, python, scatter-plot, text

How to add a title to each subplot

by IT Nursery

ax.title.set_text(‘My Plot Title’) seems to work too. fig = plt.figure() ax1 = fig.add_subplot(221) ax2 = fig.add_subplot(222) ax3 = fig.add_subplot(223) ax4 = fig.add_subplot(224) ax1.title.set_text(‘First … Read more

Tags matplotlib, python, subplot, subtitle

How to draw vertical lines on a given plot

by IT Nursery

The standard way to add vertical lines that will cover your entire plot window without you having to specify their actual height is … Read more

Tags matplotlib, pandas, python, seaborn

How to remove axis, legends, and white padding

by IT Nursery

The axis(‘off’) method resolves one of the problems more succinctly than separately changing each axis and border. It still leaves the white space … Read more

Tags matplotlib, python

Improve subplot size/spacing with many subplots

by IT Nursery

Please review matplotlib: Tight Layout guide and try using matplotlib.pyplot.tight_layout, or matplotlib.figure.Figure.tight_layout As a quick example: import matplotlib.pyplot as plt fig, axes = … Read more

Tags matplotlib, pandas, python, seaborn, subplot

Plot logarithmic axes

by IT Nursery

You can use the Axes.set_yscale method. That allows you to change the scale after the Axes object is created. That would also allow … Read more

Tags logarithm, matplotlib, python, yticks

What does the argument mean in fig.add_subplot(111)?

by IT Nursery

I think this would be best explained by the following picture: To initialize the above, one would type: import matplotlib.pyplot as plt fig … Read more

Tags figure, matplotlib, python, subplot

How to set the y-axis limit

by IT Nursery

Get current axis via plt.gca(), and then set its limits: ax = plt.gca() ax.set_xlim([xmin, xmax]) ax.set_ylim([ymin, ymax])

Tags matplotlib, python

Changing the tick frequency on the x or y axis

by IT Nursery

You could explicitly set where you want to tick marks with plt.xticks: plt.xticks(np.arange(min(x), max(x)+1, 1.0)) For example, import numpy as np import matplotlib.pyplot … Read more

Tags axes, matplotlib, plot, python, xticks
Post navigation
Older posts
Page1 Page2 … Page13 Next →

Recent Posts

  • Advice for improving internal dashboard [closed]
  • grep : ‘+’ special character
  • File location for Syslogs in Centos machine
  • How to collect users’ task completion times?
  • “service {FOO} start” vs. “/etc/init.d/{FOO} start”? [closed]
IT Nursery
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

Important Link

  • About
  • Privacy Policy
  • Contact

IT Nursery

The Goal of ITNursery Engaging the world to foster innovation through aggregate information. Our Question Answer post, blog information, products and tools help developers and technologists in life and at work.

copyright © 2023 All Right Reserved | IT NurSery