How to combine the different y-axes into one y axis in Tableau - data-visualization

in Tableau I would like to figure out how to combine the y-axes for Former smoker, Never smoked, Smoke everyday, and Smoke some days. I want one y axis that ranges from 0.00 to 1. I appreciate any help, thanks.

Not sure your ideal graph output, but instead of plotting each individual measure. Drag the [Measure Values] pill to the y axis and filter for the measures you want. You can then drag [Measure Names] to the color shelf to make a line for each measure.

Related

Add second KPI to Qlik View distribution plot

I am using a distribution plot in qlik sense desktop
Right now I have a
Dimension Point: Column A
Y-axis: column B
x-axis: column C
Right now I am only see the distribution of the x-axis in percentage, how can I add the absolute numbers to it?
how can I add another KPI to it that when I am moving over it with the mouse I also see another number ?

Vega / vega-lite multi-level / hierachy axes

i have seen view composition techniques like facets etc.
however i am struggling to create a plot that features multiple view cells / subplots for different combinations of dimensions/groups as seen in the image for the x axis. it should be possible to not only do this for year-month-day but also for something as "country, year" and then plotting e.g. some continuous x vs. y scatter as subplot within individual cell for specific country & year.
could you provide an example json for auch a plot, so that i can have multiple groups applied for both x & y axis?
please see following vega spec for what I've tried already. I would like to add a graph on top of it, the colored boxes should be the scales.
https://vega.github.io/editor/#/url/vega/N4KABGBEAkDODGALApgWwIaQFxUQFzwAdYsB6UgN2QHN0A6agSz0QFcAjOxge1IRQyUa6SgBY6AK1jcAdpAA04KAHdGAExbYwogAw7FESCkbV8WgMx6DUQujVrGM6lv0glkWCZnoANrC0A2koQwFDeqMhakGC29o7O8lAUvqyROK4QmVDsjmpawJCOhKx4UQBO6E6RiZCoji41GAAeWgCM+lCweMiEbQC+YH3WIWHoEeXcrDJ5Nck+qVoAZr6wyDU50-mFMsWlOJBIyPAA1uzcLQNDwWChkOFpSchleIzwvgpJKQ-LfmvZuVsiiUoocTmcLoMlABdRTuNToPCYHBBLKgLKGe5RPBlZDVa6GOapfzI-GZArqKIAQQ+kFsOJkezAMlYPh8sy+Liu6LJhTy+wAQjS6cgGVSaYSHq0udybryogBhIXoemMyDU9nzB46aXc8l8qAAESVKoV4o5OClw3ReqiAFFjSLVYqNQsLX1STDSZBsZVYItuGVUIFSSEQ5lvQBPQgPDw+l6LCMKMOGY7IRP7ClW7m05WOgDSaaiwtFYZ11uTUDwUZjdJeL1kSZl4cWjGQPn1kAljabNjsDicW081G8PiiMT78UgZezZUmmxwBSHI4mUzy0-RHkYAC8HgFF153vsqM9Xr4wAB+MDGUx4MA4VQaRBTxL74eHx4nt4+C9gB8sO9XsgJhmH0UKlh61zuhAnruAgvjIMSYAomSXqYvs8DcD4AbdlkkbRlEAb9u8WZQBUVSDoc4zoQiNABhGABMOhTpB0KwoYGBlMciHIaG2ZVvh+w4vApQkZAiyzkGC6QPCiJYjikTrpAIoYWoDxojKSkMk8+QVmJjCshR8Egph2E1C2bYdhSUEyuuhisIQMlqbp6ayku76dk8Lxfj+MmsKgdBNDoAHXvgAC0vn+RGTG2eGDGDgeo5Hp5p7fpeEUBa0wVATe4UIn5dARq0z66S0UluYlH5eWeaV5ZFQU4OlgVQDFhhNPR8VvhVHmftVEDpYVAGNUV1nciNmRjdZYHukAA
There are a number of faceting examples in the Vega-Lite gallery.

2 category axis in Column chart in Webi Reports

Is it possible to have 2 category axis(x -axis) values one with bar and other with line and one measure for both? If possible please let me know how to achieve it.
Thanks
Niki
Multiple Y-axis are possible, but you can only have one X-axis per chart. That said, you can have an X-axis with multiple dimensions on it (e.g. City and State).
Each measure will be plotted (aggregated) according to the dimensions added to the X-axis.
You cannot have different visualisations for the same measure on the same chart (e.g. a column and a line for the same measure), unless you have a chart with 2 Y-axis. Whether this would be a good visualisation of your data is a different matter.

How do create a scale for a second axis without unnecessary (or redundant) plotting?

I have a plot in which I have already plotted all my data and a "twined" axis, on which I'd like to use another scale, in this case dates. I also have a list of all the dates corresponding to each element of my data, and want to add an a scale for the dates to the twined axis.
For example, I have
ax2 = ax1.twinx()
and lists x_temporal_data, y_day_offsets, y_dates, all of the same length, and have already plotted the relationship between the first two with
ax1.plot(x_temporal_data, y_day_offsets)
and I just want to have a scale on ax2 for the dates in y_dates, since y_day_offsets and y_dates are "synonyms" for the same time information.
Is there a way to do this without "plotting" something I don't need to display (since all my data is already plotted). For example, I can get the dates to appear perfectly on ax2 with
ax2.plot(len(y_dates)*[some_random_out_of_xrange_value], y_dates)
but that seems like a hack: plotting nothing to "calibrate" the second axis.
Is there a better, more idiomatic way of accomplishing this?
Simply set the scale on the second y-axis to your liking with:
ax2.set_ylim([min(y_dates), max(y_dates)])

Matplotlib:subplots fonts overlap

I want to make 21 subplots using the matplotlib. In some of the plots, fonts of axis are overlapping on the X-axis but X-axis labels are OK. For example, X-axis of one plot has value of (0,10,2) and adjoining plot has value of (0.001,0.010,0.002) so in subplots, 10 (on first X-axis) is overlap with 0.001 (X-axis of adjoining plot). If any one know about it then please reply me.
Many thanks
-Viral
A few things you can try:
Adjust subplots so that there is more wspace and hspace
Adjust xlim/ylim manually to make sure there's no overlap (tricky)
Use tight_layout (see this question)