Questions tagged [axes]
Axes - plural of axis
894
questions
1
vote
1answer
153 views
Matlab subplot linkaxes is not lining up the axes as expected
I can't seem to get linkaxes to work (code is below). I am trying to get the subplots to line up, such that visually the x-axis is has the same range and width for both subplots. The misalignment is ...
0
votes
1answer
63 views
Mouse axes are based on position, not movement
Basically, when I have my cursor in the center of the screen, the camera doesn't rotate. Pretty standard. However, If I move my cursor to the left or right, It will start rotating. Still makes sense. ...
3
votes
1answer
323 views
Understanding maplotlib and how to format matplotlib axis with a single digit?
I am having an very hard time getting the ticklabels of a seaborn heatmap to show only single integers (i.e. no floating numbers). I have two lists that form the axes of a data frame that i plot using ...
0
votes
0answers
32 views
Setting axes to semilog with Mayavi 3D plot
I'm sucessfully generating a 3D plot with Mayavi, but can't find any way to rescale the axes to a semilog representation.
Is this possible?
I also tried taking a screenshot (as suggested by ...
1
vote
1answer
57 views
Port Matlab code involving matplotlib setting axes position in pixels
I would need to port this code from matlab to python:
fig;
stringNumber = '0.1'
set(gca,'units','pixels','position',[1 1 145 55],'visible','on')
box('on')
The above code results in the following ...
0
votes
1answer
32 views
Trouble opening .fig files in axes
I am creating a GUI in Matlab's Guide which should display a video and a plot saved in a .fig file. I am currently trying to open the plot in an axes element and while I know axes cannot be a ...
0
votes
2answers
59 views
Is there a way to specify x y and z limits in matplotlib plots in one command instead of 3 separate lines?
I am developing a program that needs to automatically switch from 2D to 3D plots in matplotlib. So I am looking for a way to not have many if statements to decide between 2 and 3d
I have looked at ...
2
votes
0answers
152 views
ValueError: c of shape (7303,) not acceptable as a color sequence for x
I am trying to visualize some data in Axes3D, but I'm getting an error that I don't know how to solve.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sb
from ...
1
vote
0answers
36 views
Annotate segments of correlation matrix plot using a color bar
I want to annotate segments of the x & y axes of a correlation matrix plot in MATLAB using a color bar like in the image shown below:
goal correlation plot
This is the code I have right now:
b =...
0
votes
1answer
59 views
Normalize axes to have squared plot
Consider the following series
lift = {}
lift['correct']=[0.0, 10.0, 18.0, 34.0, 44.0, 58.0, 66.0, 76.0, 84.0, 86.0, 88.0, 92.0, 92.0, 94.0, 98.0, 98.0, 100.0, 100.0, 100.0, 100.0, 100.0]
lift['avg'] =...
0
votes
1answer
33 views
ticks on right side of plot un subplots enviroment
I am trying to get the ticks for my plot on the right side. (The one int he lower right corner) I've tried many of the related topics. eg.
Python Matplotlib Y-Axis ticks on Right Side of Plot
...
1
vote
1answer
320 views
Matplotlib Plot with Finer tick marks but no labels
I am trying to produce a plot where I have customized axis ticks on both x and y axis. But like in a scale, I would like to have the finer tick marks present while the tick markings only on the bigger ...
0
votes
1answer
161 views
Swap axes after plot object created in bokeh
I need to swap the x and y axes of a plot after the plot object has been created with Bokeh. I've tried to do this as follows but get the following javascript error:
Javascript Error: Cannot read ...
2
votes
1answer
2k views
Dual axes for y with Altair
I'm trying to create an interactive plot with dual axes. For example, I want to use two axes for y1 and y2 as they have different magnitude:
import altair as alt
import pandas as pd
import numpy as ...
0
votes
1answer
50 views
Add Dynamic Title to Axes in D3
I'm using the following code:
// Add title to y axis
svg.append("text")
.attr("x", -500)
.attr("y", -100)
.attr("text-anchor", "left")
.attr("transform", "rotate(270)")
.style("font-...
0
votes
0answers
39 views
Matplotlib - x-axis labels issue?
I'm trying to add labels to the x-axis of my graph at certain points, like so:
for i in range(len(chapterPosition)):
plt.axvline(x = chapterPosition[i], label='{}'.format(chapterList[i]),color =...
1
vote
0answers
80 views
Tight subplots that only contain axes labels on the exterior
I want to plot a large number of subplots in a mercator projection in a tile based manner. For this purpose I want to keep only the x axis for my bottom line of plots. Here's an example of what I mean:...
0
votes
1answer
111 views
Loading lines from csv files into heatmap axes in Python
I am new to python and have a piece of coursework to generate a heatmap from data in a csv file. Across the top are performance indicators of cars, and down the side are names of cars. I have also ...
-2
votes
2answers
287 views
How can I swap the axes on an eCharts bar chart with javascript
I have created an eCharts barchart and I just want to swap the x and y axes
I have tried just swapping the data objects for the axes but that doesn't work and googling hasn't turned up much at all.
...
1
vote
1answer
301 views
How to link axes of all plots in a Bokeh layout?
I am designing a Bokeh layout using the Bokeh server. I am defining two main columns (see attached image), and I am attempting to link the x-axis of all plots on the right column. The problems are ...
1
vote
1answer
90 views
Highcharts: Add a button on the chart to hide or show multiple axes
I have a chart that has 3 y-axes. I have a requirement where the user has the option to show or hide the y-axis on the chart but I need some help getting it to work.
I have added a button on the ...
1
vote
1answer
360 views
Editing axis lines in matplotlib
I want to remove the y axis of my matplotlib plot (maybe via pandas DataFrame.plot() method) so that it is invisible and change the x-axis to be a dotted line. The closest I've seen to this is the ...
1
vote
1answer
101 views
ggplot2: Bars between x-axis ticks
The data I need to visualise contains passenger loads on a train between 4 stations. The data is provided in an ordered fashion, ie. between Station A and V there are 432 passengers on the train, ...
1
vote
1answer
64 views
Inconsistent automatic pandas date labeling
I was wondering how pandas formats the x-axis date exactly. I am using the same script on a bunch of data results, which all have the same pandas df format. However, pandas formats each df date ...
1
vote
1answer
515 views
How to specify axes for a pcolormesh?
So i'm trying to plot a (125 x 1000) grid with specified values. I'm using matplotlib with pcolormesh. This is how my code looks, enzyme array just symbolic.
enzyme = np.array([125 x 1000])
plt....
2
votes
1answer
34 views
Behavior of chaining syntax in axes generation
I'm writing d3.js (d3 v4) code to generate a simple bar chart, which I managed to do, but I am confused about the behavior of the code in generating axes.
So basically, I encapsulated the chart code ...
3
votes
1answer
58 views
Axes not in order on plot
I've been trying to show an area using coordinates.
When I input the coordinates directly into a list, it shows the area.
But, when I use variables, it doesn't.
#plotting a triangle using ...
0
votes
0answers
66 views
Why does Jupyter notebook print text after matplotlib xlabel()? [duplicate]
MWE:
import matplotlib.pyplot as plt
import numpy as np
x = np.random.rand(100)
y = np.random.rand(100)
plt.scatter(x, y)
plt.xlabel('x')
Output:
Why does it display Text(0.5, 0, 'x'), and how ...
0
votes
2answers
128 views
MATLAB degrades image quality
There is an original image test1.jpg. The problem is to show axes in the image and retain image quality.
I am running the following code which is taken from matlab, multiple axes or scales for image ...
0
votes
1answer
28 views
MATLAB - Axes Relabeling trouble— axes not relabeled, but compiles fine
[enter image description here][1][enter image description here][2]I have to rescale my axes. I did the necessary calculations to rescale the axes, and tried using xlim([,]) and axis([])
the code ...
0
votes
0answers
121 views
Python. Matplotlib. How to convert axes of a matrix to coordinates
it is the first time I ask in this portal, so I apologize if I did something wrong.
I have three lists that represent the coordinates x, y, z as follows:
X_grid = [[], [], ..., []]
Y_grid = [[], [],...
0
votes
1answer
28 views
Plot with bar and line and two y axes
I need to plot a bar chart showing counts and a line chart showing the average. This all in one chart with multiple y axes.
Here is an example of the dataframe:
df <- data.frame("YearMonth" = c(...
0
votes
1answer
85 views
D3 Bar Graph: flipping the Y-axis flips my data
I ran into a common problem while making a bar graph in d3: my y-axis was upside down. After some googling, I found out that the best way to fix this is by reversing the y-domain. The only problem is, ...
5
votes
1answer
4k views
How to enable and disable the logarithmic scale as a viewer in Plotly?
I am recently exploring Plotly and I wonder if there is a way for sharing a plot and let the viewer switch between a logarithmic axis and linear axis.
Any suggestion?
0
votes
1answer
533 views
Matplotlib: Mix integer and float ticks
For my pyplot axes, I want to use the following ticks:
ticks = [-5.0, -4, -3, -2, -1, -0.128]
(These strange values are calculated and will change dynamically.)
But there are 2 important details I ...
0
votes
0answers
93 views
Get axes from matrix
I have an animation plot, with 4 sub plots. The plots ax1 and ax2 share the same scale - hence I could plot the ax2 y-axis on the right hand side y-axes of ax1.
ax1.plot(df.pnl.as_matrix(),color='...
0
votes
0answers
28 views
Matplotlib cannot produce a plot with errorbars in a timely manner despite the fact that MWE can do it
I have written a code that shows takes forever to plot an errorbar plot using matplotlib package. However, when I actually make it into a MWE where I have evaluated x, y, xerr and yerr and manually ...
3
votes
2answers
86 views
How to draw means and error bars on axes in ggplot2 R
I'd like to plot the means and error bars on the axes of my qplot in R.
Here I provide an example of what I mean:
As you can see on the axes in yellow are drawn means and error bars. I'd like to have ...
0
votes
2answers
434 views
R Plot age (in years and months) on the x-axis in ggplot2
I am trying to create a graph in ggplot2 with age-in-years-and-months on the x-axis. The age variable should look like this: "2;6" = 2 years and 6 months, "5;9" = 5 years and 9 months. The raw data ...
0
votes
1answer
561 views
Matlab scatter plot set x-axis and y-axis
I have an array with two columns (date, value) to plot
date = [2002 2003 2004 2005 ....] %sometimes 2003 2005 2006 2009 and so on%
value = [918.5345 918.5361 918.5354 ....]
When I plot a scatter ...
2
votes
2answers
778 views
Aligning tick coordinates of top and bottom axis
I would like to build a figure that has on its bottom x-axis one set of ticks and on its top x-axis another set of ticks that is aligned with the bottom ticks. Specifically in my case these are ...
0
votes
1answer
273 views
starting the y-axis at a minimum value, the x-axes at 0, and making them intersect using matplot() in R
In this question it says my current question was answered by this question; however the code suggested doesn't go far enough for me. These charts need to be suitable for scientific publication, so the ...
1
vote
1answer
169 views
Why are the Line2D objects that are supposed to be contained by a matplotlib Axis showing up as empty?
The figure plots just fine, but I can't access the Line2D objects.
Example code below:
import pandas as pd
import numpy as np
from matplotlib import pyplot
df=pd.DataFrame({"col1":np.random.rand(10)...
0
votes
1answer
129 views
plotfile not using correct axes, annotation problem
I came across a weird behaviour when using matplotlibs plotfile function.
I wanted to annotate a plot of a file, text.txt, which contains:
x
0
1
1
2
3
using the following code:
import matplotlib....
0
votes
1answer
232 views
Principal axis form of Inertia tensor with eigen
I want to compute the principal axis form of an inertia tensor that stays consistent with changes of the inertia. Currently eigen outputs the computed eigenvalues(Ia,Ib,Ic) from smallest to largest, ...
0
votes
0answers
30 views
Python pccolor plot with two with two x axis description
The dataset I'm working with are wind velocity observations from a satelite. I have got 2d array of the dimension (192,24) where 24 is the number of vertical range bins: wind_velocity(192,24), ...
6
votes
3answers
2k views
How to add subtext to axes in ggplot2 R
For the main y-axis and x-axis, I have generic titles like "Tank's Ratio" and "Counts". I want a second line of label where I specify the ratio and counts. eg. Just below "Tank's Ratio" I want "# in ...
0
votes
0answers
142 views
Fixing discrepancy between categorical x axis and continuous y axis in ggplot()
I'm having trouble getting ggplot() to show all of the continuous data on my y axis, while simultaneously keeping the correct order of my categorical variable on the x axis. Here is my current code:
...
1
vote
1answer
378 views
relim of matplotlib axes (embedded in pyqt)doesn't work is I previously zoomed in
In the below example, I update a figure with varying signal length. the relim function works find except when I zoom in the figure. If I zoomed in, the relim doesn't reset the correct limit and the ...
0
votes
1answer
93 views
ggplot Axis scaling
Following script is used to plot data on one common x and two distinctly scaled y-axes:
scale <- max(data$one) / max(data$two)
#See https://stackoverflow.com/questions/3099219/plot-with-2-y-axes-...