Questions tagged [yaxis]

360 questions
2
votes
1 answer

Minimize or remove discontinuous axis white spaces or ideally, alter axis scaling - trying to find a solution - R

I have been trying to create a graph that has non-linear (and non-log) based scaling on the axis. Ideally the graph would not be discontinuous. It is hard to explain so I will show it with pictures. My current graph uses a ln transformed scale to…
Dustin
  • 89
  • 8
2
votes
1 answer

Latex in y-axis title in plotly not working

Can you please tell me why fig.update_yaxes(title=dict(text="$\text{This is a test:} \sqrt{2^4}$") does not work in the following code import plotly.express as px fig = px.bar(df, x=["Apples", "Oranges"], y=[10,20], color=["Here", "There"], …
hans
  • 95
  • 7
2
votes
2 answers

How to plot facets with discontinuous y-axis

I am trying to produce a plot with a discontinuous y-axis but can't get the facet titles to only show once: Example Data: data(mpg) library(ggplot2) > ggplot(mpg, aes(displ, cty)) + + geom_point() + + facet_grid(. ~ drv) After much digging…
DMC
  • 53
  • 7
2
votes
2 answers

Flipping image across the y axis

I need to write a code that flips the image across y-axis. This code is working but it turns the image to grayscale. I want it to stay in RGB. Lastly, I am not able to use any functions. (imrotate etc.) subplot(1,2,1); imshow(A); title('original') …
2
votes
1 answer

Free y axis in only some subplots with facet_wrap

I am trying to plot three different subplots within the same graphic using facet_wrap. I know the y axis can be settled "free" or "fixed" with the argument scales of facet_wrap(). However, due to the characteristics of my data, I would like to keep…
Javier
  • 385
  • 1
  • 9
2
votes
0 answers

Dual y-axis on subplots

I would like to create 3 stack subplots with dual y-axis on each subplot. Using the following code gives me a ValueError: too many values to unpack (expected 2). A bit lost on this and would appreciate some help. Thank you! fig, (axes, axes1) =…
filippa225
  • 21
  • 3
2
votes
1 answer

ggplot graph with double y-axis

I'm trying to make a graph with a double y-axis. My data looks like this: year variable value 1 2009 Letselongevallen 4455 2 2010 Letselongevallen 4337 3 2011 Letselongevallen 4710 4 2012 …
2
votes
1 answer

Add boxes with descriptive annotations to y-axis in ggplot2

I"M trying to add another label or description to my Y axis. I attached a picture for reference for what I'm trying to accomplish. I can't find anything that describes how to add additional elements to an axis. It the "Good" and "Bad" boxes…
TER
  • 95
  • 5
2
votes
2 answers

ggplot2 - two or more lines on y axis title

I need two or more lines of text on my y-axis title. However, the title is cut off if I have multiple lines. Anyway I can work around this? ggplot(iris,aes(Sepal.Length, Sepal.Width)) +geom_line()+labs(y=expression(paste("line 1 \nline2")))
Bubs
  • 85
  • 1
  • 1
  • 9
2
votes
1 answer

Is it possible to zoom vertical axis on Flutter Charts?

I am trying to familiarize with charts in Flutter, using github.com/google/charts package. I want to make a chart (bar, line, scatter or any other.. this, for example) where I can zoom and pan not only the x-axis, but also the vertical y-axis…
Karlooie
  • 143
  • 1
  • 6
2
votes
1 answer

How to format Matplotlib secondary y-axis datetime values

I am attempting to plot a line graph superimposed on a bar graph using matplotlib. The data has plotted correctly, however, the secondary y-axis describing the forecasted start time is being output incorrectly. All values for Forecasted Start Time…
2
votes
1 answer

Matplotlib: How to assign correct y-axis scale to data?

I can create this plot: import matplotlib.pyplot as plt x = range(1, 16) zero = [0] * 15 pointfive = [0.5] * 15 fig = plt.figure() ax1 = fig.add_subplot(111) ax1.plot(x, days, 'moccasin') ax1.set_ylabel('days', color='moccasin') ax2 =…
Julian
  • 511
  • 3
  • 9
2
votes
0 answers

Set log plot limits to next lowest/highest decade

I've got a function that creates a log-log plot using Matplotlib. import matplotlib.pyplot as plt plt.loglog(xdata, ydata, label="function label...") # ...more plots plt.set_xlabel("Frequency (Hz)") plt.show() I'd like to have Matplotlib plot one…
Sean
  • 1,080
  • 9
  • 21
2
votes
0 answers

Why matplotlib subplots does not show xtick labels when second y-axis is added?

Why matplotlib subplots does not show x-tick labels when second y-axis is added? It only shows x-tick labels for the last subplot! When I comment ax2=ax.twinx(), it will show x-tick labels, but I need the second y-label as well! n_subplots=2 fig,…
Mohammad
  • 51
  • 4
2
votes
1 answer

How do I change the y axis on facetgrid python to percentage?

Python matplotlib sns facetgrid y axis question Hello! I've been learning about python for data analysis and I'm stuck on something I can't find an answer to. I want to change the y axis on my sns facegrid chart to a percentage. Below is the code…
OverFlowMars
  • 119
  • 13
1 2
3
23 24