Questions tagged [axis]

This tag should be used for questions about editing a plot axis, from any plotting library (e.g. matplotlib, ggplot, pandas, bokeh, plotly, etc.). Don't use this tag to refer to Apache Axis. Use [apache-axis] instead; see: https://meta.stackoverflow.com/q/276302/

axis
Filter by
Sorted by
Tagged with
1 vote
2 answers
66 views

Gnuplot: x axis scale for 1-column data spaced every two seconds

I have 1 column of data: plot "memory.log" w lp notitle pt -1 lw 1 Time spacing between records is 2 seconds. How can I plot it in [hours] scale insteadt of [2 seconds] scale on x axis?
Aleksander's user avatar
0 votes
1 answer
54 views

Matlab figure: Replace xaxis with custom labels

I have a figure and would like to replace the x axis of the plot to a custom one. So now there are the values from 0 to 300 on the x axis, but I need it to show the values from 1 to 10 in a equal ...
Diodendomme's user avatar
0 votes
0 answers
57 views

Creating a time axis in pyqtgraph

enter image description herehere is my code y_value = self.data[header] self.plot_widget.plot(x=x_time, y=y_value, pen=self.color_dict[header], name=header) axis = pg.DateAxisItem(orientation='bottom')...
Дмитрий Георгиев's user avatar
0 votes
0 answers
30 views

Controlling y axis labels in a ggplot object for a time variable

I'm attempting to plot a categorical variable on the x axis and a time on the y axis. I also have a categorical variable called run used to set line colour. I have a time object created using the hms ...
E. Rei's user avatar
  • 135
1 vote
3 answers
52 views

Is there a way to eliminate the bold lines on the x and y axes of this R line plot?

I am plotting very basic data from a .CSV in Posit Cloud. The plot itself looks how I want it to, but the x and y axes both have a bit of bolding along the middle of the axis lines, and I would like ...
Haydn C's user avatar
  • 13
0 votes
1 answer
30 views

Gap between axis and first data point; scale_x_discrete doesn't fix, already factored [duplicate]

My graph has a data-point-sized gap before and after the trend line. I already factored the data to include only the days that I want- the days are put in as character data to prevent it from using ...
hank00000's user avatar
1 vote
1 answer
57 views

Why do xticks and xtick labels disappear when using plt.subplots_adjust?

I want to produce a simple 2x2 set of plots using matplotlib, where the space between the subplots is removed; the xtick and ytick labels are present on the bottom of the bottom plots and on the left ...
ProfRob's user avatar
  • 113
4 votes
1 answer
238 views

Is there a way of getting the inset axes by "asking" the axes it is embedded in?

I have several subplots, axs, some of them with embedded inset axes. I would like to get the data plotted in the insets by iterating over the main axes. Let's consider this minimal reproducible ...
alpelito7's user avatar
  • 449
0 votes
1 answer
89 views

Align axes of imshow with axes of graph in the picture

I would like to plot on top of a picture of a graph from a paper. I plot the picture with a simple imshow: import matplotlib.pyplot as plt import matplotlib.image as mpimg img = mpimg.imread('...
theWrongAlice's user avatar
0 votes
0 answers
34 views

Labels for nested grouping variables

Instead of having the labels for each treatment on the legend, I would like them placed on the x-axis under each bar instead. This is my code which I am quite happy with: fillggp <- ggplot(...
Rylee Swiderek's user avatar
0 votes
0 answers
113 views

Set position of the y axis to the right side with Chart js

Im working with chartjs ^4.3.2 and react-chartjs-2 currently generating a Line chart. I need to set the y axis to position right (right side of the chart, because it is initialy on the left side). I ...
TEISSIER Nathan's user avatar
1 vote
0 answers
61 views

How to add a colorbar to a figure that already has multiple axes objects

I am trying to add a colorbar and cannot figure out how to add it anywhere. Ideally it would be a small ax object added to the right of the right-most ax but I can't figure out how to add ax objects ...
O.rka's user avatar
  • 30.7k
1 vote
2 answers
99 views

Can We create a Xpath with multiple contain() Function and a xpath axes

For a curiosity I tried to create an xpath of orangehrm website leave portal and I have tried to make an xpath with 2 contains and xpath axes //*[contains(@class,'oxd-main-menu-item active') and ...
Akash's user avatar
  • 11
0 votes
2 answers
107 views

ggplot add date labels to x axis whilst using numeric x values

I would like to reproduce the following plot, but I would like to add date labels every 4 months instead of numeric. I had to convert the date_time values to numeric in order to plot the annotate(&...
mrob27's user avatar
  • 61
1 vote
1 answer
50 views

Zingchart single curve, double y-axis on left and right

I'm using zingchart do draw a line. I would like to have a line chart with two y-axix with same values (like duplicated axis) one on left side and one on right side, to make a easy graph read. I'm ...
makksi's user avatar
  • 11
0 votes
1 answer
64 views

Constant axes/spine border size for multiple plots

In Python Matplotlib, I would need give advice how to keep exactly same axes/spine border size for multiple plots. Independent of how many digits the axis contains. Generated plots: Code bellow shows ...
Radim Habartík's user avatar
2 votes
1 answer
230 views

Boxplot in log scale (how do I keep the original values on y-axis?)

I'd like some help with R. I have a dataset represented as a matrix with 40 rows and 12 columns. I need the boxplot of these data in logarithmic scale. I use the following command: boxplot(log(data[,2:...
Vicky's user avatar
  • 23
0 votes
0 answers
25 views

How do I correct the python code below so that the labels are displaying correctly?

I'm having problems with the following code snippet whereby the labels on the x-axis are not displaying correctly (please see image at end of post). ax = axs[i] ax.plot(data.X_displacement, data....
Knit1Purl1's user avatar
0 votes
2 answers
66 views

How to rescale axes with pcolormesh

I am plotting a graph using pcolormesh: fig, ax = plt.subplots() ax.pcolormesh(Omega_re, Omega_im, brightness, cmap="gray", shading="gouraud") ax.set_xlabel(r"$Re(\omega)$&...
Projetos Programação's user avatar
0 votes
0 answers
20 views

How do I define a secondary y-axis with variable relation to the primary y-axis?

I want to define a secondary y-axis where the scale is variable and a function of an input array (that is relative to the primary y-axis): def my_func(x): print(x) if x.any() < 4.0: ...
Py-ser's user avatar
  • 1,950
1 vote
1 answer
54 views

How to fill incomplete axis lines in chord diagram?

In the migration example dataset with code provided at [https://www.data-to-viz.com/graph/chord.html], why in some objects, axis line does not extends beyond max values. For example, in South East ...
gnuser23's user avatar
0 votes
1 answer
75 views

How to scale y-axis on a seaborn heatmap to span across the entire chart?

I'm trying to reduce the number of y-ticks on a seaborn heatmap and relabel them, but I can't seem to make the y-ticks span the entire heatmap. num_yticks = int(num_freqs/2) yticks = np.arange(...
Dan's user avatar
  • 1
0 votes
0 answers
78 views

Convert Y-axis to Z-axis for export from Unity to 3ds max

I need to convert animation from Unity to 3ds max, but there are different coordinate systems. I wrote a method. Where I made a mistake? Please help public static Quaternion ConvertRotation(Vector3 ...
AndrewMulti's user avatar
0 votes
0 answers
9 views

Script to automatically assign max/min right Vaxis values from cells

I have successfully added a script to assign vaxis max and min values from cells in my sheet. However, I need to do the same with the RIGHT vaxis. (the current script assigns to the left). How can ...
ashpash's user avatar
0 votes
1 answer
53 views

What is the sense for axis when splitting array?

I can't understand sense of axis parameter. I will explain the problem. code: np.split(b1,[1,3],axis=0) results: [array([[1, 2, 3, 4]]), array([[ 5, 6, 7, 8], [ 9, 10, 11, 12]]), array([[...
Necip Arda's user avatar
1 vote
1 answer
268 views

Pan x axis only, zoom still allowed for y axis

After looking around I can't seem to find a way to disable dragging of y axis in pan mode, while also allowing to zoom both axes. Anyone figured this one out yet ? The data is positional positive ...
Roler's user avatar
  • 33
0 votes
0 answers
15 views

x-axis misalignment for subplots with groupby plots and stacked bar plots

This is what I getThis is what I want My subplots on the right are just stacked bar charts but on the left the data has been grouped and this sorting seems to affect the bins on the x-axis. I can set ...
Kate Crawford's user avatar
1 vote
1 answer
119 views

Ensuring constant figure size when using matplotlib colorbar

I'm creating multiple plots with a colorbar in matplotlib, saving them in tight layout. I noticed that the size of the figures and the size of the axes differ for each image because the colorbar takes ...
Thomas Wagenaar's user avatar
2 votes
1 answer
513 views

How to change font size of axis titles in Apex charts?

I have tried changing axis title font size using below code but it does not change font size. const options = { // ... yaxis: { labels: { formatter: function (value) { return &...
Hemanth's user avatar
  • 35
1 vote
0 answers
127 views

Let ChartJS time axis switch to quarters or years

I create line charts with a time-based x-axis. My minimum unit is day. I configure the axis like this (Python syntax): 'scales': { 'x': { 'type': 'time', 'time': { 'round': True, ...
Boris Lau's user avatar
0 votes
0 answers
80 views

ggplot2 Tick Marks on Axis Grid Lines

I am working on a project to create stringlines with GTFS feeds. Given the visual complexity of these plots, I am hoping to simplify their panel grids as much as possible while still making them ...
transitmapper's user avatar
0 votes
0 answers
40 views

Creating 4D Axes - Manim

I'm trying to achieve a way of showing 4d characteristics in manim. I would appreciate any way of showing a 4d axes and moving mobjects in a 4d way without coding the mathematics myself. is there a ...
GoodErnest64's user avatar
0 votes
1 answer
172 views

Creating a 1D axes in a 3D scene - Manim

so I'm trying to create a 1d axes and I'm failing. what I'm trying to achieve is a line with a tip that is numbered correctly and I zoom in the camera so that it shows a 2D view of the axes, and then ...
GoodErnest64's user avatar
0 votes
0 answers
20 views

A colorscale legend in d3 does not show the first Axis label tick

I have a colorscale legend made with d3. My colorscale does not use any data for the legend size itself. It just split the color evenly over. My problem is that the first tick label of the axis is ...
Konrad UIV's user avatar
0 votes
1 answer
341 views

How to create same-side dual y-axis plot in R?

I have four columns of data x, y1, y2, type, where x, y1, y2 are numerical values, and type is a classification identifier. I now want to create a double y-axis scatter plot, the y1 axis is above the ...
RYENFLUSSH's user avatar
0 votes
0 answers
31 views

How to bind secondary x-axis to the first in plotly?

Let's say I have a figure with a secondary x-axis, like this. enter image description here What I want to achieve is that the secondary x-axis is a function of the first one. (Here C to F) One way to ...
Bence Palvolgyi's user avatar
0 votes
0 answers
132 views

How to shift y axis in plotly?

The link above shows a different graph, when plotted, as the example shows on the site. https://plotly.com/python/multiple-axes/#shift-axes-by-a-specific-number-of-pixels Why is this? The shift ...
Bence Palvolgyi's user avatar
0 votes
0 answers
35 views

How can scientific notation be enforced? [duplicate]

When the axis values are have about 5 zeroes in front, Python automatically applies scientific notation on the values and puts at the end of the y-axis the power used (e.g. 1e-6). The issue is that I ...
jefazo92's user avatar
0 votes
1 answer
31 views

ggplot multiples lines with variable scales

I have 2 lines i am trying to plot with a scale difference of ~100, using this code ggplot(TR_midday_avg, aes(x=day)) + geom_line( aes(y=avg_conductance))+ geom_line( aes(y = avg_area_flow)) + ...
DCB's user avatar
  • 33
0 votes
0 answers
126 views

How to create a logarithmic scale for the x and y axis of a heat map with Python

Im having some issues creating a heatmap using plt.imshow() with specific axes that I want to display in a logarithmic scale. I tried different methods, but the image doesn't seem to work when i try ...
IC_S's user avatar
  • 1
0 votes
1 answer
117 views

make distance between all tick marks equal in ggplot2

I have created the following graph: However, I do not like the fact that the tick marks with the numbers 4,12 and 24 look scrunched together. Is there a way for me to make the distance between all ...
Cam's user avatar
  • 449
0 votes
1 answer
88 views

Why isn't imshow displaying correctly when using custom ticks?

I am trying to plot heatmap with average values with x and y axes denote physical parameters. import csv import matplotlib.pyplot as plt from scipy import stats import numpy as np #......................
Parag's user avatar
  • 41
0 votes
1 answer
21 views

Matplotlib axis is shrinking over iteration

I'm trying to perform iterative 3D plots on a given axis. This process will be entailed in a Tkinter application, so I can't simply destroy/create a new figure, I must refresh the axis and colorbar. ...
user12377975's user avatar
0 votes
0 answers
122 views

How do I rotate axis labels on a surface plot? [duplicate]

I tried using the rotation argument, but the labels still aren't vertical fig, ax = plt.subplots(subplot_kw={"projection": "3d"}) # Plot the surface. surf = ax.plot_surface(X, Y, ...
DiesesAlpaka's user avatar
0 votes
0 answers
424 views

How do I set value for dynamic x-axis in power bi report builder bar chart?

Can you help me out with dynamic axis in Power BI report builder? For a report I am building in Power BI report builder, I am creating bar charts and column charts. As you know, charts are dynamic, ...
Christianne Bloem's user avatar
1 vote
0 answers
54 views

How can I prevent the offset multiplier in plot_surface from exceeding figure limits?

I am using matplotlib to created 3d plots using plot_surface but ran into the issue that when scientific notation is needed, the multiplier is offset to the point that it no longer appears in the ...
Cesar Carrasco's user avatar
-1 votes
1 answer
62 views

How to change the format of data in a plot label?

Good afternoon, Have a problem with the first (horizontal, x) axis of a plot. In the data$datum column there is a series of dates from 2020-03-10 until 2023-03-31. Want to show them as a label of the ...
Cappuccino's user avatar
1 vote
3 answers
72 views

Center one or both axis to center the "view" around a specific plot

Let's say the point (10, 50) divides my plot of a 2d coordinate system in four sections: top left, top right bottom left, bottom right This point is fixed and I know its location in advance. Task: ...
Tarquinius's user avatar
  • 1,714
0 votes
1 answer
117 views

In R, how to set up two secondary y-axis with different scales using facet_wrap?

I have below data dataA=structure(list(x = c(0, 10, 20, 30, 40, 50, 0, 10, 20, 30, 40, 50, 0, 10, 20, 30, 40, 50, 0, 10, 20, 30, 40, 50, 0, 10, 20, 30, 40, 50, 0, 10, 20, 30, 40, 50), part = c(&...
Jin.w.Kim's user avatar
  • 840
0 votes
1 answer
21 views

Bar Plot with dates on x-axis issue

I have a bar plot representing data of qty over several months and I used the solution suggested here to add a double x-axis: https://stackoverflow.com/a/75897246/15573456 With bigger dataset, it ...
romina's user avatar
  • 11

1 2
3
4 5
82