362 questions
-2
votes
1
answer
95
views
How to split a Date X-axis into separate nights [closed]
Apologies, I'm very new to all of this.
I have this problem with my X-axis, where it is too overcrowded with dates and times. This can be seen in the graph that I have produced:
Graph produced so far
...
2
votes
4
answers
120
views
x-axis tick are not centered under column
I am plotting some precipitation data by month using geom_col and the ticks and labels don't display correctly under the bars and I can't figure out why. The problem suddenly appeared today, I didn't ...
0
votes
0
answers
9
views
Dimplejs TimeAxis : How to make the label for the first tick also print?
I have a dimplejs plot showing months (1 to 12) on a time axis. (more details in this post)
var x = myLinePlot.addTimeAxis("x", "month");
myLinePlot.draw();
x.shapes.selectAll(&...
1
vote
0
answers
50
views
Extend bbox in heatmap
I have the following heatmap:
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
# Create a sample heatmap
data = np.random.rand(10, 12)
ax = sns.heatmap(data)
# Set ...
2
votes
1
answer
92
views
Plotly R: Filtering Bars by Category Without Showing Extra Categories with buttons
here is my code.
I am trying to create an interactive bar chart with Plotly in R, where buttons allow the user to select either Company 1 or Company 2.
However, when I filter the data using Plotly, ...
0
votes
2
answers
57
views
Current development in how to adjust individual x axis title using ggplot facet_wrap [closed]
I have some difficulties in developing correct labeller function for adding x axis title within a facet_wrap plots. This is the code:
str(R_macro_rev)
tibble [857 × 15] (S3: tbl_df/tbl/...
1
vote
1
answer
67
views
How to transform an x-axis scale both right and left of a density peak to zoom in with R?
Consider the density histogram of the depth variable from the diamonds data.
dat0 <- ggplot2::diamonds %>% select(depth)
gg0 <- ggplot(dat0, aes(x = depth)) +
scale_x_continuous(limits = c(...
0
votes
1
answer
267
views
How to create a break in x axis using coord_cartesian(xlim=..)?
I have an outlier data point I would like to include in my plot. I seem to have different options, including using coord_cartesian(xlim=..) and the ggbreak package. I'm not sure what is wrong with my ...
1
vote
1
answer
40
views
Highcharts drilldown column to pie, axis label issue
I am using Highcharts drilldown feature and change visualization type in each level of drilldown.
I have an issue when I drillup from pie chart to columns type, the xAxis labels disapear (replaced by ...
0
votes
0
answers
86
views
How to create dynamic altair x-axis and not fixed on current values?
My data looks like this:
Name
Date
1%
2%
10%
...
100%
Anne
1/1/24
3
5
1
...
92
Anne
1/2/24
4
8
2
...
78
Anne
1/3/24
7
9
6
...
47
My x axis are the percentages: 1%, 2%, 5%, 10%, 15%, 25%, 50%, and 100%
...
4
votes
1
answer
198
views
How to Set X-axis Limits in plot.adjustedsurv() from the AdjustedSurv Package in R?
I’m using the AdjustedSurv package in R to create adjusted survival curves with the IPTW_cox method. However, I’m running into an issue with setting the x-axis limits for the plot.
This is the code ...
1
vote
1
answer
39
views
ggplot2 in R: mean summary point for subgroups in grids
I have the following chart that combines five variables:
library(ggplot2)
data(mtcars)
ggplot(mtcars, aes(x=mpg , y=disp , color=cyl)) +
geom_point() + facet_grid(vs~am)
which gives me a graph ...
0
votes
1
answer
51
views
Livecharts crashing whenever ScalesYAt != 0
I'm using LiveChartsCore 2.0.0-rc2 together with the .SkiaSharpView and .SkiaSharpView.WinForms (also the same 2.0.0-rc2 version)
I'm trying to create a multiple axis Vertical Axis graph such as
For ...
0
votes
1
answer
54
views
Matplotlib move secondary x axis to specific position
The following MWE
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
# Use latex
import os
os.environ["PATH"] += os.pathsep + '/usr/local/texlive/2024/bin/x86_64-...
1
vote
0
answers
79
views
ChartJS Category Axis for line chart to behave same as bar chart
I have a chart which shows different datasets depending on what has been selected.
Some datasets are line charts and some are bar charts all using the same categories on the x-axis.
Now my problem is ...
1
vote
2
answers
100
views
How do I optimize the position of Y-axis titles and data representation?
How can I in the plotly plot:
a) position the axis titles horizontally above their respective axes?
b) reduce the space between y=0 and the X-axis?
c) draw the green data points for Power before the ...
1
vote
2
answers
70
views
Using greek letters for x-axis labels in ggplot
I want the x-axis labels "beta", "gamma" and "sigma" in the ggplot to be in Greek letters.
library(sensitivity)
library(boot)
library(ggplot2)
library(knitr)
library(...
0
votes
1
answer
33
views
how to make the xAxis dynamic using HighCharts
How make the x-axis dynamic for handling date-time data and zooming. I wanted the x-axis to dynamically display the year, then month and year, and finally date and time based on the zoom level (...
0
votes
0
answers
329
views
Recharts evenly space xAxis ticks
Hi guys as you can se here : SandBox, I am trying to have certain ticks lets say [100,200, 10000,30000, 250000] and i want to display them all but when i display them all the one that have small gap ...
1
vote
1
answer
826
views
How to place a point on x-axis in Python Matplotlib
The code below shows a single point on the graph of a function, which is supposed to be located at y=0:
x = np.linspace(-3, +3, 100)
y = np.exp(-x**2) * (2 + np.sin(2*x) + np.sin(5*x))
fig, ax = plt....
0
votes
1
answer
116
views
X-axis tick values not matching data
I'm a new user of plotly. My plot's x-axis (label/tick) values do not match the data specified for the x axis.
import pandas as pd
import psycopg2 as odb
import plotly.express as px
from urllib.parse ...
0
votes
1
answer
35
views
Setting X-axis labels with faceted plots
I am trying to create a faceted plot, where each group has a different number of data points and different x-axis labels. For each plot, faceted by SID_2, I want the x-axis to be the FULL.STATUS in ...
-1
votes
1
answer
76
views
chart js stacked scale overrides x labels
i built a chart with multiple stacked y scales.
the x axis shows a timeline, logically common to all datasets.
the x values don't overlap, as each dataset has it's own length and values.
most datasets ...
1
vote
1
answer
36
views
X-axis in ggplot2 is showing numeric values in hundreds instead of tens [closed]
I am creating a bar chart in ggplot2, but my x-axis is showing the amount of minutes in hundreds instead of tens.
This is my code.
ggplot(data=daily_sleep_diff, aes(x=TimeToFallAsleep))+geom_bar()
...
0
votes
1
answer
286
views
Different X axes with Plotly's make_subplots
I want to plot two plots with make_subplots with different times.
How should I do that?
fig = make_subplots(rows=2, cols=1,row_heights=[0.5, 0.5], shared_xaxes=True)
fig.add_trace(go.Candlestick(x=...
0
votes
0
answers
198
views
Excel Pivot Chart - Grouping by Days - X Axis Labels
I am setting up a pivotchart that summarises people starting with a service from a particular area. The data being used is:
unique person ID
area
date started
I want to group the days into 7 day ...
0
votes
0
answers
139
views
Having trouble setting x-axis endpoints in proc univariate
My code is as follows:
data mydata;
call streaminit(1234);
do binary = 0 to 1;
do i = 1 to 1000;
var = rand('integer', 0, 150);
output;
end;
end;
...
1
vote
0
answers
104
views
How to implement dynamic datetime zoom-in levels on x-axis when there are 2+ level a-axis React plotly
I'm working on a project where I need to display millions of data points associated with different stages. The requirement is to initially display only the year, then progressively include month, day, ...
0
votes
0
answers
58
views
How to keep original x-axis after utilizing a custom scaling for the geom_rect in ggplot?
I am attempting to make a depth-distribution chart of abundance and biomass. The chart is centered around zero with abundance essentially acting as the 'negative' values and biomass essentially acting ...
1
vote
1
answer
112
views
R ggplot2: Is it possible to remove the zero label after using expand_limits(x = 0)?
The ggplot function expand_limits(x = 0) produces very pleasing spacing for many graphs (in a loop) but I'd rather not have the zero label. Does anyone know how to remove the zero label only ? The ...
0
votes
1
answer
358
views
Image in xAxis Echarts
Change the style of image rendered in xAxisLabel of ECharts
does anyone know how can i style images in xaxis label in ECharts.
I used this example to render image in xAxisLabel richStyleExample
But ...
1
vote
1
answer
692
views
Triangle symbol in R how is it written
I'm very new to r
I'm working on ggplot2, Boxplot to be specific
So my plot have a sample name as character and values as numbers
I'm trying to label the x-axis with my samples name and each name has ...
1
vote
2
answers
145
views
Automatically adjust x axis text to just above or just below y=0 depending on whether bar is positive or negative
What line of code can I add to this plot so that the x-axis labels appear just below height y=0 if the bars are positive, and just above y=0 if the bars are negative?
I have another plot that I need ...
0
votes
1
answer
39
views
Setting default x axis breaks and title using ggplot
I am trying to find a way to set the default x axis breaks at 0, 20, 40, 60, 80 when plotting using ggplot, and automatically name the x axis time [days], without having to specify this in every ...
0
votes
1
answer
52
views
Make graph skip certain amount of x value Python
I am trying to write a code to make Python skip certain x value on a graph without compressing the x values in front of it.
import matplotlib.pyplot as plt
import numpy as np
#de y waarde vragen en ...
0
votes
0
answers
40
views
Is there a function to adjust the breaks of a ggplot that is using time in the format of hh:mm:ss?
I have created a graph in ggplot2 that is using time on the x-axis in the format of hh:mm:ss. The graph is automatically setting the scale breaks at 00:00:00, 10:00:00, and 20:00:00, but I would like ...
0
votes
0
answers
44
views
Plot of confidence limits changes when I change the axis ticks and labels for a polynomial regression
A multiple regression with number of days from start of observations gives me a plot in which the confidence limits are shown for the entire range of x-values of the curve. When I change the ticks and ...
0
votes
1
answer
169
views
Change in x axis display
I have a table with an index representing the trading days for each year, as if they were business days. In my chart, I need the x-axis to display the corresponding months of these days rather than ...
1
vote
1
answer
319
views
How can I add second x axis labels to a bar plot?
I am trying to produce a graph similar to the one below:
graph with two x axis labels, facet wrap and different colours
The format of my data is as follows:Data format
The code that I have been using ...
0
votes
1
answer
302
views
Continuous x-axis ticks with boxplots in Python
I am plotting some distributions using box plots. I then find the median of each distribution, fit them with a second order polynomial and make a prediction at a certain x-axis value. I plot both the ...
1
vote
1
answer
55
views
Formatting xaxis in graphs with secondary yaxis using plotly
I am seeking assistance in changing the color of the x-axis to white in a Plotly graph that includes two y-axes. In the provided code below, my attempt to conceal the x-axis by setting it to white is ...
0
votes
1
answer
583
views
r, ggplot2: Set x axis breaks with a fixed xlim
I have the following data, which produces the following two plots stacked on top of each other:
#dataset 1
channel1 <- c("Channel 1", "Channel 1", "Channel 1", "...
0
votes
1
answer
95
views
Is there a way to group values on the x axis of a ggplot in rstudio
I am making a column plot using ggplot to show percentages of populations with water access in different countries. I pivoted the data to create a column for country, population type, and percentage ...
0
votes
0
answers
48
views
Strange display error with VBA charts - x-values as dates
I'm running this script. The goal is to put two data series into the plot area, which works. Values are random.
Option Explicit
Sub LWAs_Erzeugen()
Dim wb As Workbook: Set wb = ThisWorkbook
Dim ws ...
0
votes
1
answer
50
views
Define x-axis in combined ggplot
I made two separated ggplot geom_points, and I combined them to one figure.
One with the red dots, with the x-axis ordered from the highest percentage to the lowest percentage
One with the blue dots
...
-1
votes
1
answer
279
views
How to prevent xticklabels from being cutoff [duplicate]
is there a way to modify a matplotlib plot to ensure that the x-axis tick labels are fully visible?
I wrote below python code to plot GPA of some students on a diagram but x-axis tick aren't seen.
...
0
votes
1
answer
96
views
How to assign x- axis values in ascending order from 0 to n?
I am trying to plot a temperature course automatically via VBA. Every measure point has a distance of one second to the next one.
I used the code shown below. My problem is that right now the first ...
0
votes
1
answer
681
views
Continuous data on line chart using weeks in Power BI
I am trying to make a single line chart by putting weeks on x-axis and revenue on y-axis. However when add week data on x-axis it is all messed up.
I don't have any option to choose from categorical ...
0
votes
1
answer
42
views
order character values on x axis based on separate values in same df
I have a huge dataset (10k+ rows) that I've visualized as a bubble plot in ggplot2. However, I need to organize both axes. I am very familiar with using factor() and a levels list to order variables, ...
7
votes
1
answer
668
views
Two plot side by side using base R plots, with shared titel and shared x-axis label
I'm trying to plot two plots side by side using base R.
I'd like them to share the title and the x-axis and y-axis label.
However, the range of the plots is different, so I want to keep the number of ...