I would like to do this : I have this python code : import numpy as np import pylab as plt a = np.array([1,2,3,4,5,6,7,8,9,10]) b = np.array([7,8,6,3,2,1,5,8,4
I'm using factorplot(kind="bar"). How do I scale the y-axis, for example with log-scale? I tried tinkering with the plots' axes, but that always messed up the b
I need to align a cartopy 2D map subplot with a 1D line subplot, using the following code: import xarray as xr import cartopy.crs as ccrs import matplotlib.pyp
Going through some tutorials on matplotlib animations and encountered this problem. I am using the matplotlib.animation funcanimation as follows: import matplo
I'm trying to create a matplotlib plot with an exponential(?) Y axis like the fake one I've mocked up below. For my data I want to spread the values out as they
If you have a Colormap cmap, for example: cmap = matplotlib.cm.get_cmap('Spectral') How can you get a particular colour out of it between 0 and 1, where 0 is t
I run the following code in PyCharm 3.4.1, and it highlighted %matplotlib inline showing syntax error, and I delete the first line, and run, I expect it will pr
I want to plot the output of this simple neural network: model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']) history = model.fit
I would like to use matplotlib to plot an x,y graph. To do this, I downloaded "matplotlibcpp.h" from github : https://github.com/lava/matplotlib-cpp However, in
I want to connect box plot means. I can do the basic part but cannot connect box plot means and box plots offset from x axis. similar post but not connecting me
I know, for those who know Python well piece of cake a question. I have an excel file and it looks like this: 1 7 5 8 2 4 6 3 1 7 4 6 8
I know, for those who know Python well piece of cake a question. I have an excel file and it looks like this: 1 7 5 8 2 4 6 3 1 7 4 6 8
whenever I try to import matplotlib or matplotlib.pyplot in VS Code I get the error in the title: Import "matplotlib" could not be resolved from source Pylance(
I have created a figure in matplotlib which contains three subplots, one in the top left quadrant, one in the top right quadrant, and one in the bottom right qu
I have a dataframe with two values x1 and x2, each of these points has a class label. import numpy as np import pandas as pd import matplotlib.pyplot as plt
I am trying to draw a 3D plot using matplotlib for my below code, but in the plot wireframe is not displayed over the surface. I thought it might be a problem w
This link has R code to replicate ggplot's colours: Plotting family of functions with qplot without duplicating data I have had a go at replicating the code in
I solved my own question after a long and failed search, so I'm posting the question here and the answer immediately below. The goal: plot percentages but annot
Take the following seaborn boxplot for example, from https://stanford.edu/~mwaskom/software/seaborn/examples/horizontal_boxplot.html import numpy as np import
How can I label each boxplot in a seaborn plot with the median value? E.g. import seaborn as sns sns.set_style("whitegrid") tips = sns.load_dataset("tips") ax