Stata overlapping variables labels - stata

I downloaded a package on the net:
net install cleanplots, from("https://tdmize.github.io/data/cleanplots")
set scheme cleanplots, perm
graph set window fontface "Arial Narrow"
and it has ruined Stata default visualisation:
graph hbar (count), over(School)
My y labels overlap
My x labels are not under the tick marks
My chosen font isn't working
My font size isn't working.
How do I reset all defaults (especially visualisation setting eg "schemeplot set") and delete all packages?
I deleted Stata, reinstalled it, and it is so wise it kept all my defaults.

Related

Power BI - x axis skips year

The chart has data from 2009 to 2023. The tooltip shows value from 2009 to 2023. But the label in the x-axis shows only the even number years (2010 to 2022).
I do not prefer changing the x axis to categorical as it will show all the data from 2009 to 2023 and it will have a scroll bar.
When I enlarge the visual, it shows 2024, but not 2023. It has data till 2023. The tooltip also shows the data but the axis is not showing the year.
So far I have tried the following:
reducing the font size.
changing the maximum value in x axis.
enlarging the visual.
However, the issue is not solved.
All the options available to you with native visuals have been tried. If you choose continuous, then PBI will decide what labels to show. If you use categorical, then you'll see every label.
If you want finer control over ticks and axis labels, you need to use a non-native visual. I can recommend Deneb which will give you the level of control you seek.
Try to make the font size small and i hope it works.

Default zoom Mapbox when used in Power BI

Does anyone know how to set a default point when zooming out using the MapBox app in Power BI? Currently, when I deselect the location in a slicer connected to the map, it will zoom out to the very middle of the world map. I would like set a custom marker to zoom out to if possible.
At the moment, there is no out of the box feature within the Mapbox visual for Power BI that prevents you from zooming past a certain point, as the default zoom level is set to include all of your data. For instance, if I create a report with a choropleth map of US states, when using the slicer, the map will zoom into the state I select. When I deselect the state, the map will zoom back out to show all of the states.
If you have data spanning multiple regions (or if the data is only visible at higher zoom levels), when you deselect the location in the slicer, the map will zoom out to incorporate all data. While the Mapbox visual is currently available as is, please stay tuned for updates.
MapBox
Viz Settings:
Zoom 0-10 ( preferably 9 )
Lat ( central latitude )
Lot ( central longitude )
I tried it and it worked for me... The map comes with the zoom setting I want initially

Full width bars in Chart.js version 2.7.2

I am using Chart.js version 2.7.2 to create a simple, single series bar chart. I want every bar in the chart to fill all available space such that each bar in the chart "touches" its neighbor(s).
My research has indicated that I should be using the barPercentage and categoryPercentage settings, setting both to 1. I've done this and it makes the bars very wide, but it leaves a single pixel gap between them.
My initial assumption is that this was due to a grid line, but even if I turn off grid lines (gridLines.display: false) it still has the one-pixel gap.
JsFiddle
Here is a screenshot. See the gap between each bar? How do I get rid of that?
You will have to update to 2.8+ version of the library.
There were multiple instances of issues around this on their GitHub (i.e. [BUG] Spacing between vertical bars with percentages set to 1 and [BUG] Small gap between bars even with barPercentage and categoryPercentage set to 1).
There was a PR that made it into their 2.8.0 version that is supposed to fix the issues around this (as noted by #benmccann at the bottom of the PR page).

Power Bi - Change font color of text in Matrix Visual

Is it possible to change font color of text in Matrix Visual based on some condition. I tried conditional formatting in table but it changes the background color of cell.
Thanks
As of the May 2017 Power BI Desktop release, conditionally changing the font color of a cell in a matrix isn't possible. (You can change the font color of all cells, however.)
I don't have any suggestions for working around this, but if you haven't already, I do recommend voting for this idea in the Power BI Ideas Forum: Conditional formatting for the font color, bars in the cell of the tables and all the other advanced options excel is offering (and perhaps adding a comment to clarify what exactly you'd like to see too, since you might only care about the font color part of the idea for example)

Changing tick label colour in mpld3

I am trying to plot stuff using matplotlib and mpld3. This is the code I use to generate my graph:
_fig = plt.figure()
_pl = _fig.add_subplot(111)
_pl.plot(_times, _values)
_pl.set_xlabel("Time")
_pl.set_ylabel("Value")
_pl.tick_params(direction="out", axis="both", colors="white", which="both")
_pl.xaxis.label.set_color("white")
_pl.yaxis.label.set_color("white")
_data = mpld3.fig_to_html(_fig)
.... send to client to be rendered
A graph is created and all the dynamic controls work. "Time" and "Value" labels get printed in white but tick labels in black.
If I skip mpld3 and test it with plt.show(), all tick labels get printed in white. When I check the javascript code generated by mpld3, I do not seem to detect the colour setting there for tick labels.
If I use another parameter, like font size, in tick_params it does have an effect. Only the colour gets ignored, which causes the labels to be printed in black on a dark blue background.
How do I change this?
Edit:
When inspecting the actual page rendered, there seems to be a "fill" property that determines the colour.
div#fig_el249691400950908834083380374260 .mpld3-xaxis text
{font-family:sans-serif; font-size:10px; fill:black; stroke:none; }
I tried overriding this in css but I could not figure out how to do it. This seems to override whatever I set elsewhere. It appears mpld3 sets the colour of the tick label, but how do I modify this?
Hannu
mpld3 only supports a subset of matplotlib's full capabilities, and tick formatting is one of the many things that is not yet supported. There is a partial list of these missing features on the mpld3 wiki.