I am using a line and clustered column chart in Power Bi in which I have a dual y-axis. I need grid lines for the secondary y-axis, i.e. the y-axis with the line value.
In Power Bi, for the primary y-axis we can just turn on the grid lines option to get the grid lines, but there's no option for the secondary y-axis. Is there any R script or any internal Power Bi option to enable this?
I don't really get the question.
PowerBI creates gridlines automatically and they are a different thing than the Y axis labels.
So I think you most likely want, is to turn off primary Y axis labels and keep secondary Y-axis labels on? First, why would you do that? It' going to be confusing for the end users.
Secondly, PowerBI does not support it natively (more specifically, I am not aware of that functionality), but there might be a workaround using different colors:
Set primary Y axis label to white (or same as your background) and secondary Y-axis label to black.
The output might look like this:
There are custom R visuals available, so I suppose you could write some code, but is it really worth it?
Related
I need to plot some potential energy curves. I.e. I need to be able to create graph looking like this:
Using the tutorial I'm able to recreate curves, create the legend etc. What I'm not able to do are the dissociation limits (labels on the right side of the picture in the red rectangle). Is there any way to make such "independent labels" at certain points on y-axis or do I have to create them like many little plots?
The easiest (albeit time-consuming) way is to use the "Window -> Drawing objects..." facilities and draw everything yourself by hand. Labels can be added with the "Text" button. Note that your life can be a made a bit easier by selecting "Position in: World coordinates" instead of "Viewport coordinates" and adding the real x and y value of each label.
is it possible to "mirror" the y axis with R plotly ? I would like to do something similar to this, but with a mirrored y-axis, in order to plot 2 by 2 some data, one replicate one the regular yaxis, and the other on the mirrored axis (that would prevent me to convert a half of my data to negative values).
Also, if possible, I want the bars to be on the same place (one right under the other), not on two distinct sides like showed in the link.
Thanks in advance.
I have an issue very similar to this thread Combining Bar and Line chart (double axis) in ggplot2.
I followed the answer and everything works perfectly well. However, I have very small proportions (secondary axis) so I want to change the limits of the secondary y-axis. Is there a simple way to do that?
I saw older threads where the answer was to merge the two plots. I was wondering if there may be a new more simpler way to address the limit issue.
Thanks!
I'm trying to graph some data in an iTorch notebook. I can generate plots fine, but I want to change the endpoints of the axes. (My autogenerated y-axis is from 20-100, but I'd rather it be from 0-100 since it's a graph of percentages and I want the lower left corner to be the origin.)
I looked in the documentation, and in the list of methods implemented, and in the source code, but didn't find anything that lets me do this. I can zoom the generated graph, but it preserves aspect ratio, so I can't zoom just one of the axes.
Does anyone know how to do this? I'm half convinced this isn't implemented, but it seems like a very strange feature to leave out.
You can change the axis scale by mouse-scrolling over the axis ticks, and translate by drag-and-drop.
I know it's not ideal, but I had the same problem and that's the best I could find so far.
I'm trying to create a dot chart in Stata, splitting it into two categories
Running a chunk of code:
sysuse nlsw88, clear
drop if race == 3
graph dot (mean) wage, over(occ) by(race)
Creates such output:
So far so good but I'd like to remove labels of Y axis from the right graph to give the data some more space.
The only way I've been able to do that was to manually edit graph and hide the axis label object:
Is there a way to do it programmatically? I do know I could use one more over() but in some graphs of mine that is already taken.
I believe the solution is buried in help bystyle and help by_option. However, I can't get it to work with your example (I'm on Stata 12). But the description is clear. For example:
A bystyle determines the overall look of the combined graphs,
including
whether the individual graphs have their own axes and labels or if instead the axes and labels are shared across graphs arrayed in the
same row and/or in the same column;
...
There are options that let you control each of the above attributes --
see [G-3] by_option --
And also
iyaxes and ixaxes (and noiyaxes and noixaxes) specify whether the y axes and x axes are
to be displayed with each graph. The default
with most styles and
schemes is to place y axes on the leftmost graph of each row and to place x axes on
the bottommost graph of each column. The y and
x axes include the
default ticks and labels but exclude the axes titles.
If for some reason that doesn't work out, something like
sysuse nlsw88, clear
drop if race == 3
graph dot (mean) wage, over(occ) by(race)
gr_edit .plotregion1.grpaxis[2].draw_view.setstyle, style(no)
does (but I don't really like the approach). You can mess with at least the axis number [#] to do a bit of customization. I guess recording changes in the graphical editor and then recycling the corresponding code, may be one way out of difficult situations.