37,888 questions
0
votes
1
answer
28
views
Setting xlim when the x-value is a factor causes the x-axis to extend beyond the plot window
When I plot my data without explicitly setting the x coordinate range (the fourth and lowest plot in the screenshot, "Sonntag"), par("usr") tells me what range R uses by default:
&...
0
votes
1
answer
24
views
Basemap plots in Matplotlib have cutoff map boundary lines
When trying to create a grid of maps in matplotlib using the Basemap toolkit, I noticed that the line that bounds the map projection is cut off on all four sides.
Look at the following minimal example ...
3
votes
2
answers
68
views
Need specific graphic output of years and percentages
I need help with making a specific graphic output. I have a simple data frame with years in rows and numbers (percentages) in columns with two-letter headers. The graphic result should be something ...
0
votes
0
answers
11
views
MiRT TIF plot three DIMENSIONAL model
In R using the mirt package, how can I generate Test Information Function (TIF) plots for a 3-factor multidimensional polytomous IRT model, both for the whole test and for each subscale (factor)?
0
votes
1
answer
25
views
Why can I not get a continous curve when manually splitting a fitted curve into two parts?
I aim to fit the following function to my data:
def P(t, CP, Pan, tau):
P_val = CP + Pan / (1 + t / tau)
P_val = np.where(t >= 900, P_val - 0.8 * np.log(t / 900), P_val)
return P_val
...
0
votes
2
answers
53
views
Applying same color gradient for three SpatRaster maps with terra::plot in R
I have a SpatRaster created with the terra package in R, and I have two groupings of points within the larger SpatRaster, which I then separate into groups to observe the groupings with more detail. I ...
0
votes
0
answers
21
views
finalfit Interaction Model or_plot
I don't understand why the finalfit library does not allow both the main effect and its interaction to be in the same model for the or_plot function. Below is a fake dataset to show that it works when ...
0
votes
0
answers
28
views
Plotting function in R package eHOF
My species dataset consists of species relative abundances at sites (i.e., percent). I'd like to plot the eHOF model of distributions of species values over an environmental gradient with the y axis ...
0
votes
1
answer
34
views
Grouped box plot using tidyplots
I created a grouped box plot using ggplot2 package and now I want to re-create it using the tidyplots package. The reason is that I created another plot (stacked bar chart) where I used specific ...
1
vote
3
answers
64
views
Maths font for letter (e.g. x) in R ggplot legends
I want to have a plot with a legend displaying x_0, with a font that looks "mathematical" for x (I don't know how to say that otherwise), like 𝒙_0.
When I use expression(x[0]), this is what ...
1
vote
1
answer
79
views
Plot a Torus with Python
I'm new in python and I'm trying to draw a Torus. I want my torus to look like the one here, but my following code doesn't work.
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits....
0
votes
1
answer
24
views
Python Pyx: bar graph y-axis height
I wanna make a bar graph plot in PyX (see here) using the code
from pyx import *
g = graph.graphxy(width=8, x=graph.axis.bar())
g.plot(graph.data.file("minimal.dat", xname=0, y=2), [graph....
4
votes
2
answers
94
views
how to fixed axis_nested in a facet plot?
I'm drawing a plot with annotation of y-axis labels using ggplot2 and ggh4x in R.
how to fixed the position of axis_nested in a facet plot with scales="free_y"
Here is the data:
ggd = data....
1
vote
0
answers
56
views
Triangle shaped edges on colorbar for values greater than and less than a threshold value in R?
I have this R code to produce multipanel plots with NetCDF files that contain monthly values (12 layers per .nc files). This code produces a colourbar as the one showed below, however I would like to ...
1
vote
2
answers
73
views
MATLAB: How to calculate the distance between a plane and a point
I have two bodies in space composed by 3 points.
A = [-50.0098 -181.0869 -37.5881];
B = [ -49.8410 -180.8097 -41.1383];
C = [-49.5887 -180.3952 -46.4462];
A = [-50.199 -180.93 -37.249];
B = [-...