Get the App
SLTechnology News&Howtos  ›  Development  › 

How to pass variable name and column name with string in ggplot

Shulou Source: shulou.com Published: 2022-06-01 05:16:31 10月03日 Update

This article mainly explains "how to use string to transfer variable name column name in ggplot". The explanation in the article is simple and clear, easy to learn and understand. Please follow the editor's train of thought to study and learn how to use string to transfer variable name column name in ggplot.

Use get or! Methods:

Ggplot (rates.by.groups, aes (x=name, y=rate, colour= get (column), group=get (column) ggplot (rates.by.groups, aes (x=name, y=rate, colour=! (column), groupkeeper! (column)))

Using aes_string method

F

Tags: Variables names characters strings methods learning content that is ideas situations articles more knowledge knowledge points articles follow questions practice push research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Tech Info Redmi NVidia Docker